Bots, Bureaucrats, Interface administrators, smwadministrator, smwcurator, smweditor, Administrators
2,557
edits
Timo.stripf (talk | contribs) No edit summary |
Timo.stripf (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
local a=" | local a="regex2"; | ||
local b="message"; | local b="message"; | ||
local c=" | local c="category"; | ||
local d=" | local d="regex1"; | ||
local e=" | local e="regex3"; | ||
local f=" | local f="commit"; | ||
local g=" | local g="source"; | ||
local h=" | local h="(?:warning|error|fatal error)\\: "; | ||
local i=" | local i="groups"; | ||
local j=" | local j="maingroup"; | ||
local k=" | local k="tests2"; | ||
local l=" | local l="Semantic Issue"; | ||
local m=" | local m="clang/lib/Parse/ParsePragma.cpp"; | ||
local n=" | local n="CL4"; | ||
local o=" | local o="all"; | ||
local p=" | local p="most"; | ||
local q=" | local q="ignored-pragmas"; | ||
local r | local r="clang/lib/Sema/SemaChecking.cpp"; | ||
local s=""; | |||
local | local t="pragmas"; | ||
local | local u="clang/lib/Sema/SemaExpr.cpp"; | ||
local | local v="Parse Issue"; | ||
local | local w="clang/lib/Sema/SemaDeclAttr.cpp"; | ||
local | local x="Lexical or Preprocessor Issue"; | ||
local | local y="clang/lib/Sema/AnalysisBasedWarnings.cpp"; | ||
local | local z=" \\[(?:\\-Werror,)?\\-Wignored\\-pragmas[^\\]]*\\]"; | ||
local A="ignored-attributes"; | |||
local | local B="clang/lib/Sema/SemaDecl.cpp"; | ||
local C="clang/lib/Lex/Pragma.cpp"; | |||
local | local D="openmp-clauses"; | ||
local E="odr"; | |||
local | local F="clang/lib/Parse/ParseOpenMP.cpp"; | ||
local G="unknown-pragmas"; | |||
local H="clang/lib/Sema/ | local H="format"; | ||
local | local I="clang/lib/Sema/SemaDeclObjC.cpp"; | ||
local J="openmp"; | |||
local K=" | local K="(?: \\[(?:\\-Werror)?[^\\]]*\\])?"; | ||
local L=" | local L="clang/lib/Sema/SemaType.cpp"; | ||
local M=" | local M="clang/lib/Sema/SemaStmt.cpp"; | ||
local N=" | local N="clang/lib/Sema/SemaObjCProperty.cpp"; | ||
local O="attributes"; | |||
local | local P="Unused Entity Issue"; | ||
local | local Q="unused"; | ||
local | local R=" \\[(?:\\-Werror,)?\\-Wignored\\-attributes[^\\]]*\\]"; | ||
local | local S="clang/lib/Sema/Sema.cpp"; | ||
local | local T="clang/lib/Sema/SemaDeclCXX.cpp"; | ||
local | local U="clang/lib/Sema/SemaExprObjC.cpp"; | ||
local | local V="The basic representation of diagnostics information in tablegen format, plus (uncommented and incomp..."; | ||
local | local W="b1c4d5507fad"; | ||
local X="The basic representation of diagnostics information in tablegen format, plus (uncommented and incomplete) test conversions of the existing def files to this format.\n\nllvm-svn: 66064"; | |||
local | local Y="unused-value"; | ||
local Z=" \\[(?:\\-Werror,)?\\-Wopenmp\\-clauses[^\\]]*\\]"; | |||
local | local ab="Format String Issue"; | ||
local | local bb=" \\[(?:\\-Werror,)?\\-Wodr[^\\]]*\\]"; | ||
local | local cb="clang/lib/AST/ASTStructuralEquivalence.cpp"; | ||
local | local db="60768cd89672"; | ||
local eb="[ASTImporter] Make ODR error handling configurable\n\nSummary:\nODR errors are not necessarily true err..."; | |||
local | local fb="[ASTImporter] Make ODR error handling configurable\n\nSummary:\nODR errors are not necessarily true errors during the import of ASTs.\nASTMerge and CrossTU should use the warning equivalent of every CTU error,\nwhile Sema should emit errors as before.\n\nReviewers: martong, a_sidorin, shafik, a.sidorin\n\nReviewed By: a_sidorin\n\nSubscribers: rnkovacs, dkrupp, Szelethus, jdoerfert, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D58897\n\nPatch by Endre Fulop!\n\nllvm-svn: 357394"; | ||
local gb="clang/lib/Sema/SemaAttr.cpp"; | |||
local | local hb=" \\[(?:\\-Werror,)?\\-Wunknown\\-pragmas[^\\]]*\\]"; | ||
local | local ib="clang/lib/Sema/SemaOpenMP.cpp"; | ||
local jb="source-uses-openmp"; | |||
local | local kb="thread-safety"; | ||
local | local lb="95f50964fbf5"; | ||
local | local mb="Implement P2361 Unevaluated string literals\n\nThis patch proposes to handle in an uniform fashion\nthe..."; | ||
local | local nb="Implement P2361 Unevaluated string literals\n\nThis patch proposes to handle in an uniform fashion\nthe parsing of strings that are never evaluated,\nin asm statement, static assert, attrributes, extern,\netc.\n\nUnevaluated strings are UTF-8 internally and so currently\nbehave as narrow strings, but these things will diverge with\nD93031.\n\nThe big question both for this patch and the P2361 paper\nis whether we risk breaking code by disallowing\nencoding prefixes in this context.\nI hope this patch may allow to gather some data on that.\n\nFuture work:\nImprove the rendering of unicode characters, line break\nand so forth in static-assert messages\n\nReviewed By: aaron.ballman, shafik\n\nDifferential Revision: https://reviews.llvm.org/D105759"; | ||
local | local ob=" \\[(?:\\-Werror,)?\\-Wformat[^\\]]*\\]"; | ||
local pb="OpenMP Issue"; | |||
local qb="clang/lib/AST/ASTImporter.cpp"; | |||
local rb="thread-safety-analysis"; | |||
local sb="clang/lib/Sema/SemaInit.cpp"; | |||
local | local tb="uninitialized"; | ||
local ub="clang/test/Preprocessor/pragma_microsoft.c"; | |||
local | local vb="thread-safety-attributes"; | ||
local | local wb="deprecated"; | ||
local xb="Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"; | |||
local yb="consumed"; | |||
local | local zb="objc-designated-initializers"; | ||
local | local Ab="conversion"; | ||
local | local Bb="[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"; | ||
local | local Cb="[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost comple..."; | ||
local | local Db="1228d42ddab8"; | ||
local | local Eb="clang/lib/Sema/SemaCast.cpp"; | ||
local Fb="clang/test/OpenMP/declare_variant_messages.c"; | |||
local | local Gb="unicode"; | ||
local | local Hb="(?:error|warning|fatal error)\\: "; | ||
local | local Ib="clang/lib/Lex/Lexer.cpp"; | ||
local Jb="Nullability Issue"; | |||
local Kb="Implement \'#pragma unused\'.\n\nllvm-svn: 67569"; | |||
local Lb="property-attribute-mismatch"; | |||
local Mb="[clang] Implement objc_non_runtime_protocol to remove protocol metadata\n\nSummary:\nMotivated by the n..."; | |||
local Nb="[clang] Implement objc_non_runtime_protocol to remove protocol metadata\n\nSummary:\nMotivated by the new objc_direct attribute, this change adds a new\nattribute that remotes metadata from Protocols that the programmer knows\nisn\'t going to be used at runtime. We simply have the frontend skip\ngenerating any protocol metadata entries (e.g. OBJC_CLASS_NAME,\n_OBJC_$_PROTOCOL_INSTANCE_METHDOS, _OBJC_PROTOCOL, etc) for a protocol\nmarked with `__attribute__((objc_non_runtime_protocol))`.\n\nThere are a few APIs used to retrieve a protocol at runtime.\n`@protocol(SomeProtocol)` will now error out of the requested protocol\nis marked with attribute. `objc_getProtocol` will return `NULL` which\nis consistent with the behavior of a non-existing protocol.\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D75574"; | |||
local Ob="14f6bfcb52e7"; | |||
local Pb="non-gcc"; | |||
local Qb=" \\[(?:\\-Werror,)?\\-Wsource\\-uses\\-openmp[^\\]]*\\]"; | |||
local Rb="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 Sb="clang/lib/Sema/SemaExprCXX.cpp"; | |||
local Tb="Deprecations"; | |||
local Ub="Reland [clang] Check unsupported types in expressions\n\nThis was committed as ec6c847179fd, but then ..."; | |||
local Vb="extra"; | |||
local Wb="Value Conversion Issue"; | |||
local Xb="3dbcea8b957a"; | local Xb="3dbcea8b957a"; | ||
local Yb=" | local Yb="function-multiversion"; | ||
local Zb=" | local Zb="clang/lib/AST/RecordLayoutBuilder.cpp"; | ||
local ac=" | local ac="clang/lib/Lex/PPExpressions.cpp"; | ||
local bc="[ | local bc=" \\[(?:\\-Werror,)?\\-Wunused\\-value[^\\]]*\\]"; | ||
local cc=" | local cc="clang/test/Sema/format-strings.c"; | ||
local dc="[ | local dc=" \\[(?:\\-Werror,)?\\-Wthread\\-safety\\-analysis[^\\]]*\\]"; | ||
local ec=" | local ec="tautological-compare"; | ||
local fc=" | local fc="[WebAssembly] Improve clang diagnostics for wasm attributes\n\nThis patch addresses the review comment..."; | ||
local gc=" | local gc="931fcd3ba011"; | ||
local hc=" | local hc="[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 ic="dangling"; | |||
local jc=" \\[(?:\\-Werror,)?\\-Wconsumed[^\\]]*\\]"; | |||
local kc="[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a na..."; | |||
local | local lc="non-pod-varargs"; | ||
local | local mc="branch-protection"; | ||
local | local nc="padded"; | ||
local | local oc="c3b18967ed07"; | ||
local | local pc="[MS-ABI] Add support for #pragma section and related pragmas\nThis patch adds support for the msvc pr..."; | ||
local | local qc="unknown-warning-option"; | ||
local | local rc="[MS-ABI] Add support for #pragma section and related pragmas\nThis patch adds support for the msvc pragmas section, bss_seg, code_seg, \nconst_seg and data_seg as well as support for __declspec(allocate()).\n\nAdditionally it corrects semantics and adds diagnostics for \n__attribute__((section())) and the interaction between the attribute \nand the msvc pragmas and declspec. In general conflicts should now be \nwell diganosed within and among these features.\n\nIn supporting the pragmas new machinery for uniform lexing for \nmsvc pragmas was introduced. The new machinery always lexes the \nentire pragma and stores it on an annotation token. The parser \nis responsible for parsing the pragma when the handling the \nannotation token.\n\nThere is a known outstanding bug in this implementation in C mode. \nBecause these attributes and pragmas apply _only_ to definitions, we \nprocess them at the time we detect a definition. Due to tentative \ndefinitions in C, we end up processing the definition late. This means \nthat in C mode, everything that ends up in a BSS section will end up in \nthe _last_ BSS section rather than the one that was live at the time of \ntentative definition, even if that turns out to be the point of actual \ndefinition. This issue is not known to impact anything as of yet \nbecause we are not aware of a clear use or use case for #pragma bss_seg \nbut should be fixed at some point.\n\nDifferential Revision=http://reviews.llvm.org/D3065#inline-16241 \n\nllvm-svn: 205810"; | ||
local | local sc="varargs"; | ||
local | local tc="7c11da0cfd33"; | ||
local uc="clang/test/Sema/pragma-section.c"; | |||
local | local vc="5a8987ca5113"; | ||
local | local wc=" \\[(?:\\-Werror,)?\\-Wthread\\-safety\\-attributes[^\\]]*\\]"; | ||
local | local xc="unreachable-code-aggressive"; | ||
local yc="parentheses"; | |||
local | local zc="[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a name of your choice (say\n`foo`), but have clang treat it as if it were a builtin function (say\n`__builtin_foo`), by writing\n\n static __inline__ __attribute__((__clang_arm_mve_alias(__builtin_foo)))\n int foo(args);\n\nI\'m intending to use this for the ACLE intrinsics for MVE, which have\nto be polymorphic on their argument types and also need to be\nimplemented by builtins. To avoid having to implement the polymorphism\nwith several layers of nested _Generic and make error reporting\nhideous, I want to make all the user-facing intrinsics correspond\ndirectly to clang builtins, so that after clang resolves\n__attribute__((overloadable)) polymorphism it\'s already holding the\nright BuiltinID for the intrinsic it selected.\n\nHowever, this commit itself just introduces the new attribute, and\ndoesn\'t use it for anything.\n\nTo avoid unanticipated side effects if this attribute is used to make\naliases to other builtins, there\'s a restriction mechanism: only\n(BuiltinID, alias) pairs that are approved by the function\nArmMveAliasValid() will be permitted. At present, that function\ndoesn\'t permit anything, because the Tablegen that will generate its\nlist of valid pairs isn\'t yet implemented. So the only test of this\nfacility is one that checks that an unapproved builtin _can\'t_ be\naliased.\n\nReviewers: dmgreen, miyuki, ostannard\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D67159"; | ||
local | local Ac="documentation"; | ||
local Bc="type-safety"; | |||
local | local Cc=" \\[(?:\\-Werror,)?\\-Wobjc\\-designated\\-initializers[^\\]]*\\]"; | ||
local Dc="[SYCL] Add sycl_kernel attribute for accelerated code outlining\n\nSYCL is single source offload progr..."; | |||
local | local Ec="[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>"; | ||
local | local Fc="return-stack-address"; | ||
local Gc="strncat-size"; | |||
local Hc="clang/lib/Lex/Preprocessor.cpp"; | |||
local Ic="pointer-to-int-cast"; | |||
local Jc="c094e7dc4b3f"; | |||
local Kc="clang/lib/Lex/PPDirectives.cpp"; | |||
local Lc="absolute-value"; | |||
local | local Mc="clang/lib/Sema/SemaAvailability.cpp"; | ||
local | local Nc="clang/test/SemaObjC/attr-designated-init.m"; | ||
local Oc="[Sema] Combine similar diagnostics using %select. NFC\n\nllvm-svn: 253315"; | |||
local | local Pc="xor-used-as-pow"; | ||
local Qc="ignored-qualifiers"; | |||
local Rc="clang/lib/Sema/SemaTemplate.cpp"; | |||
local | local Sc="unreachable-code"; | ||
local Tc="clang/test/SemaCXX/warn-consumed-analysis.cpp"; | |||
local | local Uc="clang/test/Sema/cast.c"; | ||
local | local Vc="pragma-pack"; | ||
local | local Wc="class-varargs"; | ||
local Xc="reserved-identifier"; | |||
local | local Yc=" \\[(?:\\-Werror,)?\\-Wuninitialized[^\\]]*\\]"; | ||
local | local Zc="tautological-constant-in-range-compare"; | ||
local | local ad="cb08f4aa4467"; | ||
local | local bd="Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/cla..."; | ||
local | local cd="Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/classes (the\ntype information may be lost through a function pointer, a declaration\nor use of the underlying type without using the typedef, etc) but I\nthink there\'s still value in being able to attribute a typedef and have\nall return types written with that typedef pick up the\nwarn_unused_result behavior.\n\nSpecifically I\'d like to be able to annotate LLVMErrorRef (a wrapper for\nllvm::Error used in the C API - the underlying type is a raw pointer, so\nit can\'t be attributed itself) to reduce the chance of unhandled errors.\n\nDifferential Revision: https://reviews.llvm.org/D102122"; | ||
local | local dd="openmp-target"; | ||
local ed="clang/lib/Frontend/CompilerInstance.cpp"; | |||
local | local fd=" \\[(?:\\-Werror,)?\\-Wunicode[^\\]]*\\]"; | ||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
return { | return { | ||
["warn_module_config_mismatch"]={ | ["warn_module_config_mismatch"]={ | ||
[ | [i]={"module-file-config-mismatch"}, | ||
[j]="module-file-config-mismatch", | |||
[ | |||
[b]="module file %0 cannot be loaded due to a configuration mismatch with the current compilation", | [b]="module file %0 cannot be loaded due to a configuration mismatch with the current compilation", | ||
[ | [d]=Hb, | ||
[ | [a]="module file (.*?) cannot be loaded due to a configuration mismatch with the current compilation", | ||
[ | [e]=" \\[[^\\]]*\\-Wmodule\\-file\\-config\\-mismatch[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"95dc57a611ad",1445037619,"[modules] Allow the error when explicitly loading an incompatible module file\nvia -fmodule-file= to ...","[modules] Allow the error when explicitly loading an incompatible module file\nvia -fmodule-file= to be turned off; in that case, just include the relevant\nfiles textually. This allows module files to be unconditionally passed to all\ncompile actions via CXXFLAGS, and to be ignored for rules that specify custom\nincompatible flags.\n\nllvm-svn: 250577"}, | ||
[ | [g]={{ed,1729,"bool CompilerInstance::loadModuleFile(StringRef FileName) {\n // ...\n bool ConfigMismatchIsRecoverable = getDiagnostics().getDiagnosticLevel(diag::warn_module_config_mismatch, SourceLocation()) <= DiagnosticsEngine::Warning;"},{ed,1750,"bool CompilerInstance::loadModuleFile(StringRef FileName) {\n // ...\n case ASTReader::ConfigurationMismatch:\n // ...\n getDiagnostics().Report(SourceLocation(), diag::warn_module_config_mismatch) << FileName;"},{ed,1895,"ModuleLoadResult CompilerInstance::findOrCompileModuleAndReadAST(StringRef ModuleName, SourceLocation ImportLoc, SourceLocation ModuleNameLoc, bool IsInclusionDirective) {\n // ...\n case ASTReader::ConfigurationMismatch:\n if (Source == MS_PrebuiltModulePath)\n // ...\n getDiagnostics().Report(SourceLocation(), diag::warn_module_config_mismatch) << ModuleFilename;"}}, | ||
[ | [k]={ | ||
["clang/test/Modules/prebuilt-implicit-modules.m"]={"error: module file /var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/build/tools/clang/test/Modules/Output/prebuilt-implicit-modules.m.tmp/module_a.pcm cannot be loaded due to a configuration mismatch with the current compilation [-Wmodule-file-config-mismatch]"} | ["clang/test/Modules/prebuilt-implicit-modules.m"]={"error: module file /var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/build/tools/clang/test/Modules/Output/prebuilt-implicit-modules.m.tmp/module_a.pcm cannot be loaded due to a configuration mismatch with the current compilation [-Wmodule-file-config-mismatch]"} | ||
} | } | ||
}, | }, | ||
["warn_module_conflict"]={ | ["warn_module_conflict"]={ | ||
[ | [i]={"module-conflict"}, | ||
[j]="module-conflict", | |||
[ | |||
[b]="module \'%0\' conflicts with already-imported module \'%1\': %2", | [b]="module \'%0\' conflicts with already-imported module \'%1\': %2", | ||
[ | [d]=h, | ||
[ | [a]="module \'(.*?)\' conflicts with already\\-imported module \'(.*?)\'\\: (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wmodule\\-conflict[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"fb9126578ec3",1363813835,"<rdar://problem/12368093> Extend module maps with a \'conflict\' declaration, and warn when a newly-im...","<rdar://problem/12368093> Extend module maps with a \'conflict\' declaration, and warn when a newly-imported module conflicts with an already-imported module.\n\nllvm-svn: 177577"}, | ||
[ | [g]={{Hc,1348,"void Preprocessor::makeModuleVisible(Module *M, SourceLocation Loc) {\n CurSubmoduleState->VisibleModules.setVisible(\n // ...\n [&](ArrayRef<Module *> Path, Module *Conflict, StringRef Message) {\n // ...\n Diag(ModuleImportLoc, diag::warn_module_conflict) << Path[0]->getFullModuleName() << Conflict->getFullModuleName() << Message;"}}, | ||
[ | [k]={ | ||
["clang/test/Modules/conflicts.m"]={"clang/test/Modules/conflicts.m:6:2: warning: module \'Conflicts.A\' conflicts with already-imported module \'Conflicts.B\': we just don\'t like B [-Wmodule-conflict]"} | ["clang/test/Modules/conflicts.m"]={"clang/test/Modules/conflicts.m:6:2: warning: module \'Conflicts.A\' conflicts with already-imported module \'Conflicts.B\': we just don\'t like B [-Wmodule-conflict]"} | ||
} | } | ||
}, | }, | ||
["warn_module_system_bit_conflict"]={ | ["warn_module_system_bit_conflict"]={ | ||
[ | [i]={"module-conflict"}, | ||
[j]="module-conflict", | |||
[ | |||
[b]="module file \'%0\' was validated as a system module and is now being imported as a non-system module; any difference in diagnostic options will be ignored", | [b]="module file \'%0\' was validated as a system module and is now being imported as a non-system module; any difference in diagnostic options will be ignored", | ||
[ | [d]=h, | ||
[ | [a]="module file \'(.*?)\' was validated as a system module and is now being imported as a non\\-system module; any difference in diagnostic options will be ignored", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wmodule\\-conflict[^\\]]*\\]", | ||
[ | [c]="AST Deserialization Issue", | ||
[ | [f]={"079c40e8860c",1489791313,"Modules: Cache PCMs in memory and avoid a use-after-free\n\nClang\'s internal build system for implicit...","Modules: Cache PCMs in memory and avoid a use-after-free\n\nClang\'s internal build system for implicit modules uses lock files to\nensure that after a process writes a PCM it will read the same one back\nin (without contention from other -cc1 commands). Since PCMs are read\nfrom disk repeatedly while invalidating, building, and importing, the\nlock is not released quickly. Furthermore, the LockFileManager is not\nrobust in every environment. Other -cc1 commands can stall until\ntimeout (after about eight minutes).\n\nThis commit changes the lock file from being necessary for correctness\nto a (possibly dubious) performance hack. The remaining benefit is to\nreduce duplicate work in competing -cc1 commands which depend on the\nsame module. Follow-up commits will change the internal build system to\ncontinue after a timeout, and reduce the timeout. Perhaps we should\nreconsider blocking at all.\n\nThis also fixes a use-after-free, when one part of a compilation\nvalidates a PCM and starts using it, and another tries to swap out the\nPCM for something new.\n\nThe PCMCache is a new type called MemoryBufferCache, which saves memory\nbuffers based on their filename. Its ownership is shared by the\nCompilerInstance and ModuleManager.\n\n - The ModuleManager stores PCMs there that it loads from disk, never\n touching the disk if the cache is hot.\n\n - When modules fail to validate, they\'re removed from the cache.\n\n - When a CompilerInstance is spawned to build a new module, each\n already-loaded PCM is assumed to be valid, and is frozen to avoid\n the use-after-free.\n\n - Any newly-built module is written directly to the cache to avoid the\n round-trip to the filesystem, making lock files unnecessary for\n correctness.\n\nOriginal patch by Manman Ren; most testcases by Adrian Prantl!\n\nllvm-svn: 298165"}, | ||
[ | [g]={{"clang/lib/Serialization/ASTReader.cpp",4773,"ASTReader::ASTReadResult ASTReader::readUnhashedControlBlock(ModuleFile &F, bool WasImportedBy, unsigned ClientLoadCapabilities) {\n // ...\n if (Result == OutOfDate && F.Kind == MK_ImplicitModule) {\n // If this module has already been finalized in the ModuleCache, we\'re stuck\n // with it; we can only load a single version of each module.\n //\n // This can happen when a module is imported in two contexts: in one, as a\n // user module; in another, as a system module (due to an import from\n // another module marked with the [system] flag). It usually indicates a\n // bug in the module map: this module should also be marked with [system].\n //\n // If -Wno-system-headers (the default), and the first import is as a\n // system module, then validation will fail during the as-user import,\n // since -Werror flags won\'t have been validated. However, it\'s reasonable\n // to treat this consistently as a system module.\n //\n // If -Wsystem-headers, the PCM on disk was built with\n // -Wno-system-headers, and the first import is as a user module, then\n // validation will fail during the as-system import since the PCM on disk\n // doesn\'t guarantee that -Werror was respected. However, the -Werror\n // flags were checked during the initial as-user import.\n if (getModuleManager().getModuleCache().isPCMFinal(F.FileName)) {\n Diag(diag::warn_module_system_bit_conflict) << F.FileName;"}} | ||
}, | }, | ||
["warn_module_uses_date_time"]={ | ["warn_module_uses_date_time"]={ | ||
[ | [i]={"pch-date-time"}, | ||
[j]="pch-date-time", | |||
[ | |||
[b]="%select{precompiled header|module}0 uses __DATE__ or __TIME__", | [b]="%select{precompiled header|module}0 uses __DATE__ or __TIME__", | ||
[ | [d]=h, | ||
[ | [a]="(?:precompiled header|module) uses __DATE__ or __TIME__", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpch\\-date\\-time[^\\]]*\\]", | ||
[ | [c]="AST Serialization Issue", | ||
[ | [f]={"b5aaf5a57a46",1441074958,"Don\'t use fprintf to emit this diagnostic!\n\nllvm-svn: 246526","Don\'t use fprintf to emit this diagnostic!\n\nllvm-svn: 246526"}, | ||
[ | [g]={{"clang/lib/Serialization/ASTWriter.cpp",2336,"/// Writes the block containing the serialized form of the\n/// preprocessor.\nvoid ASTWriter::WritePreprocessor(const Preprocessor &PP, bool IsModule) {\n // ...\n // If the AST file contains __DATE__ or __TIME__ emit a warning about this.\n // FIXME: Include a location for the use, and say which one was used.\n if (PP.SawDateOrTime())\n PP.Diag(SourceLocation(), diag::warn_module_uses_date_time) << IsModule;"}}, | ||
[ | [k]={ | ||
["clang/test/PCH/datetime.c"]={"warning: precompiled header uses __DATE__ or __TIME__ [-Wpch-date-time]"} | ["clang/test/PCH/datetime.c"]={"warning: precompiled header uses __DATE__ or __TIME__ [-Wpch-date-time]"} | ||
} | } | ||
}, | }, | ||
["warn_mt_message"]={ | ["warn_mt_message"]={ | ||
[b]="[rewriter] %0", | [b]="[rewriter] %0", | ||
[ | [d]=h, | ||
[ | [a]="\\[rewriter\\] (.*?)", | ||
[ | [e]=K, | ||
[ | [c]=s, | ||
[ | [f]={"42aa21222d37",1390712852,"ARCMigrate: Introduce proper diagnostics for TransformActions\n\nThis starts to switch ARCMT to use pr...","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]={{"clang/lib/ARCMigrate/TransformActions.cpp",695,"void TransformActions::reportWarning(StringRef message, SourceLocation loc, SourceRange range) { report(loc, diag::warn_mt_message, range) << message; }"},{"clang/unittests/Basic/DiagnosticTest.cpp",49,"// Check that DiagnosticErrorTrap works with SuppressAllDiagnostics.\nTEST(DiagnosticTest, suppressAndTrap) {\n // ...\n {\n // ...\n Diags.Report(diag::warn_mt_message) << \"warning\";"},{"clang/unittests/Basic/DiagnosticTest.cpp",74,"// Check that FatalsAsError works as intended\nTEST(DiagnosticTest, fatalsAsError) {\n for (unsigned FatalsAsError = 0; FatalsAsError != 2; ++FatalsAsError) {\n // ...\n Diags.Report(diag::warn_mt_message) << \"warning\";"}} | ||
}, | }, | ||
["warn_multichar_character_literal"]={ | ["warn_multichar_character_literal"]={ | ||
[ | [i]={n,o,p,"multichar"}, | ||
[j]="multichar", | |||
[ | |||
[b]="multi-character character constant", | [b]="multi-character character constant", | ||
[ | [d]=h, | ||
[ | [a]="multi\\-character character constant", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wmultichar[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"8fa45e1fd527",1601988326,"Convert diagnostics about multi-character literals from extension to warning\n\nThis addresses PR46797...","Convert diagnostics about multi-character literals from extension to warning\n\nThis addresses PR46797."}, | ||
[ | [g]={{"clang/lib/Lex/LiteralSupport.cpp",1798,"/// \\verbatim\n/// user-defined-character-literal: [C++11 lex.ext]\n/// character-literal ud-suffix\n/// ud-suffix:\n/// identifier\n/// character-literal: [C++11 lex.ccon]\n/// \' c-char-sequence \'\n/// u\' c-char-sequence \'\n/// U\' c-char-sequence \'\n/// L\' c-char-sequence \'\n/// u8\' c-char-sequence \' [C++1z lex.ccon]\n/// c-char-sequence:\n/// c-char\n/// c-char-sequence c-char\n/// c-char:\n/// any member of the source character set except the single-quote \',\n/// backslash \\, or new-line character\n/// escape-sequence\n/// universal-character-name\n/// escape-sequence:\n/// simple-escape-sequence\n/// octal-escape-sequence\n/// hexadecimal-escape-sequence\n/// simple-escape-sequence:\n/// one of \\\' \\\" \\? \\\\ \\a \\b \\f \\n \\r \\t \\v\n/// octal-escape-sequence:\n/// \\ octal-digit\n/// \\ octal-digit octal-digit\n/// \\ octal-digit octal-digit octal-digit\n/// hexadecimal-escape-sequence:\n/// \\x hexadecimal-digit\n/// hexadecimal-escape-sequence hexadecimal-digit\n/// universal-character-name: [C++11 lex.charset]\n/// \\u hex-quad\n/// \\U hex-quad hex-quad\n/// hex-quad:\n/// hex-digit hex-digit hex-digit hex-digit\n/// \\endverbatim\n///\nCharLiteralParser::CharLiteralParser(const char *begin, const char *end, SourceLocation Loc, Preprocessor &PP, tok::TokenKind kind) {\n // ...\n if (NumCharsSoFar > 1) {\n if (isOrdinary() && NumCharsSoFar == 4)\n // ...\n else if (isOrdinary())\n PP.Diag(Loc, diag::warn_multichar_character_literal);"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/if_warning.c"]={"clang/test/Preprocessor/if_warning.c:32:5: warning: multi-character character constant [-Wmultichar]"} | ["clang/test/Preprocessor/if_warning.c"]={"clang/test/Preprocessor/if_warning.c:32:5: warning: multi-character character constant [-Wmultichar]"} | ||
} | } | ||
}, | }, | ||
["warn_multiple_method_decl"]={ | ["warn_multiple_method_decl"]={ | ||
[ | [i]={"objc-multiple-method-names"}, | ||
[j]="objc-multiple-method-names", | |||
[ | |||
[b]="multiple methods named %0 found", | [b]="multiple methods named %0 found", | ||
[ | [d]=h, | ||
[ | [a]="multiple methods named (.*?) found", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-multiple\\-method\\-names[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{I,3639,"void Sema::DiagnoseMultipleMethodInGlobalPool(SmallVectorImpl<ObjCMethodDecl *> &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass) {\n // ...\n if (issueDiagnostic) {\n if (issueError)\n // ...\n else if (strictSelectorMatch)\n // ...\n else\n Diag(R.getBegin(), diag::warn_multiple_method_decl) << Sel << R;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/selector-overload.m"]={"clang/test/SemaObjC/selector-overload.m:47:3: warning: multiple methods named \'method:\' found [-Wobjc-multiple-method-names]"} | ["clang/test/SemaObjC/selector-overload.m"]={"clang/test/SemaObjC/selector-overload.m:47:3: warning: multiple methods named \'method:\' found [-Wobjc-multiple-method-names]"} | ||
} | } | ||
}, | }, | ||
["warn_multiple_selectors"]={ | ["warn_multiple_selectors"]={ | ||
[ | [i]={"selector","selector-type-mismatch"}, | ||
[j]="selector-type-mismatch", | |||
[ | |||
[b]="several methods with selector %0 of mismatched types are found for the @selector expression", | [b]="several methods with selector %0 of mismatched types are found for the @selector expression", | ||
[ | [d]=h, | ||
[ | [a]="several methods with selector (.*?) of mismatched types are found for the @selector expression", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wselector\\-type\\-mismatch[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"01d96986d843",1480719628,"More diagnostic name fixups: w_ -> warn_, warning_ -> warn_, not_ -> note_.\nIn passing, add a warnin...","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]={{U,1192,"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(AtLoc, diag::warn_multiple_selectors) << Method->getSelector() << FixItHint::CreateInsertion(LParenLoc, \"(\") << FixItHint::CreateInsertion(RParenLoc, \")\");"},{U,1211,"static void DiagnoseMismatchedSelectors(Sema &S, SourceLocation AtLoc, ObjCMethodDecl *Method, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors) {\n if (!WarnMultipleSelectors || S.Diags.isIgnored(diag::warn_multiple_selectors, SourceLocation()))"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/method-direct.m"]={"clang/test/SemaObjC/method-direct.m:168:10: warning: several methods with selector \'directMismatch2\' of mismatched types are found for the @selector expression [-Wselector-type-mismatch]"} | ["clang/test/SemaObjC/method-direct.m"]={"clang/test/SemaObjC/method-direct.m:168:10: warning: several methods with selector \'directMismatch2\' of mismatched types are found for the @selector expression [-Wselector-type-mismatch]"} | ||
} | } | ||
}, | }, | ||
["warn_multiversion_duplicate_entries"]={ | ["warn_multiversion_duplicate_entries"]={ | ||
[ | [i]={Yb}, | ||
[j]=Yb, | |||
[ | |||
[b]="CPU list contains duplicate entries; attribute ignored", | [b]="CPU list contains duplicate entries; attribute ignored", | ||
[ | [d]=h, | ||
[ | [a]="CPU list contains duplicate entries; attribute ignored", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wfunction\\-multiversion[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"3efe00206f0f",1532096008,"Implement cpu_dispatch/cpu_specific Multiversioning\n\nAs documented here: https://software.intel.com/...","Implement cpu_dispatch/cpu_specific Multiversioning\n\nAs documented here: https://software.intel.com/en-us/node/682969 and\nhttps://software.intel.com/en-us/node/523346. cpu_dispatch multiversioning\nis an ICC feature that provides for function multiversioning.\n\nThis feature is implemented with two attributes: First, cpu_specific,\nwhich specifies the individual function versions. Second, cpu_dispatch,\nwhich specifies the location of the resolver function and the list of\nresolvable functions.\n\nThis is valuable since it provides a mechanism where the resolver\'s TU\ncan be specified in one location, and the individual implementions\neach in their own translation units.\n\nThe goal of this patch is to be source-compatible with ICC, so this\nimplementation diverges from the ICC implementation in a few ways:\n1- Linux x86/64 only: This implementation uses ifuncs in order to\nproperly dispatch functions. This is is a valuable performance benefit\nover the ICC implementation. A future patch will be provided to enable\nthis feature on Windows, but it will obviously more closely fit ICC\'s\nimplementation.\n2- CPU Identification functions: ICC uses a set of custom functions to identify\nthe feature list of the host processor. This patch uses the cpu_supports\nfunctionality in order to better align with \'target\' multiversioning.\n1- cpu_dispatch function def/decl: ICC\'s cpu_dispatch requires that the function\nmarked cpu_dispatch be an empty definition. This patch supports that as well,\nhowever declarations are also permitted, since the linker will solve the\nissue of multiple emissions.\n\nDifferential Revision: https://reviews.llvm.org/D47474\n\nllvm-svn: 337552"}, | ||
[ | [g]={{w,2119,"static void handleCPUSpecificAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n for (unsigned ArgNo = 0; ArgNo < getNumAttributeArgs(AL); ++ArgNo) {\n // ...\n if (llvm::any_of(CPUs, [CPUName, &Target](const IdentifierInfo *Cur) { return Target.CPUSpecificManglingCharacter(CPUName) == Target.CPUSpecificManglingCharacter(Cur->getName()); })) {\n S.Diag(AL.getLoc(), diag::warn_multiversion_duplicate_entries);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-cpuspecific.c"]={"clang/test/Sema/attr-cpuspecific.c:56:20: warning: CPU list contains duplicate entries; attribute ignored [-Wfunction-multiversion]","clang/test/Sema/attr-cpuspecific.c:118:20: warning: CPU list contains duplicate entries; attribute ignored [-Wfunction-multiversion]"} | ["clang/test/Sema/attr-cpuspecific.c"]={"clang/test/Sema/attr-cpuspecific.c:56:20: warning: CPU list contains duplicate entries; attribute ignored [-Wfunction-multiversion]","clang/test/Sema/attr-cpuspecific.c:118:20: warning: CPU list contains duplicate entries; attribute ignored [-Wfunction-multiversion]"} | ||
} | } | ||
}, | }, | ||
["warn_namespace_member_extra_qualification"]={ | ["warn_namespace_member_extra_qualification"]={ | ||
[ | [i]={"extra-qualification"}, | ||
[j]="extra-qualification", | |||
[ | |||
[b]="extra qualification on member %0", | [b]="extra qualification on member %0", | ||
[ | [d]=h, | ||
[ | [a]="extra qualification on member (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wextra\\-qualification[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"a230224be492",1386229862,"Implement DR482: namespace members can be redeclared with a qualified name\nwithin their namespace, a...","Implement DR482: namespace members can be redeclared with a qualified name\nwithin their namespace, and such a redeclaration isn\'t required to be a\ndefinition any more.\n\nUpdate DR status page to say Clang 3.4 instead of SVN and add new Clang 3.5\ncategory (but keep Clang 3.4 yellow for now).\n\nllvm-svn: 196481"}, | ||
[ | [g]={{B,6181,"/// Diagnose a declaration whose declarator-id has the given\n/// nested-name-specifier.\n///\n/// \\param SS The nested-name-specifier of the declarator-id.\n///\n/// \\param DC The declaration context to which the nested-name-specifier\n/// resolves.\n///\n/// \\param Name The name of the entity being declared.\n///\n/// \\param Loc The location of the name of the entity being declared.\n///\n/// \\param IsTemplateId Whether the name is a (simple-)template-id, and thus\n/// we\'re declaring an explicit / partial specialization / instantiation.\n///\n/// \\returns true if we cannot safely recover from this error, false otherwise.\nbool Sema::diagnoseQualifiedDeclaration(CXXScopeSpec &SS, DeclContext *DC, DeclarationName Name, SourceLocation Loc, bool IsTemplateId) {\n // ...\n // If the user provided a superfluous scope specifier that refers back to the\n // class in which the entity is already declared, diagnose and ignore it.\n //\n // class X {\n // void X::f();\n // };\n //\n // Note, it was once ill-formed to give redundant qualification in all\n // contexts, but that rule was removed by DR482.\n if (Cur->Equals(DC)) {\n if (Cur->isRecord()) {\n // ...\n } else {\n Diag(Loc, diag::warn_namespace_member_extra_qualification) << Name;"}}, | ||
[ | [k]={ | ||
["clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:118:26: warning: extra qualification on member \'f_in_inline\' [-Wextra-qualification]","clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:123:26: warning: extra qualification on member \'v_in_inline\' [-Wextra-qualification]"} | ["clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:118:26: warning: extra qualification on member \'f_in_inline\' [-Wextra-qualification]","clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:123:26: warning: extra qualification on member \'v_in_inline\' [-Wextra-qualification]"} | ||
} | } | ||
}, | }, | ||
["warn_neon_vector_initializer_non_portable"]={ | ["warn_neon_vector_initializer_non_portable"]={ | ||
[ | [i]={"nonportable-vector-initialization"}, | ||
[j]="nonportable-vector-initialization", | |||
[ | |||
[b]="vector initializers are not compatible with NEON intrinsics in big endian mode", | [b]="vector initializers are not compatible with NEON intrinsics in big endian mode", | ||
[ | [d]=h, | ||
[ | [a]="vector initializers are not compatible with NEON intrinsics in big endian mode", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnonportable\\-vector\\-initialization[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"9eef2659bf60",1403274913,"The ability to use vector initializer lists is a GNU vector extension\nand is unrelated to the NEON i...","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]={{sb,1848,"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(), diag::warn_neon_vector_initializer_non_portable);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/big-endian-neon-initializers.c"]={"clang/test/Sema/big-endian-neon-initializers.c:8:15: warning: vector initializers are not compatible with NEON intrinsics in big endian mode [-Wnonportable-vector-initialization]","clang/test/Sema/big-endian-neon-initializers.c:9:15: warning: vector initializers are not compatible with NEON intrinsics in big endian mode [-Wnonportable-vector-initialization]","clang/test/Sema/big-endian-neon-initializers.c:10:15: warning: vector initializers are not compatible with NEON intrinsics in big endian mode [-Wnonportable-vector-initialization]","clang/test/Sema/big-endian-neon-initializers.c:11:17: warning: vector initializers are not compatible with NEON intrinsics in big endian mode [-Wnonportable-vector-initialization]"} | ["clang/test/Sema/big-endian-neon-initializers.c"]={"clang/test/Sema/big-endian-neon-initializers.c:8:15: warning: vector initializers are not compatible with NEON intrinsics in big endian mode [-Wnonportable-vector-initialization]","clang/test/Sema/big-endian-neon-initializers.c:9:15: warning: vector initializers are not compatible with NEON intrinsics in big endian mode [-Wnonportable-vector-initialization]","clang/test/Sema/big-endian-neon-initializers.c:10:15: warning: vector initializers are not compatible with NEON intrinsics in big endian mode [-Wnonportable-vector-initialization]","clang/test/Sema/big-endian-neon-initializers.c:11:17: warning: vector initializers are not compatible with NEON intrinsics in big endian mode [-Wnonportable-vector-initialization]"} | ||
} | } | ||
}, | }, | ||
["warn_nested_block_comment"]={ | ["warn_nested_block_comment"]={ | ||
[ | [i]={n,o,"comment","comments",p}, | ||
[j]="comment", | |||
[ | |||
[b]="\'/*\' within block comment", | [b]="\'/*\' within block comment", | ||
[ | [d]=h, | ||
[ | [a]="\'\\/\\*\' within block comment", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wcomment[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{Ib,2877,"#endif\n // ...\n FoundSlash:\n // ...\n if (CurPtr[0] == \'*\' && CurPtr[1] != \'/\') {\n // If this is a /* inside of the comment, emit a warning. Don\'t do this\n // if this is a /*/, which will end the comment. This misses cases with\n // embedded escaped newlines, but oh well.\n if (!isLexingRawMode())\n Diag(CurPtr - 1, diag::warn_nested_block_comment);"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/traditional-cpp.c"]={"clang/test/Preprocessor/traditional-cpp.c:12:15: warning: \'/*\' within block comment [-Wcomment]","clang/test/Preprocessor/traditional-cpp.c:13:25: warning: \'/*\' within block comment [-Wcomment]","clang/test/Preprocessor/traditional-cpp.c:87:20: warning: \'/*\' within block comment [-Wcomment]"} | ["clang/test/Preprocessor/traditional-cpp.c"]={"clang/test/Preprocessor/traditional-cpp.c:12:15: warning: \'/*\' within block comment [-Wcomment]","clang/test/Preprocessor/traditional-cpp.c:13:25: warning: \'/*\' within block comment [-Wcomment]","clang/test/Preprocessor/traditional-cpp.c:87:20: warning: \'/*\' within block comment [-Wcomment]"} | ||
} | } | ||
}, | }, | ||
["warn_new_dangling_initializer_list"]={ | ["warn_new_dangling_initializer_list"]={ | ||
[ | [i]={ic,"dangling-initializer-list"}, | ||
[j]="dangling-initializer-list", | |||
[ | |||
[b]="array backing %select{initializer list subobject of the allocated object|the allocated initializer list}0 will be destroyed at the end of the full-expression", | [b]="array backing %select{initializer list subobject of the allocated object|the allocated initializer list}0 will be destroyed at the end of the full-expression", | ||
[ | [d]=h, | ||
[ | [a]="array backing (?:initializer list subobject of the allocated object|the allocated initializer list) will be destroyed at the end of the full\\-expression", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdangling\\-initializer\\-list[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"0a9969b36b16",1531786301,"Restructure checking for, and warning on, lifetime extension.\n\nThis change implements C++ DR1696, wh...","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]={{sb,8243,"void Sema::checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init) {\n // ...\n auto TemporaryVisitor = [&](IndirectLocalPath &Path, Local L, ReferenceKind RK) -> bool {\n // ...\n case LK_New:\n if (isa<MaterializeTemporaryExpr>(L)) {\n if (IsGslPtrInitWithGslTempOwner)\n // ...\n else\n Diag(DiagLoc, RK == RK_ReferenceBinding ? diag::warn_new_dangling_reference : diag::warn_new_dangling_initializer_list) << !Entity.getParent() << DiagRange;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp:152:33: warning: array backing the allocated initializer list will be destroyed at the end of the full-expression [-Wdangling-initializer-list]"} | ["clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp:152:33: warning: array backing the allocated initializer list will be destroyed at the end of the full-expression [-Wdangling-initializer-list]"} | ||
} | } | ||
}, | }, | ||
["warn_new_dangling_reference"]={ | ["warn_new_dangling_reference"]={ | ||
[ | [i]={ic,"dangling-field"}, | ||
[j]="dangling-field", | |||
[ | |||
[b]="temporary bound to reference member of allocated object will be destroyed at the end of the full-expression", | [b]="temporary bound to reference member of allocated object will be destroyed at the end of the full-expression", | ||
[ | [d]=h, | ||
[ | [a]="temporary bound to reference member of allocated object will be destroyed at the end of the full\\-expression", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdangling\\-field[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"0a9969b36b16",1531786301,"Restructure checking for, and warning on, lifetime extension.\n\nThis change implements C++ DR1696, wh...","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]={{sb,8242,"void Sema::checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init) {\n // ...\n auto TemporaryVisitor = [&](IndirectLocalPath &Path, Local L, ReferenceKind RK) -> bool {\n // ...\n case LK_New:\n if (isa<MaterializeTemporaryExpr>(L)) {\n if (IsGslPtrInitWithGslTempOwner)\n // ...\n else\n Diag(DiagLoc, RK == RK_ReferenceBinding ? diag::warn_new_dangling_reference : diag::warn_new_dangling_initializer_list) << !Entity.getParent() << DiagRange;"}} | ||
}, | }, | ||
["warn_no_autosynthesis_property"]={ | ["warn_no_autosynthesis_property"]={ | ||
[ | [i]={"objc-property-synthesis"}, | ||
[j]="objc-property-synthesis", | |||
[ | |||
[b]="auto property synthesis will not synthesize property %0 because it is \'readwrite\' but it will be synthesized \'readonly\' via another property", | [b]="auto property synthesis will not synthesize property %0 because it is \'readwrite\' but it will be synthesized \'readonly\' via another property", | ||
[ | [d]=h, | ||
[ | [a]="auto property synthesis will not synthesize property (.*?) because it is \'readwrite\' but it will be synthesized \'readonly\' via another property", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-synthesis[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"9d25a48b4131",1363117577,"Objective-C: Issue warning in couple of obscure cases\nwhen property autosynthesis does not synthesiz...","Objective-C: Issue warning in couple of obscure cases\nwhen property autosynthesis does not synthesize a property.\nWhen property is declared \'readonly\' in a super class and\nis redeclared \'readwrite\' in a subclass. When a property\nautosynthesis causes it to share \'ivar\' with another property.\n// rdar://13388503\n\nllvm-svn: 176889"}, | ||
[ | [g]={{N,1953,"/// Default synthesizes all properties which must be synthesized\n/// in class\'s \\@implementation.\nvoid Sema::DefaultSynthesizeProperties(Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl, SourceLocation AtEnd) {\n // ...\n for (const auto &PropEntry : PropMap) {\n // ...\n // If property to be implemented in the super class, ignore.\n if (PropInSuperClass) {\n if ((Prop->getPropertyAttributes() & ObjCPropertyAttribute::kind_readwrite) && (PropInSuperClass->getPropertyAttributes() & ObjCPropertyAttribute::kind_readonly) && !IMPDecl->getInstanceMethod(Prop->getSetterName()) && !IDecl->HasUserDeclaredSetterMethod(Prop)) {\n Diag(Prop->getLocation(), diag::warn_no_autosynthesis_property) << Prop->getIdentifier();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/default-synthesize-3.m"]={"clang/test/SemaObjC/default-synthesize-3.m:66:28: warning: auto property synthesis will not synthesize property \'isFoo\' because it is \'readwrite\' but it will be synthesized \'readonly\' via another property [-Wobjc-property-synthesis]"} | ["clang/test/SemaObjC/default-synthesize-3.m"]={"clang/test/SemaObjC/default-synthesize-3.m:66:28: warning: auto property synthesis will not synthesize property \'isFoo\' because it is \'readwrite\' but it will be synthesized \'readonly\' via another property [-Wobjc-property-synthesis]"} | ||
} | } | ||
}, | }, | ||
["warn_no_autosynthesis_shared_ivar_property"]={ | ["warn_no_autosynthesis_shared_ivar_property"]={ | ||
[ | [i]={"objc-property-synthesis"}, | ||
[j]="objc-property-synthesis", | |||
[ | |||
[b]="auto property synthesis will not synthesize property %0 because it cannot share an ivar with another synthesized property", | [b]="auto property synthesis will not synthesize property %0 because it cannot share an ivar with another synthesized property", | ||
[ | [d]=h, | ||
[ | [a]="auto property synthesis will not synthesize property (.*?) because it cannot share an ivar with another synthesized property", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-synthesis[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"9d25a48b4131",1363117577,"Objective-C: Issue warning in couple of obscure cases\nwhen property autosynthesis does not synthesiz...","Objective-C: Issue warning in couple of obscure cases\nwhen property autosynthesis does not synthesize a property.\nWhen property is declared \'readonly\' in a super class and\nis redeclared \'readwrite\' in a subclass. When a property\nautosynthesis causes it to share \'ivar\' with another property.\n// rdar://13388503\n\nllvm-svn: 176889"}, | ||
[ | [g]={{N,1918,"/// Default synthesizes all properties which must be synthesized\n/// in class\'s \\@implementation.\nvoid Sema::DefaultSynthesizeProperties(Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl, SourceLocation AtEnd) {\n // ...\n for (const auto &PropEntry : PropMap) {\n // ...\n if (ObjCPropertyImplDecl *PID = IMPDecl->FindPropertyImplIvarDecl(Prop->getIdentifier())) {\n Diag(Prop->getLocation(), diag::warn_no_autosynthesis_shared_ivar_property) << Prop->getIdentifier();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/default-synthesize-3.m"]={"clang/test/SemaObjC/default-synthesize-3.m:67:16: warning: auto property synthesis will not synthesize property \'Property1\' because it cannot share an ivar with another synthesized property [-Wobjc-property-synthesis]"} | ["clang/test/SemaObjC/default-synthesize-3.m"]={"clang/test/SemaObjC/default-synthesize-3.m:67:16: warning: auto property synthesis will not synthesize property \'Property1\' because it cannot share an ivar with another synthesized property [-Wobjc-property-synthesis]"} | ||
} | } | ||
}, | }, | ||
["warn_no_constructor_for_refconst"]={ | ["warn_no_constructor_for_refconst"]={ | ||
[b]="%select{struct|interface|union|class|enum}0 %1 does not declare any constructor to initialize its non-modifiable members", | [b]="%select{struct|interface|union|class|enum}0 %1 does not declare any constructor to initialize its non-modifiable members", | ||
[ | [d]=h, | ||
[ | [a]="(?:struct|interface|union|class|enum) (.*?) does not declare any constructor to initialize its non\\-modifiable members", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[ | [f]={"454a5b65d402",1271289653,"Warn about non-aggregate classes with no user-declared constructors\nthat have reference or const sca...","Warn about non-aggregate classes with no user-declared constructors\nthat have reference or const scalar members, since those members can\nnever be initializer or modified. Fixes <rdar://problem/7804350>.\n\nllvm-svn: 101316"}, | ||
[ | [g]={{T,6928,"/// Perform semantic checks on a class definition that has been\n/// completing, introducing implicitly-declared members, checking for\n/// abstract types, etc.\n///\n/// \\param S The scope in which the class was parsed. Null if we didn\'t just\n/// parse a class definition.\n/// \\param Record The completed class.\nvoid Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) {\n // ...\n // If this is not an aggregate type and has no user-declared constructor,\n // complain about any non-static data members of reference or const scalar\n // type, since they will never get initializers.\n if (!Record->isInvalidDecl() && !Record->isDependentType() && !Record->isAggregate() && !Record->hasUserDeclaredConstructor() && !Record->isLambda()) {\n // ...\n for (const auto *F : Record->fields()) {\n // ...\n if (F->getType()->isReferenceType() || (F->getType().isConstQualified() && F->getType()->isScalarType())) {\n if (!Complained) {\n Diag(Record->getLocation(), diag::warn_no_constructor_for_refconst) << Record->getTagKind() << Record;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaTemplate/instantiation-backtrace.cpp"]={"clang/test/SemaTemplate/instantiation-backtrace.cpp:35:28: warning: class \'ResultTy<int &>\' does not declare any constructor to initialize its non-modifiable members"} | ["clang/test/SemaTemplate/instantiation-backtrace.cpp"]={"clang/test/SemaTemplate/instantiation-backtrace.cpp:35:28: warning: class \'ResultTy<int &>\' does not declare any constructor to initialize its non-modifiable members"} | ||
} | } | ||
}, | }, | ||
["warn_no_dynamic_cast_with_rtti_disabled"]={ | ["warn_no_dynamic_cast_with_rtti_disabled"]={ | ||
[ | [i]={"rtti"}, | ||
[j]="rtti", | |||
[ | |||
[b]="dynamic_cast will not work since RTTI data is disabled by %select{-fno-rtti-data|/GR-}0", | [b]="dynamic_cast will not work since RTTI data is disabled by %select{-fno-rtti-data|/GR-}0", | ||
[ | [d]=h, | ||
[ | [a]="dynamic_cast will not work since RTTI data is disabled by (?:\\-fno\\-rtti\\-data|\\/GR\\-)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wrtti[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={Ob,1582847864,Mb,Nb}, | ||
[ | [g]={{Eb,935,"/// CheckDynamicCast - Check that a dynamic_cast\\<DestType\\>(SrcExpr) is valid.\n/// Refer to C++ 5.2.7 for details. Dynamic casts are used mostly for runtime-\n/// checked downcasts in class hierarchies.\nvoid CastOperation::CheckDynamicCast() {\n // ...\n // Warns when dynamic_cast is used with RTTI data disabled.\n if (!Self.getLangOpts().RTTIData) {\n // ...\n if (MicrosoftABI || !DestPointee->isVoidType())\n Self.Diag(OpRange.getBegin(), diag::warn_no_dynamic_cast_with_rtti_disabled) << isClangCL;"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp"]={"clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp:21:14: warning: dynamic_cast will not work since RTTI data is disabled by -fno-rtti-data [-Wrtti]"} | ["clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp"]={"clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp:21:14: warning: dynamic_cast will not work since RTTI data is disabled by -fno-rtti-data [-Wrtti]"} | ||
} | } | ||
}, | }, | ||
["warn_no_newline_eof"]={ | ["warn_no_newline_eof"]={ | ||
[ | [i]={"newline-eof"}, | ||
[j]="newline-eof", | |||
[ | |||
[b]="no newline at end of file", | [b]="no newline at end of file", | ||
[ | [d]=h, | ||
[ | [a]="no newline at end of file", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnewline\\-eof[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"4c55d45b13e9",1377272521,"Respect -Wnewline-eof even in C++11 mode.\n\nIf the user has requested this warning, we should emit it...","Respect -Wnewline-eof even in C++11 mode.\n\nIf the user has requested this warning, we should emit it, even if it\'s not\nan extension in the current language mode. However, being an extension is\nmore important, so prefer the pedantic warning or the pedantic-compatibility\nwarning if those are enabled.\n\n<rdar://problem/12922063>\n\nllvm-svn: 189110"}, | ||
[ | [g]={{Ib,3055,"/// LexEndOfFile - CurPtr points to the end of this file. Handle this\n/// condition, reporting diagnostics and handling other edge cases as required.\n/// This returns true if Result contains a token, false if PP.Lex should be\n/// called again.\nbool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) {\n // ...\n // C99 5.1.1.2p2: If the file is non-empty and didn\'t end in a newline, issue\n // a pedwarn.\n if (CurPtr != BufferStart && (CurPtr[-1] != \'\\n\' && CurPtr[-1] != \'\\r\')) {\n // ...\n if (LangOpts.CPlusPlus11) {\n // C++11 [lex.phases] 2.2 p2\n // Prefer the C++98 pedantic compatibility warning over the generic,\n // non-extension, user-requested \"missing newline at EOF\" warning.\n if (!Diags.isIgnored(diag::warn_cxx98_compat_no_newline_eof, EndLoc)) {\n // ...\n } else {\n DiagID = diag::warn_no_newline_eof;"}}, | ||
[ | [k]={ | ||
["clang/test/Lexer/eof-number.c"]={"clang/test/Lexer/eof-number.c:9:6: warning: no newline at end of file [-Wnewline-eof]"} | ["clang/test/Lexer/eof-number.c"]={"clang/test/Lexer/eof-number.c:9:6: warning: no newline at end of file [-Wnewline-eof]"} | ||
} | } | ||
}, | }, | ||
["warn_no_priv_submodule_use_toplevel"]={ | ["warn_no_priv_submodule_use_toplevel"]={ | ||
[ | [i]={"private-module"}, | ||
[j]="private-module", | |||
[ | |||
[b]="no submodule named %0 in module \'%1\'; using top level \'%2\'", | [b]="no submodule named %0 in module \'%1\'; using top level \'%2\'", | ||
[ | [d]=h, | ||
[ | [a]="no submodule named (.*?) in module \'(.*?)\'; using top level \'(.*?)\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wprivate\\-module[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"84bc0a271dcd",1513919083,"[Modules] Map missing private submodules from Foo.Private to Foo_Private\n\nIn case `@import Foo.Priva...","[Modules] Map missing private submodules from Foo.Private to Foo_Private\n\nIn case `@import Foo.Private` fails because the submodule doesn\'t exist,\nlook for `Foo_Private` (if available) and build/load that module\ninstead. In that process emit a warning and tell the user about the\nassumption.\n\nThe intention here is to assist all existing private modules owners\n(in ObjC and Swift) to migrate to the new `Foo_Private` syntax.\n\nrdar://problem/36023940\n\nllvm-svn: 321342"}, | ||
[ | [g]={{ed,2046,"ModuleLoadResult CompilerInstance::loadModule(SourceLocation ImportLoc, ModuleIdPath Path, Module::NameVisibilityKind Visibility, bool IsInclusionDirective) {\n // ...\n for (unsigned I = 1, N = Path.size(); I != N; ++I) {\n // ...\n // If the user is requesting Foo.Private and it doesn\'t exist, try to\n // match Foo_Private and emit a warning asking for the user to write\n // @import Foo_Private instead. FIXME: remove this when existing clients\n // migrate off of Foo.Private syntax.\n if (!Sub && Name == \"Private\" && Module == Module->getTopLevelModule()) {\n // ...\n if (Sub) {\n // ...\n if (!getDiagnostics().isIgnored(diag::warn_no_priv_submodule_use_toplevel, ImportLoc)) {"},{ed,2048,"ModuleLoadResult CompilerInstance::loadModule(SourceLocation ImportLoc, ModuleIdPath Path, Module::NameVisibilityKind Visibility, bool IsInclusionDirective) {\n // ...\n for (unsigned I = 1, N = Path.size(); I != N; ++I) {\n // ...\n // If the user is requesting Foo.Private and it doesn\'t exist, try to\n // match Foo_Private and emit a warning asking for the user to write\n // @import Foo_Private instead. FIXME: remove this when existing clients\n // migrate off of Foo.Private syntax.\n if (!Sub && Name == \"Private\" && Module == Module->getTopLevelModule()) {\n // ...\n if (Sub) {\n // ...\n if (!getDiagnostics().isIgnored(diag::warn_no_priv_submodule_use_toplevel, ImportLoc)) {\n getDiagnostics().Report(Path[I].second, diag::warn_no_priv_submodule_use_toplevel) << Path[I].first << Module->getFullModuleName() << PrivateModule << SourceRange(Path[0].second, Path[I].second) << FixItHint::CreateReplacement(SourceRange(Path[0].second), PrivateModule);"}}, | ||
[ | [k]={ | ||
["clang/test/Modules/implicit-map-dot-private.m"]={"clang/test/Modules/implicit-map-dot-private.m:19:11: warning: no submodule named \'Private\' in module \'A\'; using top level \'A_Private\' [-Wprivate-module]"} | ["clang/test/Modules/implicit-map-dot-private.m"]={"clang/test/Modules/implicit-map-dot-private.m:19:11: warning: no submodule named \'Private\' in module \'A\'; using top level \'A_Private\' [-Wprivate-module]"} | ||
} | } | ||
}, | }, | ||
["warn_no_support_for_eval_method_source_on_m32"]={ | ["warn_no_support_for_eval_method_source_on_m32"]={ | ||
[ | [i]={t}, | ||
[j]=t, | |||
[ | |||
[b]="Setting the floating point evaluation method to `source` on a target without SSE is not supported.", | [b]="Setting the floating point evaluation method to `source` on a target without SSE is not supported.", | ||
[ | [d]=h, | ||
[ | [a]="Setting the floating point evaluation method to `source` on a target without SSE is not supported\\.", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpragmas[^\\]]*\\]", | ||
[ | [c]=v, | ||
[ | [f]={"69350e569dc4",1612659633,"[C++20][Modules][3/8] Initial handling for module partitions.\n\nThis implements the parsing and recog...","[C++20][Modules][3/8] Initial handling for module partitions.\n\nThis implements the parsing and recognition of module partition CMIs\nand removes the FIXMEs in the parser.\n\nModule partitions are recognised in the base computation of visibility,\nhowever additional amendments to visibility follow in subsequent patches.\n\nDifferential Revision: https://reviews.llvm.org/D118586"}, | ||
[ | [g]={{"clang/lib/Parse/ParseStmt.cpp",1260,"/// ParseCompoundStatementBody - Parse a sequence of statements optionally\n/// followed by a label and invoke the ActOnCompoundStmt action. This expects\n/// the \'{\' to be the current token, and consume the \'}\' at the end of the\n/// block. It does not manipulate the scope stack.\nStmtResult Parser::ParseCompoundStatementBody(bool isStmtExpr) {\n // ...\n // Warn the user that using option `-ffp-eval-method=source` on a\n // 32-bit target and feature `sse` disabled, or using\n // `pragma clang fp eval_method=source` and feature `sse` disabled, is not\n // supported.\n if (!PP.getTargetInfo().supportSourceEvalMethod() && (PP.getLastFPEvalPragmaLocation().isValid() || PP.getCurrentFPEvalMethod() == LangOptions::FPEvalMethodKind::FEM_Source))\n Diag(Tok.getLocation(), diag::warn_no_support_for_eval_method_source_on_m32);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/x86_64-eval-method.c"]={"clang/test/Sema/x86_64-eval-method.c:13:1: warning: Setting the floating point evaluation method to `source` on a target without SSE is not supported. [-Wpragmas]"} | ["clang/test/Sema/x86_64-eval-method.c"]={"clang/test/Sema/x86_64-eval-method.c:13:1: warning: Setting the floating point evaluation method to `source` on a target without SSE is not supported. [-Wpragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_no_typeid_with_rtti_disabled"]={ | ["warn_no_typeid_with_rtti_disabled"]={ | ||
[ | [i]={"rtti"}, | ||
[j]="rtti", | |||
[ | |||
[b]="typeid will not work since RTTI data is disabled by %select{-fno-rtti-data|/GR-}0", | [b]="typeid will not work since RTTI data is disabled by %select{-fno-rtti-data|/GR-}0", | ||
[ | [d]=h, | ||
[ | [a]="typeid will not work since RTTI data is disabled by (?:\\-fno\\-rtti\\-data|\\/GR\\-)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wrtti[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={Ob,1582847864,Mb,Nb}, | ||
[ | [g]={{Sb,705,"/// ActOnCXXTypeidOfType - Parse typeid( type-id ) or typeid (expression);\nExprResult Sema::ActOnCXXTypeid(SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc) {\n // ...\n if (!getLangOpts().RTTIData && !Result.isInvalid())\n if (auto *CTE = dyn_cast<CXXTypeidExpr>(Result.get()))\n if (CTE->isPotentiallyEvaluated() && !CTE->isMostDerived(Context))\n Diag(OpLoc, diag::warn_no_typeid_with_rtti_disabled) << (getDiagnostics().getDiagnosticOptions().getFormat() == DiagnosticOptions::MSVC);"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp"]={"clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp:20:28: warning: typeid will not work since RTTI data is disabled by -fno-rtti-data [-Wrtti]"} | ["clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp"]={"clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp:20:28: warning: typeid will not work since RTTI data is disabled by -fno-rtti-data [-Wrtti]"} | ||
} | } | ||
}, | }, | ||
["warn_no_underlying_type_specified_for_enum_bitfield"]={ | ["warn_no_underlying_type_specified_for_enum_bitfield"]={ | ||
[ | [i]={"signed-enum-bitfield"}, | ||
[j]="signed-enum-bitfield", | |||
[ | |||
[b]="enums in the Microsoft ABI are signed integers by default; consider giving the enum %0 an unsigned underlying type to make this code portable", | [b]="enums in the Microsoft ABI are signed integers by default; consider giving the enum %0 an unsigned underlying type to make this code portable", | ||
[ | [d]=h, | ||
[ | [a]="enums in the Microsoft ABI are signed integers by default; consider giving the enum (.*?) an unsigned underlying type to make this code portable", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wsigned\\-enum\\-bitfield[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"ad425626d237",1479339600,"Add warning when assigning enums to bitfields without an explicit unsigned underlying type\n\nSummary:...","Add warning when assigning enums to bitfields without an explicit unsigned underlying type\n\nSummary:\nAdd a warning when assigning enums to bitfields without an explicit\nunsigned underlying type. This is to prevent problems with MSVC\ncompatibility, since the Microsoft ABI defaults to storing enums with a\nsigned type, causing inconsistencies with saving to/reading from\nbitfields.\n\nAlso disabled the warning in the dr0xx.cpp test which throws the error,\nand added a test for the warning.\n\nThe warning can be disabled with -Wno-signed-enum-bitfield.\n\nPatch by Sasha Bermeister!\n\nReviewers: rnk, aaron.ballman\n\nSubscribers: mehdi_amini, aaron.ballman, cfe-commits, thakis, dcheng\n\nDifferential Revision: https://reviews.llvm.org/D24289\n\nllvm-svn: 287177"}, | ||
[ | [g]={{r,14047,"/// 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 (BitfieldType->isEnumeralType()) {\n // ...\n // If the underlying enum type was not explicitly specified as an unsigned\n // type and the enum contain only positive values, MSVC++ will cause an\n // inconsistency by storing this as a signed type.\n if (S.getLangOpts().CPlusPlus11 && !BitfieldEnumDecl->getIntegerTypeSourceInfo() && BitfieldEnumDecl->getNumPositiveBits() > 0 && BitfieldEnumDecl->getNumNegativeBits() == 0) {\n S.Diag(InitLoc, diag::warn_no_underlying_type_specified_for_enum_bitfield) << BitfieldEnumDecl;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-msvc-enum-bitfield.cpp"]={"clang/test/SemaCXX/warn-msvc-enum-bitfield.cpp:9:8: warning: enums in the Microsoft ABI are signed integers by default; consider giving the enum \'E\' an unsigned underlying type to make this code portable [-Wsigned-enum-bitfield]","clang/test/SemaCXX/warn-msvc-enum-bitfield.cpp:10:8: warning: enums in the Microsoft ABI are signed integers by default; consider giving the enum \'F\' an unsigned underlying type to make this code portable [-Wsigned-enum-bitfield]"} | ["clang/test/SemaCXX/warn-msvc-enum-bitfield.cpp"]={"clang/test/SemaCXX/warn-msvc-enum-bitfield.cpp:9:8: warning: enums in the Microsoft ABI are signed integers by default; consider giving the enum \'E\' an unsigned underlying type to make this code portable [-Wsigned-enum-bitfield]","clang/test/SemaCXX/warn-msvc-enum-bitfield.cpp:10:8: warning: enums in the Microsoft ABI are signed integers by default; consider giving the enum \'F\' an unsigned underlying type to make this code portable [-Wsigned-enum-bitfield]"} | ||
} | } | ||
}, | }, | ||
["warn_no_unlock"]={ | ["warn_no_unlock"]={ | ||
[ | [i]={kb,rb}, | ||
[j]=rb, | |||
[ | |||
[b]="%0 \'%1\' is still held at the end of function", | [b]="%0 \'%1\' is still held at the end of function", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) \'(.*?)\' is still held at the end of function", | ||
[ | [e]=dc, | ||
[ | [c]=l, | ||
[ | [f]={"ee5db8b5c4ab",1315518770,"Thread Safety: In C++0x Mutexes are the objects that control access to shared variables, while Lock...","Thread Safety: In C++0x Mutexes are the objects that control access to shared variables, while Locks are the objects that acquire and release Mutexes. We switch to this new terminology.\n\nllvm-svn: 139321"}, | ||
[ | [g]={{y,1915,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleMutexHeldEndOfScope(StringRef Kind, Name LockName, SourceLocation LocLocked, SourceLocation LocEndOfScope, LockErrorKind LEK) override {\n // ...\n case LEK_LockedAtEndOfFunction:\n DiagID = diag::warn_no_unlock;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjCXX/warn-thread-safety-analysis.mm"]={"clang/test/SemaObjCXX/warn-thread-safety-analysis.mm:26:1: warning: mutex \'self->lock_\' is still held at the end of function [-Wthread-safety-analysis]"} | ["clang/test/SemaObjCXX/warn-thread-safety-analysis.mm"]={"clang/test/SemaObjCXX/warn-thread-safety-analysis.mm:26:1: warning: mutex \'self->lock_\' is still held at the end of function [-Wthread-safety-analysis]"} | ||
} | } | ||
}, | }, | ||
["warn_nocf_check_attribute_ignored"]={ | ["warn_nocf_check_attribute_ignored"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="\'nocf_check\' attribute ignored; use -fcf-protection to enable the attribute", | [b]="\'nocf_check\' attribute ignored; use -fcf-protection to enable the attribute", | ||
[ | [d]=h, | ||
[ | [a]="\'nocf_check\' attribute ignored; use \\-fcf\\-protection to enable the attribute", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={"220671a08064",1521293495,"Adding nocf_check attribute for cf-protection fine tuning\n\nThe patch adds nocf_check target independ...","Adding nocf_check attribute for cf-protection fine tuning\n\nThe patch adds nocf_check target independent attribute for disabling checks that were enabled by cf-protection flag.\nThe attribute can be appertained to functions and function pointers.\nAttribute name follows GCC\'s similar attribute name.\n\nDifferential Revision: https://reviews.llvm.org/D41880\n\nllvm-svn: 327768"}, | ||
[ | [g]={{w,2212,"static void handleNoCfCheckAttr(Sema &S, Decl *D, const ParsedAttr &Attrs) {\n if (!S.getLangOpts().CFProtectionBranch)\n S.Diag(Attrs.getLoc(), diag::warn_nocf_check_attribute_ignored);"},{L,7860,"/// Process an individual function attribute. Returns true to\n/// indicate that the attribute was handled, false if it wasn\'t.\nstatic bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // ...\n if (attr.getKind() == ParsedAttr::AT_AnyX86NoCfCheck) {\n if (!S.getLangOpts().CFProtectionBranch) {\n S.Diag(attr.getLoc(), diag::warn_nocf_check_attribute_ignored);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/nocf_check_attr_not_allowed.c"]={"clang/test/Sema/nocf_check_attr_not_allowed.c:5:21: warning: \'nocf_check\' attribute ignored; use -fcf-protection to enable the attribute [-Wignored-attributes]"} | ["clang/test/Sema/nocf_check_attr_not_allowed.c"]={"clang/test/Sema/nocf_check_attr_not_allowed.c:5:21: warning: \'nocf_check\' attribute ignored; use -fcf-protection to enable the attribute [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_noderef_on_non_pointer_or_array"]={ | ["warn_noderef_on_non_pointer_or_array"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="\'noderef\' can only be used on an array or pointer type", | [b]="\'noderef\' can only be used on an array or pointer type", | ||
[ | [d]=h, | ||
[ | [a]="\'noderef\' can only be used on an array or pointer type", | ||
[ | [e]=R, | ||
[ | [c]=s, | ||
[ | [f]={"ad7ac964e5cf",1544058354,"[Sema/Attribute] Check for noderef attribute\n\nThis patch adds the noderef attribute in clang and che...","[Sema/Attribute] Check for noderef attribute\n\nThis patch adds the noderef attribute in clang and checks for dereferences of\ntypes that have this attribute. This attribute is currently used by sparse and\nwould like to be ported to clang.\n\nDifferential Revision: https://reviews.llvm.org/D49511\n\nllvm-svn: 348442"}, | ||
[ | [g]={{L,5732,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n if (DeclType.Kind != DeclaratorChunk::Paren) {\n if (ExpectNoDerefChunk && !IsNoDerefableChunk(DeclType))\n S.Diag(DeclType.Loc, diag::warn_noderef_on_non_pointer_or_array);"},{L,5740,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n if (ExpectNoDerefChunk)\n S.Diag(state.getDeclarator().getBeginLoc(), diag::warn_noderef_on_non_pointer_or_array);"}}, | ||
[ | [k]={ | ||
["clang/test/Frontend/noderef.cpp"]={"clang/test/Frontend/noderef.cpp:15:3: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:18:3: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:22:3: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:46:17: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:49:29: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:67:12: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:73:15: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:76:16: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:80:34: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:87:3: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:99:15: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:125:3: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]"} | ["clang/test/Frontend/noderef.cpp"]={"clang/test/Frontend/noderef.cpp:15:3: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:18:3: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:22:3: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:46:17: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:49:29: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:67:12: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:73:15: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:76:16: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:80:34: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:87:3: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:99:15: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:125:3: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_noderef_to_dereferenceable_pointer"]={ | ["warn_noderef_to_dereferenceable_pointer"]={ | ||
[ | [i]={"noderef"}, | ||
[j]="noderef", | |||
[ | |||
[b]="casting to dereferenceable pointer removes \'noderef\' attribute", | [b]="casting to dereferenceable pointer removes \'noderef\' attribute", | ||
[ | [d]=h, | ||
[ | [a]="casting to dereferenceable pointer removes \'noderef\' attribute", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnoderef[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"ad7ac964e5cf",1544058354,"[Sema/Attribute] Check for noderef attribute\n\nThis patch adds the noderef attribute in clang and che...","[Sema/Attribute] Check for noderef attribute\n\nThis patch adds the noderef attribute in clang and checks for dereferences of\ntypes that have this attribute. This attribute is currently used by sparse and\nwould like to be ported to clang.\n\nDifferential Revision: https://reviews.llvm.org/D49511\n\nllvm-svn: 348442"}, | ||
[ | [g]={{Eb,187,"void CheckNoDeref(Sema &S, const QualType FromType, const QualType ToType, SourceLocation OpLoc) {\n if (const auto *PtrType = dyn_cast<PointerType>(FromType)) {\n if (PtrType->getPointeeType()->hasAttr(attr::NoDeref)) {\n if (const auto *DestType = dyn_cast<PointerType>(ToType)) {\n if (!DestType->getPointeeType()->hasAttr(attr::NoDeref)) {\n S.Diag(OpLoc, diag::warn_noderef_to_dereferenceable_pointer);"},{u,10624,"Sema::AssignConvertType Sema::CheckSingleAssignmentConstraints(QualType LHSType, ExprResult &CallerRHS, bool Diagnose, bool DiagnoseCFAudited, bool ConvertRHS) {\n // ...\n if (const auto *LHSPtrType = LHSType->getAs<PointerType>()) {\n if (const auto *RHSPtrType = RHS.get()->getType()->getAs<PointerType>()) {\n if (RHSPtrType->getPointeeType()->hasAttr(attr::NoDeref) && !LHSPtrType->getPointeeType()->hasAttr(attr::NoDeref)) {\n Diag(RHS.get()->getExprLoc(), diag::warn_noderef_to_dereferenceable_pointer) << RHS.get()->getSourceRange();"},{sb,8976,"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_ConversionSequence:\n case SK_ConversionSequenceNoNarrowing: {\n if (const auto *FromPtrType = CurInit.get()->getType()->getAs<PointerType>()) {\n if (const auto *ToPtrType = Step->Type->getAs<PointerType>()) {\n if (FromPtrType->getPointeeType()->hasAttr(attr::NoDeref) && !ToPtrType->getPointeeType()->hasAttr(attr::NoDeref)) {\n // Do not check static casts here because they are checked earlier\n // in Sema::ActOnCXXNamedCast()\n if (!Kind.isStaticCast()) {\n S.Diag(CurInit.get()->getExprLoc(), diag::warn_noderef_to_dereferenceable_pointer) << CurInit.get()->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/Frontend/noderef.cpp"]={"clang/test/Frontend/noderef.cpp:33:17: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:34:15: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:93:31: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:138:12: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:147:13: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:148:13: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:156:19: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:160:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:164:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:168:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:172:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:176:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:180:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:184:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]"} | ["clang/test/Frontend/noderef.cpp"]={"clang/test/Frontend/noderef.cpp:33:17: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:34:15: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:93:31: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:138:12: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:147:13: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:148:13: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:156:19: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:160:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:164:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:168:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:172:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:176:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:180:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:184:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]"} | ||
} | } | ||
}, | }, | ||
["warn_non_aligned_allocation_function"]={ | ["warn_non_aligned_allocation_function"]={ | ||
[ | [i]={"coro-non-aligned-allocation-function","coroutine"}, | ||
[j]="coro-non-aligned-allocation-function", | |||
[ | |||
[b]="under -fcoro-aligned-allocation, the non-aligned allocation function for the promise type %0 has higher precedence than the global aligned allocation function", | [b]="under -fcoro-aligned-allocation, the non-aligned allocation function for the promise type %0 has higher precedence than the global aligned allocation function", | ||
[ | [d]=h, | ||
[ | [a]="under \\-fcoro\\-aligned\\-allocation, the non\\-aligned allocation function for the promise type (.*?) has higher precedence than the global aligned allocation function", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wcoro\\-non\\-aligned\\-allocation\\-function[^\\]]*\\]", | ||
[ | [c]="Coroutines Issue", | ||
[ | [f]={lb,1625925174,mb,nb}, | ||
[ | [g]={{"clang/lib/Sema/SemaCoroutine.cpp",1479,"bool CoroutineStmtBuilder::makeNewAndDeleteExpr() {\n // ...\n // If we found a non-aligned allocation function in the promise_type,\n // it indicates the user forgot to update the allocation function. Let\'s emit\n // a warning here.\n if (FoundNonAlignedInPromise) {\n S.Diag(OperatorNew->getLocation(), diag::warn_non_aligned_allocation_function) << &FD;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/coroutine-alloc-4.cpp"]={"clang/test/SemaCXX/coroutine-alloc-4.cpp:18:11: warning: under -fcoro-aligned-allocation, the non-aligned allocation function for the promise type \'f\' has higher precedence than the global aligned allocation function [-Wcoro-non-aligned-allocation-function]","clang/test/SemaCXX/coroutine-alloc-4.cpp:18:11: warning: under -fcoro-aligned-allocation, the non-aligned allocation function for the promise type \'f\' has higher precedence than the global aligned allocation function [-Wcoro-non-aligned-allocation-function]"} | ["clang/test/SemaCXX/coroutine-alloc-4.cpp"]={"clang/test/SemaCXX/coroutine-alloc-4.cpp:18:11: warning: under -fcoro-aligned-allocation, the non-aligned allocation function for the promise type \'f\' has higher precedence than the global aligned allocation function [-Wcoro-non-aligned-allocation-function]","clang/test/SemaCXX/coroutine-alloc-4.cpp:18:11: warning: under -fcoro-aligned-allocation, the non-aligned allocation function for the promise type \'f\' has higher precedence than the global aligned allocation function [-Wcoro-non-aligned-allocation-function]"} | ||
} | } | ||
}, | }, | ||
["warn_non_contravariant_overriding_param_types"]={ | ["warn_non_contravariant_overriding_param_types"]={ | ||
[ | [i]={"overriding-method-mismatch"}, | ||
[j]="overriding-method-mismatch", | |||
[ | |||
[b]="conflicting parameter types in declaration of %0: %1 vs %2", | [b]="conflicting parameter types in declaration of %0: %1 vs %2", | ||
[ | [d]=h, | ||
[ | [a]="conflicting parameter types in declaration of (.*?)\\: (.*?) vs (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Woverriding\\-method\\-mismatch[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"3c12dd7675cd",1312996590,"objective-c: Using existing infrastructure for finding \noverridden methods to diagnose their type m...","objective-c: Using existing infrastructure for finding \noverridden methods to diagnose their type mismatch.\nThis is a general solution for previous fixes\nfor // rdar://6191214 and // rdar://9352731\nand removes lots of duplicate code.\n\nllvm-svn: 137222"}, | ||
[ | [g]={{I,2492,"static bool CheckMethodOverrideParam(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, ParmVarDecl *ImplVar, ParmVarDecl *IfaceVar, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n // ...\n // Mismatches between ObjC pointers go into a different warning\n // category, and sometimes they\'re even completely explicitly allowed..\n if (const ObjCObjectPointerType *ImplPtrTy = ImplTy->getAs<ObjCObjectPointerType>()) {\n if (const ObjCObjectPointerType *IfacePtrTy = IfaceTy->getAs<ObjCObjectPointerType>()) {\n // ...\n DiagID = IsOverridingMode ? diag::warn_non_contravariant_overriding_param_types : diag::warn_non_contravariant_param_types;"}} | ||
}, | }, | ||
["warn_non_contravariant_param_types"]={ | ["warn_non_contravariant_param_types"]={ | ||
[ | [i]={"method-signatures"}, | ||
[j]="method-signatures", | |||
[ | |||
[b]="conflicting parameter types in implementation of %0: %1 vs %2", | [b]="conflicting parameter types in implementation of %0: %1 vs %2", | ||
[ | [d]=h, | ||
[ | [a]="conflicting parameter types in implementation of (.*?)\\: (.*?) vs (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wmethod\\-signatures[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"071df46743b9",1288233278,"Implement the newest status quo for method override checking. The idea now\nis that we need more inf...","Implement the newest status quo for method override checking. The idea now\nis that we need more information to decide the exact conditions for whether\none ObjCObjectPointer is an acceptable return/parameter override for another,\nso we\'re going to disable that entire class of warning for now. The\n\"forward developement\" warning category, -Wmethod-signatures, can receive\nunrestricted feature work, and when we\'re happy with how it acts, we\'ll\nturn it on by default.\n\nThis is a pretty conservative change, and nobody\'s totally content with it.\n\nllvm-svn: 117524"}, | ||
[ | [g]={{I,2493,"static bool CheckMethodOverrideParam(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, ParmVarDecl *ImplVar, ParmVarDecl *IfaceVar, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n // ...\n // Mismatches between ObjC pointers go into a different warning\n // category, and sometimes they\'re even completely explicitly allowed..\n if (const ObjCObjectPointerType *ImplPtrTy = ImplTy->getAs<ObjCObjectPointerType>()) {\n if (const ObjCObjectPointerType *IfacePtrTy = IfaceTy->getAs<ObjCObjectPointerType>()) {\n // ...\n DiagID = IsOverridingMode ? diag::warn_non_contravariant_overriding_param_types : diag::warn_non_contravariant_param_types;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/method-def-1.m"]={"clang/test/SemaObjC/method-def-1.m:37:3: warning: conflicting parameter types in implementation of \'myMethod1:\': \'id<proto>\' vs \'id<NSObject>\' [-Wmethod-signatures]"} | ["clang/test/SemaObjC/method-def-1.m"]={"clang/test/SemaObjC/method-def-1.m:37:3: warning: conflicting parameter types in implementation of \'myMethod1:\': \'id<proto>\' vs \'id<NSObject>\' [-Wmethod-signatures]"} | ||
} | } | ||
}, | }, | ||
["warn_non_covariant_overriding_ret_types"]={ | ["warn_non_covariant_overriding_ret_types"]={ | ||
[ | [i]={"overriding-method-mismatch"}, | ||
[j]="overriding-method-mismatch", | |||
[ | |||
[b]="conflicting return type in declaration of %0: %1 vs %2", | [b]="conflicting return type in declaration of %0: %1 vs %2", | ||
[ | [d]=h, | ||
[ | [a]="conflicting return type in declaration of (.*?)\\: (.*?) vs (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Woverriding\\-method\\-mismatch[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"3c12dd7675cd",1312996590,"objective-c: Using existing infrastructure for finding \noverridden methods to diagnose their type m...","objective-c: Using existing infrastructure for finding \noverridden methods to diagnose their type mismatch.\nThis is a general solution for previous fixes\nfor // rdar://6191214 and // rdar://9352731\nand removes lots of duplicate code.\n\nllvm-svn: 137222"}, | ||
[ | [g]={{I,2410,"static bool CheckMethodOverrideReturn(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n // ...\n // Mismatches between ObjC pointers go into a different warning\n // category, and sometimes they\'re even completely explicitly allowed.\n if (const ObjCObjectPointerType *ImplPtrTy = MethodImpl->getReturnType()->getAs<ObjCObjectPointerType>()) {\n if (const ObjCObjectPointerType *IfacePtrTy = MethodDecl->getReturnType()->getAs<ObjCObjectPointerType>()) {\n // ...\n DiagID = IsOverridingMode ? diag::warn_non_covariant_overriding_ret_types : diag::warn_non_covariant_ret_types;"}} | ||
}, | }, | ||
["warn_non_covariant_ret_types"]={ | ["warn_non_covariant_ret_types"]={ | ||
[ | [i]={"method-signatures"}, | ||
[j]="method-signatures", | |||
[ | |||
[b]="conflicting return type in implementation of %0: %1 vs %2", | [b]="conflicting return type in implementation of %0: %1 vs %2", | ||
[ | [d]=h, | ||
[ | [a]="conflicting return type in implementation of (.*?)\\: (.*?) vs (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wmethod\\-signatures[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"071df46743b9",1288233278,"Implement the newest status quo for method override checking. The idea now\nis that we need more inf...","Implement the newest status quo for method override checking. The idea now\nis that we need more information to decide the exact conditions for whether\none ObjCObjectPointer is an acceptable return/parameter override for another,\nso we\'re going to disable that entire class of warning for now. The\n\"forward developement\" warning category, -Wmethod-signatures, can receive\nunrestricted feature work, and when we\'re happy with how it acts, we\'ll\nturn it on by default.\n\nThis is a pretty conservative change, and nobody\'s totally content with it.\n\nllvm-svn: 117524"}, | ||
[ | [g]={{I,2411,"static bool CheckMethodOverrideReturn(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n // ...\n // Mismatches between ObjC pointers go into a different warning\n // category, and sometimes they\'re even completely explicitly allowed.\n if (const ObjCObjectPointerType *ImplPtrTy = MethodImpl->getReturnType()->getAs<ObjCObjectPointerType>()) {\n if (const ObjCObjectPointerType *IfacePtrTy = MethodDecl->getReturnType()->getAs<ObjCObjectPointerType>()) {\n // ...\n DiagID = IsOverridingMode ? diag::warn_non_covariant_overriding_ret_types : diag::warn_non_covariant_ret_types;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/method-typecheck-3.m"]={"clang/test/SemaObjC/method-typecheck-3.m:17:1: warning: conflicting return type in implementation of \'a\': \'B *\' vs \'A *\' [-Wmethod-signatures]"} | ["clang/test/SemaObjC/method-typecheck-3.m"]={"clang/test/SemaObjC/method-typecheck-3.m:17:1: warning: conflicting return type in implementation of \'a\': \'B *\' vs \'A *\' [-Wmethod-signatures]"} | ||
} | } | ||
}, | }, | ||
["warn_non_literal_null_pointer"]={ | ["warn_non_literal_null_pointer"]={ | ||
[ | [i]={Ab,Pb,"non-literal-null-conversion"}, | ||
[j]="non-literal-null-conversion", | |||
[ | |||
[b]="expression which evaluates to zero treated as a null pointer constant of type %0", | [b]="expression which evaluates to zero treated as a null pointer constant of type %0", | ||
[ | [d]=h, | ||
[ | [a]="expression which evaluates to zero treated as a null pointer constant of type (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnon\\-literal\\-null\\-conversion[^\\]]*\\]", | ||
[ | [c]=Wb, | ||
[ | [f]={"1c7c8f763769",1344447211,"Implement warning for integral null pointer constants other than the literal 0.\n\nThis is effectively...","Implement warning for integral null pointer constants other than the literal 0.\n\nThis is effectively a warning for code that violates core issue 903 & thus will\nbecome standard error in the future, hopefully. It catches strange null\npointers such as: \'\\0\', 1 - 1, const int null = 0; etc...\n\nThere\'s currently a flaw in this warning (& the warning for \'false\' as a null\npointer literal as well) where it doesn\'t trigger on comparisons (ptr == \'\\0\'\nfor example). Fix to come in a future patch.\n\nAlso, due to this only being a warning, not an error, it triggers quite\nfrequently on gtest code which tests expressions for null-pointer-ness in a\nSFINAE context (so it wouldn\'t be a problem if this was an error as in an\nactual implementation of core issue 903). To workaround this for now, the\ndiagnostic does not fire in unevaluated contexts.\n\nReview by Sean Silva and Richard Smith.\n\nllvm-svn: 161501"}, | ||
[ | [g]={{"clang/lib/Sema/SemaOverload.cpp",3131,"/// CheckPointerConversion - Check the pointer conversion from the\n/// expression From to the type ToType. This routine checks for\n/// ambiguous or inaccessible derived-to-base pointer\n/// conversions for which IsPointerConversion has already returned\n/// true. It returns true and produces a diagnostic if there was an\n/// error, or returns false otherwise.\nbool Sema::CheckPointerConversion(Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess, bool Diagnose) {\n // ...\n if (Diagnose && !IsCStyleOrFunctionalCast && !FromType->isAnyPointerType() && From->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNotNull) == Expr::NPCK_ZeroExpression) {\n if (Context.hasSameUnqualifiedType(From->getType(), Context.BoolTy))\n // ...\n else if (!isUnevaluatedContext())\n Diag(From->getExprLoc(), diag::warn_non_literal_null_pointer) << ToType << From->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-null.c"]={"clang/test/Sema/warn-null.c:7:10: warning: expression which evaluates to zero treated as a null pointer constant of type \'int *\' [-Wnon-literal-null-conversion]","clang/test/Sema/warn-null.c:8:10: warning: expression which evaluates to zero treated as a null pointer constant of type \'int *\' [-Wnon-literal-null-conversion]","clang/test/Sema/warn-null.c:11:7: warning: expression which evaluates to zero treated as a null pointer constant of type \'int *\' [-Wnon-literal-null-conversion]","clang/test/Sema/warn-null.c:12:9: warning: expression which evaluates to zero treated as a null pointer constant of type \'int *\' [-Wnon-literal-null-conversion]","clang/test/Sema/warn-null.c:13:7: warning: expression which evaluates to zero treated as a null pointer constant of type \'int *\' [-Wnon-literal-null-conversion]"} | ["clang/test/Sema/warn-null.c"]={"clang/test/Sema/warn-null.c:7:10: warning: expression which evaluates to zero treated as a null pointer constant of type \'int *\' [-Wnon-literal-null-conversion]","clang/test/Sema/warn-null.c:8:10: warning: expression which evaluates to zero treated as a null pointer constant of type \'int *\' [-Wnon-literal-null-conversion]","clang/test/Sema/warn-null.c:11:7: warning: expression which evaluates to zero treated as a null pointer constant of type \'int *\' [-Wnon-literal-null-conversion]","clang/test/Sema/warn-null.c:12:9: warning: expression which evaluates to zero treated as a null pointer constant of type \'int *\' [-Wnon-literal-null-conversion]","clang/test/Sema/warn-null.c:13:7: warning: expression which evaluates to zero treated as a null pointer constant of type \'int *\' [-Wnon-literal-null-conversion]"} | ||
} | } | ||
}, | }, | ||
["warn_non_modular_include_in_framework_module"]={ | ["warn_non_modular_include_in_framework_module"]={ | ||
[ | [i]={"incomplete-module","non-modular-include-in-framework-module","non-modular-include-in-module"}, | ||
[j]="non-modular-include-in-framework-module", | |||
[ | |||
[b]="include of non-modular header inside framework module \'%0\': \'%1\'", | [b]="include of non-modular header inside framework module \'%0\': \'%1\'", | ||
[ | [d]=h, | ||
[ | [a]="include of non\\-modular header inside framework module \'(.*?)\'\\: \'(.*?)\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnon\\-modular\\-include\\-in\\-framework\\-module[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"71e1a64f916e",1399326253,"Add -Wnon-modular-include* options\n\nWarn on non-modular includes in various contexts.\n\n-Wnon-modular...","Add -Wnon-modular-include* options\n\nWarn on non-modular includes in various contexts.\n\n-Wnon-modular-include\n -Wnon-modular-include-in-module\n -Wnon-modular-include-in-framework-module\n\nWhere each group is a subgroup of those above it.\n\nllvm-svn: 208004"}, | ||
[ | [g]={{"clang/lib/Lex/ModuleMap.cpp",546,"void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule, bool RequestingModuleIsModuleInterface, SourceLocation FilenameLoc, StringRef Filename, FileEntryRef File) {\n // ...\n if (RequestingModule && LangOpts.ModulesStrictDeclUse) {\n // ...\n } else if (RequestingModule && RequestingModuleIsModuleInterface && LangOpts.isCompilingModule()) {\n // ...\n diag::kind DiagID = RequestingModule->getTopLevelModule()->IsFramework ? diag::warn_non_modular_include_in_framework_module : diag::warn_non_modular_include_in_module;"}} | ||
}, | }, | ||
["warn_non_modular_include_in_module"]={ | ["warn_non_modular_include_in_module"]={ | ||
[ | [i]={"incomplete-module","non-modular-include-in-module"}, | ||
[j]="non-modular-include-in-module", | |||
[ | |||
[b]="include of non-modular header inside module \'%0\': \'%1\'", | [b]="include of non-modular header inside module \'%0\': \'%1\'", | ||
[ | [d]=h, | ||
[ | [a]="include of non\\-modular header inside module \'(.*?)\'\\: \'(.*?)\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnon\\-modular\\-include\\-in\\-module[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"71e1a64f916e",1399326253,"Add -Wnon-modular-include* options\n\nWarn on non-modular includes in various contexts.\n\n-Wnon-modular...","Add -Wnon-modular-include* options\n\nWarn on non-modular includes in various contexts.\n\n-Wnon-modular-include\n -Wnon-modular-include-in-module\n -Wnon-modular-include-in-framework-module\n\nWhere each group is a subgroup of those above it.\n\nllvm-svn: 208004"}, | ||
[ | [g]={{"clang/lib/Lex/ModuleMap.cpp",547,"void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule, bool RequestingModuleIsModuleInterface, SourceLocation FilenameLoc, StringRef Filename, FileEntryRef File) {\n // ...\n if (RequestingModule && LangOpts.ModulesStrictDeclUse) {\n // ...\n } else if (RequestingModule && RequestingModuleIsModuleInterface && LangOpts.isCompilingModule()) {\n // ...\n diag::kind DiagID = RequestingModule->getTopLevelModule()->IsFramework ? diag::warn_non_modular_include_in_framework_module : diag::warn_non_modular_include_in_module;"}}, | ||
[ | [k]={ | ||
["clang/test/Modules/incomplete-module.m"]={"clang/test/Modules/Inputs/incomplete_mod.h:1:10: warning: include of non-modular header inside module \'incomplete_mod\': \'clang/test/Modules/Inputs/incomplete_mod_missing.h\' [-Wnon-modular-include-in-module]"} | ["clang/test/Modules/incomplete-module.m"]={"clang/test/Modules/Inputs/incomplete_mod.h:1:10: warning: include of non-modular header inside module \'incomplete_mod\': \'clang/test/Modules/Inputs/incomplete_mod_missing.h\' [-Wnon-modular-include-in-module]"} | ||
} | } | ||
}, | }, | ||
["warn_non_pod_vararg_with_format_string"]={ | ["warn_non_pod_vararg_with_format_string"]={ | ||
[ | [i]={Wc,lc}, | ||
[j]=lc, | |||
[ | |||
[b]="cannot pass %select{non-POD|non-trivial}0 object of type %1 to variadic %select{function|block|method|constructor}2; expected type from format string was %3", | [b]="cannot pass %select{non-POD|non-trivial}0 object of type %1 to variadic %select{function|block|method|constructor}2; expected type from format string was %3", | ||
[ | [d]=Hb, | ||
[ | [a]="cannot pass (?:non\\-POD|non\\-trivial) object of type (.*?) to variadic (?:function|block|method|constructor); expected type from format string was (.*?)", | ||
[ | [e]=" \\[[^\\]]*\\-Wnon\\-pod\\-varargs[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"c7b0bdffe75c",1340240915,"If an object (such as a std::string) with an appropriate c_str() member function\nis passed to a vari...","If an object (such as a std::string) with an appropriate c_str() member function\nis passed to a variadic function in a position where a format string indicates\nthat c_str()\'s return type is desired, provide a note suggesting that the user\nmay have intended to call the c_str() member.\n\nFactor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and\nmove it to SemaChecking in order to facilitate this. Factor the call checking\nout of function call checking and block call checking, and extend it to cover\nconstructor calls too.\n\nPatch by Sam Panzer!\n\nllvm-svn: 158887"}, | ||
[ | [g]={{r,11385,"bool CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, const char *StartSpecifier, unsigned SpecifierLen, const Expr *E) {\n // ...\n if (Success) {\n // ...\n } else {\n // ...\n case Sema::VAK_Undefined:\n case Sema::VAK_MSVCUndefined:\n if (CallType == Sema::VariadicDoesNotApply) {\n // ...\n } else {\n EmitFormatDiagnostic(S.PDiag(diag::warn_non_pod_vararg_with_format_string) << S.getLangOpts().CPlusPlus11 << ExprTy << CallType << AT.getRepresentativeTypeName(S.Context) << CSR << E->getSourceRange(), E->getBeginLoc(), /*IsStringLocation*/ false, CSR);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/vararg-class.cpp"]={"clang/test/SemaCXX/vararg-class.cpp:35:11: error: cannot pass non-trivial object of type \'B\' to variadic function; expected type from format string was \'char *\' [-Wnon-pod-varargs]"} | ["clang/test/SemaCXX/vararg-class.cpp"]={"clang/test/SemaCXX/vararg-class.cpp:35:11: error: cannot pass non-trivial object of type \'B\' to variadic function; expected type from format string was \'char *\' [-Wnon-pod-varargs]"} | ||
} | } | ||
}, | }, | ||
["warn_non_prototype_changes_behavior"]={ | ["warn_non_prototype_changes_behavior"]={ | ||
[ | [i]={"deprecated-non-prototype","strict-prototypes"}, | ||
[j]="deprecated-non-prototype", | |||
[ | |||
[b]="a function %select{declaration|definition}0 without a prototype is deprecated in all versions of C %select{and is not supported in C2x|and is treated as a zero-parameter prototype in C2x, conflicting with a %select{previous|subsequent}2 %select{declaration|definition}3}1", | [b]="a function %select{declaration|definition}0 without a prototype is deprecated in all versions of C %select{and is not supported in C2x|and is treated as a zero-parameter prototype in C2x, conflicting with a %select{previous|subsequent}2 %select{declaration|definition}3}1", | ||
[ | [d]=h, | ||
[ | [a]="a function (?:declaration|definition) without a prototype is deprecated in all versions of C (?:and is not supported in C2x|and is treated as a zero\\-parameter prototype in C2x, conflicting with a (?:previous|subsequent) (?:declaration|definition))", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-non\\-prototype[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={ad,1620530452,bd,cd}, | ||
[ | [g]={{B,4166,"/// 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 Diag(WithoutProto->getLocation(), diag::warn_non_prototype_changes_behavior) << IsWithoutProtoADef << (WithoutProto->getNumParams() ? 0 : 1) << (WithoutProto == Old) << IsWithProtoADef;"},{B,15766,"Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, bool IsInstantiation) {\n // ...\n {\n // ...\n if (FD) {\n // ...\n // If the function being defined does not have a prototype, then we may\n // need to diagnose it as changing behavior in C2x because we now know\n // whether the function accepts arguments or not. This only handles the\n // case where the definition has no prototype but does have parameters\n // and either there is no previous potential prototype, or the previous\n // potential prototype also has no actual prototype. This handles cases\n // like:\n // void f(); void f(a) int a; {}\n // void g(a) int a; {}\n // See MergeFunctionDecl() for other cases of the behavior change\n // diagnostic. See GetFullTypeForDeclarator() for handling of a function\n // type without a prototype.\n if (!FD->hasWrittenPrototype() && FD->getNumParams() != 0 && (!PossiblePrototype || (!PossiblePrototype->hasWrittenPrototype() && !PossiblePrototype->isImplicit()))) {\n // ...\n Diag(FD->getLocation(), diag::warn_non_prototype_changes_behavior) << /*definition*/ 1 << /* not supported in C2x */ 0;"},{B,15776,"Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, bool IsInstantiation) {\n // ...\n {\n // ...\n if (FD) {\n // ...\n // If the function being defined does not have a prototype, then we may\n // need to diagnose it as changing behavior in C2x because we now know\n // whether the function accepts arguments or not. This only handles the\n // case where the definition has no prototype but does have parameters\n // and either there is no previous potential prototype, or the previous\n // potential prototype also has no actual prototype. This handles cases\n // like:\n // void f(); void f(a) int a; {}\n // void g(a) int a; {}\n // See MergeFunctionDecl() for other cases of the behavior change\n // diagnostic. See GetFullTypeForDeclarator() for handling of a function\n // type without a prototype.\n if (!FD->hasWrittenPrototype() && FD->getNumParams() != 0 && (!PossiblePrototype || (!PossiblePrototype->hasWrittenPrototype() && !PossiblePrototype->isImplicit()))) {\n // ...\n // If we have a possible prototype for the function which is a user-\n // visible declaration, we already tested that it has no prototype.\n // This will change behavior in C2x. This gets a warning rather than a\n // note because it\'s the same behavior-changing problem as with the\n // definition.\n if (PossiblePrototype)\n Diag(PossiblePrototype->getLocation(), diag::warn_non_prototype_changes_behavior) << /*declaration*/ 0 << /* conflicting */ 1 << /*subsequent*/ 1 << /*definition*/ 1;"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:30:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]","clang/test/Parser/declarators.c:34:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]","clang/test/Parser/declarators.c:101:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]","clang/test/Parser/declarators.c:103:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]","clang/test/Parser/declarators.c:105:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]"} | ["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:30:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]","clang/test/Parser/declarators.c:34:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]","clang/test/Parser/declarators.c:101:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]","clang/test/Parser/declarators.c:103:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]","clang/test/Parser/declarators.c:105:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]"} | ||
} | } | ||
}, | }, | ||
["warn_non_virtual_dtor"]={ | ["warn_non_virtual_dtor"]={ | ||
[ | [i]={"effc++","non-virtual-dtor"}, | ||
[j]="non-virtual-dtor", | |||
[ | |||
[b]="%0 has virtual functions but non-virtual destructor", | [b]="%0 has virtual functions but non-virtual destructor", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) has virtual functions but non\\-virtual destructor", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnon\\-virtual\\-dtor[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"7f3986dc64fd",1296457500,"Warn if the class has virtual methods but non-virtual destructor. Addresses rdar://8756445.\n\nllvm-sv...","Warn if the class has virtual methods but non-virtual destructor. Addresses rdar://8756445.\n\nllvm-svn: 124582"}, | ||
[ | [g]={{T,6969,"/// 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 virtual methods but non-virtual public destructor.\n if (Record->isPolymorphic() && !Record->isDependentType()) {\n // ...\n if ((!dtor || (!dtor->isVirtual() && dtor->getAccess() == AS_public)) && !Record->hasAttr<FinalAttr>())\n Diag(dtor ? dtor->getLocation() : Record->getLocation(), diag::warn_non_virtual_dtor) << Context.getRecordType(Record);"}} | ||
}, | }, | ||
["warn_nonnull_expr_compare"]={ | ["warn_nonnull_expr_compare"]={ | ||
[ | [i]={n,"address",o,p,ec,"tautological-pointer-compare"}, | ||
[j]="tautological-pointer-compare", | |||
[ | |||
[b]="comparison of nonnull %select{function call|parameter}0 \'%1\' %select{not |}2equal to a null pointer is \'%select{true|false}2\' on first encounter", | [b]="comparison of nonnull %select{function call|parameter}0 \'%1\' %select{not |}2equal to a null pointer is \'%select{true|false}2\' on first encounter", | ||
[ | [d]=h, | ||
[ | [a]="comparison of nonnull (?:function call|parameter) \'(.*?)\' (?:not |)equal to a null pointer is \'(?:true|false)\' on first encounter", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtautological\\-pointer\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"850269a47eed",1449612120,"[Sema] Add warning when comparing nonnull and null\n\nCurrently, we emit warnings in some cases where ...","[Sema] Add warning when comparing nonnull and null\n\nCurrently, we emit warnings in some cases where nonnull function\nparameters are compared against null. This patch extends this support\nto warn when comparing the result of `returns_nonnull` functions\nagainst null.\n\nMore specifically, we will now warn cases like:\n\nint *foo() __attribute__((returns_nonnull));\nint main() {\n if (foo() == NULL) {} // warning: will always evaluate to false\n}\n\nDifferential Revision: http://reviews.llvm.org/D15324\n\nllvm-svn: 255058"}, | ||
[ | [g]={{r,15489,"/// Diagnose pointers that are always non-null.\n/// \\param E the expression containing the pointer\n/// \\param NullKind NPCK_NotNull if E is a cast to bool, otherwise, E is\n/// compared to a null pointer\n/// \\param IsEqual True when the comparison is equal to a null pointer\n/// \\param Range Extra SourceRange to highlight in the diagnostic\nvoid Sema::DiagnoseAlwaysNonNullPointer(Expr *E, Expr::NullPointerConstantKind NullKind, bool IsEqual, SourceRange Range) {\n // ...\n auto ComplainAboutNonnullParamOrCall = [&](const Attr *NonnullAttr) {\n // ...\n unsigned DiagID = IsCompare ? diag::warn_nonnull_expr_compare : diag::warn_cast_nonnull_to_bool;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/nonnull.c"]={"clang/test/Sema/nonnull.c:96:8: warning: comparison of nonnull parameter \'pointer\' equal to a null pointer is \'false\' on first encounter [-Wtautological-pointer-compare]","clang/test/Sema/nonnull.c:108:8: warning: comparison of nonnull parameter \'pv\' equal to a null pointer is \'false\' on first encounter [-Wtautological-pointer-compare]","clang/test/Sema/nonnull.c:114:8: warning: comparison of nonnull parameter \'pointer\' equal to a null pointer is \'false\' on first encounter [-Wtautological-pointer-compare]","clang/test/Sema/nonnull.c:126:8: warning: comparison of nonnull parameter \'pv\' equal to a null pointer is \'false\' on first encounter [-Wtautological-pointer-compare]","clang/test/Sema/nonnull.c:164:7: warning: comparison of nonnull function call \'returns_nonnull_whee()\' equal to a null pointer is \'false\' on first encounter [-Wtautological-pointer-compare]","clang/test/Sema/nonnull.c:166:7: warning: comparison of nonnull function call \'returns_nonnull_whee()\' not equal to a null pointer is \'true\' on first encounter [-Wtautological-pointer-compare]"} | ["clang/test/Sema/nonnull.c"]={"clang/test/Sema/nonnull.c:96:8: warning: comparison of nonnull parameter \'pointer\' equal to a null pointer is \'false\' on first encounter [-Wtautological-pointer-compare]","clang/test/Sema/nonnull.c:108:8: warning: comparison of nonnull parameter \'pv\' equal to a null pointer is \'false\' on first encounter [-Wtautological-pointer-compare]","clang/test/Sema/nonnull.c:114:8: warning: comparison of nonnull parameter \'pointer\' equal to a null pointer is \'false\' on first encounter [-Wtautological-pointer-compare]","clang/test/Sema/nonnull.c:126:8: warning: comparison of nonnull parameter \'pv\' equal to a null pointer is \'false\' on first encounter [-Wtautological-pointer-compare]","clang/test/Sema/nonnull.c:164:7: warning: comparison of nonnull function call \'returns_nonnull_whee()\' equal to a null pointer is \'false\' on first encounter [-Wtautological-pointer-compare]","clang/test/Sema/nonnull.c:166:7: warning: comparison of nonnull function call \'returns_nonnull_whee()\' not equal to a null pointer is \'true\' on first encounter [-Wtautological-pointer-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_noreturn_function_has_return_expr"]={ | ["warn_noreturn_function_has_return_expr"]={ | ||
[ | [i]={"invalid-noreturn"}, | ||
[j]="invalid-noreturn", | |||
[ | |||
[b]="function %0 declared \'noreturn\' should not return", | [b]="function %0 declared \'noreturn\' should not return", | ||
[ | [d]=h, | ||
[ | [a]="function (.*?) declared \'noreturn\' should not return", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Winvalid\\-noreturn[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"6e127a6d8642",1243798333,"Downgrade an error about \"return in a no-return function\" from being \nan error to being a warning th...","Downgrade an error about \"return in a no-return function\" from being \nan error to being a warning that defaults to error. If you want this to\nbe a warning, you have to explicitly pass -Winvalid-noreturn to clang to\nmap it back to a warning.\n\nllvm-svn: 72669"}, | ||
[ | [g]={{y,631,"struct CheckFallThroughDiagnostics {\n // ...\n bool checkDiagnostics(DiagnosticsEngine &D, bool ReturnsVoid, bool HasNoReturn) const {\n if (funMode == Function) {\n return (ReturnsVoid || D.isIgnored(diag::warn_maybe_falloff_nonvoid_function, FuncLoc)) && (!HasNoReturn || D.isIgnored(diag::warn_noreturn_function_has_return_expr, FuncLoc)) && (!ReturnsVoid || D.isIgnored(diag::warn_suggest_noreturn_block, FuncLoc));"},{M,3962,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n // ...\n if (const FunctionDecl *FD = getCurFunctionDecl()) {\n // ...\n if (FD->isNoReturn())\n Diag(ReturnLoc, diag::warn_noreturn_function_has_return_expr) << FD;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-noreturn.c"]={"clang/test/Sema/attr-noreturn.c:20:3: warning: function \'f3\' declared \'noreturn\' should not return [-Winvalid-noreturn]","clang/test/Sema/attr-noreturn.c:27:3: error: function \'f4\' declared \'noreturn\' should not return [-Werror,-Winvalid-noreturn]"} | ["clang/test/Sema/attr-noreturn.c"]={"clang/test/Sema/attr-noreturn.c:20:3: warning: function \'f3\' declared \'noreturn\' should not return [-Winvalid-noreturn]","clang/test/Sema/attr-noreturn.c:27:3: error: function \'f4\' declared \'noreturn\' should not return [-Werror,-Winvalid-noreturn]"} | ||
} | } | ||
}, | }, | ||
["warn_not_a_doxygen_trailing_member_comment"]={ | ["warn_not_a_doxygen_trailing_member_comment"]={ | ||
[ | [i]={Ac}, | ||
[j]=Ac, | |||
[ | |||
[b]="not a Doxygen trailing comment", | [b]="not a Doxygen trailing comment", | ||
[ | [d]=h, | ||
[ | [a]="not a Doxygen trailing comment", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdocumentation[^\\]]*\\]", | ||
[ | [c]="Documentation Issue", | ||
[ | [f]={"052f60d3846f",1340380975,"Add a warning about almost-Doxygen trailing comments: //< and /*< ... */\n\nllvm-svn: 159001","Add a warning about almost-Doxygen trailing comments: //< and /*< ... */\n\nllvm-svn: 159001"}, | ||
[ | [g]={{S,2421,"void Sema::ActOnComment(SourceRange Comment) {\n // ...\n if (RC.isAlmostTrailingComment() || RC.hasUnsupportedSplice(SourceMgr)) {\n // ...\n Diag(Comment.getBegin(), diag::warn_not_a_doxygen_trailing_member_comment) << FixItHint::CreateReplacement(MagicMarkerRange, MagicMarkerText);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-documentation-almost-trailing.c"]={"clang/test/Sema/warn-documentation-almost-trailing.c:8:10: warning: not a Doxygen trailing comment [-Wdocumentation]","clang/test/Sema/warn-documentation-almost-trailing.c:9:10: warning: not a Doxygen trailing comment [-Wdocumentation]"} | ["clang/test/Sema/warn-documentation-almost-trailing.c"]={"clang/test/Sema/warn-documentation-almost-trailing.c:8:10: warning: not a Doxygen trailing comment [-Wdocumentation]","clang/test/Sema/warn-documentation-almost-trailing.c:9:10: warning: not a Doxygen trailing comment [-Wdocumentation]"} | ||
} | } | ||
}, | }, | ||
["warn_not_compound_assign"]={ | ["warn_not_compound_assign"]={ | ||
[b]="use of unary operator that may be intended as compound assignment (%0=)", | [b]="use of unary operator that may be intended as compound assignment (%0=)", | ||
[ | [d]=h, | ||
[ | [a]="use of unary operator that may be intended as compound assignment \\((.*?)\\=\\)", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[ | [f]={vc,1237025389,xb,xb}, | ||
[ | [g]={{u,14527,"// C99 6.5.16.1\nQualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType, BinaryOperatorKind Opc) {\n // ...\n if (CompoundType.isNull()) {\n // ...\n if (UnaryOperator *UO = dyn_cast<UnaryOperator>(RHSCheck)) {\n if ((UO->getOpcode() == UO_Plus || UO->getOpcode() == UO_Minus) && Loc.isFileID() && UO->getOperatorLoc().isFileID() &&\n // ...\n Diag(Loc, diag::warn_not_compound_assign) << (UO->getOpcode() == UO_Plus ? \"+\" : \"-\") << SourceRange(UO->getOperatorLoc(), UO->getOperatorLoc());"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/exprs.c"]={"clang/test/Sema/exprs.c:55:11: warning: use of unary operator that may be intended as compound assignment (+=)","clang/test/Sema/exprs.c:56:11: warning: use of unary operator that may be intended as compound assignment (-=)"} | ["clang/test/Sema/exprs.c"]={"clang/test/Sema/exprs.c:55:11: warning: use of unary operator that may be intended as compound assignment (+=)","clang/test/Sema/exprs.c:56:11: warning: use of unary operator that may be intended as compound assignment (-=)"} | ||
} | } | ||
}, | }, | ||
["warn_not_enough_argument"]={ | ["warn_not_enough_argument"]={ | ||
[ | [i]={"sentinel"}, | ||
[j]="sentinel", | |||
[ | |||
[b]="not enough variable arguments in %0 declaration to fit a sentinel", | [b]="not enough variable arguments in %0 declaration to fit a sentinel", | ||
[ | [d]=h, | ||
[ | [a]="not enough variable arguments in (.*?) declaration to fit a sentinel", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wsentinel[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"9e87721d47fd",1242256850,"Look for and diagnose missing sentinel argument on message\ndispatch arguments which have sentinel at...","Look for and diagnose missing sentinel argument on message\ndispatch arguments which have sentinel attribute.\n\nllvm-svn: 71737"}, | ||
[ | [g]={{u,473,"/// DiagnoseSentinelCalls - This routine checks whether a call or\n/// message-send is to a declaration with the sentinel attribute, and\n/// if so, it checks that the requirements of the sentinel are\n/// satisfied.\nvoid Sema::DiagnoseSentinelCalls(NamedDecl *D, SourceLocation Loc, ArrayRef<Expr *> Args) {\n // ...\n // If there aren\'t enough arguments for all the formal parameters,\n // the sentinel, and the args after the sentinel, complain.\n if (Args.size() < numFormalParams + numArgsAfterSentinel + 1) {\n Diag(Loc, diag::warn_not_enough_argument) << D->getDeclName();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/method-sentinel-attr.m"]={"clang/test/SemaObjC/method-sentinel-attr.m:38:6: warning: not enough variable arguments in \'foo7:\' declaration to fit a sentinel [-Wsentinel]","clang/test/SemaObjC/method-sentinel-attr.m:41:6: warning: not enough variable arguments in \'foo12:\' declaration to fit a sentinel [-Wsentinel]"} | ["clang/test/SemaObjC/method-sentinel-attr.m"]={"clang/test/SemaObjC/method-sentinel-attr.m:38:6: warning: not enough variable arguments in \'foo7:\' declaration to fit a sentinel [-Wsentinel]","clang/test/SemaObjC/method-sentinel-attr.m:41:6: warning: not enough variable arguments in \'foo12:\' declaration to fit a sentinel [-Wsentinel]"} | ||
} | } | ||
}, | }, | ||
["warn_not_in_enum"]={ | ["warn_not_in_enum"]={ | ||
[ | [i]={n,o,"switch"}, | ||
[j]="switch", | |||
[ | |||
[b]="case value not in enumerated type %0", | [b]="case value not in enumerated type %0", | ||
[ | [d]=h, | ||
[ | [a]="case value not in enumerated type (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wswitch[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"d3dfbd6f4fd7",1274152761,"If a switch condition is constant, don\'t warn about missing enum cases.\nIf a switch condition is con...","If a switch condition is constant, don\'t warn about missing enum cases.\nIf a switch condition is constant, warn if there\'s no case for it.\n\nConstant switch conditions do come up in reasonable template code.\n\nllvm-svn: 104010"}, | ||
[ | [g]={{M,1526,"StmtResult Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *BodyStmt) {\n // ...\n if (!HasDependentValue) {\n // ...\n // If switch has default case, then ignore it.\n if (!CaseListIsErroneous && !CaseListIsIncomplete && !HasConstantCond && ET && ET->getDecl()->isCompleteDefinition() && !ET->getDecl()->enumerators().empty()) {\n // ...\n // See which case values aren\'t in enum.\n for (CaseValsTy::const_iterator CI = CaseVals.begin(); CI != CaseVals.end(); CI++) {\n // ...\n if (ShouldDiagnoseSwitchCaseNotInEnum(*this, ED, CaseExpr, EI, EIEnd, CI->first))\n Diag(CaseExpr->getExprLoc(), diag::warn_not_in_enum) << CondTypeBeforePromotion;"},{M,1537,"StmtResult Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *BodyStmt) {\n // ...\n if (!HasDependentValue) {\n // ...\n // If switch has default case, then ignore it.\n if (!CaseListIsErroneous && !CaseListIsIncomplete && !HasConstantCond && ET && ET->getDecl()->isCompleteDefinition() && !ET->getDecl()->enumerators().empty()) {\n // ...\n for (CaseRangesTy::const_iterator RI = CaseRanges.begin(); RI != CaseRanges.end(); RI++) {\n // ...\n if (ShouldDiagnoseSwitchCaseNotInEnum(*this, ED, CaseExpr, EI, EIEnd, RI->first))\n Diag(CaseExpr->getExprLoc(), diag::warn_not_in_enum) << CondTypeBeforePromotion;"},{M,1547,"StmtResult Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *BodyStmt) {\n // ...\n if (!HasDependentValue) {\n // ...\n // If switch has default case, then ignore it.\n if (!CaseListIsErroneous && !CaseListIsIncomplete && !HasConstantCond && ET && ET->getDecl()->isCompleteDefinition() && !ET->getDecl()->enumerators().empty()) {\n // ...\n for (CaseRangesTy::const_iterator RI = CaseRanges.begin(); RI != CaseRanges.end(); RI++) {\n // ...\n if (ShouldDiagnoseSwitchCaseNotInEnum(*this, ED, CaseExpr, EI, EIEnd, Hi))\n Diag(CaseExpr->getExprLoc(), diag::warn_not_in_enum) << CondTypeBeforePromotion;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/enum-attr.cpp"]={"clang/test/SemaCXX/enum-attr.cpp:32:8: warning: case value not in enumerated type \'enum Enum\' [-Wswitch]","clang/test/SemaCXX/enum-attr.cpp:45:8: warning: case value not in enumerated type \'enum EnumClosed\' [-Wswitch]","clang/test/SemaCXX/enum-attr.cpp:72:8: warning: case value not in enumerated type \'enum EnumFlag\' [-Wswitch]","clang/test/SemaCXX/enum-attr.cpp:86:8: warning: case value not in enumerated type \'enum EnumFlagClosed\' [-Wswitch]"} | ["clang/test/SemaCXX/enum-attr.cpp"]={"clang/test/SemaCXX/enum-attr.cpp:32:8: warning: case value not in enumerated type \'enum Enum\' [-Wswitch]","clang/test/SemaCXX/enum-attr.cpp:45:8: warning: case value not in enumerated type \'enum EnumClosed\' [-Wswitch]","clang/test/SemaCXX/enum-attr.cpp:72:8: warning: case value not in enumerated type \'enum EnumFlag\' [-Wswitch]","clang/test/SemaCXX/enum-attr.cpp:86:8: warning: case value not in enumerated type \'enum EnumFlagClosed\' [-Wswitch]"} | ||
} | } | ||
}, | }, | ||
["warn_not_in_enum_assignment"]={ | ["warn_not_in_enum_assignment"]={ | ||
[ | [i]={"assign-enum"}, | ||
[j]="assign-enum", | |||
[ | |||
[b]="integer constant not in range of enumerated type %0", | [b]="integer constant not in range of enumerated type %0", | ||
[ | [d]=h, | ||
[ | [a]="integer constant not in range of enumerated type (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wassign\\-enum[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"1ba2733e2cde",1370526480,"Fix a crash with -Wassign-enum, where we didn\'t adjust the APInt type of the\nconstant. Also fix some...","Fix a crash with -Wassign-enum, where we didn\'t adjust the APInt type of the\nconstant. Also fix some spelling mistakes and formatting issues.\n\nReviewed by Richard Smith over IRC.\n\nFixes PR15069.\n\nllvm-svn: 183409"}, | ||
[ | [g]={{M,1633,"void Sema::DiagnoseAssignmentEnum(QualType DstType, QualType SrcType, Expr *SrcExpr) {\n if (Diags.isIgnored(diag::warn_not_in_enum_assignment, SrcExpr->getExprLoc()))"},{M,1654,"void Sema::DiagnoseAssignmentEnum(QualType DstType, QualType SrcType, Expr *SrcExpr) {\n // ...\n if (const EnumType *ET = DstType->getAs<EnumType>())\n if (!Context.hasSameUnqualifiedType(SrcType, DstType) && SrcType->isIntegerType()) {\n if (!SrcExpr->isTypeDependent() && !SrcExpr->isValueDependent() && SrcExpr->isIntegerConstantExpr(Context)) {\n // ...\n if (ED->hasAttr<FlagEnumAttr>()) {\n if (!IsValueInFlagEnum(ED, RhsVal, true))\n Diag(SrcExpr->getExprLoc(), diag::warn_not_in_enum_assignment) << DstType.getUnqualifiedType();"},{M,1679,"void Sema::DiagnoseAssignmentEnum(QualType DstType, QualType SrcType, Expr *SrcExpr) {\n // ...\n if (const EnumType *ET = DstType->getAs<EnumType>())\n if (!Context.hasSameUnqualifiedType(SrcType, DstType) && SrcType->isIntegerType()) {\n if (!SrcExpr->isTypeDependent() && !SrcExpr->isValueDependent() && SrcExpr->isIntegerConstantExpr(Context)) {\n // ...\n if (ED->hasAttr<FlagEnumAttr>()) {\n // ...\n } else {\n // ...\n if (EI == EIend || EI->first != RhsVal) {\n Diag(SrcExpr->getExprLoc(), diag::warn_not_in_enum_assignment) << DstType.getUnqualifiedType();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-flag-enum.c"]={"clang/test/Sema/attr-flag-enum.c:49:7: warning: integer constant not in range of enumerated type \'enum flag\' [-Wassign-enum]","clang/test/Sema/attr-flag-enum.c:50:7: warning: integer constant not in range of enumerated type \'enum flag\' [-Wassign-enum]","clang/test/Sema/attr-flag-enum.c:55:7: warning: integer constant not in range of enumerated type \'enum flag\' [-Wassign-enum]","clang/test/Sema/attr-flag-enum.c:76:7: warning: integer constant not in range of enumerated type \'enum flag4\' [-Wassign-enum]"} | ["clang/test/Sema/attr-flag-enum.c"]={"clang/test/Sema/attr-flag-enum.c:49:7: warning: integer constant not in range of enumerated type \'enum flag\' [-Wassign-enum]","clang/test/Sema/attr-flag-enum.c:50:7: warning: integer constant not in range of enumerated type \'enum flag\' [-Wassign-enum]","clang/test/Sema/attr-flag-enum.c:55:7: warning: integer constant not in range of enumerated type \'enum flag\' [-Wassign-enum]","clang/test/Sema/attr-flag-enum.c:76:7: warning: integer constant not in range of enumerated type \'enum flag4\' [-Wassign-enum]"} | ||
} | } | ||
}, | }, | ||
["warn_not_xl_compatible"]={ | ["warn_not_xl_compatible"]={ | ||
[ | [i]={"aix-compat"}, | ||
[j]="aix-compat", | |||
[ | |||
[b]="alignment of 16 bytes for a struct member is not binary compatible with IBM XL C/C++ for AIX 16.1.0 or older", | [b]="alignment of 16 bytes for a struct member is not binary compatible with IBM XL C/C++ for AIX 16.1.0 or older", | ||
[ | [d]=h, | ||
[ | [a]="alignment of 16 bytes for a struct member is not binary compatible with IBM XL C\\/C\\+\\+ for AIX 16\\.1\\.0 or older", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Waix\\-compat[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={Xb,1615397021,Ub,Rb}, | ||
[ | [g]={{r,6602,"// 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 Diag(FD->getLocation(), diag::warn_not_xl_compatible) << FD;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/aix-attr-align.c"]={"clang/test/Sema/aix-attr-align.c:15:7: warning: alignment of 16 bytes for a struct member is not binary compatible with IBM XL C/C++ for AIX 16.1.0 or older [-Waix-compat]"} | ["clang/test/Sema/aix-attr-align.c"]={"clang/test/Sema/aix-attr-align.c:15:7: warning: alignment of 16 bytes for a struct member is not binary compatible with IBM XL C/C++ for AIX 16.1.0 or older [-Waix-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_nothrow_attribute_ignored"]={ | ["warn_nothrow_attribute_ignored"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="\'nothrow\' attribute conflicts with exception specification; attribute ignored", | [b]="\'nothrow\' attribute conflicts with exception specification; attribute ignored", | ||
[ | [d]=h, | ||
[ | [a]="\'nothrow\' attribute conflicts with exception specification; attribute ignored", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={"d02f4a1043c0",1559237514,"Add Attribute NoThrow as an Exception Specifier Type\n\nIn response to https://bugs.llvm.org/show_bug....","Add Attribute NoThrow as an Exception Specifier Type\n\nIn response to https://bugs.llvm.org/show_bug.cgi?id=33235, it became\nclear that the current mechanism of hacking through checks for the\nexception specification of a function gets confused really quickly when\nthere are alternate exception specifiers.\n\nThis patch introcues EST_NoThrow, which is the equivilent of\nEST_noexcept when caused by EST_noThrow. The existing implementation is\nleft in place to cover functions with no FunctionProtoType.\n\nDifferential Revision: https://reviews.llvm.org/D62435\n\nllvm-svn: 362119"}, | ||
[ | [g]={{L,7941,"/// Process an individual function attribute. Returns true to\n/// indicate that the attribute was handled, false if it wasn\'t.\nstatic bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // ...\n if (attr.getKind() == ParsedAttr::AT_NoThrow) {\n // ...\n // MSVC ignores nothrow if it is in conflict with an explicit exception\n // specification.\n if (Proto->hasExceptionSpec()) {\n // ...\n case EST_Dynamic:\n case EST_MSAny:\n case EST_NoexceptFalse:\n S.Diag(attr.getLoc(), diag::warn_nothrow_attribute_ignored);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/nothrow-vs-exception-specs.cpp"]={"clang/test/SemaCXX/nothrow-vs-exception-specs.cpp:45:16: warning: \'nothrow\' attribute conflicts with exception specification; attribute ignored [-Wignored-attributes]","clang/test/SemaCXX/nothrow-vs-exception-specs.cpp:51:12: warning: \'nothrow\' attribute conflicts with exception specification; attribute ignored [-Wignored-attributes]","clang/test/SemaCXX/nothrow-vs-exception-specs.cpp:55:12: warning: \'nothrow\' attribute conflicts with exception specification; attribute ignored [-Wignored-attributes]"} | ["clang/test/SemaCXX/nothrow-vs-exception-specs.cpp"]={"clang/test/SemaCXX/nothrow-vs-exception-specs.cpp:45:16: warning: \'nothrow\' attribute conflicts with exception specification; attribute ignored [-Wignored-attributes]","clang/test/SemaCXX/nothrow-vs-exception-specs.cpp:51:12: warning: \'nothrow\' attribute conflicts with exception specification; attribute ignored [-Wignored-attributes]","clang/test/SemaCXX/nothrow-vs-exception-specs.cpp:55:12: warning: \'nothrow\' attribute conflicts with exception specification; attribute ignored [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_npot_ms_struct"]={ | ["warn_npot_ms_struct"]={ | ||
[ | [i]={"incompatible-ms-struct"}, | ||
[j]="incompatible-ms-struct", | |||
[ | |||
[b]="ms_struct may not produce Microsoft-compatible layouts with fundamental data types with sizes that aren\'t a power of two", | [b]="ms_struct may not produce Microsoft-compatible layouts with fundamental data types with sizes that aren\'t a power of two", | ||
[ | [d]=Hb, | ||
[ | [a]="ms_struct may not produce Microsoft\\-compatible layouts with fundamental data types with sizes that aren\'t a power of two", | ||
[ | [e]=" \\[[^\\]]*\\-Wincompatible\\-ms\\-struct[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"87c2ad29ee4e",1519935777,"[RecordLayout] Only assert that fundamental type sizes are power of two on MSVC\n\nMake types with siz...","[RecordLayout] Only assert that fundamental type sizes are power of two on MSVC\n\nMake types with sizes that aren\'t a power of two an error (that can\nbe disabled) in structs with ms_struct layout, except on mingw where\nthe situation is quite likely to occur and GCC handles it silently.\n\nDifferential Revision: https://reviews.llvm.org/D43908\n\nllvm-svn: 326476"}, | ||
[ | [g]={{Zb,1958,"void ItaniumRecordLayoutBuilder::LayoutField(const FieldDecl *D, bool InsertExtraPadding) {\n // ...\n if (D->getType()->isIncompleteArrayType()) {\n // ...\n } else {\n // ...\n if (IsMsStruct) {\n // ...\n if (const BuiltinType *BTy = T->getAs<BuiltinType>()) {\n // ...\n if (!llvm::isPowerOf2_64(TypeSize.getQuantity())) {\n // ...\n // Since the combination of -mms-bitfields together with structs\n // like max_align_t (which contains a long double) for mingw is\n // quite common (and GCC handles it silently), just handle it\n // silently there. For other targets that have ms_struct enabled\n // (most probably via a pragma or attribute), trigger a diagnostic\n // that defaults to an error.\n if (!Context.getTargetInfo().getTriple().isWindowsGNUEnvironment())\n Diag(D->getLocation(), diag::warn_npot_ms_struct);"}} | ||
}, | }, | ||
["warn_ns_attribute_wrong_parameter_type"]={ | ["warn_ns_attribute_wrong_parameter_type"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="%0 attribute only applies to %select{Objective-C object|pointer|pointer-to-CF-pointer|pointer/reference-to-OSObject-pointer}1 parameters", | [b]="%0 attribute only applies to %select{Objective-C object|pointer|pointer-to-CF-pointer|pointer/reference-to-OSObject-pointer}1 parameters", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) attribute only applies to (?:Objective\\-C object|pointer|pointer\\-to\\-CF\\-pointer|pointer\\/reference\\-to\\-OSObject\\-pointer) parameters", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={"ed433937c2b8",1295926318,"Add the ns_consumes_self, ns_consumed, cf_consumed, and ns_returns_autoreleased\nattributes for the b...","Add the ns_consumes_self, ns_consumed, cf_consumed, and ns_returns_autoreleased\nattributes for the benefit of the static analyzer.\n\nllvm-svn: 124174"}, | ||
[ | [g]={{w,5898,"void Sema::AddXConsumedAttr(Decl *D, const AttributeCommonInfo &CI, RetainOwnershipKind K, bool IsTemplateInstantiation) {\n // ...\n case RetainOwnershipKind::OS:\n handleSimpleAttributeOrDiagnose<OSConsumedAttr>(*this, VD, CI, isValidSubjectOfOSAttribute(VD->getType()), diag::warn_ns_attribute_wrong_parameter_type,"},{w,5911,"void Sema::AddXConsumedAttr(Decl *D, const AttributeCommonInfo &CI, RetainOwnershipKind K, bool IsTemplateInstantiation) {\n // ...\n case RetainOwnershipKind::NS:\n handleSimpleAttributeOrDiagnose<NSConsumedAttr>(*this, VD, CI, isValidSubjectOfNSAttribute(VD->getType()),\n // ...\n ((IsTemplateInstantiation && getLangOpts().ObjCAutoRefCount) ? diag::err_ns_attribute_wrong_parameter_type : diag::warn_ns_attribute_wrong_parameter_type),"},{w,5917,"void Sema::AddXConsumedAttr(Decl *D, const AttributeCommonInfo &CI, RetainOwnershipKind K, bool IsTemplateInstantiation) {\n // ...\n case RetainOwnershipKind::CF:\n handleSimpleAttributeOrDiagnose<CFConsumedAttr>(*this, VD, CI, isValidSubjectOfCFAttribute(VD->getType()), diag::warn_ns_attribute_wrong_parameter_type,"},{w,5989,"static void handleXReturnsXRetainedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {\n // ...\n } else if (S.getLangOpts().ObjCAutoRefCount && hasDeclarator(D) && (AL.getKind() == ParsedAttr::AT_NSReturnsRetained)) {\n // ...\n } else if (const auto *PD = dyn_cast<ObjCPropertyDecl>(D)) {\n // ...\n } else if (const auto *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n } else if (const auto *Param = dyn_cast<ParmVarDecl>(D)) {\n // ...\n if (ReturnType.isNull()) {\n S.Diag(D->getBeginLoc(), diag::warn_ns_attribute_wrong_parameter_type) << AL << DiagID << AL.getRange();"},{w,6053,"static void handleXReturnsXRetainedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!TypeOK) {\n // ...\n if (isa<ParmVarDecl>(D)) {\n S.Diag(D->getBeginLoc(), diag::warn_ns_attribute_wrong_parameter_type) << AL << ParmDiagID << AL.getRange();"},{w,9091,"/// ProcessDeclAttribute - Apply the specific attribute to the specified decl if\n/// the attribute applies to decls. If the attribute is a type attribute, just\n/// silently ignore it if a GNU attribute.\nstatic void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, const Sema::ProcessDeclAttributeOptions &Options) {\n // ...\n case ParsedAttr::AT_OSReturnsRetainedOnZero:\n handleSimpleAttributeOrDiagnose<OSReturnsRetainedOnZeroAttr>(S, D, AL, isValidOSObjectOutParameter(D), diag::warn_ns_attribute_wrong_parameter_type,"},{w,9097,"/// ProcessDeclAttribute - Apply the specific attribute to the specified decl if\n/// the attribute applies to decls. If the attribute is a type attribute, just\n/// silently ignore it if a GNU attribute.\nstatic void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, const Sema::ProcessDeclAttributeOptions &Options) {\n // ...\n case ParsedAttr::AT_OSReturnsRetainedOnNonZero:\n handleSimpleAttributeOrDiagnose<OSReturnsRetainedOnNonZeroAttr>(S, D, AL, isValidOSObjectOutParameter(D), diag::warn_ns_attribute_wrong_parameter_type,"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/attr-cf_returns.m"]={"clang/test/SemaObjC/attr-cf_returns.m:38:19: warning: \'cf_returns_retained\' attribute only applies to pointer-to-CF-pointer parameters [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:39:19: warning: \'cf_returns_retained\' attribute only applies to pointer-to-CF-pointer parameters [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:40:19: warning: \'cf_returns_retained\' attribute only applies to pointer-to-CF-pointer parameters [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:41:19: warning: \'cf_returns_retained\' attribute only applies to pointer-to-CF-pointer parameters [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:42:19: warning: \'cf_returns_retained\' attribute only applies to pointer-to-CF-pointer parameters [-Wignored-attributes]"} | ["clang/test/SemaObjC/attr-cf_returns.m"]={"clang/test/SemaObjC/attr-cf_returns.m:38:19: warning: \'cf_returns_retained\' attribute only applies to pointer-to-CF-pointer parameters [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:39:19: warning: \'cf_returns_retained\' attribute only applies to pointer-to-CF-pointer parameters [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:40:19: warning: \'cf_returns_retained\' attribute only applies to pointer-to-CF-pointer parameters [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:41:19: warning: \'cf_returns_retained\' attribute only applies to pointer-to-CF-pointer parameters [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:42:19: warning: \'cf_returns_retained\' attribute only applies to pointer-to-CF-pointer parameters [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_ns_attribute_wrong_return_type"]={ | ["warn_ns_attribute_wrong_return_type"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="%0 attribute only applies to %select{functions|methods|properties}1 that return %select{an Objective-C object|a pointer|a non-retainable pointer}2", | [b]="%0 attribute only applies to %select{functions|methods|properties}1 that return %select{an Objective-C object|a pointer|a non-retainable pointer}2", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) attribute only applies to (?:functions|methods|properties) that return (?:an Objective\\-C object|a pointer|a non\\-retainable pointer)", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={"3b204e4c2e06",1242248852,"Add some basic type checking for attributes ns_returns_retained and\ncf_returns_retained. Currently t...","Add some basic type checking for attributes ns_returns_retained and\ncf_returns_retained. Currently this attribute can now be applied to any\nObjective-C method or C function that returns a pointer or Objective-C object\ntype.\n\nModify the tablegen definition of diagnostic \'warn_attribute_wrong_decl_type\' to\nexpect that the diagnostics infrastructure will add quotes around the attribute\nname when appropriate. Alonq with this change, I modified the places where this\nwarning is issued to passed the attribute\'s IdentifierInfo* instead of having a\nhard-coded C constant string.\n\nllvm-svn: 71718"}, | ||
[ | [g]={{w,5952,"bool Sema::checkNSReturnsRetainedReturnType(SourceLocation Loc, QualType QT) {\n // ...\n Diag(Loc, diag::warn_ns_attribute_wrong_return_type) << \"\'ns_returns_retained\'\" << 0 << 0;"},{w,6066,"static void handleXReturnsXRetainedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!TypeOK) {\n // ...\n if (isa<ParmVarDecl>(D)) {\n // ...\n } else {\n // ...\n S.Diag(D->getBeginLoc(), diag::warn_ns_attribute_wrong_return_type) << AL << SubjectKind << Cf << AL.getRange();"},{w,6113,"static void handleObjCReturnsInnerPointerAttr(Sema &S, Decl *D, const ParsedAttr &Attrs) {\n // ...\n if (!resultType->isReferenceType() && (!resultType->isPointerType() || resultType->isObjCRetainableType())) {\n S.Diag(D->getBeginLoc(), diag::warn_ns_attribute_wrong_return_type) << SourceRange(loc) << Attrs << (isa<ObjCMethodDecl>(D) ? EP_ObjCMethod : EP_ObjCProperty) << /*non-retainable pointer*/ 2;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/attr-cf_returns.m"]={"clang/test/SemaObjC/attr-cf_returns.m:18:1: warning: \'cf_returns_retained\' attribute only applies to functions that return a pointer [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:19:1: warning: \'cf_returns_retained\' attribute only applies to functions that return a pointer [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:25:1: warning: \'cf_returns_retained\' attribute only applies to methods that return a pointer [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:26:1: warning: \'cf_returns_retained\' attribute only applies to methods that return a pointer [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:31:1: warning: \'cf_returns_retained\' attribute only applies to properties that return a pointer [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:32:1: warning: \'cf_returns_retained\' attribute only applies to properties that return a pointer [-Wignored-attributes]"} | ["clang/test/SemaObjC/attr-cf_returns.m"]={"clang/test/SemaObjC/attr-cf_returns.m:18:1: warning: \'cf_returns_retained\' attribute only applies to functions that return a pointer [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:19:1: warning: \'cf_returns_retained\' attribute only applies to functions that return a pointer [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:25:1: warning: \'cf_returns_retained\' attribute only applies to methods that return a pointer [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:26:1: warning: \'cf_returns_retained\' attribute only applies to methods that return a pointer [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:31:1: warning: \'cf_returns_retained\' attribute only applies to properties that return a pointer [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:32:1: warning: \'cf_returns_retained\' attribute only applies to properties that return a pointer [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_nsconsumed_attribute_mismatch"]={ | ["warn_nsconsumed_attribute_mismatch"]={ | ||
[ | [i]={"nsconsumed-mismatch"}, | ||
[j]="nsconsumed-mismatch", | |||
[ | |||
[b]="overriding method has mismatched ns_consumed attribute on its parameter", | [b]="overriding method has mismatched ns_consumed attribute on its parameter", | ||
[ | [d]=h, | ||
[ | [a]="overriding method has mismatched ns_consumed attribute on its parameter", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnsconsumed\\-mismatch[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"7d85b8f6f651",1505885958,"[Sema][ObjC] Warn about mismatches in attributes between overriding and\noverridden methods when comp...","[Sema][ObjC] Warn about mismatches in attributes between overriding and\noverridden methods when compiling for non-ARC.\n\nPreviously, clang would error out when compiling for ARC, but didn\'t\nprint any diagnostics when compiling for non-ARC.\n\nThis was pointed out in the patch review for attribute noescape:\n\nhttps://reviews.llvm.org/D32210\n\nllvm-svn: 313717"}, | ||
[ | [g]={{I,216,"void Sema::CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden) {\n // ...\n for (ObjCMethodDecl::param_iterator ni = NewMethod->param_begin(), ne = NewMethod->param_end(); ni != ne && oi != oe; ++ni, ++oi) {\n // ...\n if (newDecl->hasAttr<NSConsumedAttr>() != oldDecl->hasAttr<NSConsumedAttr>()) {\n Diag(newDecl->getLocation(), getLangOpts().ObjCAutoRefCount ? diag::err_nsconsumed_attribute_mismatch : diag::warn_nsconsumed_attribute_mismatch);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/arc-nsconsumed-errors.m"]={"clang/test/SemaObjC/arc-nsconsumed-errors.m:29:44: warning: overriding method has mismatched ns_consumed attribute on its parameter [-Wnsconsumed-mismatch]"} | ["clang/test/SemaObjC/arc-nsconsumed-errors.m"]={"clang/test/SemaObjC/arc-nsconsumed-errors.m:29:44: warning: overriding method has mismatched ns_consumed attribute on its parameter [-Wnsconsumed-mismatch]"} | ||
} | } | ||
}, | }, | ||
["warn_nsdictionary_duplicate_key"]={ | ["warn_nsdictionary_duplicate_key"]={ | ||
[ | [i]={"objc-dictionary-duplicate-keys"}, | ||
[j]="objc-dictionary-duplicate-keys", | |||
[ | |||
[b]="duplicate key in dictionary literal", | [b]="duplicate key in dictionary literal", | ||
[ | [d]=h, | ||
[ | [a]="duplicate key in dictionary literal", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-dictionary\\-duplicate\\-keys[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={gc,1576908663,fc,hc}, | ||
[ | [g]={{U,922,"/// 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 S.Diag(Loc, diag::warn_nsdictionary_duplicate_key);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/dictionary-literal-duplicates.m"]={"clang/test/SemaObjC/dictionary-literal-duplicates.m:29:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:30:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:34:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:35:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:36:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:37:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:38:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:40:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:46:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:47:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:55:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:55:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]"} | ["clang/test/SemaObjC/dictionary-literal-duplicates.m"]={"clang/test/SemaObjC/dictionary-literal-duplicates.m:29:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:30:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:34:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:35:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:36:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:37:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:38:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:40:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:46:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:47:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:55:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:55:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]"} | ||
} | } | ||
}, | }, | ||
["warn_nsobject_attribute"]={ | ["warn_nsobject_attribute"]={ | ||
[ | [i]={"NSObject-attribute"}, | ||
[j]="NSObject-attribute", | |||
[ | |||
[b]="\'NSObject\' attribute may be put on a typedef only; attribute is ignored", | [b]="\'NSObject\' attribute may be put on a typedef only; attribute is ignored", | ||
[ | [d]=h, | ||
[ | [a]="\'NSObject\' attribute may be put on a typedef only; attribute is ignored", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-WNSObject\\-attribute[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"a45495a9f224",1322531320,"objc: warn if NSObject attribute appears other than in a typedef.\n// rdar://10453342\n\nllvm-svn: 1453...","objc: warn if NSObject attribute appears other than in a typedef.\n// rdar://10453342\n\nllvm-svn: 145358"}, | ||
[ | [g]={{w,3012,"static void handleObjCNSObject(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (const auto *TD = dyn_cast<TypedefNameDecl>(D)) {\n // ...\n } else if (const auto *PD = dyn_cast<ObjCPropertyDecl>(D)) {\n // ...\n } else {\n // ...\n S.Diag(D->getLocation(), diag::warn_nsobject_attribute);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/nsobject-attribute.m"]={"clang/test/SemaObjC/nsobject-attribute.m:53:37: warning: \'NSObject\' attribute may be put on a typedef only; attribute is ignored [-WNSObject-attribute]","clang/test/SemaObjC/nsobject-attribute.m:59:37: warning: \'NSObject\' attribute may be put on a typedef only; attribute is ignored [-WNSObject-attribute]"} | ["clang/test/SemaObjC/nsobject-attribute.m"]={"clang/test/SemaObjC/nsobject-attribute.m:53:37: warning: \'NSObject\' attribute may be put on a typedef only; attribute is ignored [-WNSObject-attribute]","clang/test/SemaObjC/nsobject-attribute.m:59:37: warning: \'NSObject\' attribute may be put on a typedef only; attribute is ignored [-WNSObject-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_nsreturns_retained_attribute_mismatch"]={ | ["warn_nsreturns_retained_attribute_mismatch"]={ | ||
[ | [i]={"nsreturns-mismatch"}, | ||
[j]="nsreturns-mismatch", | |||
[ | |||
[b]="overriding method has mismatched ns_returns_%select{not_retained|retained}0 attributes", | [b]="overriding method has mismatched ns_returns_%select{not_retained|retained}0 attributes", | ||
[ | [d]=h, | ||
[ | [a]="overriding method has mismatched ns_returns_(?:not_retained|retained) attributes", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnsreturns\\-mismatch[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"7d85b8f6f651",1505885958,"[Sema][ObjC] Warn about mismatches in attributes between overriding and\noverridden methods when comp...","[Sema][ObjC] Warn about mismatches in attributes between overriding and\noverridden methods when compiling for non-ARC.\n\nPreviously, clang would error out when compiling for ARC, but didn\'t\nprint any diagnostics when compiling for non-ARC.\n\nThis was pointed out in the patch review for attribute noescape:\n\nhttps://reviews.llvm.org/D32210\n\nllvm-svn: 313717"}, | ||
[ | [g]={{I,190,"void Sema::CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden) {\n // ...\n if ((NewMethod->hasAttr<NSReturnsRetainedAttr>() != Overridden->hasAttr<NSReturnsRetainedAttr>())) {\n Diag(NewMethod->getLocation(), getLangOpts().ObjCAutoRefCount ? diag::err_nsreturns_retained_attribute_mismatch : diag::warn_nsreturns_retained_attribute_mismatch) << 1;"},{I,199,"void Sema::CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden) {\n // ...\n if ((NewMethod->hasAttr<NSReturnsNotRetainedAttr>() != Overridden->hasAttr<NSReturnsNotRetainedAttr>())) {\n Diag(NewMethod->getLocation(), getLangOpts().ObjCAutoRefCount ? diag::err_nsreturns_retained_attribute_mismatch : diag::warn_nsreturns_retained_attribute_mismatch) << 0;"}}, | ||
[ | [k]={ | ||
["clang/test/ARCMT/objcmt-arc-cf-annotations.m"]={"clang/test/ARCMT/objcmt-arc-cf-annotations.m:1687:1: warning: overriding method has mismatched ns_returns_retained attributes [-Wnsreturns-mismatch]","clang/test/ARCMT/objcmt-arc-cf-annotations.m:1691:1: warning: overriding method has mismatched ns_returns_retained attributes [-Wnsreturns-mismatch]"} | ["clang/test/ARCMT/objcmt-arc-cf-annotations.m"]={"clang/test/ARCMT/objcmt-arc-cf-annotations.m:1687:1: warning: overriding method has mismatched ns_returns_retained attributes [-Wnsreturns-mismatch]","clang/test/ARCMT/objcmt-arc-cf-annotations.m:1691:1: warning: overriding method has mismatched ns_returns_retained attributes [-Wnsreturns-mismatch]"} | ||
} | } | ||
}, | }, | ||
["warn_null_arg"]={ | ["warn_null_arg"]={ | ||
[ | [i]={n,o,H,p,"nonnull"}, | ||
[j]="nonnull", | |||
[ | |||
[b]="null passed to a callee that requires a non-null argument", | [b]="null passed to a callee that requires a non-null argument", | ||
[ | [d]=h, | ||
[ | [a]="null passed to a callee that requires a non\\-null argument", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnonnull[^\\]]*\\]", | ||
[ | [c]=ab, | ||
[ | [f]={"cd1a88da02c2",1242931731,"Check on null arguments in the presense of nonnull attribute.\n\nllvm-svn: 72219","Check on null arguments in the presense of nonnull attribute.\n\nllvm-svn: 72219"}, | ||
[ | [g]={{r,6415,"static void CheckNonNullArgument(Sema &S, const Expr *ArgExpr, SourceLocation CallSiteLoc) {\n if (CheckNonNullExpr(S, ArgExpr))\n S.DiagRuntimeBehavior(CallSiteLoc, ArgExpr, S.PDiag(diag::warn_null_arg) << ArgExpr->getSourceRange());"},{u,6700,"/// CheckStaticArrayArgument - If the given argument corresponds to a static\n/// array parameter, check that it is non-null, and that if it is formed by\n/// array-to-pointer decay, the underlying array is sufficiently large.\n///\n/// C99 6.7.5.3p7: If the keyword static also appears within the [ and ] of the\n/// array type derivation, then for each call to the function, the value of the\n/// corresponding actual argument shall provide access to the first element of\n/// an array with at least as many elements as specified by the size expression.\nvoid Sema::CheckStaticArrayArgument(SourceLocation CallLoc, ParmVarDecl *Param, const Expr *ArgExpr) {\n // ...\n if (ArgExpr->isNullPointerConstant(Context, Expr::NPC_NeverValueDependent)) {\n Diag(CallLoc, diag::warn_null_arg) << ArgExpr->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/kindof.m"]={"clang/test/SemaObjC/kindof.m:374:19: warning: null passed to a callee that requires a non-null argument [-Wnonnull]","clang/test/SemaObjC/kindof.m:455:35: warning: null passed to a callee that requires a non-null argument [-Wnonnull]"} | ["clang/test/SemaObjC/kindof.m"]={"clang/test/SemaObjC/kindof.m:374:19: warning: null passed to a callee that requires a non-null argument [-Wnonnull]","clang/test/SemaObjC/kindof.m:455:35: warning: null passed to a callee that requires a non-null argument [-Wnonnull]"} | ||
} | } | ||
}, | }, | ||
["warn_null_in_arithmetic_operation"]={ | ["warn_null_in_arithmetic_operation"]={ | ||
[ | [i]={"null-arithmetic"}, | ||
[j]="null-arithmetic", | |||
[ | |||
[b]="use of NULL in arithmetic operation", | [b]="use of NULL in arithmetic operation", | ||
[ | [d]=h, | ||
[ | [a]="use of NULL in arithmetic operation", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnull\\-arithmetic[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"701fb36b9515",1308260216,"Add a new warning when a NULL constant is used in arithmetic operations. The warning will fire on c...","Add a new warning when a NULL constant is used in arithmetic operations. The warning will fire on cases such as:\n\nint x = 1 + NULL;\n\nllvm-svn: 133196"}, | ||
[ | [g]={{u,11284,"// checkArithmeticNull - Detect when a NULL constant is used improperly in an\n// expression. These are mainly cases where the null pointer is used as an\n// integer instead of a pointer.\nstatic void checkArithmeticNull(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompare) {\n // ...\n // Comparison operations would not make sense with a null pointer no matter\n // what the other expression is.\n if (!IsCompare) {\n S.Diag(Loc, diag::warn_null_in_arithmetic_operation) << (LHSNull ? LHS.get()->getSourceRange() : SourceRange()) << (RHSNull ? RHS.get()->getSourceRange() : SourceRange());"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/null_in_arithmetic_ops.cpp"]={"clang/test/SemaCXX/null_in_arithmetic_ops.cpp:14:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:14:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:15:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:15:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:16:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:16:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:18:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:18:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:19:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:19:25: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:20:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:20:25: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:21:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:21:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:23:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:23:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:24:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:24:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:25:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:25:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:29:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:29:26: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:37:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:37:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:38:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:38:28: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:41:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:42:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:43:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:45:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:46:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:47:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:48:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:50:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:51:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:52:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:54:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:55:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:56:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:58:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:59:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:60:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:61:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:63:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:64:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:65:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]"} | ["clang/test/SemaCXX/null_in_arithmetic_ops.cpp"]={"clang/test/SemaCXX/null_in_arithmetic_ops.cpp:14:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:14:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:15:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:15:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:16:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:16:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:18:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:18:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:19:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:19:25: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:20:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:20:25: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:21:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:21:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:23:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:23:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:24:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:24:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:25:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:25:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:29:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:29:26: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:37:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:37:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:38:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:38:28: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:41:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:42:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:43:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:45:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:46:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:47:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:48:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:50:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:51:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:52:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:54:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:55:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:56:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:58:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:59:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:60:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:61:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:63:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:64:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:65:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]"} | ||
} | } | ||
}, | }, | ||
["warn_null_in_comparison_operation"]={ | ["warn_null_in_comparison_operation"]={ | ||
[ | [i]={"null-arithmetic"}, | ||
[j]="null-arithmetic", | |||
[ | |||
[b]="comparison between NULL and non-pointer %select{(%1 and NULL)|(NULL and %1)}0", | [b]="comparison between NULL and non-pointer %select{(%1 and NULL)|(NULL and %1)}0", | ||
[ | [d]=h, | ||
[ | [a]="comparison between NULL and non\\-pointer (?:\\((.*?) and NULL\\)|\\(NULL and (.*?)\\))", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnull\\-arithmetic[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"aee9e76722d0",1313102301,"The current warning in -Wnull-arithmetic for comparisons between NULL and non-pointers is not very h...","The current warning in -Wnull-arithmetic for comparisons between NULL and non-pointers is not very helpful. This patch will update the wording to be more helpful to users.\n\nOld warning:\n\nwarning: use of NULL in arithmetic operation [-Wnull-arithmetic]\n return 10 <= NULL;\n ^ ~~~~\n\nNew warning:\n\nwarning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]\n return 10 <= NULL;\n ~~ ^ ~~~~\nllvm-svn: 137377"}, | ||
[ | [g]={{u,11312,"// checkArithmeticNull - Detect when a NULL constant is used improperly in an\n// expression. These are mainly cases where the null pointer is used as an\n// integer instead of a pointer.\nstatic void checkArithmeticNull(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompare) {\n // ...\n S.Diag(Loc, diag::warn_null_in_comparison_operation) << LHSNull /* LHS is NULL */ << NonNullType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/null_in_arithmetic_ops.cpp"]={"clang/test/SemaCXX/null_in_arithmetic_ops.cpp:67:9: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:67:21: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:68:12: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:68:24: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:69:9: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:69:22: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:70:12: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:70:25: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:71:9: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:71:22: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:72:12: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:72:25: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:85:16: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]"} | ["clang/test/SemaCXX/null_in_arithmetic_ops.cpp"]={"clang/test/SemaCXX/null_in_arithmetic_ops.cpp:67:9: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:67:21: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:68:12: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:68:24: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:69:9: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:69:22: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:70:12: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:70:25: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:71:9: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:71:22: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:72:12: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:72:25: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:85:16: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]"} | ||
} | } | ||
}, | }, | ||
["warn_null_pointer_compare"]={ | ["warn_null_pointer_compare"]={ | ||
[ | [i]={n,"address",o,p,ec,"tautological-pointer-compare"}, | ||
[j]="tautological-pointer-compare", | |||
[ | |||
[b]="comparison of %select{address of|function|array}0 \'%1\' %select{not |}2equal to a null pointer is always %select{true|false}2", | [b]="comparison of %select{address of|function|array}0 \'%1\' %select{not |}2equal to a null pointer is always %select{true|false}2", | ||
[ | [d]=h, | ||
[ | [a]="comparison of (?:address of|function|array) \'(.*?)\' (?:not |)equal to a null pointer is always (?:true|false)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtautological\\-pointer\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"3bb8b56a5d90",1393382166,"PR16074, implement warnings to catch pointer to boolean true and pointer to\nnull comparison when the...","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,15570,"/// 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 unsigned DiagID = IsCompare ? diag::warn_null_pointer_compare : diag::warn_impcast_pointer_to_bool;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/conditional-expr.c"]={"clang/test/Sema/conditional-expr.c:89:15: warning: comparison of address of \'x\' not equal to a null pointer is always true [-Wtautological-pointer-compare]"} | ["clang/test/Sema/conditional-expr.c"]={"clang/test/Sema/conditional-expr.c:89:15: warning: comparison of address of \'x\' not equal to a null pointer is always true [-Wtautological-pointer-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_null_resettable_setter"]={ | ["warn_null_resettable_setter"]={ | ||
[ | [i]={"nullability"}, | ||
[j]="nullability", | |||
[ | |||
[b]="synthesized setter %0 for null_resettable property %1 does not handle nil", | [b]="synthesized setter %0 for null_resettable property %1 does not handle nil", | ||
[ | [d]=h, | ||
[ | [a]="synthesized setter (.*?) for null_resettable property (.*?) does not handle nil", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnullability[^\\]]*\\]", | ||
[ | [c]=Jb, | ||
[ | [f]={"849ebc269fe1",1434737686,"Implement the \'null_resettable\' attribute for Objective-C properties.\n\n\'null_resettable\' properties ...","Implement the \'null_resettable\' attribute for Objective-C properties.\n\n\'null_resettable\' properties are those whose getters return nonnull\nbut whose setters take nil, to \"reset\" the property to some\ndefault. Implements rdar://problem/19051334.\n\nllvm-svn: 240155"}, | ||
[ | [g]={{N,2155,"void Sema::diagnoseNullResettableSynthesizedSetters(const ObjCImplDecl *impDecl) {\n for (const auto *propertyImpl : impDecl->property_impls()) {\n // ...\n // Warn about null_resettable properties with synthesized setters,\n // because the setter won\'t properly handle nil.\n if (propertyImpl->getPropertyImplementation() == ObjCPropertyImplDecl::Synthesize && (property->getPropertyAttributes() & ObjCPropertyAttribute::kind_null_resettable) && property->getGetterMethodDecl() && property->getSetterMethodDecl()) {\n // ...\n if ((!getterImpl || getterImpl->isSynthesizedAccessorStub()) && (!setterImpl || setterImpl->isSynthesizedAccessorStub())) {\n // ...\n Diag(loc, diag::warn_null_resettable_setter) << setterImpl->getSelector() << property->getDeclName();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/nullability.m"]={"clang/test/SemaObjC/nullability.m:209:13: warning: synthesized setter \'setResettable3:\' for null_resettable property \'resettable3\' does not handle nil [-Wnullability]","clang/test/SemaObjC/nullability.m:199:1: warning: synthesized setter \'setResettable4:\' for null_resettable property \'resettable4\' does not handle nil [-Wnullability]"} | ["clang/test/SemaObjC/nullability.m"]={"clang/test/SemaObjC/nullability.m:209:13: warning: synthesized setter \'setResettable3:\' for null_resettable property \'resettable3\' does not handle nil [-Wnullability]","clang/test/SemaObjC/nullability.m:199:1: warning: synthesized setter \'setResettable4:\' for null_resettable property \'resettable4\' does not handle nil [-Wnullability]"} | ||
} | } | ||
}, | }, | ||
["warn_null_ret"]={ | ["warn_null_ret"]={ | ||
[ | [i]={n,o,H,p,"nonnull"}, | ||
[j]="nonnull", | |||
[ | |||
[b]="null returned from %select{function|method}0 that requires a non-null return value", | [b]="null returned from %select{function|method}0 that requires a non-null return value", | ||
[ | [d]=h, | ||
[ | [a]="null returned from (?:function|method) that requires a non\\-null return value", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnonnull[^\\]]*\\]", | ||
[ | [c]=ab, | ||
[ | [f]={"ef9e7f80598c",1390371028,"Add basic checking for returning null from functions/methods marked \'returns_nonnull\'.\n\nThis involve...","Add basic checking for returning null from functions/methods marked \'returns_nonnull\'.\n\nThis involved making CheckReturnStackAddr into a static function, which\nis now called by a top-level return value checking routine called\nCheckReturnValExpr.\n\nllvm-svn: 199790"}, | ||
[ | [g]={{r,12944,"void Sema::CheckReturnValExpr(Expr *RetValExp, QualType lhsType, SourceLocation ReturnLoc, bool isObjCMethod, const AttrVec *Attrs, const FunctionDecl *FD) {\n // Check if the return value is null but should not be.\n if (((Attrs && hasSpecificAttr<ReturnsNonNullAttr>(*Attrs)) || (!isObjCMethod && isNonNullType(lhsType))) && CheckNonNullExpr(*this, RetValExp))\n Diag(ReturnLoc, diag::warn_null_ret) << (isObjCMethod ? 1 : 0) << RetValExp->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/nonnull.cpp"]={"clang/test/SemaCXX/nonnull.cpp:12:5: warning: null returned from function that requires a non-null return value [-Wnonnull]"} | ["clang/test/SemaCXX/nonnull.cpp"]={"clang/test/SemaCXX/nonnull.cpp:12:5: warning: null returned from function that requires a non-null return value [-Wnonnull]"} | ||
} | } | ||
}, | }, | ||
["warn_null_statement"]={ | ["warn_null_statement"]={ | ||
[ | [i]={"extra-semi-stmt"}, | ||
[j]="extra-semi-stmt", | |||
[ | |||
[b]="empty expression statement has no effect; remove unnecessary \';\' to silence this warning", | [b]="empty expression statement has no effect; remove unnecessary \';\' to silence this warning", | ||
[ | [d]=h, | ||
[ | [a]="empty expression statement has no effect; remove unnecessary \';\' to silence this warning", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wextra\\-semi\\-stmt[^\\]]*\\]", | ||
[ | [c]=v, | ||
[ | [f]={"377748fd7bbf",1542740345,"[clang][Parse] Diagnose useless null statements / empty init-statements\n\nSummary:\nclang has `-Wextra...","[clang][Parse] Diagnose useless null statements / empty init-statements\n\nSummary:\nclang has `-Wextra-semi` (D43162), which is not dictated by the currently selected standard.\nWhile that is great, there is at least one more source of need-less semis - \'null statements\'.\nSometimes, they are needed:\n```\nfor(int x = 0; continueToDoWork(x); x++)\n ; // Ugly code, but the semi is needed here.\n```\n\nBut sometimes they are just there for no reason:\n```\nswitch(X) {\ncase 0:\n return -2345;\ncase 5:\n return 0;\ndefault:\n return 42;\n}; // <- oops\n\n;;;;;;;;;;; <- OOOOPS, still not diagnosed. Clearly this is junk.\n```\n\nAdditionally:\n```\nif(; // <- empty init-statement\n true)\n ;\n\nswitch (; // empty init-statement\n x) {\n ...\n}\n\nfor (; // <- empty init-statement\n int y : S())\n ;\n}\n\nAs usual, things may or may not go sideways in the presence of macros.\nWhile evaluating this diag on my codebase of interest, it was unsurprisingly\ndiscovered that Google Test macros are *very* prone to this.\nAnd it seems many issues are deep within the GTest itself, not\nin the snippets passed from the codebase that uses GTest.\n\nSo after some thought, i decided not do issue a diagnostic if the semi\nis within *any* macro, be it either from the normal header, or system header.\n\nFixes [[ https://bugs.llvm.org/show_bug.cgi?id=39111 | PR39111 ]]\n\nReviewers: rsmith, aaron.ballman, efriedma\n\nReviewed By: aaron.ballman\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D52695\n\nllvm-svn: 347339"}, | ||
[ | [g]={{"clang/lib/Parse/ParseStmt.cpp",1109,"/// Consume any extra semi-colons resulting in null statements,\n/// returning true if any tok::semi were consumed.\nbool Parser::ConsumeNullStmt(StmtVector &Stmts) {\n // ...\n Diag(StartLoc, diag::warn_null_statement) << FixItHint::CreateRemoval(SourceRange(StartLoc, EndLoc));"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp"]={"clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:16:3: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]","clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:28:5: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]","clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:31:5: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]","clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:35:5: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]","clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:46:18: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]","clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:48:19: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]"} | ["clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp"]={"clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:16:3: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]","clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:28:5: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]","clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:31:5: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]","clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:35:5: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]","clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:46:18: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]","clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:48:19: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]"} | ||
} | } | ||
}, | }, | ||
["warn_nullability_declspec"]={ | ["warn_nullability_declspec"]={ | ||
[ | [i]={"nullability-declspec"}, | ||
[j]="nullability-declspec", | |||
[ | |||
[b]="nullability specifier %0 cannot be applied to non-pointer type %1; did you mean to apply the specifier to the %select{pointer|block pointer|member pointer|function pointer|member function pointer}2?", | [b]="nullability specifier %0 cannot be applied to non-pointer type %1; did you mean to apply the specifier to the %select{pointer|block pointer|member pointer|function pointer|member function pointer}2?", | ||
[ | [d]=Hb, | ||
[ | [a]="nullability specifier (.*?) cannot be applied to non\\-pointer type (.*?); did you mean to apply the specifier to the (?:pointer|block pointer|member pointer|function pointer|member function pointer)\\?", | ||
[ | [e]=" \\[[^\\]]*\\-Wnullability\\-declspec[^\\]]*\\]", | ||
[ | [c]=Jb, | ||
[ | [f]={"261a89b0f70b",1434736265,"Introduce type nullability specifiers for C/C++.\n\nIntroduces the type specifiers __nonnull, __nullab...","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]={{L,7662,"/// Distribute a nullability type attribute that cannot be applied to\n/// the type specifier to a pointer, block pointer, or member pointer\n/// declarator, complaining if necessary.\n///\n/// \\returns true if the nullability annotation was distributed, false\n/// otherwise.\nstatic bool distributeNullabilityTypeAttr(TypeProcessingState &state, QualType type, ParsedAttr &attr) {\n // ...\n /// Attempt to move the attribute to the specified chunk.\n auto moveToChunk = [&](DeclaratorChunk &chunk, bool inFunction) -> bool {\n // ...\n auto diag = state.getSema().Diag(attr.getLoc(), diag::warn_nullability_declspec) << DiagNullabilityKind(mapNullabilityAttrKind(attr.getKind()), attr.isContextSensitiveKeywordAttribute()) << type << static_cast<unsigned>(pointerKind);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/nullability-declspec.cpp"]={"clang/test/SemaCXX/nullability-declspec.cpp:5:1: error: nullability specifier \'_Nullable\' cannot be applied to non-pointer type \'int\'; did you mean to apply the specifier to the pointer? [-Wnullability-declspec]","clang/test/SemaCXX/nullability-declspec.cpp:6:1: error: nullability specifier \'_Nullable\' cannot be applied to non-pointer type \'int\'; did you mean to apply the specifier to the function pointer? [-Wnullability-declspec]","clang/test/SemaCXX/nullability-declspec.cpp:7:1: error: nullability specifier \'_Nonnull\' cannot be applied to non-pointer type \'int\'; did you mean to apply the specifier to the block pointer? [-Wnullability-declspec]","clang/test/SemaCXX/nullability-declspec.cpp:8:1: error: nullability specifier \'_Nonnull\' cannot be applied to non-pointer type \'int\'; did you mean to apply the specifier to the member pointer? [-Wnullability-declspec]","clang/test/SemaCXX/nullability-declspec.cpp:9:1: error: nullability specifier \'_Nonnull\' cannot be applied to non-pointer type \'int\'; did you mean to apply the specifier to the member function pointer? [-Wnullability-declspec]"} | ["clang/test/SemaCXX/nullability-declspec.cpp"]={"clang/test/SemaCXX/nullability-declspec.cpp:5:1: error: nullability specifier \'_Nullable\' cannot be applied to non-pointer type \'int\'; did you mean to apply the specifier to the pointer? [-Wnullability-declspec]","clang/test/SemaCXX/nullability-declspec.cpp:6:1: error: nullability specifier \'_Nullable\' cannot be applied to non-pointer type \'int\'; did you mean to apply the specifier to the function pointer? [-Wnullability-declspec]","clang/test/SemaCXX/nullability-declspec.cpp:7:1: error: nullability specifier \'_Nonnull\' cannot be applied to non-pointer type \'int\'; did you mean to apply the specifier to the block pointer? [-Wnullability-declspec]","clang/test/SemaCXX/nullability-declspec.cpp:8:1: error: nullability specifier \'_Nonnull\' cannot be applied to non-pointer type \'int\'; did you mean to apply the specifier to the member pointer? [-Wnullability-declspec]","clang/test/SemaCXX/nullability-declspec.cpp:9:1: error: nullability specifier \'_Nonnull\' cannot be applied to non-pointer type \'int\'; did you mean to apply the specifier to the member function pointer? [-Wnullability-declspec]"} | ||
} | } | ||
}, | }, | ||
["warn_nullability_duplicate"]={ | ["warn_nullability_duplicate"]={ | ||
[ | [i]={"nullability"}, | ||
[j]="nullability", | |||
[ | |||
[b]="duplicate nullability specifier %0", | [b]="duplicate nullability specifier %0", | ||
[ | [d]=h, | ||
[ | [a]="duplicate nullability specifier (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnullability[^\\]]*\\]", | ||
[ | [c]=Jb, | ||
[ | [f]={"813a066f16df",1434737678,"Extend type nullability qualifiers for Objective-C.\n\nIntroduce context-sensitive, non-underscored nu...","Extend type nullability qualifiers for Objective-C.\n\nIntroduce context-sensitive, non-underscored nullability specifiers\n(nonnull, nullable, null_unspecified) for Objective-C method return\ntypes, method parameter types, and properties.\n\nIntroduce Objective-C-specific semantics, including computation of the\nnullability of the result of a message send, merging of nullability\ninformation from the @interface of a class into its @implementation,\netc .\n\nThis is the Objective-C part of rdar://problem/18868820.\n\nllvm-svn: 240154"}, | ||
[ | [g]={{"clang/lib/Parse/ParseObjc.cpp",848,"/// Diagnose redundant or conflicting nullability information.\nstatic void diagnoseRedundantPropertyNullability(Parser &P, ObjCDeclSpec &DS, NullabilityKind nullability, SourceLocation nullabilityLoc) {\n if (DS.getNullability() == nullability) {\n P.Diag(nullabilityLoc, diag::warn_nullability_duplicate) << DiagNullabilityKind(nullability, true) << SourceRange(DS.getNullabilityLoc());"},{L,7493,"/// 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 while (auto attributed = dyn_cast<AttributedType>(desugared.getTypePtr())) {\n // Check whether there is already a null\n if (auto existingNullability = attributed->getImmediateNullability()) {\n // Duplicated nullability.\n if (nullability == *existingNullability) {\n S.Diag(nullabilityLoc, diag::warn_nullability_duplicate) << DiagNullabilityKind(nullability, isContextSensitive) << FixItHint::CreateRemoval(nullabilityLoc);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/nullability.m"]={"clang/test/SemaObjC/nullability.m:40:4: warning: duplicate nullability specifier \'nonnull\' [-Wnullability]","clang/test/SemaObjC/nullability.m:46:25: warning: duplicate nullability specifier \'nonnull\' [-Wnullability]","clang/test/SemaObjC/nullability.m:49:35: warning: duplicate nullability specifier \'nullable\' [-Wnullability]","clang/test/SemaObjC/nullability.m:57:25: warning: duplicate nullability specifier \'nonnull\' [-Wnullability]"} | ["clang/test/SemaObjC/nullability.m"]={"clang/test/SemaObjC/nullability.m:40:4: warning: duplicate nullability specifier \'nonnull\' [-Wnullability]","clang/test/SemaObjC/nullability.m:46:25: warning: duplicate nullability specifier \'nonnull\' [-Wnullability]","clang/test/SemaObjC/nullability.m:49:35: warning: duplicate nullability specifier \'nullable\' [-Wnullability]","clang/test/SemaObjC/nullability.m:57:25: warning: duplicate nullability specifier \'nonnull\' [-Wnullability]"} | ||
} | } | ||
}, | }, | ||
["warn_nullability_inferred_on_nested_type"]={ | ["warn_nullability_inferred_on_nested_type"]={ | ||
[ | [i]={"nullability-inferred-on-nested-type"}, | ||
[j]="nullability-inferred-on-nested-type", | |||
[ | |||
[b]="inferring \'_Nonnull\' for pointer type within %select{array|reference}0 is deprecated", | [b]="inferring \'_Nonnull\' for pointer type within %select{array|reference}0 is deprecated", | ||
[ | [d]=h, | ||
[ | [a]="inferring \'_Nonnull\' for pointer type within (?:array|reference) is deprecated", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnullability\\-inferred\\-on\\-nested\\-type[^\\]]*\\]", | ||
[ | [c]=Jb, | ||
[ | [f]={"3b917fe019ff",1478820510,"Warn when \'assume_nonnull\' infers nullability within an array.\n\n...or within a reference. Both of th...","Warn when \'assume_nonnull\' infers nullability within an array.\n\n...or within a reference. Both of these add an extra level of\nindirection that make us less certain that the pointer really was\nsupposed to be non-nullable. However, changing the default behavior\nwould be a breaking change, so we\'ll just make it a warning instead.\n\nPart of rdar://problem/25846421\n\nllvm-svn: 286521"}, | ||
[ | [g]={{L,4946,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n // Local function that checks the nullability for a given pointer declarator.\n // Returns true if _Nonnull was inferred.\n auto inferPointerNullability = [&](SimplePointerKind pointerKind, SourceLocation pointerLoc, SourceLocation pointerEndLoc, ParsedAttributesView &attrs, AttributePool &Pool) -> ParsedAttr * {\n // ...\n // If we\'re supposed to infer nullability, do so now.\n if (inferNullability && !inferNullabilityInnerOnlyComplete) {\n // ...\n if (pointerLoc.isValid() && complainAboutInferringWithinChunk != PointerWrappingDeclaratorKind::None) {\n auto Diag = S.Diag(pointerLoc, diag::warn_nullability_inferred_on_nested_type);"}}, | ||
[ | [k]={ | ||
["clang/test/FixIt/nullability.mm"]={"clang/test/FixIt/nullability.mm:12:13: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:15:12: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:18:13: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:25:8: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:30:8: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:34:13: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:37:13: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:40:13: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:43:13: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:46:13: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:49:13: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:52:8: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:54:8: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:58:25: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:61:26: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:64:27: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:67:28: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]"} | ["clang/test/FixIt/nullability.mm"]={"clang/test/FixIt/nullability.mm:12:13: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:15:12: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:18:13: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:25:8: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:30:8: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:34:13: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:37:13: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:40:13: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:43:13: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:46:13: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:49:13: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:52:8: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:54:8: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:58:25: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:61:26: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:64:27: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:67:28: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]"} | ||
} | } | ||
}, | }, | ||
["warn_nullability_lost"]={ | ["warn_nullability_lost"]={ | ||
[ | [i]={"nullable-to-nonnull-conversion"}, | ||
[j]="nullable-to-nonnull-conversion", | |||
[ | |||
[b]="implicit conversion from nullable pointer %0 to non-nullable pointer type %1", | [b]="implicit conversion from nullable pointer %0 to non-nullable pointer type %1", | ||
[ | [d]=h, | ||
[ | [a]="implicit conversion from nullable pointer (.*?) to non\\-nullable pointer type (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnullable\\-to\\-nonnull\\-conversion[^\\]]*\\]", | ||
[ | [c]=Jb, | ||
[ | [f]={"b4866e85e5ff",1434737599,"Diagnose unsafe uses of nil and __nonnull pointers.\n\nThis generalizes the checking of null arguments...","Diagnose unsafe uses of nil and __nonnull pointers.\n\nThis generalizes the checking of null arguments to also work with\nvalues of pointer-to-function, reference-to-function, and block\npointer type, using the nullability information within the underling\nfunction prototype to extend non-null checking, and diagnoses returns\nof \'nil\' within a function with a __nonnull return type.\n\nNote that we don\'t warn about nil returns from Objective-C methods,\nbecause it\'s common for Objective-C methods to mimic the nil-swallowing\nbehavior of the receiver by checking ostensibly non-null parameters\nand returning nil from otherwise non-null methods in that\ncase.\n\nIt also diagnoses (via a separate flag) conversions from nullable to\nnonnull pointers. It\'s a separate flag because this warning can be noisy.\n\nllvm-svn: 240153"}, | ||
[ | [g]={{S,585,"void Sema::diagnoseNullableToNonnullConversion(QualType DstType, QualType SrcType, SourceLocation Loc) {\n // ...\n Diag(Loc, diag::warn_nullability_lost) << SrcType << DstType;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/nullability.m"]={"clang/test/SemaObjC/nullability.m:252:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:255:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:256:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:257:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:258:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:260:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:264:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:267:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:268:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:269:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:270:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable_result\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]"} | ["clang/test/SemaObjC/nullability.m"]={"clang/test/SemaObjC/nullability.m:252:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:255:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:256:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:257:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:258:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:260:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:264:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:267:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:268:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:269:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:270:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable_result\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]"} | ||
} | } | ||
}, | }, | ||
["warn_nullability_missing"]={ | ["warn_nullability_missing"]={ | ||
[ | [i]={"nullability-completeness"}, | ||
[j]="nullability-completeness", | |||
[ | |||
[b]="%select{pointer|block pointer|member pointer}0 is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)", | [b]="%select{pointer|block pointer|member pointer}0 is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)", | ||
[ | [d]=h, | ||
[ | [a]="(?:pointer|block pointer|member pointer) is missing a nullability type specifier \\(_Nonnull, _Nullable, or _Null_unspecified\\)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnullability\\-completeness[^\\]]*\\]", | ||
[ | [c]=Jb, | ||
[ | [f]={"bec595a64121",1434738465,"Check for consistent use of nullability type specifiers in a header.\n\nAdds a new warning (under -Wnu...","Check for consistent use of nullability type specifiers in a header.\n\nAdds a new warning (under -Wnullability-completeness) that complains\nabout pointer, block pointer, or member pointer declarations that have\nnot been annotated with nullability information (directly or inferred)\nwithin a header that contains some nullability annotations. This is\nintended to be used to help maintain the completeness of nullability\ninformation within a header that has already been audited.\n\nNote that, for performance reasons, this warning will underrepresent\nthe number of non-annotated pointers in the case where more than one\npointer is seen before the first nullability type specifier, because\nwe\'re only tracking one piece of information per header. Part of\nrdar://problem/18868820.\n\nllvm-svn: 240158"}, | ||
[ | [g]={{L,4467,"static void emitNullabilityConsistencyWarning(Sema &S, SimplePointerKind PointerKind, SourceLocation PointerLoc, SourceLocation PointerEndLoc) {\n // ...\n if (PointerKind == SimplePointerKind::Array) {\n // ...\n } else {\n S.Diag(PointerLoc, diag::warn_nullability_missing) << static_cast<unsigned>(PointerKind);"},{L,4510,"/// Complains about missing nullability if the file containing \\p pointerLoc\n/// has other uses of nullability (either the keywords or the \\c assume_nonnull\n/// pragma).\n///\n/// If the file has \\e not seen other uses of nullability, this particular\n/// pointer is saved for possible later diagnosis. See recordNullabilitySeen().\nstatic void checkNullabilityConsistency(Sema &S, SimplePointerKind pointerKind, SourceLocation pointerLoc, SourceLocation pointerEndLoc = SourceLocation()) {\n // ...\n if (!fileNullability.SawTypeNullability) {\n // ...\n if (pointerKind == SimplePointerKind::Array)\n // ...\n else\n diagKind = diag::warn_nullability_missing;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjCXX/nullability-pragmas.mm"]={"clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:11:13: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:43:12: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:43:13: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:46:10: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:51:14: warning: block pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:51:16: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:57:9: warning: block pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:57:19: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:64:14: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:64:15: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:74:18: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:80:19: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:80:20: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:90:13: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:114:12: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:117:10: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:120:10: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:125:10: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:130:4: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]"} | ["clang/test/SemaObjCXX/nullability-pragmas.mm"]={"clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:11:13: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:43:12: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:43:13: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:46:10: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:51:14: warning: block pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:51:16: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:57:9: warning: block pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:57:19: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:64:14: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:64:15: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:74:18: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:80:19: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:80:20: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:90:13: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:114:12: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:117:10: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:120:10: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:125:10: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:130:4: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]"} | ||
} | } | ||
}, | }, | ||
["warn_nullability_missing_array"]={ | ["warn_nullability_missing_array"]={ | ||
[ | [i]={"nullability-completeness","nullability-completeness-on-arrays"}, | ||
[j]="nullability-completeness-on-arrays", | |||
[ | |||
[b]="array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)", | [b]="array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)", | ||
[ | [d]=h, | ||
[ | [a]="array parameter is missing a nullability type specifier \\(_Nonnull, _Nullable, or _Null_unspecified\\)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnullability\\-completeness\\-on\\-arrays[^\\]]*\\]", | ||
[ | [c]=Jb, | ||
[ | [f]={"f85a9b06b826",1478820506,"Add -Wnullability-completeness-on-arrays.\n\nThis is an addition to (and sub-warning of) -Wnullability...","Add -Wnullability-completeness-on-arrays.\n\nThis is an addition to (and sub-warning of) -Wnullability-completeness\nthat warns when an array parameter is missing nullability. When the\nspecific warning is switched off, the compiler falls back to only\nwarning on pointer types written as pointer types.\n\nNote that use of nullability /within/ an array triggers the\ncompleteness checks regardless of whether or not the array-specific\nwarning is enabled; the intent there is simply to determine whether a\nparticular header is trying to be nullability-aware at all.\n\nPart of rdar://problem/25846421.\n\nllvm-svn: 286520"}, | ||
[ | [g]={{L,4465,"static void emitNullabilityConsistencyWarning(Sema &S, SimplePointerKind PointerKind, SourceLocation PointerLoc, SourceLocation PointerEndLoc) {\n // ...\n if (PointerKind == SimplePointerKind::Array) {\n S.Diag(PointerLoc, diag::warn_nullability_missing_array);"},{L,4508,"/// Complains about missing nullability if the file containing \\p pointerLoc\n/// has other uses of nullability (either the keywords or the \\c assume_nonnull\n/// pragma).\n///\n/// If the file has \\e not seen other uses of nullability, this particular\n/// pointer is saved for possible later diagnosis. See recordNullabilitySeen().\nstatic void checkNullabilityConsistency(Sema &S, SimplePointerKind pointerKind, SourceLocation pointerLoc, SourceLocation pointerEndLoc = SourceLocation()) {\n // ...\n if (!fileNullability.SawTypeNullability) {\n // ...\n if (pointerKind == SimplePointerKind::Array)\n diagKind = diag::warn_nullability_missing_array;"}}, | ||
[ | [k]={ | ||
["clang/test/FixIt/nullability.mm"]={"clang/test/FixIt/Inputs/nullability.h:3:26: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness-on-arrays]","clang/test/FixIt/Inputs/nullability.h:9:34: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness-on-arrays]","clang/test/FixIt/Inputs/nullability.h:15:34: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness-on-arrays]"} | ["clang/test/FixIt/nullability.mm"]={"clang/test/FixIt/Inputs/nullability.h:3:26: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness-on-arrays]","clang/test/FixIt/Inputs/nullability.h:9:34: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness-on-arrays]","clang/test/FixIt/Inputs/nullability.h:15:34: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness-on-arrays]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_boxing_invalid_utf8_string"]={ | ["warn_objc_boxing_invalid_utf8_string"]={ | ||
[ | [i]={"objc-boxing"}, | ||
[j]="objc-boxing", | |||
[ | |||
[b]="string is ill-formed as UTF-8 and will become a null %0 when boxed", | [b]="string is ill-formed as UTF-8 and will become a null %0 when boxed", | ||
[ | [d]=h, | ||
[ | [a]="string is ill\\-formed as UTF\\-8 and will become a null (.*?) when boxed", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-boxing[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"1488ee4bd541",1552020337,"[ObjC] Emit a boxed expression as a compile-time constant if the\nexpression inside the parentheses i...","[ObjC] Emit a boxed expression as a compile-time constant if the\nexpression inside the parentheses is a valid UTF-8 string literal.\n\nPreviously clang emitted an expression like @(\"abc\") as a message send\nto stringWithUTF8String. This commit makes clang emit the boxed\nexpression as a compile-time constant instead.\n\nThis commit also has the effect of silencing the nullable-to-nonnull\nconversion warning clang started emitting after r317727, which\noriginally motivated this commit (see https://oleb.net/2018/@keypath).\n\nrdar://problem/42684601\n\nDifferential Revision: https://reviews.llvm.org/D58729\n\nllvm-svn: 355662"}, | ||
[ | [g]={{U,552,"ExprResult Sema::BuildObjCBoxedExpr(SourceRange SR, Expr *ValueExpr) {\n // ...\n if (const PointerType *PT = ValueType->getAs<PointerType>()) {\n // ...\n if (Context.hasSameUnqualifiedType(PointeeType, Context.CharTy)) {\n // ...\n // The boxed expression can be emitted as a compile time constant if it is\n // a string literal whose character encoding is compatible with UTF-8.\n if (auto *CE = dyn_cast<ImplicitCastExpr>(ValueExpr))\n if (CE->getCastKind() == CK_ArrayToPointerDecay)\n if (auto *SL = dyn_cast<StringLiteral>(CE->getSubExpr()->IgnoreParens())) {\n // ...\n Diag(SL->getBeginLoc(), diag::warn_objc_boxing_invalid_utf8_string) << NSStringPointer << SL->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/transfer-boxed-string-nullability.m"]={"clang/test/SemaObjC/transfer-boxed-string-nullability.m:26:18: warning: string is ill-formed as UTF-8 and will become a null \'NSString *\' when boxed [-Wobjc-boxing]","clang/test/SemaObjC/transfer-boxed-string-nullability.m:27:18: warning: string is ill-formed as UTF-8 and will become a null \'NSString *\' when boxed [-Wobjc-boxing]"} | ["clang/test/SemaObjC/transfer-boxed-string-nullability.m"]={"clang/test/SemaObjC/transfer-boxed-string-nullability.m:26:18: warning: string is ill-formed as UTF-8 and will become a null \'NSString *\' when boxed [-Wobjc-boxing]","clang/test/SemaObjC/transfer-boxed-string-nullability.m:27:18: warning: string is ill-formed as UTF-8 and will become a null \'NSString *\' when boxed [-Wobjc-boxing]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_cdirective_format_string"]={ | ["warn_objc_cdirective_format_string"]={ | ||
[ | [i]={"cstring-format-directive"}, | ||
[j]="cstring-format-directive", | |||
[ | |||
[b]="using %0 directive in %select{NSString|CFString}1 which is being passed as a formatting argument to the formatting %select{method|CFfunction}2", | [b]="using %0 directive in %select{NSString|CFString}1 which is being passed as a formatting argument to the formatting %select{method|CFfunction}2", | ||
[ | [d]=h, | ||
[ | [a]="using (.*?) directive in (?:NSString|CFString) which is being passed as a formatting argument to the formatting (?:method|CFfunction)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wcstring\\-format\\-directive[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"6485fe4b07b0",1410304254,"Objective-C. Under a special flag, -Wcstring-format-directive,\noff by default, issue a warning if %s...","Objective-C. Under a special flag, -Wcstring-format-directive,\noff by default, issue a warning if %s directive is used in\ncertain CF/NS formatting APIs, to assist user in deprecating\nuse of such %s in these APIs. rdar://18182443\n\nllvm-svn: 217467"}, | ||
[ | [g]={{r,6464,"/// 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 S.Diag(FormatExpr->getExprLoc(), diag::warn_objc_cdirective_format_string) << \"%s\" << 1 << 1;"},{U,2571,"/// 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 S.Diag(FormatExpr->getExprLoc(), diag::warn_objc_cdirective_format_string) << \"%s\" << 0 << 0;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/format-cstrings-warning.m"]={"clang/test/SemaObjC/format-cstrings-warning.m:33:24: warning: using %s directive in NSString which is being passed as a formatting argument to the formatting method [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:34:41: warning: using %s directive in NSString which is being passed as a formatting argument to the formatting method [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:35:25: warning: using %s directive in NSString which is being passed as a formatting argument to the formatting method [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:36:25: warning: using %s directive in NSString which is being passed as a formatting argument to the formatting method [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:37:39: warning: using %s directive in NSString which is being passed as a formatting argument to the formatting method [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:63:64: warning: using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:64:82: warning: using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:74:11: warning: using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:76:43: warning: using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:77:15: warning: using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction [-Wcstring-format-directive]"} | ["clang/test/SemaObjC/format-cstrings-warning.m"]={"clang/test/SemaObjC/format-cstrings-warning.m:33:24: warning: using %s directive in NSString which is being passed as a formatting argument to the formatting method [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:34:41: warning: using %s directive in NSString which is being passed as a formatting argument to the formatting method [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:35:25: warning: using %s directive in NSString which is being passed as a formatting argument to the formatting method [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:36:25: warning: using %s directive in NSString which is being passed as a formatting argument to the formatting method [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:37:39: warning: using %s directive in NSString which is being passed as a formatting argument to the formatting method [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:63:64: warning: using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:64:82: warning: using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:74:11: warning: using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:76:43: warning: using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:77:15: warning: using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction [-Wcstring-format-directive]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_circular_container"]={ | ["warn_objc_circular_container"]={ | ||
[ | [i]={"objc-circular-container"}, | ||
[j]="objc-circular-container", | |||
[ | |||
[b]="adding %0 to %1 might cause circular dependency in container", | [b]="adding %0 to %1 might cause circular dependency in container", | ||
[ | [d]=h, | ||
[ | [a]="adding (.*?) to (.*?) might cause circular dependency in container", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-circular\\-container[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"e1d882c726b5",1425491752,"New ObjC warning: circular containers.\n\nThis commit adds new warning to prevent user from creating \'...","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]={{r,17627,"void Sema::CheckObjCCircularContainer(ObjCMessageExpr *Message) {\n // ...\n if (Message->getReceiverKind() == ObjCMessageExpr::SuperInstance) {\n if (DeclRefExpr *ArgRE = dyn_cast<DeclRefExpr>(Arg)) {\n if (ArgRE->isObjCSelfExpr()) {\n Diag(Message->getSourceRange().getBegin(), diag::warn_objc_circular_container) << ArgRE->getDecl() << StringRef(\"\'super\'\");"},{r,17643,"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 Diag(Message->getSourceRange().getBegin(), diag::warn_objc_circular_container) << Decl << Decl;"},{r,17657,"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(Message->getSourceRange().getBegin(), diag::warn_objc_circular_container) << Decl << Decl;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/circular-container.m"]={"clang/test/SemaObjC/circular-container.m:57:3: warning: adding \'_array\' to \'_array\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:58:3: warning: adding \'_dictionary\' to \'_dictionary\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:59:3: warning: adding \'_set\' to \'_set\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:60:3: warning: adding \'_countedSet\' to \'_countedSet\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:61:3: warning: adding \'_orderedSet\' to \'_orderedSet\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:65:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:69:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:73:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:77:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:81:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:87:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:91:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:95:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:99:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:103:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:109:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:110:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:111:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:112:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:113:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:119:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:120:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:121:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:122:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:128:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:134:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:140:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:141:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:142:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:143:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:144:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:154:3: warning: adding \'self\' to \'super\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:156:3: warning: adding \'self\' to \'self\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:165:3: warning: adding \'self\' to \'super\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:167:3: warning: adding \'self\' to \'self\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:176:3: warning: adding \'self\' to \'super\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:178:3: warning: adding \'self\' to \'self\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:186:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:187:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:188:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:189:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:190:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:196:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:197:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:198:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:199:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:205:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]"} | ["clang/test/SemaObjC/circular-container.m"]={"clang/test/SemaObjC/circular-container.m:57:3: warning: adding \'_array\' to \'_array\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:58:3: warning: adding \'_dictionary\' to \'_dictionary\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:59:3: warning: adding \'_set\' to \'_set\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:60:3: warning: adding \'_countedSet\' to \'_countedSet\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:61:3: warning: adding \'_orderedSet\' to \'_orderedSet\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:65:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:69:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:73:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:77:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:81:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:87:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:91:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:95:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:99:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:103:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:109:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:110:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:111:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:112:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:113:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:119:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:120:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:121:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:122:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:128:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:134:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:140:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:141:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:142:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:143:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:144:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:154:3: warning: adding \'self\' to \'super\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:156:3: warning: adding \'self\' to \'self\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:165:3: warning: adding \'self\' to \'super\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:167:3: warning: adding \'self\' to \'self\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:176:3: warning: adding \'self\' to \'super\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:178:3: warning: adding \'self\' to \'self\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:186:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:187:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:188:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:189:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:190:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:196:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:197:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:198:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:199:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:205:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_collection_literal_element"]={ | ["warn_objc_collection_literal_element"]={ | ||
[ | [i]={Ab,Pb,"objc-literal-conversion"}, | ||
[j]="objc-literal-conversion", | |||
[ | |||
[b]="object of type %0 is not compatible with %select{array element type|dictionary key type|dictionary value type}1 %2", | [b]="object of type %0 is not compatible with %select{array element type|dictionary key type|dictionary value type}1 %2", | ||
[ | [d]=h, | ||
[ | [a]="object of type (.*?) is not compatible with (?:array element type|dictionary key type|dictionary value type) (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-literal\\-conversion[^\\]]*\\]", | ||
[ | [c]=Wb, | ||
[ | [f]={"5054cb04673f",1436241502,"Warn when an Objective-C collection literal element is converted to an incompatible type.\n\nObjective...","Warn when an Objective-C collection literal element is converted to an incompatible type.\n\nObjective-C collection literals produce unspecialized\nNSArray/NSDictionary objects that can then be implicitly converted to\nspecialized versions of these types. In such cases, check that the\nelements in the collection are suitable for the specialized\ncollection. Part of rdar://problem/6294649.\n\nllvm-svn: 241546"}, | ||
[ | [g]={{r,14509,"/// Check a single element within a collection literal against the\n/// target element type.\nstatic void checkObjCCollectionLiteralElement(Sema &S, QualType TargetElementType, Expr *Element, unsigned ElementKind) {\n // ...\n if (ElementType->getAs<ObjCObjectPointerType>() && S.CheckSingleAssignmentConstraints(TargetElementType, ElementResult, false, false) != Sema::Compatible) {\n S.Diag(Element->getBeginLoc(), diag::warn_objc_collection_literal_element) << ElementType << ElementKind << TargetElementType << Element->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/parameterized_classes_collection_literal.m"]={"clang/test/SemaObjC/parameterized_classes_collection_literal.m:39:36: warning: object of type \'NSNumber *\' is not compatible with array element type \'NSString *\' [-Wobjc-literal-conversion]","clang/test/SemaObjC/parameterized_classes_collection_literal.m:41:35: warning: object of type \'NSArray *\' is not compatible with array element type \'NSString *\' [-Wobjc-literal-conversion]","clang/test/SemaObjC/parameterized_classes_collection_literal.m:44:47: warning: object of type \'NSString *\' is not compatible with array element type \'NSArray<NSString *> *\' [-Wobjc-literal-conversion]","clang/test/SemaObjC/parameterized_classes_collection_literal.m:45:48: warning: object of type \'NSNumber *\' is not compatible with array element type \'NSString *\' [-Wobjc-literal-conversion]","clang/test/SemaObjC/parameterized_classes_collection_literal.m:51:5: warning: object of type \'NSNumber *\' is not compatible with dictionary key type \'NSString *\' [-Wobjc-literal-conversion]","clang/test/SemaObjC/parameterized_classes_collection_literal.m:52:16: warning: object of type \'NSString *\' is not compatible with dictionary value type \'NSNumber *\' [-Wobjc-literal-conversion]"} | ["clang/test/SemaObjC/parameterized_classes_collection_literal.m"]={"clang/test/SemaObjC/parameterized_classes_collection_literal.m:39:36: warning: object of type \'NSNumber *\' is not compatible with array element type \'NSString *\' [-Wobjc-literal-conversion]","clang/test/SemaObjC/parameterized_classes_collection_literal.m:41:35: warning: object of type \'NSArray *\' is not compatible with array element type \'NSString *\' [-Wobjc-literal-conversion]","clang/test/SemaObjC/parameterized_classes_collection_literal.m:44:47: warning: object of type \'NSString *\' is not compatible with array element type \'NSArray<NSString *> *\' [-Wobjc-literal-conversion]","clang/test/SemaObjC/parameterized_classes_collection_literal.m:45:48: warning: object of type \'NSNumber *\' is not compatible with array element type \'NSString *\' [-Wobjc-literal-conversion]","clang/test/SemaObjC/parameterized_classes_collection_literal.m:51:5: warning: object of type \'NSNumber *\' is not compatible with dictionary key type \'NSString *\' [-Wobjc-literal-conversion]","clang/test/SemaObjC/parameterized_classes_collection_literal.m:52:16: warning: object of type \'NSString *\' is not compatible with dictionary value type \'NSNumber *\' [-Wobjc-literal-conversion]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_designated_init_missing_super_call"]={ | ["warn_objc_designated_init_missing_super_call"]={ | ||
[ | [i]={n,o,p,zb}, | ||
[j]=zb, | |||
[ | |||
[b]="designated initializer missing a \'super\' call to a designated initializer of the super class", | [b]="designated initializer missing a \'super\' call to a designated initializer of the super class", | ||
[ | [d]=h, | ||
[ | [a]="designated initializer missing a \'super\' call to a designated initializer of the super class", | ||
[ | [e]=Cc, | ||
[ | [c]=l, | ||
[ | [f]={"22bfa2c28bdb",1386105096,"[objc] Emit a warning when the implementation of a designated initializer does not chain to\nan init ...","[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]={{B,15851,"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 Diag(MD->getLocation(), diag::warn_objc_designated_init_missing_super_call);"}}, | ||
[ | [k]={ | ||
[ | [Nc]={"clang/test/SemaObjC/attr-designated-init.m:64:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:70:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:73:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:108:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:119:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:132:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:187:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:238:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:294:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:303:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:410:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_designated_init_non_designated_init_call"]={ | ["warn_objc_designated_init_non_designated_init_call"]={ | ||
[ | [i]={n,o,p,zb}, | ||
[j]=zb, | |||
[ | |||
[b]="designated initializer invoked a non-designated initializer", | [b]="designated initializer invoked a non-designated initializer", | ||
[ | [d]=h, | ||
[ | [a]="designated initializer invoked a non\\-designated initializer", | ||
[ | [e]=Cc, | ||
[ | [c]=l, | ||
[ | [f]={"fcded9b93a96",1386105103,"[objc] Emit warnings when the implementation of a designated initializer calls on\nsuper an initializ...","[objc] Emit warnings when the implementation of a designated initializer calls on\nsuper an initializer that is not a designated one or any initializer on self.\n\nllvm-svn: 196317"}, | ||
[ | [g]={{U,3208,"/// 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(SelLoc, SuperLoc.isValid() ? diag::warn_objc_designated_init_non_designated_init_call : diag::warn_objc_designated_init_non_super_designated_init_call);"}}, | ||
[ | [k]={ | ||
[ | [Nc]={"clang/test/SemaObjC/attr-designated-init.m:71:17: warning: designated initializer invoked a non-designated initializer [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:109:17: warning: designated initializer invoked a non-designated initializer [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:295:18: warning: designated initializer invoked a non-designated initializer [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:304:18: warning: designated initializer invoked a non-designated initializer [-Wobjc-designated-initializers]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_designated_init_non_super_designated_init_call"]={ | ["warn_objc_designated_init_non_super_designated_init_call"]={ | ||
[ | [i]={n,o,p,zb}, | ||
[j]=zb, | |||
[ | |||
[b]="designated initializer should only invoke a designated initializer on \'super\'", | [b]="designated initializer should only invoke a designated initializer on \'super\'", | ||
[ | [d]=h, | ||
[ | [a]="designated initializer should only invoke a designated initializer on \'super\'", | ||
[ | [e]=Cc, | ||
[ | [c]=l, | ||
[ | [f]={"fcded9b93a96",1386105103,"[objc] Emit warnings when the implementation of a designated initializer calls on\nsuper an initializ...","[objc] Emit warnings when the implementation of a designated initializer calls on\nsuper an initializer that is not a designated one or any initializer on self.\n\nllvm-svn: 196317"}, | ||
[ | [g]={{U,3209,"/// 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(SelLoc, SuperLoc.isValid() ? diag::warn_objc_designated_init_non_designated_init_call : diag::warn_objc_designated_init_non_super_designated_init_call);"}}, | ||
[ | [k]={ | ||
[ | [Nc]={"clang/test/SemaObjC/attr-designated-init.m:74:16: warning: designated initializer should only invoke a designated initializer on \'super\' [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:136:9: warning: designated initializer should only invoke a designated initializer on \'super\' [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:141:11: warning: designated initializer should only invoke a designated initializer on \'super\' [-Wobjc-designated-initializers]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_direct_ignored"]={ | ["warn_objc_direct_ignored"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="%0 attribute isn\'t implemented by this Objective-C runtime", | [b]="%0 attribute isn\'t implemented by this Objective-C runtime", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) attribute isn\'t implemented by this Objective\\-C runtime", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={Jc,1573050950,Dc,Ec}, | ||
[ | [g]={{w,2951,"static void handleObjCDirectAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (S.getLangOpts().ObjCRuntime.allowsDirectDispatch()) {\n // ...\n } else {\n S.Diag(AL.getLoc(), diag::warn_objc_direct_ignored) << AL;"},{w,2960,"static void handleObjCDirectMembersAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (S.getLangOpts().ObjCRuntime.allowsDirectDispatch()) {\n // ...\n } else {\n S.Diag(AL.getLoc(), diag::warn_objc_direct_ignored) << AL;"}} | ||
}, | }, | ||
["warn_objc_direct_property_ignored"]={ | ["warn_objc_direct_property_ignored"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="direct attribute on property %0 ignored (not implemented by this Objective-C runtime)", | [b]="direct attribute on property %0 ignored (not implemented by this Objective-C runtime)", | ||
[ | [d]=h, | ||
[ | [a]="direct attribute on property (.*?) ignored \\(not implemented by this Objective\\-C runtime\\)", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={Jc,1573050950,Dc,Ec}, | ||
[ | [g]={{N,714,"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 ((Attributes & ObjCPropertyAttribute::kind_direct) || CDecl->hasAttr<ObjCDirectMembersAttr>()) {\n if (isa<ObjCProtocolDecl>(CDecl)) {\n // ...\n } else if (getLangOpts().ObjCRuntime.allowsDirectDispatch()) {\n // ...\n } else {\n Diag(PDecl->getLocation(), diag::warn_objc_direct_property_ignored) << PDecl->getDeclName();"}} | ||
}, | }, | ||
["warn_objc_implementation_missing_designated_init_override"]={ | ["warn_objc_implementation_missing_designated_init_override"]={ | ||
[ | [i]={n,o,p,zb}, | ||
[j]=zb, | |||
[ | |||
[b]="method override for the designated initializer of the superclass %objcinstance0 not found", | [b]="method override for the designated initializer of the superclass %objcinstance0 not found", | ||
[ | [d]=h, | ||
[ | [a]="method override for the designated initializer of the superclass (.*?) not found", | ||
[ | [e]=Cc, | ||
[ | [c]=l, | ||
[ | [f]={"db5ce0f71ec9",1386105114,"[objc] Add a warning when a class that provides a designated initializer, does not\noverride all of t...","[objc] Add a warning when a class that provides a designated initializer, does not\noverride all of the designated initializers of its superclass.\n\nllvm-svn: 196319"}, | ||
[ | [g]={{N,2350,"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 Diag(ImplD->getLocation(), diag::warn_objc_implementation_missing_designated_init_override) << MD->getSelector();"}}, | ||
[ | [k]={ | ||
[ | [Nc]={"clang/test/SemaObjC/attr-designated-init.m:92:17: warning: method override for the designated initializer of the superclass \'-initB1\' not found [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:92:17: warning: method override for the designated initializer of the superclass \'-initB3\' not found [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:107:17: warning: method override for the designated initializer of the superclass \'-initS1\' not found [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:155:17: warning: method override for the designated initializer of the superclass \'-initB1\' not found [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:155:17: warning: method override for the designated initializer of the superclass \'-initB3\' not found [-Wobjc-designated-initializers]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_invalid_bridge"]={ | ["warn_objc_invalid_bridge"]={ | ||
[ | [i]={"bridge-cast"}, | ||
[j]="bridge-cast", | |||
[ | |||
[b]="%0 bridges to %1, not %2", | [b]="%0 bridges to %1, not %2", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) bridges to (.*?), not (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wbridge\\-cast[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"f07183ce9402",1384566325,"ObjetiveC ARC. Start diagnosing invalid toll free bridging.\n// rdar://15454846.\n\nllvm-svn: 194915","ObjetiveC ARC. Start diagnosing invalid toll free bridging.\n// rdar://15454846.\n\nllvm-svn: 194915"}, | ||
[ | [g]={{U,4031,"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 if (warn)\n S.Diag(castExpr->getBeginLoc(), diag::warn_objc_invalid_bridge) << T << Target->getName() << castType->getPointeeType();"},{U,4043,"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 S.Diag(castExpr->getBeginLoc(), diag::warn_objc_invalid_bridge) << T << Target->getName() << castType;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:56:33: warning: \'CFErrorRef2\' (aka \'__CFErrorRef *\') bridges to NSError, not \'NSString\' [-Wbridge-cast]","clang/test/SemaObjCXX/objcbridge-static-cast.mm:63:31: warning: \'CFErrorRef2\' (aka \'__CFErrorRef *\') bridges to NSError, not \'MyError\' [-Wbridge-cast]","clang/test/SemaObjCXX/objcbridge-static-cast.mm:77:28: warning: \'CFErrorRef2\' (aka \'__CFErrorRef *\') bridges to NSError, not \'Class\' [-Wbridge-cast]","clang/test/SemaObjCXX/objcbridge-static-cast.mm:95:38: warning: \'CFErrorRef\' (aka \'__CFErrorRef *\') bridges to NSError, not \'id<P1,P2,P4>\' [-Wbridge-cast]","clang/test/SemaObjCXX/objcbridge-static-cast.mm:114:38: warning: \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') bridges to MyError, not \'id<P1,P2,P4>\' [-Wbridge-cast]"} | ["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:56:33: warning: \'CFErrorRef2\' (aka \'__CFErrorRef *\') bridges to NSError, not \'NSString\' [-Wbridge-cast]","clang/test/SemaObjCXX/objcbridge-static-cast.mm:63:31: warning: \'CFErrorRef2\' (aka \'__CFErrorRef *\') bridges to NSError, not \'MyError\' [-Wbridge-cast]","clang/test/SemaObjCXX/objcbridge-static-cast.mm:77:28: warning: \'CFErrorRef2\' (aka \'__CFErrorRef *\') bridges to NSError, not \'Class\' [-Wbridge-cast]","clang/test/SemaObjCXX/objcbridge-static-cast.mm:95:38: warning: \'CFErrorRef\' (aka \'__CFErrorRef *\') bridges to NSError, not \'id<P1,P2,P4>\' [-Wbridge-cast]","clang/test/SemaObjCXX/objcbridge-static-cast.mm:114:38: warning: \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') bridges to MyError, not \'id<P1,P2,P4>\' [-Wbridge-cast]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_invalid_bridge_to_cf"]={ | ["warn_objc_invalid_bridge_to_cf"]={ | ||
[ | [i]={"bridge-cast"}, | ||
[j]="bridge-cast", | |||
[ | |||
[b]="%0 cannot bridge to %1", | [b]="%0 cannot bridge to %1", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) cannot bridge to (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wbridge\\-cast[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"8a0210e535c5",1384629392,"ObjectiveC ARC. Validate toll free bridge casting\nof ObjectiveC objects to CF types when CF type\nhas...","ObjectiveC ARC. Validate toll free bridge casting\nof ObjectiveC objects to CF types when CF type\nhas the objc_bridge attribute.\n\nllvm-svn: 194930"}, | ||
[ | [g]={{U,4096,"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 S.Diag(castExpr->getBeginLoc(), diag::warn_objc_invalid_bridge_to_cf) << castExpr->getType()->getPointeeType() << T;"},{U,4111,"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 S.Diag(castExpr->getBeginLoc(), diag::warn_objc_invalid_bridge_to_cf) << castExpr->getType() << castType;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:73:33: warning: \'NSString\' cannot bridge to \'CFErrorRef\' (aka \'__CFErrorRef *\') [-Wbridge-cast]","clang/test/SemaObjCXX/objcbridge-static-cast.mm:81:33: warning: \'Class\' cannot bridge to \'CFErrorRef\' (aka \'__CFErrorRef *\') [-Wbridge-cast]"} | ["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:73:33: warning: \'NSString\' cannot bridge to \'CFErrorRef\' (aka \'__CFErrorRef *\') [-Wbridge-cast]","clang/test/SemaObjCXX/objcbridge-static-cast.mm:81:33: warning: \'Class\' cannot bridge to \'CFErrorRef\' (aka \'__CFErrorRef *\') [-Wbridge-cast]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_isa_assign"]={ | ["warn_objc_isa_assign"]={ | ||
[ | [i]={"deprecated-objc-isa-usage"}, | ||
[j]="deprecated-objc-isa-usage", | |||
[ | |||
[b]="assignment to Objective-C\'s isa is deprecated in favor of object_setClass()", | [b]="assignment to Objective-C\'s isa is deprecated in favor of object_setClass()", | ||
[ | [d]=h, | ||
[ | [a]="assignment to Objective\\-C\'s isa is deprecated in favor of object_setClass\\(\\)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-objc\\-isa\\-usage[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"84510744d965",1364419165,"Objective-C: Issue more precise warning when user\nis accessing \'isa\' as an object pointer.\n// rdar:/...","Objective-C: Issue more precise warning when user\nis accessing \'isa\' as an object pointer.\n// rdar://13503456. FixIt to follow in another patch.\n\nllvm-svn: 178179"}, | ||
[ | [g]={{u,613,"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 if (RHS) {\n // ...\n if (ObjectSetClass) {\n // ...\n S.Diag(OIRE->getExprLoc(), diag::warn_objc_isa_assign) << FixItHint::CreateInsertion(OIRE->getBeginLoc(), \"object_setClass(\") << FixItHint::CreateReplacement(SourceRange(OIRE->getOpLoc(), AssignLoc), \",\") << FixItHint::CreateInsertion(RHSLocEnd, \")\");"},{u,621,"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 if (RHS) {\n // ...\n if (ObjectSetClass) {\n // ...\n } else\n S.Diag(OIRE->getLocation(), diag::warn_objc_isa_assign);"},{u,15691,"/// CreateBuiltinBinOp - Creates a new built-in binary operation with\n/// operator @p Opc at location @c TokLoc. This routine only supports\n/// built-in operations; ActOnBinOp handles overloaded operators.\nExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n if (const ObjCIsaExpr *OISA = dyn_cast<ObjCIsaExpr>(LHS.get()->IgnoreParenCasts())) {\n // ...\n if (ObjectSetClass && isa<ObjCIsaExpr>(LHS.get())) {\n // ...\n Diag(LHS.get()->getExprLoc(), diag::warn_objc_isa_assign) << FixItHint::CreateInsertion(LHS.get()->getBeginLoc(), \"object_setClass(\") << FixItHint::CreateReplacement(SourceRange(OISA->getOpLoc(), OpLoc), \",\") << FixItHint::CreateInsertion(RHSLocEnd, \")\");"},{u,15760,"/// CreateBuiltinBinOp - Creates a new built-in binary operation with\n/// operator @p Opc at location @c TokLoc. This routine only supports\n/// built-in operations; ActOnBinOp handles overloaded operators.\nExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n if (const ObjCIsaExpr *OISA = dyn_cast<ObjCIsaExpr>(LHS.get()->IgnoreParenCasts())) {\n // ...\n if (ObjectSetClass && isa<ObjCIsaExpr>(LHS.get())) {\n // ...\n } else\n Diag(LHS.get()->getExprLoc(), diag::warn_objc_isa_assign);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/deprecated-objc-introspection.m"]={"clang/test/SemaObjC/deprecated-objc-introspection.m:88:8: warning: assignment to Objective-C\'s isa is deprecated in favor of object_setClass() [-Wdeprecated-objc-isa-usage]"} | ["clang/test/SemaObjC/deprecated-objc-introspection.m"]={"clang/test/SemaObjC/deprecated-objc-introspection.m:88:8: warning: assignment to Objective-C\'s isa is deprecated in favor of object_setClass() [-Wdeprecated-objc-isa-usage]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_isa_use"]={ | ["warn_objc_isa_use"]={ | ||
[ | [i]={"deprecated-objc-isa-usage"}, | ||
[j]="deprecated-objc-isa-usage", | |||
[ | |||
[b]="direct access to Objective-C\'s isa is deprecated in favor of object_getClass()", | [b]="direct access to Objective-C\'s isa is deprecated in favor of object_getClass()", | ||
[ | [d]=h, | ||
[ | [a]="direct access to Objective\\-C\'s isa is deprecated in favor of object_getClass\\(\\)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-objc\\-isa\\-usage[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"28324b00666b",1326913736,"objc: deprecate direct usage of \'isa\' of objc objects\nin favor of usage of api\'s intended for.\n// rd...","objc: deprecate direct usage of \'isa\' of objc objects\nin favor of usage of api\'s intended for.\n// rdar://8290002\n\nllvm-svn: 148404"}, | ||
[ | [g]={{u,628,"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 if (RHS) {\n // ...\n } else {\n // ...\n if (ObjectGetClass)\n S.Diag(OIRE->getExprLoc(), diag::warn_objc_isa_use) << FixItHint::CreateInsertion(OIRE->getBeginLoc(), \"object_getClass(\") << FixItHint::CreateReplacement(SourceRange(OIRE->getOpLoc(), OIRE->getEndLoc()), \")\");"},{u,634,"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 if (RHS) {\n // ...\n } else {\n // ...\n if (ObjectGetClass)\n // ...\n else\n S.Diag(OIRE->getLocation(), diag::warn_objc_isa_use);"},{u,692,"ExprResult Sema::DefaultLvalueConversion(Expr *E) {\n // ...\n if (const ObjCIsaExpr *OISA = dyn_cast<ObjCIsaExpr>(E->IgnoreParenCasts())) {\n // ...\n if (ObjectGetClass)\n Diag(E->getExprLoc(), diag::warn_objc_isa_use) << FixItHint::CreateInsertion(OISA->getBeginLoc(), \"object_getClass(\") << FixItHint::CreateReplacement(SourceRange(OISA->getOpLoc(), OISA->getIsaMemberLoc()), \")\");"},{u,697,"ExprResult Sema::DefaultLvalueConversion(Expr *E) {\n // ...\n if (const ObjCIsaExpr *OISA = dyn_cast<ObjCIsaExpr>(E->IgnoreParenCasts())) {\n // ...\n if (ObjectGetClass)\n // ...\n else\n Diag(E->getExprLoc(), diag::warn_objc_isa_use);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/deprecated-objc-introspection.m"]={"clang/test/SemaObjC/deprecated-objc-introspection.m:29:9: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]","clang/test/SemaObjC/deprecated-objc-introspection.m:30:7: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]","clang/test/SemaObjC/deprecated-objc-introspection.m:81:14: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]","clang/test/SemaObjC/deprecated-objc-introspection.m:82:14: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]","clang/test/SemaObjC/deprecated-objc-introspection.m:83:14: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]","clang/test/SemaObjC/deprecated-objc-introspection.m:84:14: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]"} | ["clang/test/SemaObjC/deprecated-objc-introspection.m"]={"clang/test/SemaObjC/deprecated-objc-introspection.m:29:9: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]","clang/test/SemaObjC/deprecated-objc-introspection.m:30:7: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]","clang/test/SemaObjC/deprecated-objc-introspection.m:81:14: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]","clang/test/SemaObjC/deprecated-objc-introspection.m:82:14: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]","clang/test/SemaObjC/deprecated-objc-introspection.m:83:14: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]","clang/test/SemaObjC/deprecated-objc-introspection.m:84:14: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_literal_comparison"]={ | ["warn_objc_literal_comparison"]={ | ||
[ | [i]={"objc-literal-compare"}, | ||
[j]="objc-literal-compare", | |||
[ | |||
[b]="direct comparison of %select{an array literal|a dictionary literal|a numeric literal|a boxed expression|}0 has undefined behavior", | [b]="direct comparison of %select{an array literal|a dictionary literal|a numeric literal|a boxed expression|}0 has undefined behavior", | ||
[ | [d]=h, | ||
[ | [a]="direct comparison of (?:an array literal|a dictionary literal|a numeric literal|a boxed expression|) has undefined behavior", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-literal\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"f9198030015f",1341852884,"Downgrade the \"direct comparison\" error for ObjC literals to a warning.\n\nChris pointed out that whil...","Downgrade the \"direct comparison\" error for ObjC literals to a warning.\n\nChris pointed out that while the comparison is certainly problematic\nand does not have well-defined behavior, it isn\'t any worse than some\nof the other abuses that we merely warn about and doesn\'t need to make\nthe compilation fail.\n\nRevert the release notes change (r159766) now that this is just a new warning.\n\nllvm-svn: 159939"}, | ||
[ | [g]={{u,12513,"static void diagnoseObjCLiteralComparison(Sema &S, SourceLocation Loc, ExprResult &LHS, ExprResult &RHS, BinaryOperator::Opcode Opc) {\n // ...\n if (LiteralKind == Sema::LK_String)\n // ...\n else\n S.Diag(Loc, diag::warn_objc_literal_comparison) << LiteralKind << Literal->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/objc-literal-comparison.m"]={"clang/test/SemaObjC/objc-literal-comparison.m:44:11: warning: direct comparison of an array literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:45:11: warning: direct comparison of a dictionary literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:46:11: warning: direct comparison of a numeric literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:47:12: warning: direct comparison of a numeric literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:48:19: warning: direct comparison of a numeric literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:49:14: warning: direct comparison of a boxed expression has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:82:11: warning: direct comparison of a numeric literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:83:10: warning: direct comparison of a numeric literal has undefined behavior [-Wobjc-literal-compare]"} | ["clang/test/SemaObjC/objc-literal-comparison.m"]={"clang/test/SemaObjC/objc-literal-comparison.m:44:11: warning: direct comparison of an array literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:45:11: warning: direct comparison of a dictionary literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:46:11: warning: direct comparison of a numeric literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:47:12: warning: direct comparison of a numeric literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:48:19: warning: direct comparison of a numeric literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:49:14: warning: direct comparison of a boxed expression has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:82:11: warning: direct comparison of a numeric literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:83:10: warning: direct comparison of a numeric literal has undefined behavior [-Wobjc-literal-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_missing_super_call"]={ | ["warn_objc_missing_super_call"]={ | ||
[ | [i]={n,o,p,"objc-missing-super-calls"}, | ||
[j]="objc-missing-super-calls", | |||
[ | |||
[b]="method possibly missing a [super %0] call", | [b]="method possibly missing a [super %0] call", | ||
[ | [d]=h, | ||
[ | [a]="method possibly missing a \\[super (.*?)\\] call", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-missing\\-super\\-calls[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"b05417e1e136",1347295869,"objective-C: Improving diagnostocs for missing call to\nsuper\'s annotated methods. // rdar://6386358\n...","objective-C: Improving diagnostocs for missing call to\nsuper\'s annotated methods. // rdar://6386358\n\nllvm-svn: 163517"}, | ||
[ | [g]={{B,15826,"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->ObjCShouldCallSuper) {\n Diag(MD->getEndLoc(), diag::warn_objc_missing_super_call) << MD->getSelector().getAsString();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjCXX/warn-missing-super.mm"]={"clang/test/SemaObjCXX/warn-missing-super.mm:18:1: warning: method possibly missing a [super dealloc] call [-Wobjc-missing-super-calls]"} | ["clang/test/SemaObjCXX/warn-missing-super.mm"]={"clang/test/SemaObjCXX/warn-missing-super.mm:18:1: warning: method possibly missing a [super dealloc] call [-Wobjc-missing-super-calls]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_pointer_cxx_catch_fragile"]={ | ["warn_objc_pointer_cxx_catch_fragile"]={ | ||
[ | [i]={"objc-nonunified-exceptions"}, | ||
[j]="objc-nonunified-exceptions", | |||
[ | |||
[b]="cannot catch an exception thrown with @throw in C++ in the non-unified exception model", | [b]="cannot catch an exception thrown with @throw in C++ in the non-unified exception model", | ||
[ | [d]=h, | ||
[ | [a]="cannot catch an exception thrown with @throw in C\\+\\+ in the non\\-unified exception model", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-nonunified\\-exceptions[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"0a3cfcc87f07",1308774111,"Alloa catching Objective-C id\'s being thrown with C++ throw\nin Darwin\'s fragile abi mode. // rdar:/...","Alloa catching Objective-C id\'s being thrown with C++ throw\nin Darwin\'s fragile abi mode. // rdar://8940528\n\nllvm-svn: 133639"}, | ||
[ | [g]={{T,16678,"/// Perform semantic analysis for the variable declaration that\n/// occurs within a C++ catch clause, returning the newly-created\n/// variable.\nVarDecl *Sema::BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation Loc, IdentifierInfo *Name) {\n // ...\n // Only the non-fragile NeXT runtime currently supports C++ catches\n // of ObjC types, and no runtime supports catching ObjC types by value.\n if (!Invalid && getLangOpts().ObjC) {\n // ...\n if (T->isObjCObjectType()) {\n // ...\n } else if (T->isObjCObjectPointerType()) {\n // FIXME: should this be a test for macosx-fragile specifically?\n if (getLangOpts().ObjCRuntime.isFragile())\n Diag(Loc, diag::warn_objc_pointer_cxx_catch_fragile);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjCXX/exceptions-fragile.mm"]={"clang/test/SemaObjCXX/exceptions-fragile.mm:9:27: warning: cannot catch an exception thrown with @throw in C++ in the non-unified exception model [-Wobjc-nonunified-exceptions]"} | ["clang/test/SemaObjCXX/exceptions-fragile.mm"]={"clang/test/SemaObjCXX/exceptions-fragile.mm:9:27: warning: cannot catch an exception thrown with @throw in C++ in the non-unified exception model [-Wobjc-nonunified-exceptions]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_pointer_masking"]={ | ["warn_objc_pointer_masking"]={ | ||
[ | [i]={"deprecated-objc-pointer-introspection"}, | ||
[j]="deprecated-objc-pointer-introspection", | |||
[ | |||
[b]="bitmasking for introspection of Objective-C object pointers is strongly discouraged", | [b]="bitmasking for introspection of Objective-C object pointers is strongly discouraged", | ||
[ | [d]=h, | ||
[ | [a]="bitmasking for introspection of Objective\\-C object pointers is strongly discouraged", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-objc\\-pointer\\-introspection[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"ebeabab9a9b6",1366670812,"Add a warning for Objective-C pointer introspection, which is solely the job of the Objective-C runt...","Add a warning for Objective-C pointer introspection, which is solely the job of the Objective-C runtime.\n\nllvm-svn: 180062"}, | ||
[ | [g]={{u,15341,"/// Check if a bitwise-& is performed on an Objective-C pointer. This\n/// is usually indicative of introspection within the Objective-C pointer.\nstatic void checkObjCPointerIntrospection(Sema &S, ExprResult &L, ExprResult &R, SourceLocation OpLoc) {\n // ...\n // This warning is deliberately made very specific to reduce false\n // positives with logic that uses \'&\' for hashing. This logic mainly\n // looks for code trying to introspect into tagged pointers, which\n // code should generally never do.\n if (ObjCPointerExpr && isa<IntegerLiteral>(OtherExpr->IgnoreParenCasts())) {\n unsigned Diag = diag::warn_objc_pointer_masking;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/deprecated-objc-introspection.m"]={"clang/test/SemaObjC/deprecated-objc-introspection.m:95:28: warning: bitmasking for introspection of Objective-C object pointers is strongly discouraged [-Wdeprecated-objc-pointer-introspection]","clang/test/SemaObjC/deprecated-objc-introspection.m:96:15: warning: bitmasking for introspection of Objective-C object pointers is strongly discouraged [-Wdeprecated-objc-pointer-introspection]","clang/test/SemaObjC/deprecated-objc-introspection.m:99:15: warning: bitmasking for introspection of Objective-C object pointers is strongly discouraged [-Wdeprecated-objc-pointer-introspection-performSelector]"} | ["clang/test/SemaObjC/deprecated-objc-introspection.m"]={"clang/test/SemaObjC/deprecated-objc-introspection.m:95:28: warning: bitmasking for introspection of Objective-C object pointers is strongly discouraged [-Wdeprecated-objc-pointer-introspection]","clang/test/SemaObjC/deprecated-objc-introspection.m:96:15: warning: bitmasking for introspection of Objective-C object pointers is strongly discouraged [-Wdeprecated-objc-pointer-introspection]","clang/test/SemaObjC/deprecated-objc-introspection.m:99:15: warning: bitmasking for introspection of Objective-C object pointers is strongly discouraged [-Wdeprecated-objc-pointer-introspection-performSelector]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_pointer_masking_performSelector"]={ | ["warn_objc_pointer_masking_performSelector"]={ | ||
[ | [i]={"deprecated-objc-pointer-introspection","deprecated-objc-pointer-introspection-performSelector"}, | ||
[j]="deprecated-objc-pointer-introspection-performSelector", | |||
[ | |||
[b]="bitmasking for introspection of Objective-C object pointers is strongly discouraged", | [b]="bitmasking for introspection of Objective-C object pointers is strongly discouraged", | ||
[ | [d]=h, | ||
[ | [a]="bitmasking for introspection of Objective\\-C object pointers is strongly discouraged", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-objc\\-pointer\\-introspection\\-performSelector[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"009d61dd16b4",1372109739,"Tweak -Wdeprecated-objc-pointer-introspection to have a subgroup for results of using -performSelect...","Tweak -Wdeprecated-objc-pointer-introspection to have a subgroup for results of using -performSelectorXXX.\n\n-performSelector: and friends return a value that is boxed as an Objective-C\npointer. Sometimes it is an Objective-C pointer, sometimes it isn\'t.\nSome clients may wish to silence this warning based on calling\nthis method.\n\nFixes <rdar://problem/14147304>\n\nllvm-svn: 184789"}, | ||
[ | [g]={{u,15489,"/// Check if a bitwise-& is performed on an Objective-C pointer. This\n/// is usually indicative of introspection within the Objective-C pointer.\nstatic void checkObjCPointerIntrospection(Sema &S, ExprResult &L, ExprResult &R, SourceLocation OpLoc) {\n // ...\n // This warning is deliberately made very specific to reduce false\n // positives with logic that uses \'&\' for hashing. This logic mainly\n // looks for code trying to introspect into tagged pointers, which\n // code should generally never do.\n if (ObjCPointerExpr && isa<IntegerLiteral>(OtherExpr->IgnoreParenCasts())) {\n // ...\n // Special case messages to -performSelector and friends, which\n // can return non-pointer values boxed in a pointer value.\n // Some clients may wish to silence warnings in this subcase.\n if (const ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(Ex)) {\n // ...\n if (SelArg0.startswith(\"performSelector\"))\n Diag = diag::warn_objc_pointer_masking_performSelector;"}} | ||
}, | }, | ||
["warn_objc_precise_lifetime_meaningless"]={ | ["warn_objc_precise_lifetime_meaningless"]={ | ||
[b]="objc_precise_lifetime is not meaningful for %select{__unsafe_unretained|__autoreleasing}0 objects", | [b]="objc_precise_lifetime is not meaningful for %select{__unsafe_unretained|__autoreleasing}0 objects", | ||
[ | [d]="(?:error|fatal error)\\: ", | ||
[ | [a]="objc_precise_lifetime is not meaningful for (?:__unsafe_unretained|__autoreleasing) objects", | ||
[ | [e]=s, | ||
[ | [c]=l, | ||
[ | [f]={"31168b077c36",1308178962,"Automatic Reference Counting.\n\nLanguage-design credit goes to a lot of people, but I particularly wa...","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"}, | ||
[ | [g]={{w,6325,"static void handleObjCPreciseLifetimeAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n case Qualifiers::OCL_ExplicitNone:\n case Qualifiers::OCL_Autoreleasing:\n S.Diag(AL.getLoc(), diag::warn_objc_precise_lifetime_meaningless) << (Lifetime == Qualifiers::OCL_Autoreleasing);"}} | ||
}, | }, | ||
["warn_objc_property_assign_on_object"]={ | ["warn_objc_property_assign_on_object"]={ | ||
[ | [i]={"objc-property-assign-on-object-type"}, | ||
[j]="objc-property-assign-on-object-type", | |||
[ | |||
[b]="\'assign\' property of object type may become a dangling reference; consider using \'unsafe_unretained\'", | [b]="\'assign\' property of object type may become a dangling reference; consider using \'unsafe_unretained\'", | ||
[ | [d]=h, | ||
[ | [a]="\'assign\' property of object type may become a dangling reference; consider using \'unsafe_unretained\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-assign\\-on\\-object\\-type[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"52a503d4f333",1536174120,"Add -Wobjc-property-assign-on-object-type.\n\nThis is a warning about using \'assign\' instead of \'unsaf...","Add -Wobjc-property-assign-on-object-type.\n\nThis is a warning about using \'assign\' instead of \'unsafe_unretained\'\nin Objective-C property declarations. It\'s off by default because there\nisn\'t consensus in the Objective-C steering group that this is the right\nthing to do, but we\'re nonetheless okay with adding it because there\'s a\nsubstantial pool of Objective-C programmers who will appreciate the warning.\n\nPatch by Alfred Zien!\n\nllvm-svn: 341489"}, | ||
[ | [g]={{N,2675,"void Sema::CheckObjCPropertyAttributes(Decl *PDecl, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass) {\n // ...\n // Check for assign on object types.\n if ((Attributes & ObjCPropertyAttribute::kind_assign) && !(Attributes & ObjCPropertyAttribute::kind_unsafe_unretained) && PropertyTy->isObjCRetainableType() && !PropertyTy->isObjCARCImplicitlyUnretainedType()) {\n Diag(Loc, diag::warn_objc_property_assign_on_object);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/property-assign-on-object-type.m"]={"clang/test/SemaObjC/property-assign-on-object-type.m:7:1: warning: \'assign\' property of object type may become a dangling reference; consider using \'unsafe_unretained\' [-Wobjc-property-assign-on-object-type]"} | ["clang/test/SemaObjC/property-assign-on-object-type.m"]={"clang/test/SemaObjC/property-assign-on-object-type.m:7:1: warning: \'assign\' property of object type may become a dangling reference; consider using \'unsafe_unretained\' [-Wobjc-property-assign-on-object-type]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_property_copy_missing_on_block"]={ | ["warn_objc_property_copy_missing_on_block"]={ | ||
[b]="\'copy\' attribute must be specified for the block property when -fobjc-gc-only is specified", | [b]="\'copy\' attribute must be specified for the block property when -fobjc-gc-only is specified", | ||
[ | [d]=h, | ||
[ | [a]="\'copy\' attribute must be specified for the block property when \\-fobjc\\-gc\\-only is specified", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[ | [f]={"5580bdcaa2d4",1241737610,"Add a warning for a missing copy attribute on a property that is a\nblock pointer. Radar 6441502\n\nll...","Add a warning for a missing copy attribute on a property that is a\nblock pointer. Radar 6441502\n\nllvm-svn: 71190"}, | ||
[ | [g]={{N,2808,"void Sema::CheckObjCPropertyAttributes(Decl *PDecl, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass) {\n // ...\n if (!(Attributes & ObjCPropertyAttribute::kind_copy) && !(Attributes & ObjCPropertyAttribute::kind_readonly) && getLangOpts().getGC() == LangOptions::GCOnly && PropertyTy->isBlockPointerType())\n Diag(Loc, diag::warn_objc_property_copy_missing_on_block);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/block-attr.m"]={"clang/test/SemaObjC/block-attr.m:6:1: warning: \'copy\' attribute must be specified for the block property when -fobjc-gc-only is specified"} | ["clang/test/SemaObjC/block-attr.m"]={"clang/test/SemaObjC/block-attr.m:6:1: warning: \'copy\' attribute must be specified for the block property when -fobjc-gc-only is specified"} | ||
} | } | ||
}, | }, | ||
["warn_objc_property_default_assign_on_object"]={ | ["warn_objc_property_default_assign_on_object"]={ | ||
[ | [i]={"objc-property-no-attribute"}, | ||
[j]="objc-property-no-attribute", | |||
[ | |||
[b]="default property attribute \'assign\' not appropriate for object", | [b]="default property attribute \'assign\' not appropriate for object", | ||
[ | [d]=h, | ||
[ | [a]="default property attribute \'assign\' not appropriate for object", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-no\\-attribute[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{N,2794,"void Sema::CheckObjCPropertyAttributes(Decl *PDecl, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass) {\n // ...\n // Warn if user supplied no assignment attribute, property is\n // readwrite, and this is an object type.\n if (!getOwnershipRule(Attributes) && PropertyTy->isObjCRetainableType()) {\n if (Attributes & ObjCPropertyAttribute::kind_readonly) {\n // ...\n } else if (getLangOpts().ObjCAutoRefCount) {\n // ...\n } else if (PropertyTy->isObjCObjectPointerType()) {\n // ...\n // In non-gc, non-arc mode, \'Class\' is treated as a \'void *\' no need to\n // issue any warning.\n if (isAnyClassTy && getLangOpts().getGC() == LangOptions::NonGC)\n // ...\n else if (propertyInPrimaryClass) {\n // ...\n // If non-gc code warn that this is likely inappropriate.\n if (getLangOpts().getGC() == LangOptions::NonGC)\n Diag(Loc, diag::warn_objc_property_default_assign_on_object);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:9:1: warning: default property attribute \'assign\' not appropriate for object [-Wobjc-property-no-attribute]"} | ["clang/test/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:9:1: warning: default property attribute \'assign\' not appropriate for object [-Wobjc-property-no-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_property_no_assignment_attribute"]={ | ["warn_objc_property_no_assignment_attribute"]={ | ||
[ | [i]={"objc-property-no-attribute"}, | ||
[j]="objc-property-no-attribute", | |||
[ | |||
[b]="no \'assign\', \'retain\', or \'copy\' attribute is specified - \'assign\' is assumed", | [b]="no \'assign\', \'retain\', or \'copy\' attribute is specified - \'assign\' is assumed", | ||
[ | [d]=h, | ||
[ | [a]="no \'assign\', \'retain\', or \'copy\' attribute is specified \\- \'assign\' is assumed", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-no\\-attribute[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{N,2790,"void Sema::CheckObjCPropertyAttributes(Decl *PDecl, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass) {\n // ...\n // Warn if user supplied no assignment attribute, property is\n // readwrite, and this is an object type.\n if (!getOwnershipRule(Attributes) && PropertyTy->isObjCRetainableType()) {\n if (Attributes & ObjCPropertyAttribute::kind_readonly) {\n // ...\n } else if (getLangOpts().ObjCAutoRefCount) {\n // ...\n } else if (PropertyTy->isObjCObjectPointerType()) {\n // ...\n // In non-gc, non-arc mode, \'Class\' is treated as a \'void *\' no need to\n // issue any warning.\n if (isAnyClassTy && getLangOpts().getGC() == LangOptions::NonGC)\n // ...\n else if (propertyInPrimaryClass) {\n // Don\'t issue warning on property with no life time in class\n // extension as it is inherited from property in primary class.\n // Skip this warning in gc-only mode.\n if (getLangOpts().getGC() != LangOptions::GCOnly)\n Diag(Loc, diag::warn_objc_property_no_assignment_attribute);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:9:1: warning: no \'assign\', \'retain\', or \'copy\' attribute is specified - \'assign\' is assumed [-Wobjc-property-no-attribute]"} | ["clang/test/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:9:1: warning: no \'assign\', \'retain\', or \'copy\' attribute is specified - \'assign\' is assumed [-Wobjc-property-no-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_property_retain_of_block"]={ | ["warn_objc_property_retain_of_block"]={ | ||
[ | [i]={"objc-noncopy-retain-block-property"}, | ||
[j]="objc-noncopy-retain-block-property", | |||
[ | |||
[b]="retain\'ed block property does not copy the block - use copy attribute instead", | [b]="retain\'ed block property does not copy the block - use copy attribute instead", | ||
[ | [d]=h, | ||
[ | [a]="retain\'ed block property does not copy the block \\- use copy attribute instead", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-noncopy\\-retain\\-block\\-property[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"1723e17b78f8",1316023426,"objc-arc: warn when a \'retain\' block property is\ndeclared which does not force a \'copy\' of the block...","objc-arc: warn when a \'retain\' block property is\ndeclared which does not force a \'copy\' of the block literal\nobject. // rdar://9829425\n\nllvm-svn: 139706"}, | ||
[ | [g]={{N,2813,"void Sema::CheckObjCPropertyAttributes(Decl *PDecl, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass) {\n // ...\n if (!(Attributes & ObjCPropertyAttribute::kind_copy) && !(Attributes & ObjCPropertyAttribute::kind_readonly) && getLangOpts().getGC() == LangOptions::GCOnly && PropertyTy->isBlockPointerType())\n // ...\n else if ((Attributes & ObjCPropertyAttribute::kind_retain) && !(Attributes & ObjCPropertyAttribute::kind_readonly) && !(Attributes & ObjCPropertyAttribute::kind_strong) && PropertyTy->isBlockPointerType())\n Diag(Loc, diag::warn_objc_property_retain_of_block);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/warn-retain-cycle.m"]={"clang/test/SemaObjC/warn-retain-cycle.m:36:1: warning: retain\'ed block property does not copy the block - use copy attribute instead [-Wobjc-noncopy-retain-block-property]"} | ["clang/test/SemaObjC/warn-retain-cycle.m"]={"clang/test/SemaObjC/warn-retain-cycle.m:36:1: warning: retain\'ed block property does not copy the block - use copy attribute instead [-Wobjc-noncopy-retain-block-property]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_protocol_qualifier_missing_id"]={ | ["warn_objc_protocol_qualifier_missing_id"]={ | ||
[b]="protocol has no object type specified; defaults to qualified \'id\'", | |||
[d]=h, | |||
[a]="protocol has no object type specified; defaults to qualified \'id\'", | [a]="protocol has no object type specified; defaults to qualified \'id\'", | ||
[e]=K, | |||
[e]= | [c]=v, | ||
[ | [f]={W,1236199783,V,X}, | ||
[g]={{"clang/lib/Parse/ParseObjc.cpp",1625,"TypeResult Parser::parseObjCProtocolQualifierType(SourceLocation &rAngleLoc) {\n // ...\n if (result.isUsable()) {\n Diag(lAngleLoc, diag::warn_objc_protocol_qualifier_missing_id) << FixItHint::CreateInsertion(lAngleLoc, \"id\") << SourceRange(lAngleLoc, rAngleLoc);"}}, | |||
[f | [k]={ | ||
[ | |||
[ | |||
["clang/test/SemaObjC/protocol-archane.m"]={"clang/test/SemaObjC/protocol-archane.m:11:8: warning: protocol has no object type specified; defaults to qualified \'id\'","clang/test/SemaObjC/protocol-archane.m:13:5: warning: protocol has no object type specified; defaults to qualified \'id\'","clang/test/SemaObjC/protocol-archane.m:40:20: warning: protocol has no object type specified; defaults to qualified \'id\'","clang/test/SemaObjC/protocol-archane.m:44:9: warning: protocol has no object type specified; defaults to qualified \'id\'"} | ["clang/test/SemaObjC/protocol-archane.m"]={"clang/test/SemaObjC/protocol-archane.m:11:8: warning: protocol has no object type specified; defaults to qualified \'id\'","clang/test/SemaObjC/protocol-archane.m:13:5: warning: protocol has no object type specified; defaults to qualified \'id\'","clang/test/SemaObjC/protocol-archane.m:40:20: warning: protocol has no object type specified; defaults to qualified \'id\'","clang/test/SemaObjC/protocol-archane.m:44:9: warning: protocol has no object type specified; defaults to qualified \'id\'"} | ||
} | } | ||
}, | }, | ||
["warn_objc_readonly_property_has_setter"]={ | ["warn_objc_readonly_property_has_setter"]={ | ||
[ | [i]={"objc-readonly-with-setter-property"}, | ||
[j]="objc-readonly-with-setter-property", | |||
[ | |||
[b]="setter cannot be specified for a readonly property", | [b]="setter cannot be specified for a readonly property", | ||
[ | [d]=h, | ||
[ | [a]="setter cannot be specified for a readonly property", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-readonly\\-with\\-setter\\-property[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"3018b950936a",1320188536,"objc: warn if a readonly property has a setter attribute too.\n// rdar://10357768\n\nllvm-svn: 143518","objc: warn if a readonly property has a setter attribute too.\n// rdar://10357768\n\nllvm-svn: 143518"}, | ||
[ | [g]={{N,2817,"void Sema::CheckObjCPropertyAttributes(Decl *PDecl, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass) {\n // ...\n if ((Attributes & ObjCPropertyAttribute::kind_readonly) && (Attributes & ObjCPropertyAttribute::kind_setter))\n Diag(Loc, diag::warn_objc_readonly_property_has_setter);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/property-10.m"]={"clang/test/SemaObjC/property-10.m:46:1: warning: setter cannot be specified for a readonly property [-Wobjc-readonly-with-setter-property]"} | ["clang/test/SemaObjC/property-10.m"]={"clang/test/SemaObjC/property-10.m:46:1: warning: setter cannot be specified for a readonly property [-Wobjc-readonly-with-setter-property]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_redundant_literal_use"]={ | ["warn_objc_redundant_literal_use"]={ | ||
[ | [i]={"objc-cocoa-api","objc-redundant-api-use","objc-redundant-literal-use"}, | ||
[j]="objc-redundant-literal-use", | |||
[ | |||
[b]="using %0 with a literal is redundant", | [b]="using %0 with a literal is redundant", | ||
[ | [d]=h, | ||
[ | [a]="using (.*?) with a literal is redundant", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-redundant\\-literal\\-use[^\\]]*\\]", | ||
[ | [c]="Cocoa API Issue", | ||
[ | [f]={"e65b086e07a6",1331064356,"Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,\nNSNumber, and boolea...","Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,\nNSNumber, and boolean literals. This includes both Sema and Codegen support.\nIncluded is also support for new Objective-C container subscripting.\n\nMy apologies for the large patch. It was very difficult to break apart.\nThe patch introduces changes to the driver as well to cause clang to link\nin additional runtime support when needed to support the new language features.\n\nDocs are forthcoming to document the implementation and behavior of these features.\n\nllvm-svn: 152137"}, | ||
[ | [g]={{U,2491,"static void checkCocoaAPI(Sema &S, const ObjCMessageExpr *Msg) { applyCocoaAPICheck(S, Msg, diag::warn_objc_redundant_literal_use, edit::rewriteObjCRedundantCallWithLiteral); }"}}, | ||
[ | [k]={ | ||
["clang/test/ARCMT/objcmt-instancetype.m"]={"clang/test/ARCMT/objcmt-instancetype.m:107:21: warning: using \'stringWithString:\' with a literal is redundant [-Wobjc-redundant-literal-use]","clang/test/ARCMT/objcmt-instancetype.m:108:9: warning: using \'initWithString:\' with a literal is redundant [-Wobjc-redundant-literal-use]","clang/test/ARCMT/objcmt-instancetype.m:109:18: warning: using \'arrayWithArray:\' with a literal is redundant [-Wobjc-redundant-literal-use]","clang/test/ARCMT/objcmt-instancetype.m:110:24: warning: using \'dictionaryWithDictionary:\' with a literal is redundant [-Wobjc-redundant-literal-use]"} | ["clang/test/ARCMT/objcmt-instancetype.m"]={"clang/test/ARCMT/objcmt-instancetype.m:107:21: warning: using \'stringWithString:\' with a literal is redundant [-Wobjc-redundant-literal-use]","clang/test/ARCMT/objcmt-instancetype.m:108:9: warning: using \'initWithString:\' with a literal is redundant [-Wobjc-redundant-literal-use]","clang/test/ARCMT/objcmt-instancetype.m:109:18: warning: using \'arrayWithArray:\' with a literal is redundant [-Wobjc-redundant-literal-use]","clang/test/ARCMT/objcmt-instancetype.m:110:24: warning: using \'dictionaryWithDictionary:\' with a literal is redundant [-Wobjc-redundant-literal-use]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_redundant_qualified_class_type"]={ | ["warn_objc_redundant_qualified_class_type"]={ | ||
[ | [i]={"objc-protocol-qualifiers"}, | ||
[j]="objc-protocol-qualifiers", | |||
[ | |||
[b]="parameterized class %0 already conforms to the protocols listed; did you forget a \'*\'?", | [b]="parameterized class %0 already conforms to the protocols listed; did you forget a \'*\'?", | ||
[ | [d]=h, | ||
[ | [a]="parameterized class (.*?) already conforms to the protocols listed; did you forget a \'\\*\'\\?", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-protocol\\-qualifiers[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"10dc9d80cbb4",1436241508,"Warn when an intended Objective-C specialization was actually a useless protocol qualification.\n\nWar...","Warn when an intended Objective-C specialization was actually a useless protocol qualification.\n\nWarn in cases where one has provided redundant protocol qualification\nthat might be a typo for a specialization, e.g., NSArray<NSObject>,\nwhich is pointless (NSArray declares that it conforms to NSObject) and\nis likely to be a typo for NSArray<NSObject *>, i.e., an array of\nNSObject pointers. This warning is very narrow, only applying when the\nbase type being qualified is parameterized, has the same number of\nparameters as their are protocols listed, all of the names can also\nrefer to types (including Objective-C class types, of course), and at\nleast one of those types is an Objective-C class (making this a typo\nfor a missing \'*\'). The limitations are partly for performance reasons\n(we don\'t want to do redundant name lookup unless we really need to),\nand because we want the warning to apply in very limited cases to\nlimit false positives.\n\nPart of rdar://problem/6294649.\n\nllvm-svn: 241547"}, | ||
[ | [g]={{I,1528,"void Sema::actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef<IdentifierInfo *> identifiers, ArrayRef<SourceLocation> identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl<ParsedType> &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl<Decl *> &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) {\n // ...\n auto resolvedAsProtocols = [&] {\n // ...\n // All of the protocols listed also have type names, and at least\n // one is an Objective-C class name. Check whether all of the\n // protocol conformances are declared by the base class itself, in\n // which case we warn.\n if (allAreTypeNames && firstClassNameLoc.isValid()) {\n // ...\n if (allProtocolsDeclared) {\n Diag(firstClassNameLoc, diag::warn_objc_redundant_qualified_class_type) << baseClass->getDeclName() << SourceRange(lAngleLoc, rAngleLoc) << FixItHint::CreateInsertion(getLocForEndOfToken(firstClassNameLoc), \" *\");"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/parameterized_classes_subst.m"]={"clang/test/SemaObjC/parameterized_classes_subst.m:436:17: warning: parameterized class \'NSArray\' already conforms to the protocols listed; did you forget a \'*\'? [-Wobjc-protocol-qualifiers]"} | ["clang/test/SemaObjC/parameterized_classes_subst.m"]={"clang/test/SemaObjC/parameterized_classes_subst.m:436:17: warning: parameterized class \'NSArray\' already conforms to the protocols listed; did you forget a \'*\'? [-Wobjc-protocol-qualifiers]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_requires_super_protocol"]={ | ["warn_objc_requires_super_protocol"]={ | ||
[ | [i]={"requires-super-attribute"}, | ||
[j]="requires-super-attribute", | |||
[ | |||
[b]="%0 attribute cannot be applied to %select{methods in protocols|dealloc}1", | [b]="%0 attribute cannot be applied to %select{methods in protocols|dealloc}1", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) attribute cannot be applied to (?:methods in protocols|dealloc)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wrequires\\-super\\-attribute[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"566fff0dac54",1347061583,"objective-C: introduce __attribute((objc_requires_super)) on method\nin classes. Use it to flag those...","objective-C: introduce __attribute((objc_requires_super)) on method\nin classes. Use it to flag those method implementations which don\'t\ncontain call to \'super\' if they have \'super\' class and it has the method\nwith this attribute set. This is wip. // rdar://6386358\n\nllvm-svn: 163434"}, | ||
[ | [g]={{w,6131,"static void handleObjCRequiresSuperAttr(Sema &S, Decl *D, const ParsedAttr &Attrs) {\n // ...\n if (const auto *PDecl = dyn_cast_or_null<ObjCProtocolDecl>(DC)) {\n S.Diag(D->getBeginLoc(), diag::warn_objc_requires_super_protocol) << Attrs << 0;"},{w,6137,"static void handleObjCRequiresSuperAttr(Sema &S, Decl *D, const ParsedAttr &Attrs) {\n // ...\n if (Method->getMethodFamily() == OMF_dealloc) {\n S.Diag(D->getBeginLoc(), diag::warn_objc_requires_super_protocol) << Attrs << 1;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/super-dealloc-attribute.m"]={"clang/test/SemaObjC/super-dealloc-attribute.m:12:1: warning: \'objc_requires_super\' attribute cannot be applied to methods in protocols [-Wrequires-super-attribute]","clang/test/SemaObjC/super-dealloc-attribute.m:18:1: warning: \'objc_requires_super\' attribute cannot be applied to dealloc [-Wrequires-super-attribute]"} | ["clang/test/SemaObjC/super-dealloc-attribute.m"]={"clang/test/SemaObjC/super-dealloc-attribute.m:12:1: warning: \'objc_requires_super\' attribute cannot be applied to methods in protocols [-Wrequires-super-attribute]","clang/test/SemaObjC/super-dealloc-attribute.m:18:1: warning: \'objc_requires_super\' attribute cannot be applied to dealloc [-Wrequires-super-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_root_class_missing"]={ | ["warn_objc_root_class_missing"]={ | ||
[ | [i]={"objc-root-class"}, | ||
[j]="objc-root-class", | |||
[ | |||
[b]="class %0 defined without specifying a base class", | [b]="class %0 defined without specifying a base class", | ||
[ | [d]=h, | ||
[ | [a]="class (.*?) defined without specifying a base class", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-root\\-class[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"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]={{I,4138,"// 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 Diag(DeclLoc, diag::warn_objc_root_class_missing) << IDecl->getIdentifier();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/method-encoding-2.m"]={"clang/test/SemaObjC/method-encoding-2.m:4:12: warning: class \'Intf\' defined without specifying a base class [-Wobjc-root-class]"} | ["clang/test/SemaObjC/method-encoding-2.m"]={"clang/test/SemaObjC/method-encoding-2.m:4:12: warning: class \'Intf\' defined without specifying a base class [-Wobjc-root-class]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_secondary_init_missing_init_call"]={ | ["warn_objc_secondary_init_missing_init_call"]={ | ||
[ | [i]={n,o,p,zb}, | ||
[j]=zb, | |||
[ | |||
[b]="convenience initializer missing a \'self\' call to another initializer", | [b]="convenience initializer missing a \'self\' call to another initializer", | ||
[ | [d]=h, | ||
[ | [a]="convenience initializer missing a \'self\' call to another initializer", | ||
[ | [e]=Cc, | ||
[ | [c]=l, | ||
[ | [f]={"b66d3cf5cf84",1386105109,"[objc] Emit warning when the implementation of a secondary initializer calls on\nsuper another initia...","[objc] Emit warning when the implementation of a secondary initializer calls on\nsuper another initializer and when the implementation does not delegate to\nanother initializer via a call on \'self\'.\n\nA secondary initializer is an initializer method not marked as a designated\ninitializer within a class that has at least one initializer marked as a\ndesignated initializer.\n\nllvm-svn: 196318"}, | ||
[ | [g]={{B,15861,"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->ObjCWarnForNoInitDelegation) {\n // Don\'t issue this warning for unavaialable inits.\n if (!MD->isUnavailable())\n Diag(MD->getLocation(), diag::warn_objc_secondary_init_missing_init_call);"}}, | ||
[ | [k]={ | ||
[ | [Nc]={"clang/test/SemaObjC/attr-designated-init.m:32:1: warning: convenience initializer missing a \'self\' call to another initializer [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:48:1: warning: convenience initializer missing a \'self\' call to another initializer [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:160:1: warning: convenience initializer missing a \'self\' call to another initializer [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:176:1: warning: convenience initializer missing a \'self\' call to another initializer [-Wobjc-designated-initializers]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_secondary_init_super_init_call"]={ | ["warn_objc_secondary_init_super_init_call"]={ | ||
[ | [i]={n,o,p,zb}, | ||
[j]=zb, | |||
[ | |||
[b]="convenience initializer should not invoke an initializer on \'super\'", | [b]="convenience initializer should not invoke an initializer on \'super\'", | ||
[ | [d]=h, | ||
[ | [a]="convenience initializer should not invoke an initializer on \'super\'", | ||
[ | [e]=Cc, | ||
[ | [c]=l, | ||
[ | [f]={"b66d3cf5cf84",1386105109,"[objc] Emit warning when the implementation of a secondary initializer calls on\nsuper another initia...","[objc] Emit warning when the implementation of a secondary initializer calls on\nsuper another initializer and when the implementation does not delegate to\nanother initializer via a call on \'self\'.\n\nA secondary initializer is an initializer method not marked as a designated\ninitializer within a class that has at least one initializer marked as a\ndesignated initializer.\n\nllvm-svn: 196318"}, | ||
[ | [g]={{U,3219,"/// 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->ObjCIsSecondaryInit && (SuperLoc.isValid() || isSelfExpr(Receiver))) {\n if (SuperLoc.isValid()) {\n Diag(SelLoc, diag::warn_objc_secondary_init_super_init_call);"}}, | ||
[ | [k]={ | ||
[ | [Nc]={"clang/test/SemaObjC/attr-designated-init.m:161:17: warning: convenience initializer should not invoke an initializer on \'super\' [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:170:10: warning: convenience initializer should not invoke an initializer on \'super\' [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:172:12: warning: convenience initializer should not invoke an initializer on \'super\' [-Wobjc-designated-initializers]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_string_literal_comparison"]={ | ["warn_objc_string_literal_comparison"]={ | ||
[ | [i]={"objc-literal-compare","objc-string-compare"}, | ||
[j]="objc-string-compare", | |||
[ | |||
[b]="direct comparison of a string literal has undefined behavior", | [b]="direct comparison of a string literal has undefined behavior", | ||
[ | [d]=h, | ||
[ | [a]="direct comparison of a string literal has undefined behavior", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-string\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"ea70bf71547b",1342547204,"Add -Wobjc-string-compare under -Wobjc-literal-compare.\n\nSuggested by Ted, since string literal comp...","Add -Wobjc-string-compare under -Wobjc-literal-compare.\n\nSuggested by Ted, since string literal comparison is at least slightly more\nsensible than comparison of runtime literals. (Ambiguous language on\ndeveloper.apple.com implies that strings are guaranteed to be uniqued within\na translation unit and possibly across a linked binary.)\n\nllvm-svn: 160378"}, | ||
[ | [g]={{u,12503,"static void diagnoseObjCLiteralComparison(Sema &S, SourceLocation Loc, ExprResult &LHS, ExprResult &RHS, BinaryOperator::Opcode Opc) {\n // ...\n if (LiteralKind == Sema::LK_String)\n S.Diag(Loc, diag::warn_objc_string_literal_comparison) << Literal->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/FixIt/fixit-nsstring-compare.m"]={"clang/test/FixIt/fixit-nsstring-compare.m:16:28: warning: direct comparison of a string literal has undefined behavior [-Wobjc-string-compare]"} | ["clang/test/FixIt/fixit-nsstring-compare.m"]={"clang/test/FixIt/fixit-nsstring-compare.m:16:28: warning: direct comparison of a string literal has undefined behavior [-Wobjc-string-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_objc_unsafe_perform_selector"]={ | ["warn_objc_unsafe_perform_selector"]={ | ||
[ | [i]={"objc-unsafe-perform-selector"}, | ||
[j]="objc-unsafe-perform-selector", | |||
[ | |||
[b]="%0 is incompatible with selectors that return a %select{struct|union|vector}1 type", | [b]="%0 is incompatible with selectors that return a %select{struct|union|vector}1 type", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) is incompatible with selectors that return a (?:struct|union|vector) type", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-unsafe\\-perform\\-selector[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"0e23c61c8755",1488815914,"[Sema][ObjC] Warn about \'performSelector\' calls with selectors\nthat return record or vector types\n\nT...","[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]={{U,2530,"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 S.Diag(Loc, diag::warn_objc_unsafe_perform_selector) << Method->getSelector() << (!Ret->isRecordType() ? /*Vector*/ 2 : Ret->isUnionType() ? /*Union*/ 1 : /*Struct*/ 0);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/unsafe-perform-selector.m"]={"clang/test/SemaObjC/unsafe-perform-selector.m:58:6: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:59:6: warning: \'performSelectorInBackground:withObject:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:60:6: warning: \'performSelector:\' is incompatible with selectors that return a union type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:61:6: warning: \'performSelectorOnMainThread:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:62:6: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:90:9: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:91:9: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:95:10: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:96:10: warning: \'performSelectorInBackground:withObject:\' is incompatible with selectors that return a union type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:106:9: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:110:10: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:119:9: warning: \'performSelectorOnMainThread:onThread:withObject:waitUntilDone:modes:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:123:9: warning: \'performSelector:\' is incompatible with selectors that return a vector type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:124:9: warning: \'performSelector:\' is incompatible with selectors that return a vector type [-Wobjc-unsafe-perform-selector]"} | ["clang/test/SemaObjC/unsafe-perform-selector.m"]={"clang/test/SemaObjC/unsafe-perform-selector.m:58:6: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:59:6: warning: \'performSelectorInBackground:withObject:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:60:6: warning: \'performSelector:\' is incompatible with selectors that return a union type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:61:6: warning: \'performSelectorOnMainThread:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:62:6: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:90:9: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:91:9: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:95:10: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:96:10: warning: \'performSelectorInBackground:withObject:\' is incompatible with selectors that return a union type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:106:9: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:110:10: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:119:9: warning: \'performSelectorOnMainThread:onThread:withObject:waitUntilDone:modes:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:123:9: warning: \'performSelector:\' is incompatible with selectors that return a vector type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:124:9: warning: \'performSelector:\' is incompatible with selectors that return a vector type [-Wobjc-unsafe-perform-selector]"} | ||
} | } | ||
}, | }, | ||
["warn_odr_different_num_template_parameters"]={ | ["warn_odr_different_num_template_parameters"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="template parameter lists have a different number of parameters (%0 vs %1)", | [b]="template parameter lists have a different number of parameters (%0 vs %1)", | ||
[ | [d]=h, | ||
[ | [a]="template parameter lists have a different number of parameters \\((.*?) vs (.*?)\\)", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{cb,2240,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_different_num_template_parameters:\n return diag::warn_odr_different_num_template_parameters;"}} | ||
}, | }, | ||
["warn_odr_different_template_parameter_kind"]={ | ["warn_odr_different_template_parameter_kind"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="template parameter has different kinds in different translation units", | [b]="template parameter has different kinds in different translation units", | ||
[ | [d]=h, | ||
[ | [a]="template parameter has different kinds in different translation units", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{cb,2242,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_different_template_parameter_kind:\n return diag::warn_odr_different_template_parameter_kind;"}}, | ||
[ | [k]={ | ||
["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-template1.cpp:12:14: warning: template parameter has different kinds in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class-template/Inputs/class-template1.cpp:21:18: warning: template parameter has different kinds in different translation units [-Wodr]"} | ["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-template1.cpp:12:14: warning: template parameter has different kinds in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class-template/Inputs/class-template1.cpp:21:18: warning: template parameter has different kinds in different translation units [-Wodr]"} | ||
} | } | ||
}, | }, | ||
["warn_odr_field_type_inconsistent"]={ | ["warn_odr_field_type_inconsistent"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="field %0 declared with incompatible types in different translation units (%1 vs. %2)", | [b]="field %0 declared with incompatible types in different translation units (%1 vs. %2)", | ||
[ | [d]=h, | ||
[ | [a]="field (.*?) declared with incompatible types in different translation units \\((.*?) vs\\. (.*?)\\)", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{qb,3915,"ExpectedDecl ASTNodeImporter::VisitFieldDecl(FieldDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (FieldDecl *FoundField = dyn_cast<FieldDecl>(FoundDecl)) {\n // ...\n Importer.ToDiag(Loc, diag::warn_odr_field_type_inconsistent) << Name << D->getType() << FoundField->getType();"},{qb,3994,"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(Loc, diag::warn_odr_field_type_inconsistent) << Name << D->getType() << FoundField->getType();"},{cb,2220,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_field_type_inconsistent:\n return diag::warn_odr_field_type_inconsistent;"}} | ||
}, | }, | ||
["warn_odr_function_type_inconsistent"]={ | ["warn_odr_function_type_inconsistent"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="external function %0 declared with incompatible types in different translation units (%1 vs. %2)", | [b]="external function %0 declared with incompatible types in different translation units (%1 vs. %2)", | ||
[ | [d]=h, | ||
[ | [a]="external function (.*?) declared with incompatible types in different translation units \\((.*?) vs\\. (.*?)\\)", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{qb,3543,"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(Loc, diag::warn_odr_function_type_inconsistent) << Name << D->getType() << FoundFunction->getType();"},{cb,2216,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_function_type_inconsistent:\n return diag::warn_odr_function_type_inconsistent;"}}, | ||
[ | [k]={ | ||
["clang/test/ASTMerge/function/test.c"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/function/Inputs/function2.c:3:6: warning: external function \'f1\' declared with incompatible types in different translation units (\'void (Int, double)\' (aka \'void (int, double)\') vs. \'void (int, float)\') [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/function/Inputs/function2.c:5:6: warning: external function \'f3\' declared with incompatible types in different translation units (\'void (int)\' vs. \'void (void)\') [-Wodr]"} | ["clang/test/ASTMerge/function/test.c"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/function/Inputs/function2.c:3:6: warning: external function \'f1\' declared with incompatible types in different translation units (\'void (Int, double)\' (aka \'void (int, double)\') vs. \'void (int, float)\') [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/function/Inputs/function2.c:5:6: warning: external function \'f3\' declared with incompatible types in different translation units (\'void (int)\' vs. \'void (void)\') [-Wodr]"} | ||
} | } | ||
}, | }, | ||
["warn_odr_ivar_type_inconsistent"]={ | ["warn_odr_ivar_type_inconsistent"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="instance variable %0 declared with incompatible types in different translation units (%1 vs. %2)", | [b]="instance variable %0 declared with incompatible types in different translation units (%1 vs. %2)", | ||
[ | [d]=h, | ||
[ | [a]="instance variable (.*?) declared with incompatible types in different translation units \\((.*?) vs\\. (.*?)\\)", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{qb,4185,"ExpectedDecl ASTNodeImporter::VisitObjCIvarDecl(ObjCIvarDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (ObjCIvarDecl *FoundIvar = dyn_cast<ObjCIvarDecl>(FoundDecl)) {\n // ...\n Importer.ToDiag(Loc, diag::warn_odr_ivar_type_inconsistent) << Name << D->getType() << FoundIvar->getType();"},{cb,2222,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_ivar_type_inconsistent:\n return diag::warn_odr_ivar_type_inconsistent;"}}, | ||
[ | [k]={ | ||
["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/interface2.m:16:9: warning: instance variable \'ivar2\' declared with incompatible types in different translation units (\'float\' vs. \'int\') [-Wodr]"} | ["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/interface2.m:16:9: warning: instance variable \'ivar2\' declared with incompatible types in different translation units (\'float\' vs. \'int\') [-Wodr]"} | ||
} | } | ||
}, | }, | ||
["warn_odr_non_type_parameter_type_inconsistent"]={ | ["warn_odr_non_type_parameter_type_inconsistent"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="non-type template parameter declared with incompatible types in different translation units (%0 vs. %1)", | [b]="non-type template parameter declared with incompatible types in different translation units (%0 vs. %1)", | ||
[ | [d]=h, | ||
[ | [a]="non\\-type template parameter declared with incompatible types in different translation units \\((.*?) vs\\. (.*?)\\)", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{cb,2246,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_non_type_parameter_type_inconsistent:\n return diag::warn_odr_non_type_parameter_type_inconsistent;"}}, | ||
[ | [k]={ | ||
["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-template1.cpp:9:14: warning: non-type template parameter declared with incompatible types in different translation units (\'int\' vs. \'long\') [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class-template/Inputs/class-template1.cpp:18:23: warning: non-type template parameter declared with incompatible types in different translation units (\'long\' vs. \'int\') [-Wodr]"} | ["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-template1.cpp:9:14: warning: non-type template parameter declared with incompatible types in different translation units (\'int\' vs. \'long\') [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class-template/Inputs/class-template1.cpp:18:23: warning: non-type template parameter declared with incompatible types in different translation units (\'long\' vs. \'int\') [-Wodr]"} | ||
} | } | ||
}, | }, | ||
["warn_odr_objc_method_num_params_inconsistent"]={ | ["warn_odr_objc_method_num_params_inconsistent"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="%select{class|instance}0 method %1 has a different number of parameters in different translation units (%2 vs. %3)", | [b]="%select{class|instance}0 method %1 has a different number of parameters in different translation units (%2 vs. %3)", | ||
[ | [d]=h, | ||
[ | [a]="(?:class|instance) method (.*?) has a different number of parameters in different translation units \\((.*?) vs\\. (.*?)\\)", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{qb,4503,"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 Importer.ToDiag(Loc, diag::warn_odr_objc_method_num_params_inconsistent) << D->isInstanceMethod() << Name << D->param_size() << FoundMethod->param_size();"},{cb,2228,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_method_num_params_inconsistent:\n return diag::warn_odr_objc_method_num_params_inconsistent;"}} | ||
}, | }, | ||
["warn_odr_objc_method_param_type_inconsistent"]={ | ["warn_odr_objc_method_param_type_inconsistent"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="%select{class|instance}0 method %1 has a parameter with a different types in different translation units (%2 vs. %3)", | [b]="%select{class|instance}0 method %1 has a parameter with a different types in different translation units (%2 vs. %3)", | ||
[ | [d]=h, | ||
[ | [a]="(?:class|instance) method (.*?) has a parameter with a different types in different translation units \\((.*?) vs\\. (.*?)\\)", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{qb,4520,"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 Importer.FromDiag((*P)->getLocation(), diag::warn_odr_objc_method_param_type_inconsistent) << D->isInstanceMethod() << Name << (*P)->getType() << (*FoundP)->getType();"},{cb,2230,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_method_param_type_inconsistent:\n return diag::warn_odr_objc_method_param_type_inconsistent;"}}, | ||
[ | [k]={ | ||
["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/interface2.m:39:19: warning: class method \'bar:\' has a parameter with a different types in different translation units (\'float\' vs. \'int\') [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface2.m:57:20: warning: instance method \'bar:\' has a parameter with a different types in different translation units (\'double\' vs. \'float\') [-Wodr]"} | ["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/interface2.m:39:19: warning: class method \'bar:\' has a parameter with a different types in different translation units (\'float\' vs. \'int\') [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface2.m:57:20: warning: instance method \'bar:\' has a parameter with a different types in different translation units (\'double\' vs. \'float\') [-Wodr]"} | ||
} | } | ||
}, | }, | ||
["warn_odr_objc_method_result_type_inconsistent"]={ | ["warn_odr_objc_method_result_type_inconsistent"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="%select{class|instance}0 method %1 has incompatible result types in different translation units (%2 vs. %3)", | [b]="%select{class|instance}0 method %1 has incompatible result types in different translation units (%2 vs. %3)", | ||
[ | [d]=h, | ||
[ | [a]="(?:class|instance) method (.*?) has incompatible result types in different translation units \\((.*?) vs\\. (.*?)\\)", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{qb,4491,"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 Importer.ToDiag(Loc, diag::warn_odr_objc_method_result_type_inconsistent) << D->isInstanceMethod() << Name << D->getReturnType() << FoundMethod->getReturnType();"},{cb,2226,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_method_result_type_inconsistent:\n return diag::warn_odr_objc_method_result_type_inconsistent;"}}, | ||
[ | [k]={ | ||
["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:12:26: warning: instance method \'Prop1\' has incompatible result types in different translation units (\'int\' vs. \'float\') [-Wodr]"} | ["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:12:26: warning: instance method \'Prop1\' has incompatible result types in different translation units (\'int\' vs. \'float\') [-Wodr]"} | ||
} | } | ||
}, | }, | ||
["warn_odr_objc_method_variadic_inconsistent"]={ | ["warn_odr_objc_method_variadic_inconsistent"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="%select{class|instance}0 method %1 is variadic in one translation unit and not variadic in another", | [b]="%select{class|instance}0 method %1 is variadic in one translation unit and not variadic in another", | ||
[ | [d]=h, | ||
[ | [a]="(?:class|instance) method (.*?) is variadic in one translation unit and not variadic in another", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{qb,4533,"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 Importer.ToDiag(Loc, diag::warn_odr_objc_method_variadic_inconsistent) << D->isInstanceMethod() << Name;"},{cb,2232,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_method_variadic_inconsistent:\n return diag::warn_odr_objc_method_variadic_inconsistent;"}}, | ||
[ | [k]={ | ||
["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/interface2.m:45:1: warning: class method \'bar:\' is variadic in one translation unit and not variadic in another [-Wodr]"} | ["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/interface2.m:45:1: warning: class method \'bar:\' is variadic in one translation unit and not variadic in another [-Wodr]"} | ||
} | } | ||
}, | }, | ||
["warn_odr_objc_property_impl_kind_inconsistent"]={ | ["warn_odr_objc_property_impl_kind_inconsistent"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="property %0 is implemented with %select{@synthesize|@dynamic}1 in one translation but %select{@dynamic|@synthesize}1 in another translation unit", | [b]="property %0 is implemented with %select{@synthesize|@dynamic}1 in one translation but %select{@dynamic|@synthesize}1 in another translation unit", | ||
[ | [d]=h, | ||
[ | [a]="property (.*?) is implemented with (?:@synthesize|@dynamic) in one translation but (?:@dynamic|@synthesize) in another translation unit", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{qb,5602,"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 Importer.ToDiag(ToImpl->getLocation(), diag::warn_odr_objc_property_impl_kind_inconsistent) << Property->getDeclName() << (ToImpl->getPropertyImplementation() == ObjCPropertyImplDecl::Dynamic);"},{cb,2236,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_property_impl_kind_inconsistent:\n return diag::warn_odr_objc_property_impl_kind_inconsistent;"}}, | ||
[ | [k]={ | ||
["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:29:10: warning: property \'Prop3\' is implemented with @dynamic in one translation but @synthesize in another translation unit [-Wodr]"} | ["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:29:10: warning: property \'Prop3\' is implemented with @dynamic in one translation but @synthesize in another translation unit [-Wodr]"} | ||
} | } | ||
}, | }, | ||
["warn_odr_objc_property_type_inconsistent"]={ | ["warn_odr_objc_property_type_inconsistent"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="property %0 declared with incompatible types in different translation units (%1 vs. %2)", | [b]="property %0 declared with incompatible types in different translation units (%1 vs. %2)", | ||
[ | [d]=h, | ||
[ | [a]="property (.*?) declared with incompatible types in different translation units \\((.*?) vs\\. (.*?)\\)", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{qb,5501,"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 Importer.ToDiag(Loc, diag::warn_odr_objc_property_type_inconsistent) << Name << D->getType() << FoundProp->getType();"},{cb,2234,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_property_type_inconsistent:\n return diag::warn_odr_objc_property_type_inconsistent;"}}, | ||
[ | [k]={ | ||
["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:12:26: warning: property \'Prop1\' declared with incompatible types in different translation units (\'int\' vs. \'float\') [-Wodr]"} | ["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:12:26: warning: property \'Prop1\' declared with incompatible types in different translation units (\'int\' vs. \'float\') [-Wodr]"} | ||
} | } | ||
}, | }, | ||
["warn_odr_objc_superclass_inconsistent"]={ | ["warn_odr_objc_superclass_inconsistent"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="class %0 has incompatible superclasses", | [b]="class %0 has incompatible superclasses", | ||
[ | [d]=h, | ||
[ | [a]="class (.*?) has incompatible superclasses", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{qb,5182,"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 Importer.ToDiag(To->getLocation(), diag::warn_odr_objc_superclass_inconsistent) << To->getDeclName();"},{qb,5448,"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 Importer.ToDiag(Impl->getLocation(), diag::warn_odr_objc_superclass_inconsistent) << Iface->getDeclName();"},{cb,2224,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_superclass_inconsistent:\n return diag::warn_odr_objc_superclass_inconsistent;"}}, | ||
[ | [k]={ | ||
["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:12: warning: class \'I4\' has incompatible superclasses [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface1.m:100:17: warning: class \'I15\' has incompatible superclasses [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface1.m:100:17: warning: class \'I15\' has incompatible superclasses [-Wodr]"} | ["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:12: warning: class \'I4\' has incompatible superclasses [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface1.m:100:17: warning: class \'I15\' has incompatible superclasses [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface1.m:100:17: warning: class \'I15\' has incompatible superclasses [-Wodr]"} | ||
} | } | ||
}, | }, | ||
["warn_odr_objc_synthesize_ivar_inconsistent"]={ | ["warn_odr_objc_synthesize_ivar_inconsistent"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="property %0 is synthesized to different ivars in different translation units (%1 vs. %2)", | [b]="property %0 is synthesized to different ivars in different translation units (%1 vs. %2)", | ||
[ | [d]=h, | ||
[ | [a]="property (.*?) is synthesized to different ivars in different translation units \\((.*?) vs\\. (.*?)\\)", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{qb,5618,"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 Importer.ToDiag(ToImpl->getPropertyIvarDeclLoc(), diag::warn_odr_objc_synthesize_ivar_inconsistent) << Property->getDeclName() << ToImpl->getPropertyIvarDecl()->getDeclName() << Ivar->getDeclName();"},{cb,2238,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_synthesize_ivar_inconsistent:\n return diag::warn_odr_objc_synthesize_ivar_inconsistent;"}}, | ||
[ | [k]={ | ||
["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:28:21: warning: property \'Prop2\' is synthesized to different ivars in different translation units (\'ivar3\' vs. \'ivar2\') [-Wodr]"} | ["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:28:21: warning: property \'Prop2\' is synthesized to different ivars in different translation units (\'ivar3\' vs. \'ivar2\') [-Wodr]"} | ||
} | } | ||
}, | }, | ||
["warn_odr_parameter_pack_non_pack"]={ | ["warn_odr_parameter_pack_non_pack"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="parameter kind mismatch; parameter is %select{not a|a}0 parameter pack", | [b]="parameter kind mismatch; parameter is %select{not a|a}0 parameter pack", | ||
[ | [d]=h, | ||
[ | [a]="parameter kind mismatch; parameter is (?:not a|a) parameter pack", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{cb,2244,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_parameter_pack_non_pack:\n return diag::warn_odr_parameter_pack_non_pack;"}} | ||
}, | }, | ||
["warn_odr_tag_type_inconsistent"]={ | ["warn_odr_tag_type_inconsistent"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="type %0 has incompatible definitions in different translation units", | [b]="type %0 has incompatible definitions in different translation units", | ||
[ | [d]=h, | ||
[ | [a]="type (.*?) has incompatible definitions in different translation units", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={"98c101833744",1266013059,"Implement AST importing and merging for enumeration types and\nenumerators, along with ImplicitCastEx...","Implement AST importing and merging for enumeration types and\nenumerators, along with ImplicitCastExprs to make it work.\n\nllvm-svn: 96024"}, | ||
[ | [g]={{cb,2218,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_tag_type_inconsistent:\n return diag::warn_odr_tag_type_inconsistent;"}}, | ||
[ | [k]={ | ||
["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:13:8: warning: type \'struct S1\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:21:8: warning: type \'struct S2\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:24:8: warning: type \'struct S3\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:27:8: warning: type \'struct S4\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:56:10: warning: type \'struct DeeperError\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:54:8: warning: type \'struct DeepError\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:74:9: warning: type \'S13\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:130:7: warning: type \'struct DeepUnnamedError::(unnamed at /var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:130:7)\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:129:5: warning: type \'union DeepUnnamedError::(unnamed at /var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:129:5)\' has incompatible definitions in different translation units [-Wodr]"} | ["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:13:8: warning: type \'struct S1\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:21:8: warning: type \'struct S2\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:24:8: warning: type \'struct S3\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:27:8: warning: type \'struct S4\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:56:10: warning: type \'struct DeeperError\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:54:8: warning: type \'struct DeepError\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:74:9: warning: type \'S13\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:130:7: warning: type \'struct DeepUnnamedError::(unnamed at /var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:130:7)\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:129:5: warning: type \'union DeepUnnamedError::(unnamed at /var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:129:5)\' has incompatible definitions in different translation units [-Wodr]"} | ||
} | } | ||
}, | }, | ||
["warn_odr_variable_multiple_def"]={ | ["warn_odr_variable_multiple_def"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="external variable %0 defined in multiple translation units", | [b]="external variable %0 defined in multiple translation units", | ||
[ | [d]=h, | ||
[ | [a]="external variable (.*?) defined in multiple translation units", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{cb,2214,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_variable_multiple_def:\n return diag::warn_odr_variable_multiple_def;"}} | ||
}, | }, | ||
["warn_odr_variable_type_inconsistent"]={ | ["warn_odr_variable_type_inconsistent"]={ | ||
[ | [i]={E}, | ||
[j]=E, | |||
[ | |||
[b]="external variable %0 declared with incompatible types in different translation units (%1 vs. %2)", | [b]="external variable %0 declared with incompatible types in different translation units (%1 vs. %2)", | ||
[ | [d]=h, | ||
[ | [a]="external variable (.*?) declared with incompatible types in different translation units \\((.*?) vs\\. (.*?)\\)", | ||
[ | [e]=bb, | ||
[ | [c]=s, | ||
[ | [f]={db,1554130013,eb,fb}, | ||
[ | [g]={{qb,4296,"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(Loc, diag::warn_odr_variable_type_inconsistent) << Name << D->getType() << FoundVar->getType();"},{cb,2212,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_variable_type_inconsistent:\n return diag::warn_odr_variable_type_inconsistent;"}}, | ||
[ | [k]={ | ||
["clang/test/ASTMerge/namespace/test.cpp"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/namespace/Inputs/namespace2.cpp:16:17: warning: external variable \'z\' declared with incompatible types in different translation units (\'double\' vs. \'float\') [-Wodr]"} | ["clang/test/ASTMerge/namespace/test.cpp"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/namespace/Inputs/namespace2.cpp:16:17: warning: external variable \'z\' declared with incompatible types in different translation units (\'double\' vs. \'float\') [-Wodr]"} | ||
} | } | ||
}, | }, | ||
["warn_old_implicitly_unsigned_long"]={ | ["warn_old_implicitly_unsigned_long"]={ | ||
[ | [i]={"c99-compat"}, | ||
[j]="c99-compat", | |||
[ | |||
[b]="integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C89; this literal will %select{have type \'long long\'|be ill-formed}0 in C99 onwards", | [b]="integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C89; this literal will %select{have type \'long long\'|be ill-formed}0 in C99 onwards", | ||
[ | [d]=h, | ||
[ | [a]="integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C89; this literal will (?:have type \'long long\'|be ill\\-formed) in C99 onwards", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wc99\\-compat[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"13234ae40db3",1433800799,"Consider unsigned long for non-u/U decimal literals (C90/C++03)\n\nSummary:\nThis modifies Clang to ref...","Consider unsigned long for non-u/U decimal literals (C90/C++03)\n\nSummary:\nThis modifies Clang to reflect that under pre-C99 ISO C, decimal\nconstants may have type `unsigned long` even if they do not contain `u`\nor `U` in their suffix (C90 subclause 6.1.3.2 paragraph 5). The same is\ndone for C++ without C++11 which--because of undefined behaviour--allows\nfor behaviour compatible with ISO C90 in the case of an unsuffixed\ndecimal literal and is otherwise identical to C90 in its treatment of\ninteger literals (C++03 subclause 2.13.1 [lex.icon] paragraph 2).\n\nMessages are added to the `c99-compat` and `c++11-compat` groups to warn\non such literals, since they behave differently under the newer\nstandards.\n\nFixes PR 16678.\n\nTest Plan:\nA new test file is added to exercise both pre-C99/C++11 and C99/C++11-up\non decimal literals with no suffix or suffixes `l`/`L` for both 32-bit\nand 64-bit `long`.\n\nIn the file, 2^31 (being `INT_MAX+1`) is tested for the expected type\nusing `__typeof__` and multiple declarations of the same entity. 2^63\nis similarly tested when it is within the range of `unsigned long`.\n\nPreprocessor arithmetic tests are added to ensure consistency given\nthat Clang (like GCC) uses greater than 32 bits for preprocessor\narithmetic even when `long` and `unsigned long` is 32 bits and a\npre-C99/C++11 mode is in effect.\n\nTests added:\n test/Sema/PR16678.c\n\nReviewers: fraggamuffin, rsmith\n\nReviewed By: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D9794\n\nllvm-svn: 239356"}, | ||
[ | [g]={{u,4225,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n // ...\n if (Literal.isFixedPointLiteral()) {\n // ...\n } else if (Literal.isFloatingLiteral()) {\n // ...\n } else if (!Literal.isIntegerLiteral()) {\n // ...\n } else {\n // ...\n if (Literal.GetIntegerValue(ResultVal)) {\n // ...\n } else {\n // ...\n // Are long/unsigned long possibilities?\n if (Ty.isNull() && !Literal.isLongLong && !Literal.isSizeT) {\n // ...\n // Does it fit in a unsigned long?\n if (ResultVal.isIntN(LongSize)) {\n // Does it fit in a signed long?\n if (!Literal.isUnsigned && ResultVal[LongSize - 1] == 0)\n // ...\n else if (AllowUnsigned)\n // ...\n // Check according to the rules of C90 6.1.3.2p5. C++03 [lex.icon]p2\n // is compatible.\n else if (!getLangOpts().C99 && !getLangOpts().CPlusPlus11) {\n // ...\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus ? Literal.isLong ? diag::warn_old_implicitly_unsigned_long_cxx : /*C++98 UB*/ diag::ext_old_implicitly_unsigned_long_cxx : diag::warn_old_implicitly_unsigned_long) << (LongLongSize > LongSize ? /*will have type \'long long\'*/ 0 : /*will be ill-formed*/ 1);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/PR16678.c"]={"clang/test/Sema/PR16678.c:74:19: warning: integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C89; this literal will be ill-formed in C99 onwards [-Wc99-compat]","clang/test/Sema/PR16678.c:75:19: warning: integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C89; this literal will be ill-formed in C99 onwards [-Wc99-compat]","clang/test/Sema/PR16678.c:76:19: warning: integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C89; this literal will be ill-formed in C99 onwards [-Wc99-compat]"} | ["clang/test/Sema/PR16678.c"]={"clang/test/Sema/PR16678.c:74:19: warning: integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C89; this literal will be ill-formed in C99 onwards [-Wc99-compat]","clang/test/Sema/PR16678.c:75:19: warning: integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C89; this literal will be ill-formed in C99 onwards [-Wc99-compat]","clang/test/Sema/PR16678.c:76:19: warning: integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C89; this literal will be ill-formed in C99 onwards [-Wc99-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_old_implicitly_unsigned_long_cxx"]={ | ["warn_old_implicitly_unsigned_long_cxx"]={ | ||
[ | [i]={"c++0x-compat","c++11-compat","c++11-compat-pedantic"}, | ||
[j]="c++11-compat", | |||
[ | |||
[b]="integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C++98; this literal will %select{have type \'long long\'|be ill-formed}0 in C++11 onwards", | [b]="integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C++98; this literal will %select{have type \'long long\'|be ill-formed}0 in C++11 onwards", | ||
[ | [d]=h, | ||
[ | [a]="integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C\\+\\+98; this literal will (?:have type \'long long\'|be ill\\-formed) in C\\+\\+11 onwards", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+11\\-compat[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"13234ae40db3",1433800799,"Consider unsigned long for non-u/U decimal literals (C90/C++03)\n\nSummary:\nThis modifies Clang to ref...","Consider unsigned long for non-u/U decimal literals (C90/C++03)\n\nSummary:\nThis modifies Clang to reflect that under pre-C99 ISO C, decimal\nconstants may have type `unsigned long` even if they do not contain `u`\nor `U` in their suffix (C90 subclause 6.1.3.2 paragraph 5). The same is\ndone for C++ without C++11 which--because of undefined behaviour--allows\nfor behaviour compatible with ISO C90 in the case of an unsuffixed\ndecimal literal and is otherwise identical to C90 in its treatment of\ninteger literals (C++03 subclause 2.13.1 [lex.icon] paragraph 2).\n\nMessages are added to the `c99-compat` and `c++11-compat` groups to warn\non such literals, since they behave differently under the newer\nstandards.\n\nFixes PR 16678.\n\nTest Plan:\nA new test file is added to exercise both pre-C99/C++11 and C99/C++11-up\non decimal literals with no suffix or suffixes `l`/`L` for both 32-bit\nand 64-bit `long`.\n\nIn the file, 2^31 (being `INT_MAX+1`) is tested for the expected type\nusing `__typeof__` and multiple declarations of the same entity. 2^63\nis similarly tested when it is within the range of `unsigned long`.\n\nPreprocessor arithmetic tests are added to ensure consistency given\nthat Clang (like GCC) uses greater than 32 bits for preprocessor\narithmetic even when `long` and `unsigned long` is 32 bits and a\npre-C99/C++11 mode is in effect.\n\nTests added:\n test/Sema/PR16678.c\n\nReviewers: fraggamuffin, rsmith\n\nReviewed By: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D9794\n\nllvm-svn: 239356"}, | ||
[ | [g]={{u,4193,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n // ...\n if (Literal.isFixedPointLiteral()) {\n // ...\n } else if (Literal.isFloatingLiteral()) {\n // ...\n } else if (!Literal.isIntegerLiteral()) {\n // ...\n } else {\n // ...\n if (Literal.GetIntegerValue(ResultVal)) {\n // ...\n } else {\n // ...\n // Are long/unsigned long possibilities?\n if (Ty.isNull() && !Literal.isLongLong && !Literal.isSizeT) {\n // ...\n // Does it fit in a unsigned long?\n if (ResultVal.isIntN(LongSize)) {\n // Does it fit in a signed long?\n if (!Literal.isUnsigned && ResultVal[LongSize - 1] == 0)\n // ...\n else if (AllowUnsigned)\n // ...\n // Check according to the rules of C90 6.1.3.2p5. C++03 [lex.icon]p2\n // is compatible.\n else if (!getLangOpts().C99 && !getLangOpts().CPlusPlus11) {\n // ...\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus ? Literal.isLong ? diag::warn_old_implicitly_unsigned_long_cxx : /*C++98 UB*/ diag::ext_old_implicitly_unsigned_long_cxx : diag::warn_old_implicitly_unsigned_long) << (LongLongSize > LongSize ? /*will have type \'long long\'*/ 0 : /*will be ill-formed*/ 1);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/PR16678.c"]={"clang/test/Sema/PR16678.c:75:19: warning: integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C++98; this literal will be ill-formed in C++11 onwards [-Wc++11-compat]","clang/test/Sema/PR16678.c:76:19: warning: integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C++98; this literal will be ill-formed in C++11 onwards [-Wc++11-compat]"} | ["clang/test/Sema/PR16678.c"]={"clang/test/Sema/PR16678.c:75:19: warning: integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C++98; this literal will be ill-formed in C++11 onwards [-Wc++11-compat]","clang/test/Sema/PR16678.c:76:19: warning: integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C++98; this literal will be ill-formed in C++11 onwards [-Wc++11-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_old_style_cast"]={ | ["warn_old_style_cast"]={ | ||
[ | [i]={"old-style-cast"}, | ||
[j]="old-style-cast", | |||
[ | |||
[b]="use of old-style cast", | [b]="use of old-style cast", | ||
[ | [d]=h, | ||
[ | [a]="use of old\\-style cast", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wold\\-style\\-cast[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"c7c1ebe66049",1385522297,"Implement -Wold-style-cast\n\nBased on a patch by Ondřej Hošek!\n\nllvm-svn: 195808","Implement -Wold-style-cast\n\nBased on a patch by Ondřej Hošek!\n\nllvm-svn: 195808"}, | ||
[ | [g]={{u,8508,"ExprResult Sema::ActOnCastExpr(Scope *S, SourceLocation LParenLoc, Declarator &D, ParsedType &Ty, SourceLocation RParenLoc, Expr *CastExpr) {\n // ...\n if (getLangOpts().CPlusPlus && !castType->isVoidType())\n Diag(LParenLoc, diag::warn_old_style_cast) << CastExpr->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/old-style-cast.cpp"]={"clang/test/SemaCXX/old-style-cast.cpp:4:12: warning: use of old-style cast [-Wold-style-cast]","clang/test/SemaCXX/old-style-cast.cpp:5:3: warning: use of old-style cast [-Wold-style-cast]","clang/test/SemaCXX/old-style-cast.cpp:6:3: warning: use of old-style cast [-Wold-style-cast]"} | ["clang/test/SemaCXX/old-style-cast.cpp"]={"clang/test/SemaCXX/old-style-cast.cpp:4:12: warning: use of old-style cast [-Wold-style-cast]","clang/test/SemaCXX/old-style-cast.cpp:5:3: warning: use of old-style cast [-Wold-style-cast]","clang/test/SemaCXX/old-style-cast.cpp:6:3: warning: use of old-style cast [-Wold-style-cast]"} | ||
} | } | ||
}, | }, | ||
["warn_omp51_compat_attributes"]={ | ["warn_omp51_compat_attributes"]={ | ||
[ | [i]={"pre-openmp-51-compat"}, | ||
[j]="pre-openmp-51-compat", | |||
[ | |||
[b]="specifying OpenMP directives with [[]] is incompatible with OpenMP standards before OpenMP 5.1", | [b]="specifying OpenMP directives with [[]] is incompatible with OpenMP standards before OpenMP 5.1", | ||
[ | [d]=h, | ||
[ | [a]="specifying OpenMP directives with \\[\\[\\]\\] is incompatible with OpenMP standards before OpenMP 5\\.1", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpre\\-openmp\\-51\\-compat[^\\]]*\\]", | ||
[ | [c]=v, | ||
[ | [f]={"69350e569dc4",1612659633,"[C++20][Modules][3/8] Initial handling for module partitions.\n\nThis implements the parsing and recog...","[C++20][Modules][3/8] Initial handling for module partitions.\n\nThis implements the parsing and recognition of module partition CMIs\nand removes the FIXMEs in the parser.\n\nModule partitions are recognised in the base computation of visibility,\nhowever additional amendments to visibility follow in subsequent patches.\n\nDifferential Revision: https://reviews.llvm.org/D118586"}, | ||
[ | [g]={{"clang/lib/Parse/ParseDeclCXX.cpp",4431,"/// ParseCXX11AttributeArgs -- Parse a C++11 attribute-argument-clause.\n///\n/// [C++11] attribute-argument-clause:\n/// \'(\' balanced-token-seq \')\'\n///\n/// [C++11] balanced-token-seq:\n/// balanced-token\n/// balanced-token-seq balanced-token\n///\n/// [C++11] balanced-token:\n/// \'(\' balanced-token-seq \')\'\n/// \'[\' balanced-token-seq \']\'\n/// \'{\' balanced-token-seq \'}\'\n/// any token but \'(\', \')\', \'[\', \']\', \'{\', or \'}\'\nbool Parser::ParseCXX11AttributeArgs(IdentifierInfo *AttrName, SourceLocation AttrNameLoc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, CachedTokens &OpenMPTokens) {\n // ...\n if (ScopeName && ScopeName->isStr(\"omp\")) {\n Diag(AttrNameLoc, getLangOpts().OpenMP >= 51 ? diag::warn_omp51_compat_attributes : diag::ext_omp_attributes);"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/openmp_attribute_compat.cpp"]={"clang/test/OpenMP/openmp_attribute_compat.cpp:17:8: warning: specifying OpenMP directives with [[]] is incompatible with OpenMP standards before OpenMP 5.1 [-Wpre-openmp-51-compat]"} | ["clang/test/OpenMP/openmp_attribute_compat.cpp"]={"clang/test/OpenMP/openmp_attribute_compat.cpp:17:8: warning: specifying OpenMP directives with [[]] is incompatible with OpenMP standards before OpenMP 5.1 [-Wpre-openmp-51-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_alignment_not_power_of_two"]={ | ["warn_omp_alignment_not_power_of_two"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="aligned clause will be ignored because the requested alignment is not a power of 2", | [b]="aligned clause will be ignored because the requested alignment is not a power of 2", | ||
[ | [d]=h, | ||
[ | [a]="aligned clause will be ignored because the requested alignment is not a power of 2", | ||
[ | [e]=Z, | ||
[ | [c]=pb, | ||
[ | [f]={"09184fedc049",1412054968,"[OPENMP] Codegen of the ‘aligned’ clause for the ‘omp simd’ directive.\nDifferential Revision...","[OPENMP] Codegen of the ‘aligned’ clause for the ‘omp simd’ directive.\nDifferential Revision: http://reviews.llvm.org/D5499\n\nllvm-svn: 218660"}, | ||
[ | [g]={{ib,16532,"ExprResult Sema::VerifyPositiveIntegerConstantInClause(Expr *E, OpenMPClauseKind CKind, bool StrictlyPositive, bool SuppressExprDiags) {\n // ...\n if ((CKind == OMPC_aligned || CKind == OMPC_align) && !Result.isPowerOf2()) {\n Diag(E->getExprLoc(), diag::warn_omp_alignment_not_power_of_two) << E->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/align_clause_messages.cpp"]={"clang/test/OpenMP/align_clause_messages.cpp:41:31: warning: aligned clause will be ignored because the requested alignment is not a power of 2 [-Wopenmp-clauses]","clang/test/OpenMP/align_clause_messages.cpp:51:33: warning: aligned clause will be ignored because the requested alignment is not a power of 2 [-Wopenmp-clauses]"} | ["clang/test/OpenMP/align_clause_messages.cpp"]={"clang/test/OpenMP/align_clause_messages.cpp:41:31: warning: aligned clause will be ignored because the requested alignment is not a power of 2 [-Wopenmp-clauses]","clang/test/OpenMP/align_clause_messages.cpp:51:33: warning: aligned clause will be ignored because the requested alignment is not a power of 2 [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_allocate_thread_on_task_target_directive"]={ | ["warn_omp_allocate_thread_on_task_target_directive"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="allocator with the \'thread\' trait access has unspecified behavior on \'%0\' directive", | [b]="allocator with the \'thread\' trait access has unspecified behavior on \'%0\' directive", | ||
[ | [d]=h, | ||
[ | [a]="allocator with the \'thread\' trait access has unspecified behavior on \'(.*?)\' directive", | ||
[ | [e]=Z, | ||
[ | [c]=pb, | ||
[ | [f]={"471171c4c94c",1553800536,"[OPENMP]Add check for undefined behavior with thread allocators on\ntarget and task-based directives....","[OPENMP]Add check for undefined behavior with thread allocators on\ntarget and task-based directives.\n\nAccording to OpenMP 5.0, 2.11.4 allocate Clause, Restrictions, For task,\ntaskloop or target directives, allocation requests to memory allocators\nwith the trait access set to thread result in unspecified behavior.\nPatch introduces a check for omp_thread_mem_alloc predefined allocator\non target- and trask-based directives.\n\nllvm-svn: 357205"}, | ||
[ | [g]={{ib,5511,"static void checkAllocateClauses(Sema &S, DSAStackTy *Stack, ArrayRef<OMPClause *> Clauses) {\n // ...\n for (OMPClause *C : AllocateRange) {\n // ...\n // OpenMP, 2.11.4 allocate Clause, Restrictions.\n // For task, taskloop or target directives, allocation requests to memory\n // allocators with the trait access set to thread result in unspecified\n // behavior.\n if (AllocatorKind == OMPAllocateDeclAttr::OMPThreadMemAlloc && (isOpenMPTaskingDirective(Stack->getCurrentDirective()) || isOpenMPTargetExecutionDirective(Stack->getCurrentDirective()))) {\n S.Diag(AC->getAllocator()->getExprLoc(), diag::warn_omp_allocate_thread_on_task_target_directive) << getOpenMPDirectiveName(Stack->getCurrentDirective());"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/target_teams_private_messages.cpp"]={"clang/test/OpenMP/target_teams_private_messages.cpp:112:89: warning: allocator with the \'thread\' trait access has unspecified behavior on \'target teams\' directive [-Wopenmp-clauses]"} | ["clang/test/OpenMP/target_teams_private_messages.cpp"]={"clang/test/OpenMP/target_teams_private_messages.cpp:112:89: warning: allocator with the \'thread\' trait access has unspecified behavior on \'target teams\' directive [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_ctx_incompatible_property_for_selector"]={ | ["warn_omp_ctx_incompatible_property_for_selector"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="the context property \'%0\' is not valid for the context selector \'%1\' and the context set \'%2\'; property ignored", | [b]="the context property \'%0\' is not valid for the context selector \'%1\' and the context set \'%2\'; property ignored", | ||
[ | [d]=h, | ||
[ | [a]="the context property \'(.*?)\' is not valid for the context selector \'(.*?)\' and the context set \'(.*?)\'; property ignored", | ||
[ | [e]=Z, | ||
[ | [c]=v, | ||
[ | [f]={Db,1576809732,Cb,Bb}, | ||
[ | [g]={{F,1027,"void Parser::parseOMPContextProperty(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n Diag(PropertyLoc, diag::warn_omp_ctx_incompatible_property_for_selector) << getOpenMPContextTraitPropertyName(TIProperty.Kind, TIProperty.RawString) << getOpenMPContextTraitSelectorName(TISelector.Kind) << getOpenMPContextTraitSetName(Set);"}} | ||
}, | }, | ||
["warn_omp_ctx_incompatible_score_for_property"]={ | ["warn_omp_ctx_incompatible_score_for_property"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="the context selector \'%0\' in the context set \'%1\' cannot have a score (\'%2\'); score ignored", | [b]="the context selector \'%0\' in the context set \'%1\' cannot have a score (\'%2\'); score ignored", | ||
[ | [d]=h, | ||
[ | [a]="the context selector \'(.*?)\' in the context set \'(.*?)\' cannot have a score \\(\'(.*?)\'\\); score ignored", | ||
[ | [e]=Z, | ||
[ | [c]=v, | ||
[ | [f]={Db,1576809732,Cb,Bb}, | ||
[ | [g]={{F,1207,"/// Parses an OpenMP context selector.\n///\n/// <trait-selector-name> [\'(\'[<trait-score>] <trait-property> [, <t-p>]* \')\']\nvoid Parser::parseOMPContextSelector(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &SeenSelectors) {\n // ...\n if (!AllowsTraitScore && !Score.isUnset()) {\n if (Score.isUsable()) {\n Diag(ScoreLoc, diag::warn_omp_ctx_incompatible_score_for_property) << getOpenMPContextTraitSelectorName(TISelector.Kind) << getOpenMPContextTraitSetName(Set) << Score.get();"},{F,1211,"/// Parses an OpenMP context selector.\n///\n/// <trait-selector-name> [\'(\'[<trait-score>] <trait-property> [, <t-p>]* \')\']\nvoid Parser::parseOMPContextSelector(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &SeenSelectors) {\n // ...\n if (!AllowsTraitScore && !Score.isUnset()) {\n if (Score.isUsable()) {\n // ...\n } else {\n Diag(ScoreLoc, diag::warn_omp_ctx_incompatible_score_for_property) << getOpenMPContextTraitSelectorName(TISelector.Kind) << getOpenMPContextTraitSetName(Set) << \"<invalid>\";"}}, | ||
[ | [k]={ | ||
[ | [Fb]={"clang/test/OpenMP/declare_variant_messages.c:49:53: warning: the context selector \'kind\' in the context set \'device\' cannot have a score (\'5\'); score ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:48:53: warning: the context selector \'kind\' in the context set \'device\' cannot have a score (\'5\'); score ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:47:53: warning: the context selector \'kind\' in the context set \'device\' cannot have a score (\'foo()\'); score ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:46:53: warning: the context selector \'kind\' in the context set \'device\' cannot have a score (\'2\'); score ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:45:55: warning: the context selector \'kind\' in the context set \'device\' cannot have a score (\'<recovery-expr>()\'); score ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:44:53: warning: the context selector \'kind\' in the context set \'device\' cannot have a score (\'<invalid>\'); score ignored [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_ctx_incompatible_selector_for_set"]={ | ["warn_omp_ctx_incompatible_selector_for_set"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="the context selector \'%0\' is not valid for the context set \'%1\'; selector ignored", | [b]="the context selector \'%0\' is not valid for the context set \'%1\'; selector ignored", | ||
[ | [d]=h, | ||
[ | [a]="the context selector \'(.*?)\' is not valid for the context set \'(.*?)\'; selector ignored", | ||
[ | [e]=Z, | ||
[ | [c]=v, | ||
[ | [f]={Db,1576809732,Cb,Bb}, | ||
[ | [g]={{F,1161,"/// Parses an OpenMP context selector.\n///\n/// <trait-selector-name> [\'(\'[<trait-score>] <trait-property> [, <t-p>]* \')\']\nvoid Parser::parseOMPContextSelector(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &SeenSelectors) {\n // ...\n if (!isValidTraitSelectorForTraitSet(TISelector.Kind, Set, AllowsTraitScore, RequiresProperty)) {\n Diag(SelectorLoc, diag::warn_omp_ctx_incompatible_selector_for_set) << getOpenMPContextTraitSelectorName(TISelector.Kind) << getOpenMPContextTraitSetName(Set);"}}, | ||
[ | [k]={ | ||
[ | [Fb]={"clang/test/OpenMP/declare_variant_messages.c:49:72: warning: the context selector \'vendor\' is not valid for the context set \'device\'; selector ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:39:79: warning: the context selector \'kind\' is not valid for the context set \'implementation\'; selector ignored [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_ctx_selector_without_properties"]={ | ["warn_omp_ctx_selector_without_properties"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="the context selector \'%0\' in context set \'%1\' requires a context property defined in parentheses; selector ignored", | [b]="the context selector \'%0\' in context set \'%1\' requires a context property defined in parentheses; selector ignored", | ||
[ | [d]=h, | ||
[ | [a]="the context selector \'(.*?)\' in context set \'(.*?)\' requires a context property defined in parentheses; selector ignored", | ||
[ | [e]=Z, | ||
[ | [c]=v, | ||
[ | [f]={Db,1576809732,Cb,Bb}, | ||
[ | [g]={{F,1180,"/// Parses an OpenMP context selector.\n///\n/// <trait-selector-name> [\'(\'[<trait-score>] <trait-property> [, <t-p>]* \')\']\nvoid Parser::parseOMPContextSelector(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &SeenSelectors) {\n // ...\n if (!Tok.is(tok::l_paren)) {\n Diag(SelectorLoc, diag::warn_omp_ctx_selector_without_properties) << getOpenMPContextTraitSelectorName(TISelector.Kind) << getOpenMPContextTraitSetName(Set);"}}, | ||
[ | [k]={ | ||
[ | [Fb]={"clang/test/OpenMP/declare_variant_messages.c:41:48: warning: the context selector \'kind\' in context set \'device\' requires a context property defined in parentheses; selector ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:31:56: warning: the context selector \'vendor\' in context set \'implementation\' requires a context property defined in parentheses; selector ignored [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_declare_target_after_first_use"]={ | ["warn_omp_declare_target_after_first_use"]={ | ||
[ | [i]={J,dd}, | ||
[j]=dd, | |||
[ | |||
[b]="declaration marked as declare target after first use, it may lead to incorrect results", | [b]="declaration marked as declare target after first use, it may lead to incorrect results", | ||
[ | [d]=h, | ||
[ | [a]="declaration marked as declare target after first use, it may lead to incorrect results", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wopenmp\\-target[^\\]]*\\]", | ||
[ | [c]=pb, | ||
[ | [f]={"729e242a7972",1566576674,"[OPENMP5.0]Add support for device_type clause in declare target\nconstruct.\n\nOpenMP 5.0 introduced ne...","[OPENMP5.0]Add support for device_type clause in declare target\nconstruct.\n\nOpenMP 5.0 introduced new clause for declare target directive, device_type clause, which may accept values host, nohost, and any. Host means\nthat the function must be emitted only for the host, nohost - only for\nthe device, and any - for both, device and the host.\n\nllvm-svn: 369775"}, | ||
[ | [g]={{ib,23061,"void Sema::ActOnOpenMPDeclareTargetName(NamedDecl *ND, SourceLocation Loc, OMPDeclareTargetDeclAttr::MapTypeTy MT, DeclareTargetContextInfo &DTCI) {\n // ...\n // Diagnose marking after use as it may lead to incorrect diagnosis and\n // codegen.\n if (LangOpts.OpenMP >= 50 && (ND->isUsed(/*CheckUsedAttr=*/false) || ND->isReferenced()))\n Diag(Loc, diag::warn_omp_declare_target_after_first_use);"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/declare_target_messages.cpp"]={"clang/test/OpenMP/declare_target_messages.cpp:76:28: warning: declaration marked as declare target after first use, it may lead to incorrect results [-Wopenmp-target]"} | ["clang/test/OpenMP/declare_target_messages.cpp"]={"clang/test/OpenMP/declare_target_messages.cpp:76:28: warning: declaration marked as declare target after first use, it may lead to incorrect results [-Wopenmp-target]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_declare_variant_after_emitted"]={ | ["warn_omp_declare_variant_after_emitted"]={ | ||
[ | [i]={J,jb}, | ||
[j]=jb, | |||
[ | |||
[b]="\'#pragma omp declare variant\' cannot be applied to the function that was defined already; the original function might be used", | [b]="\'#pragma omp declare variant\' cannot be applied to the function that was defined already; the original function might be used", | ||
[ | [d]=h, | ||
[ | [a]="\'\\#pragma omp declare variant\' cannot be applied to the function that was defined already; the original function might be used", | ||
[ | [e]=Qb, | ||
[ | [c]=pb, | ||
[ | [f]={tc,1567434909,kc,zc}, | ||
[ | [g]={{ib,7396,"std::optional<std::pair<FunctionDecl *, Expr *>> Sema::checkOpenMPDeclareVariantFunction(Sema::DeclGroupPtrTy DG, Expr *VariantRef, OMPTraitInfo &TI, unsigned NumAppendArgs, SourceRange SR) {\n // ...\n if (!FD->isThisDeclarationADefinition() && FD->isDefined(Definition) && (LangOpts.EmitAllDecls || Context.DeclMustBeEmitted(Definition)))\n Diag(SR.getBegin(), diag::warn_omp_declare_variant_after_emitted) << FD->getLocation();"}}, | ||
[ | [k]={ | ||
[ | [Fb]={"clang/test/OpenMP/declare_variant_messages.c:133:1: warning: \'#pragma omp declare variant\' cannot be applied to the function that was defined already; the original function might be used [-Wsource-uses-openmp]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_declare_variant_after_used"]={ | ["warn_omp_declare_variant_after_used"]={ | ||
[ | [i]={J,jb}, | ||
[j]=jb, | |||
[ | |||
[b]="\'#pragma omp declare variant\' cannot be applied for function after first usage; the original function might be used", | [b]="\'#pragma omp declare variant\' cannot be applied for function after first usage; the original function might be used", | ||
[ | [d]=h, | ||
[ | [a]="\'\\#pragma omp declare variant\' cannot be applied for function after first usage; the original function might be used", | ||
[ | [e]=Qb, | ||
[ | [c]=pb, | ||
[ | [f]={tc,1567434909,kc,zc}, | ||
[ | [g]={{ib,7389,"std::optional<std::pair<FunctionDecl *, Expr *>> Sema::checkOpenMPDeclareVariantFunction(Sema::DeclGroupPtrTy DG, Expr *VariantRef, OMPTraitInfo &TI, unsigned NumAppendArgs, SourceRange SR) {\n // ...\n // Allow #pragma omp declare variant only if the function is not used.\n if (FD->isUsed(false))\n Diag(SR.getBegin(), diag::warn_omp_declare_variant_after_used) << FD->getLocation();"}}, | ||
[ | [k]={ | ||
[ | [Fb]={"clang/test/OpenMP/declare_variant_messages.c:127:1: warning: \'#pragma omp declare variant\' cannot be applied for function after first usage; the original function might be used [-Wsource-uses-openmp]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_declare_variant_ctx_mutiple_use"]={ | ["warn_omp_declare_variant_ctx_mutiple_use"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="the context %select{set|selector|property}0 \'%1\' was used already in the same \'omp declare variant\' directive; %select{set|selector|property}0 ignored", | [b]="the context %select{set|selector|property}0 \'%1\' was used already in the same \'omp declare variant\' directive; %select{set|selector|property}0 ignored", | ||
[ | [d]=h, | ||
[ | [a]="the context (?:set|selector|property) \'(.*?)\' was used already in the same \'omp declare variant\' directive; (?:set|selector|property) ignored", | ||
[ | [e]=Z, | ||
[ | [c]=v, | ||
[ | [f]={Db,1576809732,Cb,Bb}, | ||
[ | [g]={{F,867,"static bool checkForDuplicates(Parser &P, StringRef Name, SourceLocation NameLoc, llvm::StringMap<SourceLocation> &Seen, OMPContextLvl Lvl) {\n // ...\n P.Diag(NameLoc, diag::warn_omp_declare_variant_ctx_mutiple_use) << Lvl << Name;"}}, | ||
[ | [k]={ | ||
["clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c"]={"clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:9:79: warning: the context property \'match_none\' was used already in the same \'omp declare variant\' directive; property ignored [-Wopenmp-clauses]"} | ["clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c"]={"clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:9:79: warning: the context property \'match_none\' was used already in the same \'omp declare variant\' directive; property ignored [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_declare_variant_ctx_not_a_property"]={ | ["warn_omp_declare_variant_ctx_not_a_property"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="\'%0\' is not a valid context property for the context selector \'%1\' and the context set \'%2\'; property ignored", | [b]="\'%0\' is not a valid context property for the context selector \'%1\' and the context set \'%2\'; property ignored", | ||
[ | [d]=h, | ||
[ | [a]="\'(.*?)\' is not a valid context property for the context selector \'(.*?)\' and the context set \'(.*?)\'; property ignored", | ||
[ | [e]=Z, | ||
[ | [c]=v, | ||
[ | [f]={Db,1576809732,Cb,Bb}, | ||
[ | [g]={{F,899,"void Parser::parseOMPTraitPropertyKind(OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set, llvm::omp::TraitSelector Selector, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n Diag(NameLoc, diag::warn_omp_declare_variant_ctx_not_a_property) << Name << getOpenMPContextTraitSelectorName(Selector) << getOpenMPContextTraitSetName(Set);"}}, | ||
[ | [k]={ | ||
[ | [Fb]={"clang/test/OpenMP/declare_variant_messages.c:50:66: warning: \'aaa\' is not a valid context property for the context selector \'extension\' and the context set \'implementation\'; property ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:47:66: warning: \'ibm\' is not a valid context property for the context selector \'kind\' and the context set \'device\'; property ignored [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_declare_variant_ctx_not_a_selector"]={ | ["warn_omp_declare_variant_ctx_not_a_selector"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="\'%0\' is not a valid context selector for the context set \'%1\'; selector ignored", | [b]="\'%0\' is not a valid context selector for the context set \'%1\'; selector ignored", | ||
[ | [d]=h, | ||
[ | [a]="\'(.*?)\' is not a valid context selector for the context set \'(.*?)\'; selector ignored", | ||
[ | [e]=Z, | ||
[ | [c]=v, | ||
[ | [f]={Db,1576809732,Cb,Bb}, | ||
[ | [g]={{F,1064,"void Parser::parseOMPTraitSelectorKind(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n Diag(NameLoc, diag::warn_omp_declare_variant_ctx_not_a_selector) << Name << getOpenMPContextTraitSetName(Set);"}}, | ||
[ | [k]={ | ||
[ | [Fb]={"clang/test/OpenMP/declare_variant_messages.c:40:48: warning: \'xxx\' is not a valid context selector for the context set \'device\'; selector ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:30:56: warning: \'xxx\' is not a valid context selector for the context set \'implementation\'; selector ignored [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_declare_variant_ctx_not_a_set"]={ | ["warn_omp_declare_variant_ctx_not_a_set"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="\'%0\' is not a valid context set in a `declare variant`; set ignored", | [b]="\'%0\' is not a valid context set in a `declare variant`; set ignored", | ||
[ | [d]=h, | ||
[ | [a]="\'(.*?)\' is not a valid context set in a `declare variant`; set ignored", | ||
[ | [e]=Z, | ||
[ | [c]=v, | ||
[ | [f]={Db,1576809732,Cb,Bb}, | ||
[ | [g]={{F,1251,"void Parser::parseOMPTraitSetKind(OMPTraitSet &TISet, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n Diag(NameLoc, diag::warn_omp_declare_variant_ctx_not_a_set) << Name;"}}, | ||
[ | [k]={ | ||
[ | [Fb]={"clang/test/OpenMP/declare_variant_messages.c:29:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:28:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:27:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:26:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:25:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:24:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:23:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:22:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:21:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:67:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:70:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:94:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:98:45: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:103:43: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:108:45: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:127:54: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:129:54: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:133:54: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:139:52: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:144:53: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:176:51: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_declare_variant_expected"]={ | ["warn_omp_declare_variant_expected"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="expected \'%0\' after the %1; \'%0\' assumed", | [b]="expected \'%0\' after the %1; \'%0\' assumed", | ||
[ | [d]=h, | ||
[ | [a]="expected \'(.*?)\' after the (.*?); \'(.*?)\' assumed", | ||
[ | [e]=Z, | ||
[ | [c]=v, | ||
[ | [f]={Db,1576809732,Cb,Bb}, | ||
[ | [g]={{F,1112,"/// Parse optional \'score\' \'(\' <expr> \')\' \':\'.\nstatic ExprResult parseContextScore(Parser &P) {\n // ...\n // Parse \':\'\n if (P.getCurToken().is(tok::colon))\n // ...\n else\n P.Diag(P.getCurToken(), diag::warn_omp_declare_variant_expected) << \"\':\'\""},{F,1328,"/// Parses an OpenMP context selector set.\n///\n/// <trait-set-selector-name> \'=\' \'{\' <trait-selector> [, <trait-selector>]* \'}\'\nvoid Parser::parseOMPContextSelectorSet(OMPTraitSet &TISet, llvm::StringMap<SourceLocation> &SeenSets) {\n // ...\n // Parse \'=\'.\n if (!TryConsumeToken(tok::equal))\n Diag(Tok.getLocation(), diag::warn_omp_declare_variant_expected) << \"=\" << (\"context set name \\\"\" + getOpenMPContextTraitSetName(TISet.Kind) + \"\\\"\").str();"},{F,1338,"/// Parses an OpenMP context selector set.\n///\n/// <trait-set-selector-name> \'=\' \'{\' <trait-selector> [, <trait-selector>]* \'}\'\nvoid Parser::parseOMPContextSelectorSet(OMPTraitSet &TISet, llvm::StringMap<SourceLocation> &SeenSets) {\n // ...\n // Parse \'{\'.\n if (Tok.is(tok::l_brace)) {\n // ...\n } else {\n Diag(Tok.getLocation(), diag::warn_omp_declare_variant_expected) << \"{\" << (\"\'=\' that follows the context set name \\\"\" + getOpenMPContextTraitSetName(TISet.Kind) + \"\\\"\").str();"},{F,1358,"/// Parses an OpenMP context selector set.\n///\n/// <trait-set-selector-name> \'=\' \'{\' <trait-selector> [, <trait-selector>]* \'}\'\nvoid Parser::parseOMPContextSelectorSet(OMPTraitSet &TISet, llvm::StringMap<SourceLocation> &SeenSets) {\n // ...\n // Parse \'}\'.\n if (Tok.is(tok::r_brace)) {\n // ...\n } else {\n Diag(Tok.getLocation(), diag::warn_omp_declare_variant_expected) << \"}\" << (\"context selectors for the context set \\\"\" + getOpenMPContextTraitSetName(TISet.Kind) + \"\\\"\").str();"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/metadirective_messages.cpp"]={"clang/test/OpenMP/metadirective_messages.cpp:10:38: warning: expected \'=\' after the context set name \"device\"; \'=\' assumed [-Wopenmp-clauses]","clang/test/OpenMP/metadirective_messages.cpp:12:38: warning: expected \'=\' after the context set name \"device\"; \'=\' assumed [-Wopenmp-clauses]","clang/test/OpenMP/metadirective_messages.cpp:14:38: warning: expected \'=\' after the context set name \"device\"; \'=\' assumed [-Wopenmp-clauses]"} | ["clang/test/OpenMP/metadirective_messages.cpp"]={"clang/test/OpenMP/metadirective_messages.cpp:10:38: warning: expected \'=\' after the context set name \"device\"; \'=\' assumed [-Wopenmp-clauses]","clang/test/OpenMP/metadirective_messages.cpp:12:38: warning: expected \'=\' after the context set name \"device\"; \'=\' assumed [-Wopenmp-clauses]","clang/test/OpenMP/metadirective_messages.cpp:14:38: warning: expected \'=\' after the context set name \"device\"; \'=\' assumed [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_declare_variant_marked_as_declare_variant"]={ | ["warn_omp_declare_variant_marked_as_declare_variant"]={ | ||
[ | [i]={J,jb}, | ||
[j]=jb, | |||
[ | |||
[b]="variant function in \'#pragma omp declare variant\' is itself marked as \'#pragma omp declare variant\'", | [b]="variant function in \'#pragma omp declare variant\' is itself marked as \'#pragma omp declare variant\'", | ||
[ | [d]=h, | ||
[ | [a]="variant function in \'\\#pragma omp declare variant\' is itself marked as \'\\#pragma omp declare variant\'", | ||
[ | [e]=Qb, | ||
[ | [c]=pb, | ||
[ | [f]={tc,1567434909,kc,zc}, | ||
[ | [g]={{ib,7580,"std::optional<std::pair<FunctionDecl *, Expr *>> Sema::checkOpenMPDeclareVariantFunction(Sema::DeclGroupPtrTy DG, Expr *VariantRef, OMPTraitInfo &TI, unsigned NumAppendArgs, SourceRange SR) {\n // ...\n // Check if variant function is not marked with declare variant directive.\n if (NewFD->hasAttrs() && NewFD->hasAttr<OMPDeclareVariantAttr>()) {\n Diag(VariantRef->getExprLoc(), diag::warn_omp_declare_variant_marked_as_declare_variant) << VariantRef->getSourceRange();"}}, | ||
[ | [k]={ | ||
[ | [Fb]={"clang/test/OpenMP/declare_variant_messages.c:176:29: warning: variant function in \'#pragma omp declare variant\' is itself marked as \'#pragma omp declare variant\' [-Wsource-uses-openmp]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_declare_variant_score_not_constant"]={ | ["warn_omp_declare_variant_score_not_constant"]={ | ||
[ | [i]={J,jb}, | ||
[j]=jb, | |||
[ | |||
[b]="score expressions in the OpenMP context selector need to be constant; %0 is not and will be ignored", | [b]="score expressions in the OpenMP context selector need to be constant; %0 is not and will be ignored", | ||
[ | [d]=h, | ||
[ | [a]="score expressions in the OpenMP context selector need to be constant; (.*?) is not and will be ignored", | ||
[ | [e]=Qb, | ||
[ | [c]=pb, | ||
[ | [f]={Db,1576809732,Cb,Bb}, | ||
[ | [g]={{ib,7423,"std::optional<std::pair<FunctionDecl *, Expr *>> Sema::checkOpenMPDeclareVariantFunction(Sema::DeclGroupPtrTy DG, Expr *VariantRef, OMPTraitInfo &TI, unsigned NumAppendArgs, SourceRange SR) {\n // ...\n // Deal with non-constant score and user condition expressions.\n auto HandleNonConstantScoresAndConditions = [this](Expr *&E, bool IsScore) -> bool {\n // ...\n if (IsScore) {\n // ...\n Diag(E->getExprLoc(), diag::warn_omp_declare_variant_score_not_constant) << E;"}}, | ||
[ | [k]={ | ||
[ | [Fb]={"clang/test/OpenMP/declare_variant_messages.c:37:69: warning: score expressions in the OpenMP context selector need to be constant; foo() is not and will be ignored [-Wsource-uses-openmp]","clang/test/OpenMP/declare_variant_messages.c:54:71: warning: score expressions in the OpenMP context selector need to be constant; foo() is not and will be ignored [-Wsource-uses-openmp]","clang/test/OpenMP/declare_variant_messages.c:53:71: warning: score expressions in the OpenMP context selector need to be constant; foo is not and will be ignored [-Wsource-uses-openmp]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_declare_variant_string_literal_or_identifier"]={ | ["warn_omp_declare_variant_string_literal_or_identifier"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="expected identifier or string literal describing a context %select{set|selector|property}0; %select{set|selector|property}0 skipped", | [b]="expected identifier or string literal describing a context %select{set|selector|property}0; %select{set|selector|property}0 skipped", | ||
[ | [d]=h, | ||
[ | [a]="expected identifier or string literal describing a context (?:set|selector|property); (?:set|selector|property) skipped", | ||
[ | [e]=Z, | ||
[ | [c]=v, | ||
[ | [f]={Db,1576809732,Cb,Bb}, | ||
[ | [g]={{F,852,"static StringRef getNameFromIdOrString(Parser &P, Token &Tok, OMPContextLvl Lvl) {\n // ...\n P.Diag(Tok.getLocation(), diag::warn_omp_declare_variant_string_literal_or_identifier) << Lvl;"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/metadirective_messages.cpp"]={"clang/test/OpenMP/metadirective_messages.cpp:8:32: warning: expected identifier or string literal describing a context set; set skipped [-Wopenmp-clauses]","clang/test/OpenMP/metadirective_messages.cpp:10:39: warning: expected identifier or string literal describing a context selector; selector skipped [-Wopenmp-clauses]"} | ["clang/test/OpenMP/metadirective_messages.cpp"]={"clang/test/OpenMP/metadirective_messages.cpp:8:32: warning: expected identifier or string literal describing a context set; set skipped [-Wopenmp-clauses]","clang/test/OpenMP/metadirective_messages.cpp:10:39: warning: expected identifier or string literal describing a context selector; selector skipped [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_depend_in_ordered_deprecated"]={ | ["warn_omp_depend_in_ordered_deprecated"]={ | ||
[ | [i]={wb}, | ||
[j]=wb, | |||
[ | |||
[b]="\'depend\' clause for \'ordered\' is deprecated; use \'doacross\' instead", | [b]="\'depend\' clause for \'ordered\' is deprecated; use \'doacross\' instead", | ||
[ | [d]=h, | ||
[ | [a]="\'depend\' clause for \'ordered\' is deprecated; use \'doacross\' instead", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdeprecated[^\\]]*\\]", | ||
[ | [c]=Tb, | ||
[ | [f]={"ef9ec4bbcca2",1677810915,"[OpenMP] Add the `ompx_attribute` clause for target directives\n\nCUDA and HIP have kernel attributes ...","[OpenMP] Add the `ompx_attribute` clause for target directives\n\nCUDA and HIP have kernel attributes to tune the code generation (in the\nbackend). To reuse this functionality for OpenMP target regions we\nintroduce the `ompx_attribute` clause that takes these kernel\nattributes and emits code as if they had been attached to the kernel\nfuction (which is implicitly generated).\n\nTo limit the impact, we only support three kernel attributes:\n`amdgpu_waves_per_eu`, for AMDGPU\n`amdgpu_flat_work_group_size`, for AMDGPU\n`launch_bounds`, for NVPTX\n\nThe existing implementations of those attributes are used for error\nchecking and code generation. `ompx_attribute` can be attached to any\nexecutable target region and it can hold more than one kernel attribute.\n\nDifferential Revision: https://reviews.llvm.org/D156184"}, | ||
[ | [g]={{F,3373,"/// Parsing of OpenMP clauses.\n///\n/// clause:\n/// if-clause | final-clause | num_threads-clause | safelen-clause |\n/// default-clause | private-clause | firstprivate-clause | shared-clause\n/// | linear-clause | aligned-clause | collapse-clause | bind-clause |\n/// lastprivate-clause | reduction-clause | proc_bind-clause |\n/// schedule-clause | copyin-clause | copyprivate-clause | untied-clause |\n/// mergeable-clause | flush-clause | read-clause | write-clause |\n/// update-clause | capture-clause | seq_cst-clause | device-clause |\n/// simdlen-clause | threads-clause | simd-clause | num_teams-clause |\n/// thread_limit-clause | priority-clause | grainsize-clause |\n/// nogroup-clause | num_tasks-clause | hint-clause | to-clause |\n/// from-clause | is_device_ptr-clause | task_reduction-clause |\n/// in_reduction-clause | allocator-clause | allocate-clause |\n/// acq_rel-clause | acquire-clause | release-clause | relaxed-clause |\n/// depobj-clause | destroy-clause | detach-clause | inclusive-clause |\n/// exclusive-clause | uses_allocators-clause | use_device_addr-clause |\n/// has_device_addr\n///\nOMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, OpenMPClauseKind CKind, bool FirstClause) {\n // ...\n case OMPC_private:\n case OMPC_firstprivate:\n case OMPC_lastprivate:\n case OMPC_shared:\n case OMPC_reduction:\n case OMPC_task_reduction:\n case OMPC_in_reduction:\n case OMPC_linear:\n case OMPC_aligned:\n case OMPC_copyin:\n case OMPC_copyprivate:\n case OMPC_flush:\n case OMPC_depend:\n case OMPC_map:\n case OMPC_to:\n case OMPC_from:\n case OMPC_use_device_ptr:\n case OMPC_use_device_addr:\n case OMPC_is_device_ptr:\n case OMPC_has_device_addr:\n case OMPC_allocate:\n case OMPC_nontemporal:\n case OMPC_inclusive:\n case OMPC_exclusive:\n case OMPC_affinity:\n case OMPC_doacross:\n if (getLangOpts().OpenMP >= 52 && DKind == OMPD_ordered && CKind == OMPC_depend)\n Diag(Tok, diag::warn_omp_depend_in_ordered_deprecated);"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/ordered_messages.cpp"]={"clang/test/OpenMP/ordered_messages.cpp:405:21: warning: \'depend\' clause for \'ordered\' is deprecated; use \'doacross\' instead [-Wdeprecated]"} | ["clang/test/OpenMP/ordered_messages.cpp"]={"clang/test/OpenMP/ordered_messages.cpp:405:21: warning: \'depend\' clause for \'ordered\' is deprecated; use \'doacross\' instead [-Wdeprecated]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_extra_tokens_at_eol"]={ | ["warn_omp_extra_tokens_at_eol"]={ | ||
[ | [i]={"endif-labels","extra-tokens"}, | ||
[j]="extra-tokens", | |||
[ | |||
[b]="extra tokens at the end of \'#pragma omp %0\' are ignored", | [b]="extra tokens at the end of \'#pragma omp %0\' are ignored", | ||
[ | [d]=h, | ||
[ | [a]="extra tokens at the end of \'\\#pragma omp (.*?)\' are ignored", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wextra\\-tokens[^\\]]*\\]", | ||
[ | [c]=v, | ||
[ | [f]={"a769e07232d2",1363934075,"OpenMP threadprivate directive parsing and semantic analysis\n\nllvm-svn: 177705","OpenMP threadprivate directive parsing and semantic analysis\n\nllvm-svn: 177705"}, | ||
[ | [g]={{F,1968,"void Parser::skipUntilPragmaOpenMPEnd(OpenMPDirectiveKind DKind) {\n // ...\n Diag(Tok, diag::warn_omp_extra_tokens_at_eol) << getOpenMPDirectiveName(DKind);"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/unroll_messages.cpp"]={"clang/test/OpenMP/unroll_messages.cpp:21:22: warning: extra tokens at the end of \'#pragma omp unroll\' are ignored [-Wextra-tokens]"} | ["clang/test/OpenMP/unroll_messages.cpp"]={"clang/test/OpenMP/unroll_messages.cpp:21:22: warning: extra tokens at the end of \'#pragma omp unroll\' are ignored [-Wextra-tokens]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_linear_step_zero"]={ | ["warn_omp_linear_step_zero"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="zero linear step (%0 %select{|and other variables in clause }1should probably be const)", | [b]="zero linear step (%0 %select{|and other variables in clause }1should probably be const)", | ||
[ | [d]=h, | ||
[ | [a]="zero linear step \\((.*?) (?:|and other variables in clause )should probably be const\\)", | ||
[ | [e]=Z, | ||
[ | [c]=pb, | ||
[ | [f]={"8dba66412b0a",1398172182,"[OPENMP] parsing \'linear\' clause (for directive \'omp simd\')\n\nDifferential Revision: http://reviews.l...","[OPENMP] parsing \'linear\' clause (for directive \'omp simd\')\n\nDifferential Revision: http://reviews.llvm.org/D3272\n\nllvm-svn: 206891"}, | ||
[ | [g]={{ib,20138,"OMPClause *Sema::ActOnOpenMPLinearClause(ArrayRef<Expr *> VarList, Expr *Step, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind LinKind, SourceLocation LinLoc, SourceLocation ColonLoc, SourceLocation EndLoc) {\n // ...\n if (Step && !Step->isValueDependent() && !Step->isTypeDependent() && !Step->isInstantiationDependent() && !Step->containsUnexpandedParameterPack()) {\n // ...\n // Warn about zero linear step (it would be probably better specified as\n // making corresponding variables \'const\').\n if (std::optional<llvm::APSInt> Result = StepExpr->getIntegerConstantExpr(Context)) {\n if (!Result->isNegative() && !Result->isStrictlyPositive())\n Diag(StepLoc, diag::warn_omp_linear_step_zero) << Vars[0] << (Vars.size() > 1);"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/for_simd_linear_messages.cpp"]={"clang/test/OpenMP/for_simd_linear_messages.cpp:74:36: warning: zero linear step (ind2 should probably be const) [-Wopenmp-clauses]"} | ["clang/test/OpenMP/for_simd_linear_messages.cpp"]={"clang/test/OpenMP/for_simd_linear_messages.cpp:74:36: warning: zero linear step (ind2 should probably be const) [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_loop_64_bit_var"]={ | ["warn_omp_loop_64_bit_var"]={ | ||
[ | [i]={J,"openmp-loop-form"}, | ||
[j]="openmp-loop-form", | |||
[ | |||
[b]="OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed", | [b]="OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed", | ||
[ | [d]=h, | ||
[ | [a]="OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wopenmp\\-loop\\-form[^\\]]*\\]", | ||
[ | [c]=pb, | ||
[ | [f]={"174b3ca6820b",1412594189,"[OPENMP] Limit the loop counters to 64 bits for the worksharing loops\n\nllvm-svn: 219113","[OPENMP] Limit the loop counters to 64 bits for the worksharing loops\n\nllvm-svn: 219113"}, | ||
[ | [g]={{ib,8834,"/// Build the expression to calculate the number of iterations.\nExpr *OpenMPIterationSpaceChecker::buildNumIterations(Scope *S, ArrayRef<LoopIterationSpace> ResultIterSpaces, bool LimitedType, llvm::MapVector<const Expr *, DeclRefExpr *> &Captures) const {\n // ...\n if (LimitedType) {\n // ...\n if (NewSize != C.getTypeSize(Type)) {\n if (NewSize < C.getTypeSize(Type)) {\n // ...\n SemaRef.Diag(DefaultLoc, diag::warn_omp_loop_64_bit_var) << InitSrcRange << ConditionSrcRange;"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/taskloop_misc_messages.c"]={"clang/test/OpenMP/taskloop_misc_messages.c:378:3: warning: OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed [-Wopenmp-loop-form]"} | ["clang/test/OpenMP/taskloop_misc_messages.c"]={"clang/test/OpenMP/taskloop_misc_messages.c:378:3: warning: OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed [-Wopenmp-loop-form]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_minus_in_reduction_deprecated"]={ | ["warn_omp_minus_in_reduction_deprecated"]={ | ||
[ | [i]={wb}, | ||
[j]=wb, | |||
[ | |||
[b]="minus(-) operator for reductions is deprecated; use + or user defined reduction instead", | [b]="minus(-) operator for reductions is deprecated; use + or user defined reduction instead", | ||
[ | [d]=h, | ||
[ | [a]="minus\\(\\-\\) operator for reductions is deprecated; use \\+ or user defined reduction instead", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdeprecated[^\\]]*\\]", | ||
[ | [c]=Tb, | ||
[ | [f]={lb,1625925174,mb,nb}, | ||
[ | [g]={{ib,19254,"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 // OpenMP 5.2, 5.5.5 (see page 627, line 18) reduction Clause, Restrictions\n // A reduction clause with the minus (-) operator was deprecated\n if (OOK == OO_Minus && S.LangOpts.OpenMP == 52)\n S.Diag(ReductionId.getLoc(), diag::warn_omp_minus_in_reduction_deprecated);"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/taskloop_reduction_messages_attr.cpp"]={"clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:158:39: warning: minus(-) operator for reductions is deprecated; use + or user defined reduction instead [-Wdeprecated]","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:260:39: warning: minus(-) operator for reductions is deprecated; use + or user defined reduction instead [-Wdeprecated]","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:158:39: warning: minus(-) operator for reductions is deprecated; use + or user defined reduction instead [-Wdeprecated]","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:158:39: warning: minus(-) operator for reductions is deprecated; use + or user defined reduction instead [-Wdeprecated]"} | ["clang/test/OpenMP/taskloop_reduction_messages_attr.cpp"]={"clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:158:39: warning: minus(-) operator for reductions is deprecated; use + or user defined reduction instead [-Wdeprecated]","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:260:39: warning: minus(-) operator for reductions is deprecated; use + or user defined reduction instead [-Wdeprecated]","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:158:39: warning: minus(-) operator for reductions is deprecated; use + or user defined reduction instead [-Wdeprecated]","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:158:39: warning: minus(-) operator for reductions is deprecated; use + or user defined reduction instead [-Wdeprecated]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_more_one_device_type_clause"]={ | ["warn_omp_more_one_device_type_clause"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="more than one \'device_type\' clause is specified", | [b]="more than one \'device_type\' clause is specified", | ||
[ | [d]=h, | ||
[ | [a]="more than one \'device_type\' clause is specified", | ||
[ | [e]=Z, | ||
[ | [c]=v, | ||
[ | [f]={"729e242a7972",1566576674,"[OPENMP5.0]Add support for device_type clause in declare target\nconstruct.\n\nOpenMP 5.0 introduced ne...","[OPENMP5.0]Add support for device_type clause in declare target\nconstruct.\n\nOpenMP 5.0 introduced new clause for declare target directive, device_type clause, which may accept values host, nohost, and any. Host means\nthat the function must be emitted only for the host, nohost - only for\nthe device, and any - for both, device and the host.\n\nllvm-svn: 369775"}, | ||
[ | [g]={{F,1888,"void Parser::ParseOMPDeclareTargetClauses(Sema::DeclareTargetContextInfo &DTCI) {\n // ...\n while (Tok.isNot(tok::annot_pragma_openmp_end)) {\n // ...\n if (HasIdentifier) {\n // ...\n // Parse \'device_type\' clause and go to next clause if any.\n if (IsDeviceTypeClause) {\n // ...\n if (DevTypeData) {\n if (DeviceTypeLoc.isValid()) {\n // ...\n Diag(DevTypeData->Loc, diag::warn_omp_more_one_device_type_clause);"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/declare_target_messages.cpp"]={"clang/test/OpenMP/declare_target_messages.cpp:37:51: warning: more than one \'device_type\' clause is specified [-Wopenmp-clauses]"} | ["clang/test/OpenMP/declare_target_messages.cpp"]={"clang/test/OpenMP/declare_target_messages.cpp:37:51: warning: more than one \'device_type\' clause is specified [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_more_one_interop_type"]={ | ["warn_omp_more_one_interop_type"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="interop type \'%0\' cannot be specified more than once", | [b]="interop type \'%0\' cannot be specified more than once", | ||
[ | [d]=h, | ||
[ | [a]="interop type \'(.*?)\' cannot be specified more than once", | ||
[ | [e]=Z, | ||
[ | [c]=v, | ||
[ | [f]={"69350e569dc4",1612659633,"[C++20][Modules][3/8] Initial handling for module partitions.\n\nThis implements the parsing and recog...","[C++20][Modules][3/8] Initial handling for module partitions.\n\nThis implements the parsing and recognition of module partition CMIs\nand removes the FIXMEs in the parser.\n\nModule partitions are recognised in the base computation of visibility,\nhowever additional amendments to visibility follow in subsequent patches.\n\nDifferential Revision: https://reviews.llvm.org/D118586"}, | ||
[ | [g]={{F,3562,"/// Parses a comma-separated list of interop-types and a prefer_type list.\n///\nbool Parser::ParseOMPInteropInfo(OMPInteropInfo &InteropInfo, OpenMPClauseKind Kind) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (Tok.getIdentifierInfo()->isStr(\"target\")) {\n // OpenMP 5.1 [2.15.1, interop Construct, Restrictions]\n // Each interop-type may be specified on an action-clause at most\n // once.\n if (IsTarget)\n Diag(Tok, diag::warn_omp_more_one_interop_type) << \"target\";"},{F,3567,"/// Parses a comma-separated list of interop-types and a prefer_type list.\n///\nbool Parser::ParseOMPInteropInfo(OMPInteropInfo &InteropInfo, OpenMPClauseKind Kind) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (Tok.getIdentifierInfo()->isStr(\"target\")) {\n // ...\n } else if (Tok.getIdentifierInfo()->isStr(\"targetsync\")) {\n if (IsTargetSync)\n Diag(Tok, diag::warn_omp_more_one_interop_type) << \"targetsync\";"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/interop_messages.cpp"]={"clang/test/OpenMP/interop_messages.cpp:87:46: warning: interop type \'target\' cannot be specified more than once [-Wopenmp-clauses]"} | ["clang/test/OpenMP/interop_messages.cpp"]={"clang/test/OpenMP/interop_messages.cpp:87:46: warning: interop type \'target\' cannot be specified more than once [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_more_one_omp_all_memory"]={ | ["warn_omp_more_one_omp_all_memory"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="reserved locator \'omp_all_memory\' cannot be specified more than once", | [b]="reserved locator \'omp_all_memory\' cannot be specified more than once", | ||
[ | [d]=h, | ||
[ | [a]="reserved locator \'omp_all_memory\' cannot be specified more than once", | ||
[ | [e]=Z, | ||
[ | [c]=v, | ||
[ | [f]={"9ba937112fa6",1652807460,"[OpenMP] Add parsing/sema support for omp_all_memory reserved locator\n\nAdds support for the reserved...","[OpenMP] Add parsing/sema support for omp_all_memory reserved locator\n\nAdds support for the reserved locator \'omp_all_memory\' for use\nin depend clauses with \'out\' or \'inout\' dependence-types.\n\nDifferential Revision: https://reviews.llvm.org/D125828"}, | ||
[ | [g]={{F,4309,"bool Parser::ParseOpenMPReservedLocator(OpenMPClauseKind Kind, Sema::OpenMPVarListDataTy &Data, const LangOptions &LangOpts) {\n // ...\n if (Tok.is(tok::identifier) && Tok.getIdentifierInfo()->isStr(\"omp_all_memory\")) {\n if (Data.ExtraModifier == OMPC_DEPEND_outallmemory || Data.ExtraModifier == OMPC_DEPEND_inoutallmemory)\n Diag(Tok, diag::warn_omp_more_one_omp_all_memory);"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/task_depend_messages.cpp"]={"clang/test/OpenMP/task_depend_messages.cpp:89:52: warning: reserved locator \'omp_all_memory\' cannot be specified more than once [-Wopenmp-clauses]"} | ["clang/test/OpenMP/task_depend_messages.cpp"]={"clang/test/OpenMP/task_depend_messages.cpp:89:52: warning: reserved locator \'omp_all_memory\' cannot be specified more than once [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_nesting_simd"]={ | ["warn_omp_nesting_simd"]={ | ||
[ | [i]={J,jb}, | ||
[j]=jb, | |||
[ | |||
[b]="OpenMP only allows an ordered construct with the simd clause nested in a simd construct", | [b]="OpenMP only allows an ordered construct with the simd clause nested in a simd construct", | ||
[ | [d]=h, | ||
[ | [a]="OpenMP only allows an ordered construct with the simd clause nested in a simd construct", | ||
[ | [e]=Qb, | ||
[ | [c]=pb, | ||
[ | [f]={"fd8b5748f113",1467383425,"[OpenMP] Issue warning if a simd construct nested inside another simd\nconstruct\n\nllvm-svn: 274352","[OpenMP] Issue warning if a simd construct nested inside another simd\nconstruct\n\nllvm-svn: 274352"}, | ||
[ | [g]={{ib,5011,"static bool checkNestingOfRegions(Sema &SemaRef, const DSAStackTy *Stack, OpenMPDirectiveKind CurrentRegion, const DeclarationNameInfo &CurrentName, OpenMPDirectiveKind CancelRegion, OpenMPBindClauseKind BindKind, SourceLocation StartLoc) {\n if (Stack->getCurScope()) {\n // ...\n if (isOpenMPSimdDirective(ParentRegion) && ((SemaRef.LangOpts.OpenMP <= 45 && CurrentRegion != OMPD_ordered) || (SemaRef.LangOpts.OpenMP >= 50 && CurrentRegion != OMPD_ordered && CurrentRegion != OMPD_simd && CurrentRegion != OMPD_atomic && CurrentRegion != OMPD_scan))) {\n // ...\n SemaRef.Diag(StartLoc, (CurrentRegion != OMPD_simd) ? diag::err_omp_prohibited_region_simd : diag::warn_omp_nesting_simd) << (SemaRef.LangOpts.OpenMP >= 50 ? 1 : 0);"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/nesting_of_regions.cpp"]={"clang/test/OpenMP/nesting_of_regions.cpp:250:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:803:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:2841:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:6735:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:7054:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:7847:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:8136:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:9432:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:9680:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:10135:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:10635:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:12554:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:15561:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:15880:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:16191:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:16726:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:17015:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:18311:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:18559:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]"} | ["clang/test/OpenMP/nesting_of_regions.cpp"]={"clang/test/OpenMP/nesting_of_regions.cpp:250:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:803:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:2841:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:6735:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:7054:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:7847:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:8136:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:9432:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:9680:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:10135:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:10635:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:12554:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:15561:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:15880:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:16191:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:16726:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:17015:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:18311:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:18559:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_non_trivial_type_mapped"]={ | ["warn_omp_non_trivial_type_mapped"]={ | ||
[ | [i]={J,J,"openmp-mapping",dd}, | ||
[j]="openmp-mapping", | |||
[ | |||
[b]="Type %0 is not trivially copyable and not guaranteed to be mapped correctly", | [b]="Type %0 is not trivially copyable and not guaranteed to be mapped correctly", | ||
[ | [d]=h, | ||
[ | [a]="Type (.*?) is not trivially copyable and not guaranteed to be mapped correctly", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wopenmp\\-mapping[^\\]]*\\]", | ||
[ | [c]=pb, | ||
[ | [f]={"95c23e72da98",1519767071,"[OPENMP] Emit warning for non-trivial types in map clauses.\n\nIf the mapped type is non-trivial, the ...","[OPENMP] Emit warning for non-trivial types in map clauses.\n\nIf the mapped type is non-trivial, the warning message is emitted for\nbetter user experience.\n\nllvm-svn: 326251"}, | ||
[ | [g]={{ib,20969,"static bool checkTypeMappable(SourceLocation SL, SourceRange SR, Sema &SemaRef, DSAStackTy *Stack, QualType QTy, bool FullCheck = true) {\n // ...\n if (FullCheck && !SemaRef.CurContext->isDependentContext() && !QTy.isTriviallyCopyableType(SemaRef.Context))\n SemaRef.Diag(SL, diag::warn_omp_non_trivial_type_mapped) << QTy << SR;"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp"]={"clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp:122:43: warning: Type \'const S3[5]\' is not trivially copyable and not guaranteed to be mapped correctly [-Wopenmp-mapping]"} | ["clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp"]={"clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp:122:43: warning: Type \'const S3[5]\' is not trivially copyable and not guaranteed to be mapped correctly [-Wopenmp-mapping]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_not_in_target_context"]={ | ["warn_omp_not_in_target_context"]={ | ||
[ | [i]={J,dd}, | ||
[j]=dd, | |||
[ | |||
[b]="declaration is not declared in any declare target region", | [b]="declaration is not declared in any declare target region", | ||
[ | [d]=h, | ||
[ | [a]="declaration is not declared in any declare target region", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wopenmp\\-target[^\\]]*\\]", | ||
[ | [c]=pb, | ||
[ | [f]={"0b0da296e6de",1459942739,"[OPENMP] Parsing and Sema support for \'omp declare target\' directive\n\nAdd parsing, sema analysis for...","[OPENMP] Parsing and Sema support for \'omp declare target\' directive\n\nAdd parsing, sema analysis for \'declare target\' construct for OpenMP 4.0\n(4.5 support will be added in separate patch).\n\nThe declare target directive specifies that variables, functions (C, C++\nand Fortran), and subroutines (Fortran) are mapped to a device. The declare\ntarget directive is a declarative directive. In Clang declare target is\nimplemented as implicit attribute for the declaration.\n\nThe syntax of the declare target directive is as follows:\n\n #pragma omp declare target\n declarations-definition-seq\n #pragma omp end declare target\n\nBased on patch from Michael Wong http://reviews.llvm.org/D15321\n\nllvm-svn: 265530"}, | ||
[ | [g]={{ib,23133,"static void checkDeclInTargetContext(SourceLocation SL, SourceRange SR, Sema &SemaRef, Decl *D) {\n // ...\n SemaRef.Diag(VD->getLocation(), diag::warn_omp_not_in_target_context);"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/nvptx_target_exceptions_messages.cpp"]={"clang/test/OpenMP/nvptx_target_exceptions_messages.cpp:92:7: warning: declaration is not declared in any declare target region [-Wopenmp-target]"} | ["clang/test/OpenMP/nvptx_target_exceptions_messages.cpp"]={"clang/test/OpenMP/nvptx_target_exceptions_messages.cpp:92:7: warning: declaration is not declared in any declare target region [-Wopenmp-target]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_section_is_char"]={ | ["warn_omp_section_is_char"]={ | ||
[ | [i]={n,o,"char-subscripts",p}, | ||
[j]="char-subscripts", | |||
[ | |||
[b]="array section %select{lower bound|length}0 is of type \'char\'", | [b]="array section %select{lower bound|length}0 is of type \'char\'", | ||
[ | [d]=h, | ||
[ | [a]="array section (?:lower bound|length) is of type \'char\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wchar\\-subscripts[^\\]]*\\]", | ||
[ | [c]=pb, | ||
[ | [f]={"1a3320e4639c",1440512644,"[OPENMP 4.0] Initial support for array sections.\n\nAdds parsing/sema analysis/serialization/deseriali...","[OPENMP 4.0] Initial support for array sections.\n\nAdds parsing/sema analysis/serialization/deserialization for array sections in OpenMP constructs (introduced in OpenMP 4.0).\nCurrently it is allowed to use array sections only in OpenMP clauses that accepts list of expressions.\nDifferential Revision: http://reviews.llvm.org/D10732\n\nllvm-svn: 245937"}, | ||
[ | [g]={{u,5326,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n // C99 6.5.2.1p1\n if (LowerBound) {\n // ...\n if (LowerBound->getType()->isSpecificBuiltinType(BuiltinType::Char_S) || LowerBound->getType()->isSpecificBuiltinType(BuiltinType::Char_U))\n Diag(LowerBound->getExprLoc(), diag::warn_omp_section_is_char) << 0 << LowerBound->getSourceRange();"},{u,5340,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n if (Length) {\n // ...\n if (Length->getType()->isSpecificBuiltinType(BuiltinType::Char_S) || Length->getType()->isSpecificBuiltinType(BuiltinType::Char_U))\n Diag(Length->getExprLoc(), diag::warn_omp_section_is_char) << 1 << Length->getSourceRange();"},{u,5355,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n if (Stride) {\n // ...\n if (Stride->getType()->isSpecificBuiltinType(BuiltinType::Char_S) || Stride->getType()->isSpecificBuiltinType(BuiltinType::Char_U))\n Diag(Stride->getExprLoc(), diag::warn_omp_section_is_char) << 1 << Stride->getSourceRange();"}} | ||
}, | }, | ||
["warn_omp_unknown_assumption_clause_missing_id"]={ | ["warn_omp_unknown_assumption_clause_missing_id"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="valid %0 clauses start with %1; %select{token|tokens}2 will be ignored", | [b]="valid %0 clauses start with %1; %select{token|tokens}2 will be ignored", | ||
[ | [d]=h, | ||
[ | [a]="valid (.*?) clauses start with (.*?); (?:token|tokens) will be ignored", | ||
[ | [e]=Z, | ||
[ | [c]=v, | ||
[ | [f]={"38d18d93534d",1601621202,"[SVE] Add support to vectorize_width loop pragma for scalable vectors\n\nThis patch adds support for t...","[SVE] Add support to vectorize_width loop pragma for scalable vectors\n\nThis patch adds support for two new variants of the vectorize_width\npragma:\n\n1. vectorize_width(X[, fixed|scalable]) where an optional second\nparameter is passed to the vectorize_width pragma, which indicates if\nthe user wishes to use fixed width or scalable vectorization. For\nexample the user can now write something like:\n\n #pragma clang loop vectorize_width(4, fixed)\nor\n #pragma clang loop vectorize_width(4, scalable)\n\nIn the absence of a second parameter it is assumed the user wants\nfixed width vectorization, in order to maintain compatibility with\nexisting code.\n2. vectorize_width(fixed|scalable) where the width is left unspecified,\nbut the user hints what type of vectorization they prefer, either\nfixed width or scalable.\n\nI have implemented this by making use of the LLVM loop hint attribute:\n\n llvm.loop.vectorize.scalable.enable\n\nTests were added to\n\n clang/test/CodeGenCXX/pragma-loop.cpp\n\nfor both the \'fixed\' and \'scalable\' optional parameter.\n\nSee this thread for context: http://lists.llvm.org/pipermail/cfe-dev/2020-November/067262.html\n\nDifferential Revision: https://reviews.llvm.org/D89031"}, | ||
[ | [g]={{F,1721,"/// `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 while (Tok.isNot(tok::annot_pragma_openmp_end)) {\n // ...\n // Handle unknown clauses by skipping them.\n if (Idx == -1) {\n Diag(StartLoc, diag::warn_omp_unknown_assumption_clause_missing_id) << llvm::omp::getOpenMPDirectiveName(DKind) << llvm::omp::getAllAssumeClauseOptions() << NextIsLPar;"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/assumes_messages_attr.c"]={"clang/test/OpenMP/assumes_messages_attr.c:9:26: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:10:32: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:13:32: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:14:26: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:21:26: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:21:43: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:22:32: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:22:49: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:25:32: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:25:60: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:26:26: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:26:54: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:29:36: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:30:42: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:45:26: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:46:32: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]"} | ["clang/test/OpenMP/assumes_messages_attr.c"]={"clang/test/OpenMP/assumes_messages_attr.c:9:26: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:10:32: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:13:32: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:14:26: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:21:26: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:21:43: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:22:32: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:22:49: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:25:32: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:25:60: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:26:26: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:26:54: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:29:36: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:30:42: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:45:26: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:46:32: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_unknown_assumption_clause_without_args"]={ | ["warn_omp_unknown_assumption_clause_without_args"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="%0 clause should not be followed by arguments; tokens will be ignored", | [b]="%0 clause should not be followed by arguments; tokens will be ignored", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) clause should not be followed by arguments; tokens will be ignored", | ||
[ | [e]=Z, | ||
[ | [c]=v, | ||
[ | [f]={"38d18d93534d",1601621202,"[SVE] Add support to vectorize_width loop pragma for scalable vectors\n\nThis patch adds support for t...","[SVE] Add support to vectorize_width loop pragma for scalable vectors\n\nThis patch adds support for two new variants of the vectorize_width\npragma:\n\n1. vectorize_width(X[, fixed|scalable]) where an optional second\nparameter is passed to the vectorize_width pragma, which indicates if\nthe user wishes to use fixed width or scalable vectorization. For\nexample the user can now write something like:\n\n #pragma clang loop vectorize_width(4, fixed)\nor\n #pragma clang loop vectorize_width(4, scalable)\n\nIn the absence of a second parameter it is assumed the user wants\nfixed width vectorization, in order to maintain compatibility with\nexisting code.\n2. vectorize_width(fixed|scalable) where the width is left unspecified,\nbut the user hints what type of vectorization they prefer, either\nfixed width or scalable.\n\nI have implemented this by making use of the LLVM loop hint attribute:\n\n llvm.loop.vectorize.scalable.enable\n\nTests were added to\n\n clang/test/CodeGenCXX/pragma-loop.cpp\n\nfor both the \'fixed\' and \'scalable\' optional parameter.\n\nSee this thread for context: http://lists.llvm.org/pipermail/cfe-dev/2020-November/067262.html\n\nDifferential Revision: https://reviews.llvm.org/D89031"}, | ||
[ | [g]={{F,1740,"/// `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 while (Tok.isNot(tok::annot_pragma_openmp_end)) {\n // ...\n if (NextIsLPar) {\n Diag(Tok.getLocation(), diag::warn_omp_unknown_assumption_clause_without_args) << II;"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/assumes_messages_attr.c"]={"clang/test/OpenMP/assumes_messages_attr.c:17:35: warning: \'no_openmp\' clause should not be followed by arguments; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:18:41: warning: \'no_openmp\' clause should not be followed by arguments; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:49:33: warning: \'ext_123\' clause should not be followed by arguments; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:50:39: warning: \'ext_123\' clause should not be followed by arguments; tokens will be ignored [-Wopenmp-clauses]"} | ["clang/test/OpenMP/assumes_messages_attr.c"]={"clang/test/OpenMP/assumes_messages_attr.c:17:35: warning: \'no_openmp\' clause should not be followed by arguments; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:18:41: warning: \'no_openmp\' clause should not be followed by arguments; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:49:33: warning: \'ext_123\' clause should not be followed by arguments; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:50:39: warning: \'ext_123\' clause should not be followed by arguments; tokens will be ignored [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_unterminated_declare_target"]={ | ["warn_omp_unterminated_declare_target"]={ | ||
[ | [i]={J,jb}, | ||
[j]=jb, | |||
[ | |||
[b]="expected \'#pragma omp end declare target\' at end of file to match \'#pragma omp %0\'", | [b]="expected \'#pragma omp end declare target\' at end of file to match \'#pragma omp %0\'", | ||
[ | [d]=h, | ||
[ | [a]="expected \'\\#pragma omp end declare target\' at end of file to match \'\\#pragma omp (.*?)\'", | ||
[ | [e]=Qb, | ||
[ | [c]=pb, | ||
[ | [f]={ad,1620530452,bd,cd}, | ||
[ | [g]={{ib,23012,"void Sema::DiagnoseUnterminatedOpenMPDeclareTarget() {\n // ...\n Diag(DTCI.Loc, diag::warn_omp_unterminated_declare_target) << getOpenMPDirectiveName(DTCI.Kind);"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/declare_target_messages.cpp"]={"clang/test/OpenMP/declare_target_messages.cpp:279:27: warning: expected \'#pragma omp end declare target\' at end of file to match \'#pragma omp begin declare target\' [-Wsource-uses-openmp]"} | ["clang/test/OpenMP/declare_target_messages.cpp"]={"clang/test/OpenMP/declare_target_messages.cpp:279:27: warning: expected \'#pragma omp end declare target\' at end of file to match \'#pragma omp begin declare target\' [-Wsource-uses-openmp]"} | ||
} | } | ||
}, | }, | ||
["warn_omp_used_different_allocator"]={ | ["warn_omp_used_different_allocator"]={ | ||
[ | [i]={J,D}, | ||
[j]=D, | |||
[ | |||
[b]="allocate directive specifies %select{default|\'%1\'}0 allocator while previously used %select{default|\'%3\'}2", | [b]="allocate directive specifies %select{default|\'%1\'}0 allocator while previously used %select{default|\'%3\'}2", | ||
[ | [d]=h, | ||
[ | [a]="allocate directive specifies (?:default|\'(.*?)\') allocator while previously used (?:default|\'(.*?)\')", | ||
[ | [e]=Z, | ||
[ | [c]=pb, | ||
[ | [f]={"282555ad8268",1553027624,"[OPENMP]Warn if the different allocator is used for the variable.\n\nIf the allocator was specified fo...","[OPENMP]Warn if the different allocator is used for the variable.\n\nIf the allocator was specified for the variable and next one is found\nwith the different allocator, the warning is emitted, and the allocator\nis ignored.\n\nllvm-svn: 356513"}, | ||
[ | [g]={{ib,3343,"static bool checkPreviousOMPAllocateAttribute(Sema &S, DSAStackTy *Stack, Expr *RefExpr, VarDecl *VD, OMPAllocateDeclAttr::AllocatorTypeTy AllocatorKind, Expr *Allocator) {\n // ...\n if (!AllocatorsMatch) {\n // ...\n S.Diag(AllocatorLoc, diag::warn_omp_used_different_allocator) << (Allocator ? 1 : 0) << AllocatorStream.str() << (PrevAllocator ? 1 : 0) << PrevAllocatorStream.str() << AllocatorRange;"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/allocate_allocator_messages.cpp"]={"clang/test/OpenMP/allocate_allocator_messages.cpp:34:35: warning: allocate directive specifies \'omp_thread_mem_alloc\' allocator while previously used default [-Wopenmp-clauses]","clang/test/OpenMP/allocate_allocator_messages.cpp:43:22: warning: allocate directive specifies default allocator while previously used \'omp_thread_mem_alloc\' [-Wopenmp-clauses]","clang/test/OpenMP/allocate_allocator_messages.cpp:47:35: warning: allocate directive specifies \'omp_high_bw_mem_alloc\' allocator while previously used \'omp_thread_mem_alloc\' [-Wopenmp-clauses]"} | ["clang/test/OpenMP/allocate_allocator_messages.cpp"]={"clang/test/OpenMP/allocate_allocator_messages.cpp:34:35: warning: allocate directive specifies \'omp_thread_mem_alloc\' allocator while previously used default [-Wopenmp-clauses]","clang/test/OpenMP/allocate_allocator_messages.cpp:43:22: warning: allocate directive specifies default allocator while previously used \'omp_thread_mem_alloc\' [-Wopenmp-clauses]","clang/test/OpenMP/allocate_allocator_messages.cpp:47:35: warning: allocate directive specifies \'omp_high_bw_mem_alloc\' allocator while previously used \'omp_thread_mem_alloc\' [-Wopenmp-clauses]"} | ||
} | } | ||
}, | }, | ||
["warn_on_superclass_use"]={ | ["warn_on_superclass_use"]={ | ||
[b]="class implementation may not have super class", | |||
[d]=h, | |||
[a]="class implementation may not have super class", | [a]="class implementation may not have super class", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[f]={"34e3cef4836d",1266613134,"Start supporting declaration of ivars in @implementation\nblocks. WIP.\n\nllvm-svn: 96696","Start supporting declaration of ivars in @implementation\nblocks. WIP.\n\nllvm-svn: 96696"}, | |||
[g]={{I,2168,"void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **ivars, unsigned numIvars, SourceLocation RBrace) {\n // ...\n if (LangOpts.ObjCRuntime.isNonFragile()) {\n if (ImpDecl->getSuperClass())\n Diag(ImpDecl->getLocation(), diag::warn_on_superclass_use);"}}, | |||
[f | [k]={ | ||
[ | |||
[ | |||
["clang/test/SemaObjC/ivar-in-implementations.m"]={"clang/test/SemaObjC/ivar-in-implementations.m:12:17: warning: class implementation may not have super class"} | ["clang/test/SemaObjC/ivar-in-implementations.m"]={"clang/test/SemaObjC/ivar-in-implementations.m:12:17: warning: class implementation may not have super class"} | ||
} | } | ||
}, | }, | ||
["warn_opencl_attr_deprecated_ignored"]={ | ["warn_opencl_attr_deprecated_ignored"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="%0 attribute is deprecated and ignored in %1", | [b]="%0 attribute is deprecated and ignored in %1", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) attribute is deprecated and ignored in (.*?)", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={"c4bb5df4ab28",1459422442,"[OpenCL] Added nosvm attribute for OpenCL v2.0.\n\nIt is not widely used and removed from OpenCL v2.1....","[OpenCL] Added nosvm attribute for OpenCL v2.0.\n\nIt is not widely used and removed from OpenCL v2.1.\n\nThis change modifies Clang to parse the attribute for OpenCL\nbut ignores it afterwards.\n\nPatch by Liu Yaxun (Sam)!\n\nDifferential Revision: http://reviews.llvm.org/D17861\n\nllvm-svn: 265006"}, | ||
[ | [g]={{w,8284,"static void handleOpenCLNoSVMAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (S.LangOpts.getOpenCLCompatibleVersion() < 200)\n // ...\n else\n S.Diag(AL.getLoc(), diag::warn_opencl_attr_deprecated_ignored) << AL << S.LangOpts.getOpenCLVersionString();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaOpenCL/nosvm.cl"]={"clang/test/SemaOpenCL/nosvm.cl:7:30: warning: \'nosvm\' attribute is deprecated and ignored in C++ for OpenCL version 1.0 [-Wignored-attributes]"} | ["clang/test/SemaOpenCL/nosvm.cl"]={"clang/test/SemaOpenCL/nosvm.cl:7:30: warning: \'nosvm\' attribute is deprecated and ignored in C++ for OpenCL version 1.0 [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_opencl_generic_address_space_arg"]={ | ["warn_opencl_generic_address_space_arg"]={ | ||
[ | [i]={Ab,Pb}, | ||
[j]=Ab, | |||
[ | |||
[b]="passing non-generic address space pointer to %0 may cause dynamic conversion affecting performance", | [b]="passing non-generic address space pointer to %0 may cause dynamic conversion affecting performance", | ||
[ | [d]=h, | ||
[ | [a]="passing non\\-generic address space pointer to (.*?) may cause dynamic conversion affecting performance", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wconversion[^\\]]*\\]", | ||
[ | [c]=Wb, | ||
[ | [f]={"1076cc2ffae3",1537438047,"[OpenCL] Diagnose redundant address space conversion\n\nAdd a warning if a parameter with a named addr...","[OpenCL] Diagnose redundant address space conversion\n\nAdd a warning if a parameter with a named address space is passed\nto a to_addr builtin.\n\nFor example:\n\n int i;\n to_private(&i); // generate warning as conversion from private to private is redundant.\n\nPatch by Alistair Davies.\n\nDifferential Revision: https://reviews.llvm.org/D51411\n\nllvm-svn: 342638"}, | ||
[ | [g]={{r,1868,"// OpenCL v2.0 s6.13.9 - Address space qualifier functions.\n// Performs semantic analysis for the to_global/local/private call.\n// \\param S Reference to the semantic analyzer.\n// \\param BuiltinID ID of the builtin function.\n// \\param Call A pointer to the builtin call.\n// \\return True if a semantic error has been found, false otherwise.\nstatic bool SemaOpenCLBuiltinToAddr(Sema &S, unsigned BuiltinID, CallExpr *Call) {\n // ...\n if (RT->getPointeeType().getAddressSpace() != LangAS::opencl_generic) {\n S.Diag(Call->getArg(0)->getBeginLoc(), diag::warn_opencl_generic_address_space_arg) << Call->getDirectCallee()->getNameInfo().getAsString() << Call->getArg(0)->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaOpenCL/to_addr_builtin.cl"]={"clang/test/SemaOpenCL/to_addr_builtin.cl:44:19: warning: passing non-generic address space pointer to to_global may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:52:20: warning: passing non-generic address space pointer to to_private may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:60:18: warning: passing non-generic address space pointer to to_local may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:67:20: warning: passing non-generic address space pointer to to_global may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:75:21: warning: passing non-generic address space pointer to to_private may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:83:19: warning: passing non-generic address space pointer to to_local may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:91:20: warning: passing non-generic address space pointer to to_global may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:98:21: warning: passing non-generic address space pointer to to_private may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:106:19: warning: passing non-generic address space pointer to to_local may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:114:35: warning: passing non-generic address space pointer to to_global may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:122:29: warning: passing non-generic address space pointer to to_global may cause dynamic conversion affecting performance [-Wconversion]"} | ["clang/test/SemaOpenCL/to_addr_builtin.cl"]={"clang/test/SemaOpenCL/to_addr_builtin.cl:44:19: warning: passing non-generic address space pointer to to_global may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:52:20: warning: passing non-generic address space pointer to to_private may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:60:18: warning: passing non-generic address space pointer to to_local may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:67:20: warning: passing non-generic address space pointer to to_global may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:75:21: warning: passing non-generic address space pointer to to_private may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:83:19: warning: passing non-generic address space pointer to to_local may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:91:20: warning: passing non-generic address space pointer to to_global may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:98:21: warning: passing non-generic address space pointer to to_private may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:106:19: warning: passing non-generic address space pointer to to_local may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:114:35: warning: passing non-generic address space pointer to to_global may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:122:29: warning: passing non-generic address space pointer to to_global may cause dynamic conversion affecting performance [-Wconversion]"} | ||
} | } | ||
}, | }, | ||
["warn_opencl_unsupported_core_feature"]={ | ["warn_opencl_unsupported_core_feature"]={ | ||
[ | [i]={"pedantic-core-features"}, | ||
[j]="pedantic-core-features", | |||
[ | |||
[b]="%0 is a core feature in %select{OpenCL C|C++ for OpenCL}1 version %2 but not supported on this target", | [b]="%0 is a core feature in %select{OpenCL C|C++ for OpenCL}1 version %2 but not supported on this target", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) is a core feature in (?:OpenCL C|C\\+\\+ for OpenCL) version (.*?) but not supported on this target", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpedantic\\-core\\-features[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"f0efc0075131",1619110439,"[OpenCL] Introduce new method for validating OpenCL target\n\nLanguage options are not available when ...","[OpenCL] Introduce new method for validating OpenCL target\n\nLanguage options are not available when a target is being created,\nthus, a new method is introduced. Also, some refactoring is done,\nsuch as removing OpenCL feature macros setting from TargetInfo.\n\nReviewed By: Anastasia\n\nDifferential Revision: https://reviews.llvm.org/D101087"}, | ||
[ | [g]={{"clang/lib/Basic/Targets.cpp",867,"/// validateOpenCLTarget - Check that OpenCL target has valid\n/// options setting based on OpenCL version.\nbool TargetInfo::validateOpenCLTarget(const LangOptions &Opts, DiagnosticsEngine &Diags) const {\n // ...\n auto diagnoseNotSupportedCore = [&](llvm::StringRef Name, auto... OptArgs) {\n if (OpenCLOptions::isOpenCLOptionCoreIn(Opts, OptArgs...) && !hasFeatureEnabled(OpenCLFeaturesMap, Name))\n Diags.Report(diag::warn_opencl_unsupported_core_feature) << Name << Opts.OpenCLCPlusPlus << Opts.getOpenCLVersionTuple().getAsString();"}}, | ||
[ | [k]={ | ||
["clang/test/Misc/r600.unsupported_core.cl"]={"warning: cl_khr_byte_addressable_store is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]","warning: cl_khr_global_int32_base_atomics is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]","warning: cl_khr_global_int32_extended_atomics is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]","warning: cl_khr_local_int32_base_atomics is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]","warning: cl_khr_local_int32_extended_atomics is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]","warning: cl_khr_3d_image_writes is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]"} | ["clang/test/Misc/r600.unsupported_core.cl"]={"warning: cl_khr_byte_addressable_store is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]","warning: cl_khr_global_int32_base_atomics is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]","warning: cl_khr_global_int32_extended_atomics is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]","warning: cl_khr_local_int32_base_atomics is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]","warning: cl_khr_local_int32_extended_atomics is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]","warning: cl_khr_3d_image_writes is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]"} | ||
} | } | ||
}, | }, | ||
["warn_operator_new_returns_null"]={ | ["warn_operator_new_returns_null"]={ | ||
[ | [i]={"new-returns-null"}, | ||
[j]="new-returns-null", | |||
[ | |||
[b]="%0 should not return a null pointer unless it is declared \'throw()\'%select{| or \'noexcept\'}1", | [b]="%0 should not return a null pointer unless it is declared \'throw()\'%select{| or \'noexcept\'}1", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) should not return a null pointer unless it is declared \'throw\\(\\)\'(?:| or \'noexcept\')", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnew\\-returns\\-null[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"2c6b449098dc",1389924573,"Issue a warning if a throwing operator new or operator new[] returns a null\npointer, since this invo...","Issue a warning if a throwing operator new or operator new[] returns a null\npointer, since this invokes undefined behavior. Based on a patch by Artyom\nSkrobov! Handling of dependent exception specifications and some additional\ntestcases by me.\n\nllvm-svn: 199452"}, | ||
[ | [g]={{r,12959,"void Sema::CheckReturnValExpr(Expr *RetValExp, QualType lhsType, SourceLocation ReturnLoc, bool isObjCMethod, const AttrVec *Attrs, const FunctionDecl *FD) {\n // ...\n // C++11 [basic.stc.dynamic.allocation]p4:\n // If an allocation function declared with a non-throwing\n // exception-specification fails to allocate storage, it shall return\n // a null pointer. Any other allocation function that fails to allocate\n // storage shall indicate failure only by throwing an exception [...]\n if (FD) {\n // ...\n if (Op == OO_New || Op == OO_Array_New) {\n // ...\n if (!Proto->isNothrow(/*ResultIfDependent*/ true) && CheckNonNullExpr(*this, RetValExp))\n Diag(ReturnLoc, diag::warn_operator_new_returns_null) << FD << getLangOpts().CPlusPlus11;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-new-overaligned.cpp"]={"clang/test/SemaCXX/warn-new-overaligned.cpp:46:5: warning: \'operator new\' should not return a null pointer unless it is declared \'throw()\' or \'noexcept\' [-Wnew-returns-null]","clang/test/SemaCXX/warn-new-overaligned.cpp:68:5: warning: \'operator new[]\' should not return a null pointer unless it is declared \'throw()\' or \'noexcept\' [-Wnew-returns-null]"} | ["clang/test/SemaCXX/warn-new-overaligned.cpp"]={"clang/test/SemaCXX/warn-new-overaligned.cpp:46:5: warning: \'operator new\' should not return a null pointer unless it is declared \'throw()\' or \'noexcept\' [-Wnew-returns-null]","clang/test/SemaCXX/warn-new-overaligned.cpp:68:5: warning: \'operator new[]\' should not return a null pointer unless it is declared \'throw()\' or \'noexcept\' [-Wnew-returns-null]"} | ||
} | } | ||
}, | }, | ||
["warn_option_invalid_ocl_version"]={ | ["warn_option_invalid_ocl_version"]={ | ||
[ | [i]={wb}, | ||
[j]=wb, | |||
[ | |||
[b]="%0 does not support the option \'%1\'", | [b]="%0 does not support the option \'%1\'", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) does not support the option \'(.*?)\'", | ||
[ | [e]=s, | ||
[ | [c]=Tb, | ||
[ | [f]={"b5f176e9bdbd",1467229172,"[OpenCL] Allow -cl-std and other standard -cl- options in driver\n\nAllow -cl-std and other standard -...","[OpenCL] Allow -cl-std and other standard -cl- options in driver\n\nAllow -cl-std and other standard -cl- options from cc1 to driver.\n\nAdded a test for the options moved.\n\nPatch by Aaron En Ye Shi.\n\nDifferential Revision: http://reviews.llvm.org/D21031\n\nllvm-svn: 274150"}, | ||
[ | [g]={{"clang/lib/Frontend/CompilerInvocation.cpp",550,"static bool FixupInvocation(CompilerInvocation &Invocation, DiagnosticsEngine &Diags, const ArgList &Args, InputKind IK) {\n // ...\n // -cl-strict-aliasing needs to emit diagnostic in the case where CL > 1.0.\n // This option should be deprecated for CL > 1.0 because\n // this option was added for compatibility with OpenCL 1.0.\n if (Args.getLastArg(OPT_cl_strict_aliasing) && (LangOpts.getOpenCLCompatibleVersion() > 100))\n Diags.Report(diag::warn_option_invalid_ocl_version) << LangOpts.getOpenCLVersionString() << Args.getLastArg(OPT_cl_strict_aliasing)->getAsString(Args);"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGenOpenCL/cl-strict-aliasing.cl"]={"warning: OpenCL C version 1.2 does not support the option \'-cl-strict-aliasing\'"} | ["clang/test/CodeGenOpenCL/cl-strict-aliasing.cl"]={"warning: OpenCL C version 1.2 does not support the option \'-cl-strict-aliasing\'"} | ||
} | } | ||
}, | }, | ||
["warn_os_log_format_narg"]={ | ["warn_os_log_format_narg"]={ | ||
[b]="os_log() \'%%n\' format specifier is not allowed", | [b]="os_log() \'%%n\' format specifier is not allowed", | ||
[ | [d]="(?:error|fatal error)\\: ", | ||
[ | [a]="os_log\\(\\) \'%n\' format specifier is not allowed", | ||
[ | [e]=s, | ||
[ | [c]=l, | ||
[ | [f]={"29034362ae87",1477328183,"Add support for __builtin_os_log_format[_buffer_size]\n\nThese new builtins support a mechanism for lo...","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"}, | ||
[ | [g]={{r,10838,"bool CheckPrintfHandler::HandlePrintfSpecifier(const analyze_printf::PrintfSpecifier &FS, const char *startSpecifier, unsigned specifierLen, const TargetInfo &Target) {\n // ...\n // %n is not allowed with os_log.\n if (FSType == Sema::FST_OSLog && CS.getKind() == ConversionSpecifier::nArg) {\n EmitFormatDiagnostic(S.PDiag(diag::warn_os_log_format_narg), getLocationOfByte(CS.getStart()),"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/format-strings-oslog.m"]={"clang/test/SemaObjC/format-strings-oslog.m:22:34: error: os_log() \'%n\' format specifier is not allowed"} | ["clang/test/SemaObjC/format-strings-oslog.m"]={"clang/test/SemaObjC/format-strings-oslog.m:22:34: error: os_log() \'%n\' format specifier is not allowed"} | ||
} | } | ||
}, | }, | ||
["warn_out_of_range_compare"]={ | ["warn_out_of_range_compare"]={ | ||
[ | [i]={n,o,p,ec,"tautological-constant-compare","tautological-constant-out-of-range-compare"}, | ||
[j]="tautological-constant-out-of-range-compare", | |||
[ | |||
[b]="result of comparison of %select{constant %0|true|false}1 with %select{expression of type %2|boolean expression}3 is always %4", | [b]="result of comparison of %select{constant %0|true|false}1 with %select{expression of type %2|boolean expression}3 is always %4", | ||
[ | [d]=h, | ||
[ | [a]="result of comparison of (?:constant (.*?)|true|false) with (?:expression of type (.*?)|boolean expression) is always (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtautological\\-constant\\-out\\-of\\-range\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"2f4e33aba231",1348169801,"Improvements to my patch in r164143 per\nRichard\'s comments. // rdar://12202422\n\nllvm-svn: 164316","Improvements to my patch in r164143 per\nRichard\'s comments. // rdar://12202422\n\nllvm-svn: 164316"}, | ||
[ | [g]={{r,13737,"static int classifyConstantValue(Expr *Constant) {\n // ...\n // diag::warn_out_of_range_compare and diag::warn_tautological_bool_compare."},{r,13878,"static bool CheckTautologicalComparison(Sema &S, BinaryOperator *E, Expr *Constant, Expr *Other, const llvm::APSInt &Value, bool RhsConstant) {\n // ...\n // FIXME: We use a somewhat different formatting for the in-range cases and\n // cases involving boolean values for historical reasons. We should pick a\n // consistent way of presenting these diagnostics.\n if (!InRange || Other->isKnownToHaveBooleanValue()) {\n S.DiagRuntimeBehavior(E->getOperatorLoc(), E, S.PDiag(!InRange ? diag::warn_out_of_range_compare : diag::warn_tautological_bool_compare) << OS.str() << classifyConstantValue(Constant) << OtherT << OtherIsBooleanDespiteType << *Result << E->getLHS()->getSourceRange() << E->getRHS()->getSourceRange());"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/outof-range-constant-compare.c"]={"clang/test/Sema/outof-range-constant-compare.c:10:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:12:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:14:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:16:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:18:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:20:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:23:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:25:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:27:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:29:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:31:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:33:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:35:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:37:11: warning: result of comparison of constant -1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:39:11: warning: result of comparison of constant -1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:41:11: warning: result of comparison of constant -1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:43:11: warning: result of comparison of constant -1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:45:11: warning: result of comparison of constant -1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:53:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:55:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:57:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:59:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:61:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:63:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:66:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:68:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:70:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:72:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:74:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:76:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:113:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'enum E\' is always false [-Wtautological-constant-out-of-range-compare]"} | ["clang/test/Sema/outof-range-constant-compare.c"]={"clang/test/Sema/outof-range-constant-compare.c:10:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:12:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:14:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:16:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:18:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:20:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:23:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:25:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:27:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:29:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:31:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:33:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:35:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:37:11: warning: result of comparison of constant -1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:39:11: warning: result of comparison of constant -1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:41:11: warning: result of comparison of constant -1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:43:11: warning: result of comparison of constant -1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:45:11: warning: result of comparison of constant -1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:53:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:55:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:57:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:59:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:61:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:63:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:66:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:68:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:70:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:72:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:74:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:76:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:113:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'enum E\' is always false [-Wtautological-constant-out-of-range-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_overaligned_type"]={ | ["warn_overaligned_type"]={ | ||
[ | [i]={"over-aligned"}, | ||
[j]="over-aligned", | |||
[ | |||
[b]="type %0 requires %1 bytes of alignment and the default allocator only guarantees %2 bytes", | [b]="type %0 requires %1 bytes of alignment and the default allocator only guarantees %2 bytes", | ||
[ | [d]=h, | ||
[ | [a]="type (.*?) requires (.*?) bytes of alignment and the default allocator only guarantees (.*?) bytes", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wover\\-aligned[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"411fc65b4566",1327439741,"Add a new warning, -Wover-aligned, which detects attempts to use the default\nallocator to construct ...","Add a new warning, -Wover-aligned, which detects attempts to use the default\nallocator to construct an object which declares more alignment than the default\nallocator actually provides. Fixes PR9527!\n\nllvm-svn: 148857"}, | ||
[ | [g]={{Sb,2364,"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 (OperatorNew) {\n // ...\n // Warn if the type is over-aligned and is being allocated by (unaligned)\n // global operator new.\n if (PlacementArgs.empty() && !PassAlignment && (OperatorNew->isImplicit() || (OperatorNew->getBeginLoc().isValid() && getSourceManager().isInSystemHeader(OperatorNew->getBeginLoc())))) {\n if (Alignment > NewAlignment)\n Diag(StartLoc, diag::warn_overaligned_type) << AllocType << unsigned(Alignment / Context.getCharWidth()) << unsigned(NewAlignment / Context.getCharWidth());"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-new-overaligned.cpp"]={"clang/test/SemaCXX/warn-new-overaligned.cpp:16:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]","clang/test/SemaCXX/warn-new-overaligned.cpp:17:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]","clang/test/SemaCXX/warn-new-overaligned.cpp:33:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]","clang/test/SemaCXX/warn-new-overaligned.cpp:34:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]","clang/test/SemaCXX/warn-new-overaligned.cpp:56:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]","clang/test/SemaCXX/warn-new-overaligned.cpp:77:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]"} | ["clang/test/SemaCXX/warn-new-overaligned.cpp"]={"clang/test/SemaCXX/warn-new-overaligned.cpp:16:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]","clang/test/SemaCXX/warn-new-overaligned.cpp:17:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]","clang/test/SemaCXX/warn-new-overaligned.cpp:33:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]","clang/test/SemaCXX/warn-new-overaligned.cpp:34:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]","clang/test/SemaCXX/warn-new-overaligned.cpp:56:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]","clang/test/SemaCXX/warn-new-overaligned.cpp:77:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]"} | ||
} | } | ||
}, | }, | ||
["warn_overloaded_shift_in_comparison"]={ | ["warn_overloaded_shift_in_comparison"]={ | ||
[ | [i]={n,o,"overloaded-shift-op-parentheses",yc}, | ||
[j]="overloaded-shift-op-parentheses", | |||
[ | |||
[b]="overloaded operator %select{>>|<<}0 has higher precedence than comparison operator", | [b]="overloaded operator %select{>>|<<}0 has higher precedence than comparison operator", | ||
[ | [d]=h, | ||
[ | [a]="overloaded operator (?:\\>\\>|\\<\\<) has higher precedence than comparison operator", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Woverloaded\\-shift\\-op\\-parentheses[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"fe042e6aab26",1366164765,"Add warning group -Woverloaded-shift-op-parentheses to -Wparentheses. This\nwill fire on code such a...","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"}, | ||
[ | [g]={{u,15870,"static void DiagnoseShiftCompare(Sema &S, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n S.Diag(OpLoc, diag::warn_overloaded_shift_in_comparison) << LHSExpr->getSourceRange() << RHSExpr->getSourceRange() << (Kind == OO_LessLess);"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/cxx2a-spaceship.cpp"]={"clang/test/Parser/cxx2a-spaceship.cpp:13:21: warning: overloaded operator << has higher precedence than comparison operator [-Woverloaded-shift-op-parentheses]","clang/test/Parser/cxx2a-spaceship.cpp:17:21: warning: overloaded operator << has higher precedence than comparison operator [-Woverloaded-shift-op-parentheses]"} | ["clang/test/Parser/cxx2a-spaceship.cpp"]={"clang/test/Parser/cxx2a-spaceship.cpp:13:21: warning: overloaded operator << has higher precedence than comparison operator [-Woverloaded-shift-op-parentheses]","clang/test/Parser/cxx2a-spaceship.cpp:17:21: warning: overloaded operator << has higher precedence than comparison operator [-Woverloaded-shift-op-parentheses]"} | ||
} | } | ||
}, | }, | ||
["warn_overloaded_virtual"]={ | ["warn_overloaded_virtual"]={ | ||
[ | [i]={n,o,p,"overloaded-virtual"}, | ||
[j]="overloaded-virtual", | |||
[ | |||
[b]="%q0 hides overloaded virtual %select{function|functions}1", | [b]="%q0 hides overloaded virtual %select{function|functions}1", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) hides overloaded virtual (?:function|functions)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Woverloaded\\-virtual[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"7272d9cf36cd",1296756075,"Implement -Woverloaded-virtual.\n\nThe difference with gcc is that it warns if you overload virtual me...","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]={{T,10284,"/// Diagnose methods which overload virtual methods in a base class\n/// without overriding any.\nvoid Sema::DiagnoseHiddenVirtualMethods(CXXMethodDecl *MD) {\n // ...\n if (Diags.isIgnored(diag::warn_overloaded_virtual, MD->getLocation()))"},{T,10290,"/// Diagnose methods which overload virtual methods in a base class\n/// without overriding any.\nvoid Sema::DiagnoseHiddenVirtualMethods(CXXMethodDecl *MD) {\n // ...\n if (!OverloadedMethods.empty()) {\n Diag(MD->getLocation(), diag::warn_overloaded_virtual) << MD << (OverloadedMethods.size() > 1);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-overloaded-virtual.cpp"]={"clang/test/SemaCXX/warn-overloaded-virtual.cpp:9:8: warning: \'S1::foo\' hides overloaded virtual functions [-Woverloaded-virtual]","clang/test/SemaCXX/warn-overloaded-virtual.cpp:21:17: warning: \'MS1::foo\' hides overloaded virtual functions [-Woverloaded-virtual]","clang/test/SemaCXX/warn-overloaded-virtual.cpp:137:17: warning: \'(anonymous namespace)::B::foo\' hides overloaded virtual functions [-Woverloaded-virtual]"} | ["clang/test/SemaCXX/warn-overloaded-virtual.cpp"]={"clang/test/SemaCXX/warn-overloaded-virtual.cpp:9:8: warning: \'S1::foo\' hides overloaded virtual functions [-Woverloaded-virtual]","clang/test/SemaCXX/warn-overloaded-virtual.cpp:21:17: warning: \'MS1::foo\' hides overloaded virtual functions [-Woverloaded-virtual]","clang/test/SemaCXX/warn-overloaded-virtual.cpp:137:17: warning: \'(anonymous namespace)::B::foo\' hides overloaded virtual functions [-Woverloaded-virtual]"} | ||
} | } | ||
}, | }, | ||
["warn_overriding_method_missing_noescape"]={ | ["warn_overriding_method_missing_noescape"]={ | ||
[ | [i]={"missing-noescape"}, | ||
[j]="missing-noescape", | |||
[ | |||
[b]="parameter of overriding method should be annotated with __attribute__((noescape))", | [b]="parameter of overriding method should be annotated with __attribute__((noescape))", | ||
[ | [d]=h, | ||
[ | [a]="parameter of overriding method should be annotated with __attribute__\\(\\(noescape\\)\\)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wmissing\\-noescape[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"fc587e6a5707",1505888571,"Add support for attribute \'noescape\'.\n\nThe attribute informs the compiler that the annotated pointer...","Add support for attribute \'noescape\'.\n\nThe attribute informs the compiler that the annotated pointer parameter\nof a function cannot escape and enables IRGen to attach attribute\n\'nocapture\' to parameters that are annotated with the attribute. That is\nthe only optimization that currently takes advantage of \'noescape\', but\nthere are other optimizations that will be added later that improves\nIRGen for ObjC blocks.\n\nrdar://problem/19886775\n\nDifferential Revision: https://reviews.llvm.org/D32520\n\nllvm-svn: 313720"}, | ||
[ | [g]={{T,17983,"bool Sema::CheckOverridingFunctionAttributes(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n if (OldFT->hasExtParameterInfos()) {\n for (unsigned I = 0, E = OldFT->getNumParams(); I != E; ++I)\n // A parameter of the overriding method should be annotated with noescape\n // if the corresponding parameter of the overridden method is annotated.\n if (OldFT->getExtParameterInfo(I).isNoEscape() && !NewFT->getExtParameterInfo(I).isNoEscape()) {\n Diag(New->getParamDecl(I)->getLocation(), diag::warn_overriding_method_missing_noescape);"},{I,118,"/// Issue a warning if the parameter of the overridden method is non-escaping\n/// but the parameter of the overriding method is not.\nstatic bool diagnoseNoescape(const ParmVarDecl *NewD, const ParmVarDecl *OldD, Sema &S) {\n if (OldD->hasAttr<NoEscapeAttr>() && !NewD->hasAttr<NoEscapeAttr>()) {\n S.Diag(NewD->getLocation(), diag::warn_overriding_method_missing_noescape);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjCXX/noescape.mm"]={"clang/test/SemaObjCXX/noescape.mm:42:16: warning: parameter of overriding method should be annotated with __attribute__((noescape)) [-Wmissing-noescape]","clang/test/SemaObjCXX/noescape.mm:69:19: warning: parameter of overriding method should be annotated with __attribute__((noescape)) [-Wmissing-noescape]","clang/test/SemaObjCXX/noescape.mm:123:19: warning: parameter of overriding method should be annotated with __attribute__((noescape)) [-Wmissing-noescape]","clang/test/SemaObjCXX/noescape.mm:133:19: warning: parameter of overriding method should be annotated with __attribute__((noescape)) [-Wmissing-noescape]"} | ["clang/test/SemaObjCXX/noescape.mm"]={"clang/test/SemaObjCXX/noescape.mm:42:16: warning: parameter of overriding method should be annotated with __attribute__((noescape)) [-Wmissing-noescape]","clang/test/SemaObjCXX/noescape.mm:69:19: warning: parameter of overriding method should be annotated with __attribute__((noescape)) [-Wmissing-noescape]","clang/test/SemaObjCXX/noescape.mm:123:19: warning: parameter of overriding method should be annotated with __attribute__((noescape)) [-Wmissing-noescape]","clang/test/SemaObjCXX/noescape.mm:133:19: warning: parameter of overriding method should be annotated with __attribute__((noescape)) [-Wmissing-noescape]"} | ||
} | } | ||
}, | }, | ||
["warn_padded_struct_anon_field"]={ | ["warn_padded_struct_anon_field"]={ | ||
[ | [i]={nc}, | ||
[j]=nc, | |||
[ | |||
[b]="padding %select{struct|interface|class}0 %1 with %2 %select{byte|bit}3%s2 to align anonymous bit-field", | [b]="padding %select{struct|interface|class}0 %1 with %2 %select{byte|bit}3%s2 to align anonymous bit-field", | ||
[ | [d]=h, | ||
[ | [a]="padding (?:struct|interface|class) (.*?) with (.*?) (?:byte|bit)(.*?) to align anonymous bit\\-field", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpadded[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"ca0d0cd3b993",1285165944,"Implement -Wpadded and -Wpacked.\n\n-Wpadded warns when undesired padding is introduced in a struct. (...","Implement -Wpadded and -Wpacked.\n\n-Wpadded warns when undesired padding is introduced in a struct. (rdar://7469556)\n-Wpacked warns if a struct is given the packed attribute, but the packed attribute has no effect\n on the layout or the size of the struct. Such structs may be mis-aligned for little benefit.\n\nThe warnings are emitted at the point where layout is calculated, that is at RecordLayoutBuilder.\nTo avoid calculating the layouts of all structs regardless of whether they are needed or not,\nI let the layouts be lazily constructed when needed. This has the disadvantage that the above warnings\nwill be emitted only when they are used for IR gen, and not e.g with -fsyntax-only:\n\n$ cat t.c\nstruct S {\n char c;\n int i;\n};\nvoid f(struct S* s) {}\n\n$ clang -fsyntax-only -Wpadded t.c\n$ clang -c -Wpadded t.c -o t.o\nt.c:3:7: warning: padding struct \'struct S\' with 3 bytes to align \'i\' [-Wpadded]\n int i;\n ^\n1 warning generated.\n\nThis is a good tradeoff between providing the warnings and not calculating layouts for all\nstructs in case the user has enabled a couple of rarely used warnings.\n\nllvm-svn: 114544"}, | ||
[ | [g]={{Zb,2309,"void ItaniumRecordLayoutBuilder::CheckFieldPadding(uint64_t Offset, uint64_t UnpaddedOffset, uint64_t UnpackedOffset, unsigned UnpackedAlign, bool isPacked, const FieldDecl *D) {\n // ...\n // Warn if padding was introduced to the struct/class.\n if (!IsUnion && Offset > UnpaddedOffset) {\n // ...\n if (D->getIdentifier())\n // ...\n else\n Diag(D->getLocation(), diag::warn_padded_struct_anon_field) << getPaddingDiagFromTagKind(D->getParent()->getTagKind()) << Context.getTypeDeclType(D->getParent()) << PadSize << (InBits ? 1 : 0); // (byte|bit)"}} | ||
}, | }, | ||
["warn_padded_struct_field"]={ | ["warn_padded_struct_field"]={ | ||
[ | [i]={nc}, | ||
[j]=nc, | |||
[ | |||
[b]="padding %select{struct|interface|class}0 %1 with %2 %select{byte|bit}3%s2 to align %4", | [b]="padding %select{struct|interface|class}0 %1 with %2 %select{byte|bit}3%s2 to align %4", | ||
[ | [d]=h, | ||
[ | [a]="padding (?:struct|interface|class) (.*?) with (.*?) (?:byte|bit)(.*?) to align (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpadded[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"ca0d0cd3b993",1285165944,"Implement -Wpadded and -Wpacked.\n\n-Wpadded warns when undesired padding is introduced in a struct. (...","Implement -Wpadded and -Wpacked.\n\n-Wpadded warns when undesired padding is introduced in a struct. (rdar://7469556)\n-Wpacked warns if a struct is given the packed attribute, but the packed attribute has no effect\n on the layout or the size of the struct. Such structs may be mis-aligned for little benefit.\n\nThe warnings are emitted at the point where layout is calculated, that is at RecordLayoutBuilder.\nTo avoid calculating the layouts of all structs regardless of whether they are needed or not,\nI let the layouts be lazily constructed when needed. This has the disadvantage that the above warnings\nwill be emitted only when they are used for IR gen, and not e.g with -fsyntax-only:\n\n$ cat t.c\nstruct S {\n char c;\n int i;\n};\nvoid f(struct S* s) {}\n\n$ clang -fsyntax-only -Wpadded t.c\n$ clang -c -Wpadded t.c -o t.o\nt.c:3:7: warning: padding struct \'struct S\' with 3 bytes to align \'i\' [-Wpadded]\n int i;\n ^\n1 warning generated.\n\nThis is a good tradeoff between providing the warnings and not calculating layouts for all\nstructs in case the user has enabled a couple of rarely used warnings.\n\nllvm-svn: 114544"}, | ||
[ | [g]={{Zb,2302,"void ItaniumRecordLayoutBuilder::CheckFieldPadding(uint64_t Offset, uint64_t UnpaddedOffset, uint64_t UnpackedOffset, unsigned UnpackedAlign, bool isPacked, const FieldDecl *D) {\n // ...\n // Warn if padding was introduced to the struct/class.\n if (!IsUnion && Offset > UnpaddedOffset) {\n // ...\n if (D->getIdentifier())\n Diag(D->getLocation(), diag::warn_padded_struct_field) << getPaddingDiagFromTagKind(D->getParent()->getTagKind()) << Context.getTypeDeclType(D->getParent()) << PadSize << (InBits ? 1 : 0) // (byte|bit)"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp"]={"clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:11:9: warning: padding struct \'S1\' with 1 byte to align \'s\' [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:12:8: warning: padding struct \'S1\' with 4 bytes to align \'l\' [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:35:5: warning: padding struct \'S5\' with 3 bytes to align \'u\' [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:52:7: warning: padding struct \'S8\' with 3 bytes to align \'i\' [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:73:8: warning: padding struct \'S12\' with 7 bits to align \'c\' [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:147:17: warning: padding struct \'S26\' with 7 bits to align \'b\' [-Wpadded]"} | ["clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp"]={"clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:11:9: warning: padding struct \'S1\' with 1 byte to align \'s\' [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:12:8: warning: padding struct \'S1\' with 4 bytes to align \'l\' [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:35:5: warning: padding struct \'S5\' with 3 bytes to align \'u\' [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:52:7: warning: padding struct \'S8\' with 3 bytes to align \'i\' [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:73:8: warning: padding struct \'S12\' with 7 bits to align \'c\' [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:147:17: warning: padding struct \'S26\' with 7 bits to align \'b\' [-Wpadded]"} | ||
} | } | ||
}, | }, | ||
["warn_padded_struct_size"]={ | ["warn_padded_struct_size"]={ | ||
[ | [i]={nc}, | ||
[j]=nc, | |||
[ | |||
[b]="padding size of %0 with %1 %select{byte|bit}2%s1 to alignment boundary", | [b]="padding size of %0 with %1 %select{byte|bit}2%s1 to alignment boundary", | ||
[ | [d]=h, | ||
[ | [a]="padding size of (.*?) with (.*?) (?:byte|bit)(.*?) to alignment boundary", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpadded[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"ca0d0cd3b993",1285165944,"Implement -Wpadded and -Wpacked.\n\n-Wpadded warns when undesired padding is introduced in a struct. (...","Implement -Wpadded and -Wpacked.\n\n-Wpadded warns when undesired padding is introduced in a struct. (rdar://7469556)\n-Wpacked warns if a struct is given the packed attribute, but the packed attribute has no effect\n on the layout or the size of the struct. Such structs may be mis-aligned for little benefit.\n\nThe warnings are emitted at the point where layout is calculated, that is at RecordLayoutBuilder.\nTo avoid calculating the layouts of all structs regardless of whether they are needed or not,\nI let the layouts be lazily constructed when needed. This has the disadvantage that the above warnings\nwill be emitted only when they are used for IR gen, and not e.g with -fsyntax-only:\n\n$ cat t.c\nstruct S {\n char c;\n int i;\n};\nvoid f(struct S* s) {}\n\n$ clang -fsyntax-only -Wpadded t.c\n$ clang -c -Wpadded t.c -o t.o\nt.c:3:7: warning: padding struct \'struct S\' with 3 bytes to align \'i\' [-Wpadded]\n int i;\n ^\n1 warning generated.\n\nThis is a good tradeoff between providing the warnings and not calculating layouts for all\nstructs in case the user has enabled a couple of rarely used warnings.\n\nllvm-svn: 114544"}, | ||
[ | [g]={{Zb,2196,"void ItaniumRecordLayoutBuilder::FinishLayout(const NamedDecl *D) {\n // ...\n if (const RecordDecl *RD = dyn_cast<RecordDecl>(D)) {\n // Warn if padding was introduced to the struct/class/union.\n if (getSizeInBits() > UnpaddedSize) {\n // ...\n Diag(RD->getLocation(), diag::warn_padded_struct_size) << Context.getTypeDeclType(RD) << PadSize << (InBits ? 1 : 0); // (byte|bit)"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp"]={"clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:15:8: warning: padding size of \'S2\' with 3 bytes to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:38:8: warning: padding size of \'S6\' with 30 bits to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:42:8: warning: padding size of \'S7\' with 7 bytes to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:76:8: warning: padding size of \'S13\' with 6 bits to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:90:8: warning: padding size of \'S16\' with 2 bytes to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:99:8: warning: padding size of \'S18\' with 2 bytes to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:114:8: warning: padding size of \'S21\' with 4 bits to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:124:8: warning: padding size of \'S23\' with 4 bits to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:140:8: warning: padding size of \'S25\' with 7 bits to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:150:8: warning: padding size of \'S27\' with 7 bits to alignment boundary [-Wpadded]"} | ["clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp"]={"clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:15:8: warning: padding size of \'S2\' with 3 bytes to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:38:8: warning: padding size of \'S6\' with 30 bits to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:42:8: warning: padding size of \'S7\' with 7 bytes to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:76:8: warning: padding size of \'S13\' with 6 bits to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:90:8: warning: padding size of \'S16\' with 2 bytes to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:99:8: warning: padding size of \'S18\' with 2 bytes to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:114:8: warning: padding size of \'S21\' with 4 bits to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:124:8: warning: padding size of \'S23\' with 4 bits to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:140:8: warning: padding size of \'S25\' with 7 bits to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:150:8: warning: padding size of \'S27\' with 7 bits to alignment boundary [-Wpadded]"} | ||
} | } | ||
}, | }, | ||
["warn_param_mismatched_alignment"]={ | ["warn_param_mismatched_alignment"]={ | ||
[ | [i]={"align-mismatch"}, | ||
[j]="align-mismatch", | |||
[ | |||
[b]="passing %0-byte aligned argument to %1-byte aligned parameter %2%select{| of %4}3 may result in an unaligned pointer access", | [b]="passing %0-byte aligned argument to %1-byte aligned parameter %2%select{| of %4}3 may result in an unaligned pointer access", | ||
[ | [d]=h, | ||
[ | [a]="passing (.*?)\\-byte aligned argument to (.*?)\\-byte aligned parameter (.*?)(?:| of (.*?)) may result in an unaligned pointer access", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Walign\\-mismatch[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to ...","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"}, | ||
[ | [g]={{r,6643,"/// Warn if a pointer or reference argument passed to a function points to an\n/// object that is less aligned than the parameter. This can happen when\n/// creating a typedef with a lower alignment than the original type and then\n/// calling functions defined in terms of the original type.\nvoid Sema::CheckArgAlignment(SourceLocation Loc, NamedDecl *FDecl, StringRef ParamName, QualType ArgTy, QualType ParamTy) {\n // ...\n // If the argument is less aligned than the parameter, there is a\n // potential alignment issue.\n if (ArgAlign < ParamAlign)\n Diag(Loc, diag::warn_param_mismatched_alignment) << (int)ArgAlign.getQuantity() << (int)ParamAlign.getQuantity() << ParamName << (FDecl != nullptr) << FDecl;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/aix-attr-aligned-vector-warn.c"]={"clang/test/Sema/aix-attr-aligned-vector-warn.c:14:17: warning: passing 8-byte aligned argument to 16-byte aligned parameter 1 of \'escape\' may result in an unaligned pointer access [-Walign-mismatch]"} | ["clang/test/Sema/aix-attr-aligned-vector-warn.c"]={"clang/test/Sema/aix-attr-aligned-vector-warn.c:14:17: warning: passing 8-byte aligned argument to 16-byte aligned parameter 1 of \'escape\' may result in an unaligned pointer access [-Walign-mismatch]"} | ||
} | } | ||
}, | }, | ||
["warn_param_return_typestate_mismatch"]={ | ["warn_param_return_typestate_mismatch"]={ | ||
[ | [i]={yb}, | ||
[j]=yb, | |||
[ | |||
[b]="parameter \'%0\' not in expected state when the function returns: expected \'%1\', observed \'%2\'", | [b]="parameter \'%0\' not in expected state when the function returns: expected \'%1\', observed \'%2\'", | ||
[ | [d]=h, | ||
[ | [a]="parameter \'(.*?)\' not in expected state when the function returns\\: expected \'(.*?)\', observed \'(.*?)\'", | ||
[ | [e]=jc, | ||
[ | [c]=l, | ||
[ | [f]={"36ea1dd4fc5e",1382050384,"Consumed Analysis: Allow parameters that are passed by non-const reference\nto be treated as return v...","Consumed Analysis: Allow parameters that are passed by non-const reference\nto be treated as return values, and marked with the \"returned_typestate\"\nattribute. Patch by chris.wailes@gmail.com; reviewed by delesley@google.com.\n\nllvm-svn: 192932"}, | ||
[ | [g]={{y,2104,"class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {\n // ...\n void warnParamReturnTypestateMismatch(SourceLocation Loc, StringRef VariableName, StringRef ExpectedState, StringRef ObservedState) override {\n PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_param_return_typestate_mismatch) << VariableName << ExpectedState << ObservedState);"}}, | ||
[ | [k]={ | ||
[ | [Tc]={"clang/test/SemaCXX/warn-consumed-analysis.cpp:425:6: warning: parameter \'Param\' not in expected state when the function returns: expected \'unconsumed\', observed \'consumed\' [-Wconsumed]","clang/test/SemaCXX/warn-consumed-analysis.cpp:429:5: warning: parameter \'Param\' not in expected state when the function returns: expected \'unconsumed\', observed \'consumed\' [-Wconsumed]"} | ||
} | } | ||
}, | }, | ||
["warn_param_typestate_mismatch"]={ | ["warn_param_typestate_mismatch"]={ | ||
[ | [i]={yb}, | ||
[j]=yb, | |||
[ | |||
[b]="argument not in expected state; expected \'%0\', observed \'%1\'", | [b]="argument not in expected state; expected \'%0\', observed \'%1\'", | ||
[ | [d]=h, | ||
[ | [a]="argument not in expected state; expected \'(.*?)\', observed \'(.*?)\'", | ||
[ | [e]=jc, | ||
[ | [c]=l, | ||
[ | [f]={"6939177ceab8",1382052233,"Consumed analysis: Add param_typestate attribute, which specifies that\nfunction parameters must be i...","Consumed analysis: Add param_typestate attribute, which specifies that\nfunction parameters must be in a particular state. Patch by\nchris.wailes@gmail.com. Reviewed by delesley@google.com.\n\nllvm-svn: 192934"}, | ||
[ | [g]={{y,2114,"class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {\n // ...\n void warnParamTypestateMismatch(SourceLocation Loc, StringRef ExpectedState, StringRef ObservedState) override {\n PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_param_typestate_mismatch) << ExpectedState << ObservedState);"}}, | ||
[ | [k]={ | ||
[ | [Tc]={"clang/test/SemaCXX/warn-consumed-analysis.cpp:458:34: warning: argument not in expected state; expected \'consumed\', observed \'unconsumed\' [-Wconsumed]","clang/test/SemaCXX/warn-consumed-analysis.cpp:476:15: warning: argument not in expected state; expected \'unconsumed\', observed \'consumed\' [-Wconsumed]","clang/test/SemaCXX/warn-consumed-analysis.cpp:477:32: warning: argument not in expected state; expected \'unconsumed\', observed \'consumed\' [-Wconsumed]","clang/test/SemaCXX/warn-consumed-analysis.cpp:479:22: warning: argument not in expected state; expected \'unconsumed\', observed \'consumed\' [-Wconsumed]","clang/test/SemaCXX/warn-consumed-analysis.cpp:480:9: warning: argument not in expected state; expected \'unconsumed\', observed \'consumed\' [-Wconsumed]","clang/test/SemaCXX/warn-consumed-analysis.cpp:481:9: warning: argument not in expected state; expected \'unconsumed\', observed \'consumed\' [-Wconsumed]"} | ||
} | } | ||
}, | }, | ||
["warn_parameter_size"]={ | ["warn_parameter_size"]={ | ||
[ | [i]={"large-by-value-copy"}, | ||
[j]="large-by-value-copy", | |||
[ | |||
[b]="%0 is a large (%1 bytes) pass-by-value argument; pass it by reference instead ?", | [b]="%0 is a large (%1 bytes) pass-by-value argument; pass it by reference instead ?", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) is a large \\((.*?) bytes\\) pass\\-by\\-value argument; pass it by reference instead \\?", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wlarge\\-by\\-value\\-copy[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"af84ec0a9612",1290035514,"Introduce option -Wargument-larger-than[=N] which warns about function definitions if they take by-v...","Introduce option -Wargument-larger-than[=N] which warns about function definitions if they take by-value\nor return by-value any POD that is larger than some threshold (default is 64 bytes).\n\nImplements rdar://8548050.\n\nllvm-svn: 119583"}, | ||
[ | [g]={{B,14881,"void Sema::DiagnoseSizeOfParametersAndReturnValue(ArrayRef<ParmVarDecl *> Parameters, QualType ReturnTy, NamedDecl *D) {\n // ...\n // Warn if any parameter is pass-by-value and larger than the specified\n // threshold.\n for (const ParmVarDecl *Parameter : Parameters) {\n // ...\n if (Size > LangOpts.NumLargeByValueCopy)\n Diag(Parameter->getLocation(), diag::warn_parameter_size) << Parameter << Size;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-large-by-value-copy.cpp"]={"clang/test/SemaCXX/warn-large-by-value-copy.cpp:16:16: warning: \'s\' is a large (101 bytes) pass-by-value argument; pass it by reference instead ? [-Wlarge-by-value-copy]","clang/test/SemaCXX/warn-large-by-value-copy.cpp:19:29: warning: \'\' is a large (101 bytes) pass-by-value argument; pass it by reference instead ? [-Wlarge-by-value-copy]","clang/test/SemaCXX/warn-large-by-value-copy.cpp:24:35: warning: \'\' is a large (101 bytes) pass-by-value argument; pass it by reference instead ? [-Wlarge-by-value-copy]","clang/test/SemaCXX/warn-large-by-value-copy.cpp:43:18: warning: \'ts\' is a large (300 bytes) pass-by-value argument; pass it by reference instead ? [-Wlarge-by-value-copy]"} | ["clang/test/SemaCXX/warn-large-by-value-copy.cpp"]={"clang/test/SemaCXX/warn-large-by-value-copy.cpp:16:16: warning: \'s\' is a large (101 bytes) pass-by-value argument; pass it by reference instead ? [-Wlarge-by-value-copy]","clang/test/SemaCXX/warn-large-by-value-copy.cpp:19:29: warning: \'\' is a large (101 bytes) pass-by-value argument; pass it by reference instead ? [-Wlarge-by-value-copy]","clang/test/SemaCXX/warn-large-by-value-copy.cpp:24:35: warning: \'\' is a large (101 bytes) pass-by-value argument; pass it by reference instead ? [-Wlarge-by-value-copy]","clang/test/SemaCXX/warn-large-by-value-copy.cpp:43:18: warning: \'ts\' is a large (300 bytes) pass-by-value argument; pass it by reference instead ? [-Wlarge-by-value-copy]"} | ||
} | } | ||
}, | }, | ||
["warn_parens_disambiguated_as_function_declaration"]={ | ["warn_parens_disambiguated_as_function_declaration"]={ | ||
[ | [i]={"vexing-parse"}, | ||
[j]="vexing-parse", | |||
[ | |||
[b]="parentheses were disambiguated as a function declaration", | [b]="parentheses were disambiguated as a function declaration", | ||
[ | [d]=h, | ||
[ | [a]="parentheses were disambiguated as a function declaration", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wvexing\\-parse[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"943c44045551",1343683852,"Improvements to vexing-parse warnings. Make the no-parameters case more\naccurate by asking the parse...","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]={{L,3860,"/// 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 S.Diag(DeclType.Loc, FTI.NumParams ? diag::warn_parens_disambiguated_as_function_declaration : diag::warn_empty_parens_are_function_decl) << ParenRange;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/dcl_ambig_res.cpp"]={"clang/test/SemaCXX/dcl_ambig_res.cpp:16:6: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]","clang/test/SemaCXX/dcl_ambig_res.cpp:18:7: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]","clang/test/SemaCXX/dcl_ambig_res.cpp:73:8: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]"} | ["clang/test/SemaCXX/dcl_ambig_res.cpp"]={"clang/test/SemaCXX/dcl_ambig_res.cpp:16:6: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]","clang/test/SemaCXX/dcl_ambig_res.cpp:18:7: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]","clang/test/SemaCXX/dcl_ambig_res.cpp:73:8: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]"} | ||
} | } | ||
}, | }, | ||
["warn_parens_disambiguated_as_variable_declaration"]={ | ["warn_parens_disambiguated_as_variable_declaration"]={ | ||
[ | [i]={"vexing-parse"}, | ||
[j]="vexing-parse", | |||
[ | |||
[b]="parentheses were disambiguated as redundant parentheses around declaration of variable named %0", | [b]="parentheses were disambiguated as redundant parentheses around declaration of variable named %0", | ||
[ | [d]=h, | ||
[ | [a]="parentheses were disambiguated as redundant parentheses around declaration of variable named (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wvexing\\-parse[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"ac63d63543ca",1506729445,"Add a \"vexing parse\" warning for ambiguity between a variable declaration and a\nfunction-style cast....","Add a \"vexing parse\" warning for ambiguity between a variable declaration and a\nfunction-style cast.\n\nThis fires for cases such as\n\n T(x);\n\n... where \'x\' was previously declared and T is a type. This construct declares\na variable named \'x\' rather than the (probably expected) interpretation of a\nfunction-style cast of \'x\' to T.\n\nllvm-svn: 314570"}, | ||
[ | [g]={{L,4022,"/// Produce an appropriate diagnostic for a declarator with top-level\n/// parentheses.\nstatic void warnAboutRedundantParens(Sema &S, Declarator &D, QualType T) {\n // ...\n S.Diag(Paren.Loc, diag::warn_parens_disambiguated_as_variable_declaration) << ParenRange << D.getIdentifier();"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/cxx0x-condition.cpp"]={"clang/test/Parser/cxx0x-condition.cpp:17:8: warning: parentheses were disambiguated as redundant parentheses around declaration of variable named \'a\' [-Wvexing-parse]","clang/test/Parser/cxx0x-condition.cpp:21:8: warning: parentheses were disambiguated as redundant parentheses around declaration of variable named \'n\' [-Wvexing-parse]"} | ["clang/test/Parser/cxx0x-condition.cpp"]={"clang/test/Parser/cxx0x-condition.cpp:17:8: warning: parentheses were disambiguated as redundant parentheses around declaration of variable named \'a\' [-Wvexing-parse]","clang/test/Parser/cxx0x-condition.cpp:21:8: warning: parentheses were disambiguated as redundant parentheses around declaration of variable named \'n\' [-Wvexing-parse]"} | ||
} | } | ||
}, | }, | ||
["warn_pass_class_arg_to_vararg"]={ | ["warn_pass_class_arg_to_vararg"]={ | ||
[ | [i]={Wc}, | ||
[j]=Wc, | |||
[ | |||
[b]="passing object of class type %0 through variadic %select{function|block|method|constructor}1%select{|; did you mean to call \'%3\'?}2", | [b]="passing object of class type %0 through variadic %select{function|block|method|constructor}1%select{|; did you mean to call \'%3\'?}2", | ||
[ | [d]=h, | ||
[ | [a]="passing object of class type (.*?) through variadic (?:function|block|method|constructor)(?:|; did you mean to call \'(.*?)\'\\?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wclass\\-varargs[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"2868a736f88e",1393551399,"Add a -Wclass-varargs to warn on objects of any class type being passed through an ellipsis. Since C...","Add a -Wclass-varargs to warn on objects of any class type being passed through an ellipsis. Since C++11 relaxed the rules on this, we allow a lot more bad code through silently, such as:\n\n const char *format = \"%s\";\n std::experimental::string_view view = \"foo\";\n printf(format, view);\n\nIn this case, not only warn about a class type being used here, but also suggest that calling c_str() might be a good idea.\n\nllvm-svn: 202461"}, | ||
[ | [g]={{u,1005,"void Sema::checkVariadicArgument(const Expr *E, VariadicCallType CT) {\n // ...\n case VAK_Valid:\n if (Ty->isRecordType()) {\n // ...\n DiagRuntimeBehavior(E->getBeginLoc(), nullptr, PDiag(diag::warn_pass_class_arg_to_vararg) << Ty << CT << hasCStrMethod(E) << \".c_str()\");"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/vararg-class.cpp"]={"clang/test/SemaCXX/vararg-class.cpp:15:5: warning: passing object of class type \'A\' through variadic function [-Wclass-varargs]","clang/test/SemaCXX/vararg-class.cpp:17:5: warning: passing object of class type \'C\' through variadic function; did you mean to call \'.c_str()\'? [-Wclass-varargs]","clang/test/SemaCXX/vararg-class.cpp:18:5: warning: passing object of class type \'D\' through variadic function; did you mean to call \'.c_str()\'? [-Wclass-varargs]","clang/test/SemaCXX/vararg-class.cpp:19:5: warning: passing object of class type \'E\' through variadic function [-Wclass-varargs]","clang/test/SemaCXX/vararg-class.cpp:20:5: warning: passing object of class type \'F\' through variadic function; did you mean to call \'.c_str()\'? [-Wclass-varargs]"} | ["clang/test/SemaCXX/vararg-class.cpp"]={"clang/test/SemaCXX/vararg-class.cpp:15:5: warning: passing object of class type \'A\' through variadic function [-Wclass-varargs]","clang/test/SemaCXX/vararg-class.cpp:17:5: warning: passing object of class type \'C\' through variadic function; did you mean to call \'.c_str()\'? [-Wclass-varargs]","clang/test/SemaCXX/vararg-class.cpp:18:5: warning: passing object of class type \'D\' through variadic function; did you mean to call \'.c_str()\'? [-Wclass-varargs]","clang/test/SemaCXX/vararg-class.cpp:19:5: warning: passing object of class type \'E\' through variadic function [-Wclass-varargs]","clang/test/SemaCXX/vararg-class.cpp:20:5: warning: passing object of class type \'F\' through variadic function; did you mean to call \'.c_str()\'? [-Wclass-varargs]"} | ||
} | } | ||
}, | }, | ||
["warn_pessimizing_move_on_initialization"]={ | ["warn_pessimizing_move_on_initialization"]={ | ||
[ | [i]={n,o,p,"move","pessimizing-move"}, | ||
[j]="pessimizing-move", | |||
[ | |||
[b]="moving a temporary object prevents copy elision", | [b]="moving a temporary object prevents copy elision", | ||
[ | [d]=h, | ||
[ | [a]="moving a temporary object prevents copy elision", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpessimizing\\-move[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"ac3eca536d3d",1430272337,"Add -Wpessimizing-move and -Wredundant-move warnings.\n\n-Wpessimizing-move warns when a call to std::...","Add -Wpessimizing-move and -Wredundant-move warnings.\n\n-Wpessimizing-move warns when a call to std::move would prevent copy elision\nif the argument was not wrapped in a call. This happens when moving a local\nvariable in a return statement when the variable is the same type as the\nreturn type or using a move to create a new object from a temporary object.\n\n-Wredundant-move warns when an implicit move would already be made, so the\nstd::move call is not needed, such as when moving a local variable in a return\nthat is different from the return type.\n\nDifferential Revision: http://reviews.llvm.org/D7633\n\nllvm-svn: 236075"}, | ||
[ | [g]={{sb,8407,"/// Provide warnings when std::move is used on construction.\nstatic void CheckMoveOnConstruction(Sema &S, const Expr *InitExpr, bool IsReturnStmt) {\n // ...\n if (IsReturnStmt) {\n // ...\n } else {\n DiagID = diag::warn_pessimizing_move_on_initialization;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-pessmizing-move.cpp"]={"clang/test/SemaCXX/warn-pessmizing-move.cpp:62:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:67:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:89:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:94:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:105:9: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:110:9: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:121:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:127:8: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:133:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:139:8: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:147:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:152:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:157:11: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:162:11: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]"} | ["clang/test/SemaCXX/warn-pessmizing-move.cpp"]={"clang/test/SemaCXX/warn-pessmizing-move.cpp:62:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:67:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:89:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:94:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:105:9: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:110:9: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:121:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:127:8: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:133:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:139:8: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:147:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:152:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:157:11: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:162:11: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]"} | ||
} | } | ||
}, | }, | ||
["warn_pessimizing_move_on_return"]={ | ["warn_pessimizing_move_on_return"]={ | ||
[ | [i]={n,o,p,"move","pessimizing-move"}, | ||
[j]="pessimizing-move", | |||
[ | |||
[b]="moving a local object in a return statement prevents copy elision", | [b]="moving a local object in a return statement prevents copy elision", | ||
[ | [d]=h, | ||
[ | [a]="moving a local object in a return statement prevents copy elision", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpessimizing\\-move[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"ac3eca536d3d",1430272337,"Add -Wpessimizing-move and -Wredundant-move warnings.\n\n-Wpessimizing-move warns when a call to std::...","Add -Wpessimizing-move and -Wredundant-move warnings.\n\n-Wpessimizing-move warns when a call to std::move would prevent copy elision\nif the argument was not wrapped in a call. This happens when moving a local\nvariable in a return statement when the variable is the same type as the\nreturn type or using a move to create a new object from a temporary object.\n\n-Wredundant-move warns when an implicit move would already be made, so the\nstd::move call is not needed, such as when moving a local variable in a return\nthat is different from the return type.\n\nDifferential Revision: http://reviews.llvm.org/D7633\n\nllvm-svn: 236075"}, | ||
[ | [g]={{sb,8405,"/// Provide warnings when std::move is used on construction.\nstatic void CheckMoveOnConstruction(Sema &S, const Expr *InitExpr, bool IsReturnStmt) {\n // ...\n if (IsReturnStmt) {\n // ...\n // If we\'re returning a function parameter, copy elision\n // is not possible.\n if (isa<ParmVarDecl>(VD))\n // ...\n else\n DiagID = diag::warn_pessimizing_move_on_return;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-pessmizing-move.cpp"]={"clang/test/SemaCXX/warn-pessmizing-move.cpp:35:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:54:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:168:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:173:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:178:11: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:183:11: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:197:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:202:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:207:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:221:1: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:230:3: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:243:12: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]"} | ["clang/test/SemaCXX/warn-pessmizing-move.cpp"]={"clang/test/SemaCXX/warn-pessmizing-move.cpp:35:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:54:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:168:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:173:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:178:11: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:183:11: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:197:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:202:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:207:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:221:1: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:230:3: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:243:12: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]"} | ||
} | } | ||
}, | }, | ||
["warn_pointer_abs"]={ | ["warn_pointer_abs"]={ | ||
[ | [i]={Lc}, | ||
[j]=Lc, | |||
[ | |||
[b]="taking the absolute value of %select{pointer|function|array}0 type %1 is suspicious", | [b]="taking the absolute value of %select{pointer|function|array}0 type %1 is suspicious", | ||
[ | [d]=h, | ||
[ | [a]="taking the absolute value of (?:pointer|function|array) type (.*?) is suspicious", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wabsolute\\-value[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"7f77eb90a54c",1447556674,"[Sema] Don\'t crash trying to diagnose abs called on a pointer type\n\nClang tries to figure out if a c...","[Sema] Don\'t crash trying to diagnose abs called on a pointer type\n\nClang tries to figure out if a call to abs is suspicious by looking\nthrough implicit casts to look at the underlying, implicitly converted\ntype.\nInterestingly, C has implicit conversions from pointer-ish types like\nfunction to less exciting types like int. This trips up our \'abs\'\nchecker because it doesn\'t know which variant of \'abs\' is appropriate.\n\nInstead, diagnose \'abs\' called on function types upfront. This sort of\nthing is highly suspicious and is likely indicative of a missing\npointer dereference/function call/array index operation.\n\nThis fixes PR25532.\n\nllvm-svn: 253156"}, | ||
[ | [g]={{r,12041,"// Warn when using the wrong abs() function.\nvoid Sema::CheckAbsoluteValueFunction(const CallExpr *Call, const FunctionDecl *FDecl) {\n // ...\n // Taking the absolute value of a pointer is very suspicious, they probably\n // wanted to index into an array, dereference a pointer, call a function, etc.\n if (ArgType->isPointerType() || ArgType->canDecayToPointerType()) {\n // ...\n Diag(Call->getExprLoc(), diag::warn_pointer_abs) << DiagType << ArgType;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-absolute-value.c"]={"clang/test/Sema/warn-absolute-value.c:784:10: warning: taking the absolute value of array type \'long long[1]\' is suspicious [-Wabsolute-value]","clang/test/Sema/warn-absolute-value.c:788:10: warning: taking the absolute value of pointer type \'long long (*)(void)\' is suspicious [-Wabsolute-value]","clang/test/Sema/warn-absolute-value.c:792:10: warning: taking the absolute value of pointer type \'void *\' is suspicious [-Wabsolute-value]","clang/test/Sema/warn-absolute-value.c:796:10: warning: taking the absolute value of function type \'long long (void)\' is suspicious [-Wabsolute-value]"} | ["clang/test/Sema/warn-absolute-value.c"]={"clang/test/Sema/warn-absolute-value.c:784:10: warning: taking the absolute value of array type \'long long[1]\' is suspicious [-Wabsolute-value]","clang/test/Sema/warn-absolute-value.c:788:10: warning: taking the absolute value of pointer type \'long long (*)(void)\' is suspicious [-Wabsolute-value]","clang/test/Sema/warn-absolute-value.c:792:10: warning: taking the absolute value of pointer type \'void *\' is suspicious [-Wabsolute-value]","clang/test/Sema/warn-absolute-value.c:796:10: warning: taking the absolute value of function type \'long long (void)\' is suspicious [-Wabsolute-value]"} | ||
} | } | ||
}, | }, | ||
["warn_pointer_arith_null_ptr"]={ | ["warn_pointer_arith_null_ptr"]={ | ||
[ | [i]={s,n,Vb,"null-pointer-arithmetic"}, | ||
[j]="null-pointer-arithmetic", | |||
[ | |||
[b]="performing pointer arithmetic on a null pointer has undefined behavior%select{| if the offset is nonzero}0", | [b]="performing pointer arithmetic on a null pointer has undefined behavior%select{| if the offset is nonzero}0", | ||
[ | [d]=h, | ||
[ | [a]="performing pointer arithmetic on a null pointer has undefined behavior(?:| if the offset is nonzero)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnull\\-pointer\\-arithmetic[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"3d0a540857ed",1505852800,"Teach clang to tolerate the \'p = nullptr + n\' idiom used by glibc\n\nDifferential Revision: https://re...","Teach clang to tolerate the \'p = nullptr + n\' idiom used by glibc\n\nDifferential Revision: https://reviews.llvm.org/D37042\n\nllvm-svn: 313666"}, | ||
[ | [g]={{u,11473,"/// Diagnose invalid arithmetic on a null pointer.\n///\n/// If \\p IsGNUIdiom is true, the operation is using the \'p = (i8*)nullptr + n\'\n/// idiom, which we recognize as a GNU extension.\n///\nstatic void diagnoseArithmeticOnNullPointer(Sema &S, SourceLocation Loc, Expr *Pointer, bool IsGNUIdiom) {\n if (IsGNUIdiom)\n // ...\n else\n S.Diag(Loc, diag::warn_pointer_arith_null_ptr) << S.getLangOpts().CPlusPlus << Pointer->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/nullptr-arithmetic.cpp"]={"clang/test/SemaCXX/nullptr-arithmetic.cpp:16:16: warning: performing pointer arithmetic on a null pointer has undefined behavior if the offset is nonzero [-Wnull-pointer-arithmetic]","clang/test/SemaCXX/nullptr-arithmetic.cpp:17:15: warning: performing pointer arithmetic on a null pointer has undefined behavior if the offset is nonzero [-Wnull-pointer-arithmetic]"} | ["clang/test/SemaCXX/nullptr-arithmetic.cpp"]={"clang/test/SemaCXX/nullptr-arithmetic.cpp:16:16: warning: performing pointer arithmetic on a null pointer has undefined behavior if the offset is nonzero [-Wnull-pointer-arithmetic]","clang/test/SemaCXX/nullptr-arithmetic.cpp:17:15: warning: performing pointer arithmetic on a null pointer has undefined behavior if the offset is nonzero [-Wnull-pointer-arithmetic]"} | ||
} | } | ||
}, | }, | ||
["warn_pointer_compare"]={ | ["warn_pointer_compare"]={ | ||
[ | [i]={"pointer-compare"}, | ||
[j]="pointer-compare", | |||
[ | |||
[b]="comparing a pointer to a null character constant; did you mean to compare to %select{NULL|(void *)0}0?", | [b]="comparing a pointer to a null character constant; did you mean to compare to %select{NULL|(void *)0}0?", | ||
[ | [d]=h, | ||
[ | [a]="comparing a pointer to a null character constant; did you mean to compare to (?:NULL|\\(void \\*\\)0)\\?", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpointer\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"f708f0a2430f",1565043340,"[Sema] Add -Wpointer-compare\n\nThis patch adds a warning that diagnoses comparisons of pointers to\n\'\\...","[Sema] Add -Wpointer-compare\n\nThis patch adds a warning that diagnoses comparisons of pointers to\n\'\\0\'. This is often indicative of a bug (e.g. the user might\'ve\nforgotten to dereference the pointer).\n\nPatch by Elaina Guan!\n\nDifferential Revision: https://reviews.llvm.org/D65595\n\nllvm-svn: 367940"}, | ||
[ | [g]={{u,12916,"void Sema::CheckPtrComparisonWithNullChar(ExprResult &E, ExprResult &NullE) {\n // ...\n if (!E.get()->getType()->isAnyPointerType() && E.get()->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNotNull) == Expr::NPCK_ZeroExpression) {\n if (const auto *CL = dyn_cast<CharacterLiteral>(E.get())) {\n if (CL->getValue() == 0)\n Diag(E.get()->getExprLoc(), diag::warn_pointer_compare) << NullValue << FixItHint::CreateReplacement(E.get()->getExprLoc(), NullValue ? \"NULL\" : \"(void *)0\");"},{u,13012,"void Sema::CheckPtrComparisonWithNullChar(ExprResult &E, ExprResult &NullE) {\n // ...\n if (!E.get()->getType()->isAnyPointerType() && E.get()->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNotNull) == Expr::NPCK_ZeroExpression) {\n if (const auto *CL = dyn_cast<CharacterLiteral>(E.get())) {\n // ...\n } else if (const auto *CE = dyn_cast<CStyleCastExpr>(E.get())) {\n // ...\n if (T == Context.CharTy)\n Diag(E.get()->getExprLoc(), diag::warn_pointer_compare) << NullValue << FixItHint::CreateReplacement(E.get()->getExprLoc(), NullValue ? \"NULL\" : \"(void *)0\");"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-nullchar-nullptr.c"]={"clang/test/Sema/warn-nullchar-nullptr.c:4:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:8:10: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:12:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:16:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:20:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:24:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:29:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:34:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:39:15: warning: comparing a pointer to a null character constant; did you mean to compare to NULL? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:44:15: warning: comparing a pointer to a null character constant; did you mean to compare to NULL? [-Wpointer-compare]"} | ["clang/test/Sema/warn-nullchar-nullptr.c"]={"clang/test/Sema/warn-nullchar-nullptr.c:4:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:8:10: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:12:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:16:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:20:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:24:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:29:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:34:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:39:15: warning: comparing a pointer to a null character constant; did you mean to compare to NULL? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:44:15: warning: comparing a pointer to a null character constant; did you mean to compare to NULL? [-Wpointer-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_pointer_indirection_from_incompatible_type"]={ | ["warn_pointer_indirection_from_incompatible_type"]={ | ||
[ | [i]={"undefined-reinterpret-cast"}, | ||
[j]="undefined-reinterpret-cast", | |||
[ | |||
[b]="dereference of type %1 that was reinterpret_cast from type %0 has undefined behavior", | [b]="dereference of type %1 that was reinterpret_cast from type %0 has undefined behavior", | ||
[ | [d]=h, | ||
[ | [a]="dereference of type (.*?) that was reinterpret_cast from type (.*?) has undefined behavior", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wundefined\\-reinterpret\\-cast[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"69a2c924b9e8",1304360479,"Add a warning for when reinterpret_cast leads to undefined behavior, patch by Richard Trieu!\n\nllvm-s...","Add a warning for when reinterpret_cast leads to undefined behavior, patch by Richard Trieu!\n\nllvm-svn: 130703"}, | ||
[ | [g]={{Eb,2039,"// Checks for undefined behavior in reinterpret_cast.\n// The cases that is checked for is:\n// *reinterpret_cast<T*>(&a)\n// reinterpret_cast<T&>(a)\n// where accessing \'a\' as type \'T\' will result in undefined behavior.\nvoid Sema::CheckCompatibleReinterpretCast(QualType SrcType, QualType DestType, bool IsDereference, SourceRange Range) {\n unsigned DiagID = IsDereference ? diag::warn_pointer_indirection_from_incompatible_type : diag::warn_undefined_reinterpret_cast;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/reinterpret-cast.cpp"]={"clang/test/SemaCXX/reinterpret-cast.cpp:163:10: warning: dereference of type \'double *\' that was reinterpret_cast from type \'long *\' has undefined behavior [-Wundefined-reinterpret-cast]","clang/test/SemaCXX/reinterpret-cast.cpp:165:10: warning: dereference of type \'double *\' that was reinterpret_cast from type \'float *\' has undefined behavior [-Wundefined-reinterpret-cast]","clang/test/SemaCXX/reinterpret-cast.cpp:167:10: warning: dereference of type \'float *\' that was reinterpret_cast from type \'long *\' has undefined behavior [-Wundefined-reinterpret-cast]","clang/test/SemaCXX/reinterpret-cast.cpp:169:10: warning: dereference of type \'float *\' that was reinterpret_cast from type \'double *\' has undefined behavior [-Wundefined-reinterpret-cast]"} | ["clang/test/SemaCXX/reinterpret-cast.cpp"]={"clang/test/SemaCXX/reinterpret-cast.cpp:163:10: warning: dereference of type \'double *\' that was reinterpret_cast from type \'long *\' has undefined behavior [-Wundefined-reinterpret-cast]","clang/test/SemaCXX/reinterpret-cast.cpp:165:10: warning: dereference of type \'double *\' that was reinterpret_cast from type \'float *\' has undefined behavior [-Wundefined-reinterpret-cast]","clang/test/SemaCXX/reinterpret-cast.cpp:167:10: warning: dereference of type \'float *\' that was reinterpret_cast from type \'long *\' has undefined behavior [-Wundefined-reinterpret-cast]","clang/test/SemaCXX/reinterpret-cast.cpp:169:10: warning: dereference of type \'float *\' that was reinterpret_cast from type \'double *\' has undefined behavior [-Wundefined-reinterpret-cast]"} | ||
} | } | ||
}, | }, | ||
["warn_pointer_sub_null_ptr"]={ | ["warn_pointer_sub_null_ptr"]={ | ||
[ | [i]={s,n,Vb,"null-pointer-subtraction"}, | ||
[j]="null-pointer-subtraction", | |||
[ | |||
[b]="performing pointer subtraction with a null pointer %select{has|may have}0 undefined behavior", | [b]="performing pointer subtraction with a null pointer %select{has|may have}0 undefined behavior", | ||
[ | [d]=h, | ||
[ | [a]="performing pointer subtraction with a null pointer (?:has|may have) undefined behavior", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wnull\\-pointer\\-subtraction[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={Xb,1615397021,Ub,Rb}, | ||
[ | [g]={{u,11484,"/// Diagnose invalid subraction on a null pointer.\n///\nstatic void diagnoseSubtractionOnNullPointer(Sema &S, SourceLocation Loc, Expr *Pointer, bool BothNull) {\n // ...\n S.DiagRuntimeBehavior(Loc, Pointer, S.PDiag(diag::warn_pointer_sub_null_ptr) << S.getLangOpts().CPlusPlus << Pointer->getSourceRange());"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/pointer-subtraction.c"]={"clang/test/Sema/pointer-subtraction.c:10:26: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:11:18: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:12:26: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:12:26: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:15:28: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:22:28: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:27:3: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]"} | ["clang/test/Sema/pointer-subtraction.c"]={"clang/test/Sema/pointer-subtraction.c:10:26: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:11:18: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:12:26: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:12:26: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:15:28: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:22:28: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:27:3: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]"} | ||
} | } | ||
}, | }, | ||
["warn_pointer_to_enum_cast"]={ | ["warn_pointer_to_enum_cast"]={ | ||
[ | [i]={"pointer-to-enum-cast",Ic}, | ||
[j]="pointer-to-enum-cast", | |||
[ | |||
[b]="cast to smaller integer type %1 from %0", | [b]="cast to smaller integer type %1 from %0", | ||
[ | [d]=h, | ||
[ | [a]="cast to smaller integer type (.*?) from (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpointer\\-to\\-enum\\-cast[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={gc,1576908663,fc,hc}, | ||
[ | [g]={{Eb,3174,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n // If either type is a pointer, the other type has to be either an\n // integer or a pointer.\n if (!DestType->isArithmeticType()) {\n // ...\n } else if (!SrcType->isArithmeticType()) {\n // ...\n if ((Self.Context.getTypeSize(SrcType) > Self.Context.getTypeSize(DestType)) && !DestType->isBooleanType()) {\n // ...\n if (SrcType->isVoidPointerType())\n // ...\n else if (DestType->isEnumeralType())\n Diag = diag::warn_pointer_to_enum_cast;"}}, | ||
[ | [k]={ | ||
[ | [Uc]={"clang/test/Sema/cast.c:205:9: warning: cast to smaller integer type \'X\' from \'CharPtr\' (aka \'char *\') [-Wpointer-to-enum-cast]","clang/test/Sema/cast.c:210:9: warning: cast to smaller integer type \'X\' from \'CharPtr\' (aka \'char *\') [-Wpointer-to-enum-cast]"} | ||
} | } | ||
}, | }, | ||
["warn_pointer_to_int_cast"]={ | ["warn_pointer_to_int_cast"]={ | ||
[ | [i]={Ic}, | ||
[j]=Ic, | |||
[ | |||
[b]="cast to smaller integer type %1 from %0", | [b]="cast to smaller integer type %1 from %0", | ||
[ | [d]=h, | ||
[ | [a]="cast to smaller integer type (.*?) from (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpointer\\-to\\-int\\-cast[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={gc,1576908663,fc,hc}, | ||
[ | [g]={{Eb,2468,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n // ...\n if (DestType->isIntegralType(Self.Context)) {\n // ...\n // C++ 5.2.10p4: A pointer can be explicitly converted to any integral\n // type large enough to hold it; except in Microsoft mode, where the\n // integral type size doesn\'t matter (except we don\'t allow bool).\n if ((Self.Context.getTypeSize(SrcType) > Self.Context.getTypeSize(DestType))) {\n // ...\n if (MicrosoftException) {\n unsigned Diag = SrcType->isVoidPointerType() ? diag::warn_void_pointer_to_int_cast : diag::warn_pointer_to_int_cast;"},{Eb,3176,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n // If either type is a pointer, the other type has to be either an\n // integer or a pointer.\n if (!DestType->isArithmeticType()) {\n // ...\n } else if (!SrcType->isArithmeticType()) {\n // ...\n if ((Self.Context.getTypeSize(SrcType) > Self.Context.getTypeSize(DestType)) && !DestType->isBooleanType()) {\n // ...\n if (SrcType->isVoidPointerType())\n // ...\n else if (DestType->isEnumeralType())\n // ...\n else\n Diag = diag::warn_pointer_to_int_cast;"}}, | ||
[ | [k]={ | ||
[ | [Uc]={"clang/test/Sema/cast.c:173:10: warning: cast to smaller integer type \'Int\' (aka \'int\') from \'CharPtr\' (aka \'char *\') [-Wpointer-to-int-cast]","clang/test/Sema/cast.c:181:9: warning: cast to smaller integer type \'Int\' (aka \'int\') from \'CharPtr\' (aka \'char *\') [-Wpointer-to-int-cast]"} | ||
} | } | ||
}, | }, | ||
["warn_poison_system_directories"]={ | ["warn_poison_system_directories"]={ | ||
[ | [i]={"poison-system-directories"}, | ||
[j]="poison-system-directories", | |||
[ | |||
[b]="include location \'%0\' is unsafe for cross-compilation", | [b]="include location \'%0\' is unsafe for cross-compilation", | ||
[ | [d]=h, | ||
[ | [a]="include location \'(.*?)\' is unsafe for cross\\-compilation", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpoison\\-system\\-directories[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"39f50da2a357",1568041174,"Support -fstack-clash-protection for x86\n\nImplement protection against the stack clash attack [0] th...","Support -fstack-clash-protection for x86\n\nImplement protection against the stack clash attack [0] through inline stack\nprobing.\n\nProbe stack allocation every PAGE_SIZE during frame lowering or dynamic\nallocation to make sure the page guard, if any, is touched when touching the\nstack, in a similar manner to GCC[1].\n\nThis extends the existing `probe-stack\' mechanism with a special value `inline-asm\'.\nTechnically the former uses function call before stack allocation while this\npatch provides inlined stack probes and chunk allocation.\n\nOnly implemented for x86.\n\n[0] https://www.qualys.com/2017/06/19/stack-clash/stack-clash.txt\n[1] https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00556.html\n\nDifferential Revision: https://reviews.llvm.org/D68720"}, | ||
[ | [g]={{"clang/lib/Lex/InitHeaderSearch.cpp",153,"bool InitHeaderSearch::AddUnmappedPath(const Twine &Path, IncludeDirGroup Group, bool isFramework, std::optional<unsigned> UserEntryIdx) {\n // ...\n // If use system headers while cross-compiling, emit the warning.\n if (HasSysroot && (MappedPathStr.startswith(\"/usr/include\") || MappedPathStr.startswith(\"/usr/local/include\"))) {\n Headers.getDiags().Report(diag::warn_poison_system_directories) << MappedPathStr;"}}, | ||
[ | [k]={ | ||
["clang/test/Frontend/warning-poison-system-directories.c"]={"warning: include location \'/usr/include\' is unsafe for cross-compilation [-Wpoison-system-directories]"} | ["clang/test/Frontend/warning-poison-system-directories.c"]={"warning: include location \'/usr/include\' is unsafe for cross-compilation [-Wpoison-system-directories]"} | ||
} | } | ||
}, | }, | ||
["warn_potentially_direct_selector_expression"]={ | ["warn_potentially_direct_selector_expression"]={ | ||
[ | [i]={"potentially-direct-selector","strict-potentially-direct-selector"}, | ||
[j]="potentially-direct-selector", | |||
[ | |||
[b]="@selector expression formed with potentially direct selector %0", | [b]="@selector expression formed with potentially direct selector %0", | ||
[ | [d]=h, | ||
[ | [a]="@selector expression formed with potentially direct selector (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpotentially\\-direct\\-selector[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={Ob,1582847864,Mb,Nb}, | ||
[ | [g]={{U,1334,"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 Diag(AtLoc, diag::warn_potentially_direct_selector_expression) << Sel;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/potentially-direct-selector.m"]={"clang/test/SemaObjC/potentially-direct-selector.m:68:9: warning: @selector expression formed with potentially direct selector \'inBase\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:69:9: warning: @selector expression formed with potentially direct selector \'inBaseImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:70:9: warning: @selector expression formed with potentially direct selector \'inBaseCat\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:71:9: warning: @selector expression formed with potentially direct selector \'inBaseCatImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:72:9: warning: @selector expression formed with potentially direct selector \'inDerived\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:73:9: warning: @selector expression formed with potentially direct selector \'inDerivedImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:74:9: warning: @selector expression formed with potentially direct selector \'inDerivedCat\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:75:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:76:9: warning: @selector expression formed with potentially direct selector \'inDerivedClass\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:77:9: warning: @selector expression formed with potentially direct selector \'inBaseClass\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:78:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatClass\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:99:9: warning: @selector expression formed with potentially direct selector \'inBase\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:100:9: warning: @selector expression formed with potentially direct selector \'inBaseImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:101:9: warning: @selector expression formed with potentially direct selector \'inBaseCat\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:102:9: warning: @selector expression formed with potentially direct selector \'inBaseCatImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:108:9: warning: @selector expression formed with potentially direct selector \'inBaseClass\' [-Wpotentially-direct-selector]"} | ["clang/test/SemaObjC/potentially-direct-selector.m"]={"clang/test/SemaObjC/potentially-direct-selector.m:68:9: warning: @selector expression formed with potentially direct selector \'inBase\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:69:9: warning: @selector expression formed with potentially direct selector \'inBaseImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:70:9: warning: @selector expression formed with potentially direct selector \'inBaseCat\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:71:9: warning: @selector expression formed with potentially direct selector \'inBaseCatImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:72:9: warning: @selector expression formed with potentially direct selector \'inDerived\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:73:9: warning: @selector expression formed with potentially direct selector \'inDerivedImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:74:9: warning: @selector expression formed with potentially direct selector \'inDerivedCat\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:75:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:76:9: warning: @selector expression formed with potentially direct selector \'inDerivedClass\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:77:9: warning: @selector expression formed with potentially direct selector \'inBaseClass\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:78:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatClass\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:99:9: warning: @selector expression formed with potentially direct selector \'inBase\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:100:9: warning: @selector expression formed with potentially direct selector \'inBaseImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:101:9: warning: @selector expression formed with potentially direct selector \'inBaseCat\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:102:9: warning: @selector expression formed with potentially direct selector \'inBaseCatImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:108:9: warning: @selector expression formed with potentially direct selector \'inBaseClass\' [-Wpotentially-direct-selector]"} | ||
} | } | ||
}, | }, | ||
["warn_pp_ambiguous_macro"]={ | ["warn_pp_ambiguous_macro"]={ | ||
[ | [i]={"ambiguous-macro"}, | ||
[j]="ambiguous-macro", | |||
[ | |||
[b]="ambiguous expansion of macro %0", | [b]="ambiguous expansion of macro %0", | ||
[ | [d]=h, | ||
[ | [a]="ambiguous expansion of macro (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wambiguous\\-macro[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"5968b1b71f88",1349989659,"Diagnose the expansion of ambiguous macro definitions. This can happen\nonly with modules, when two d...","Diagnose the expansion of ambiguous macro definitions. This can happen\nonly with modules, when two disjoint modules #define the same\nidentifier to different token sequences.\n\nllvm-svn: 165746"}, | ||
[ | [g]={{"clang/lib/Lex/PPMacroExpansion.cpp",559,"/// HandleMacroExpandedIdentifier - If an identifier token is read that is to be\n/// expanded as a macro, handle it and return the next token as \'Identifier\'.\nbool Preprocessor::HandleMacroExpandedIdentifier(Token &Identifier, const MacroDefinition &M) {\n // ...\n // If the macro definition is ambiguous, complain.\n if (M.isAmbiguous()) {\n Diag(Identifier, diag::warn_pp_ambiguous_macro) << Identifier.getIdentifierInfo();"}}, | ||
[ | [k]={ | ||
["clang/test/Modules/macros2.c"]={"clang/test/Modules/macros2.c:14:1: warning: ambiguous expansion of macro \'TOP_OTHER_DEF_RIGHT_UNDEF\' [-Wambiguous-macro]","clang/test/Modules/macros2.c:37:3: warning: ambiguous expansion of macro \'LEFT_RIGHT_DIFFERENT\' [-Wambiguous-macro]","clang/test/Modules/macros2.c:40:3: warning: ambiguous expansion of macro \'LEFT_RIGHT_DIFFERENT2\' [-Wambiguous-macro]","clang/test/Modules/macros2.c:71:10: warning: ambiguous expansion of macro \'TOP_OTHER_REDEF1\' [-Wambiguous-macro]"} | ["clang/test/Modules/macros2.c"]={"clang/test/Modules/macros2.c:14:1: warning: ambiguous expansion of macro \'TOP_OTHER_DEF_RIGHT_UNDEF\' [-Wambiguous-macro]","clang/test/Modules/macros2.c:37:3: warning: ambiguous expansion of macro \'LEFT_RIGHT_DIFFERENT\' [-Wambiguous-macro]","clang/test/Modules/macros2.c:40:3: warning: ambiguous expansion of macro \'LEFT_RIGHT_DIFFERENT2\' [-Wambiguous-macro]","clang/test/Modules/macros2.c:71:10: warning: ambiguous expansion of macro \'TOP_OTHER_REDEF1\' [-Wambiguous-macro]"} | ||
} | } | ||
}, | }, | ||
["warn_pp_convert_to_positive"]={ | ["warn_pp_convert_to_positive"]={ | ||
[b]="%select{left|right}0 side of operator converted from negative value to unsigned: %1", | [b]="%select{left|right}0 side of operator converted from negative value to unsigned: %1", | ||
[ | [d]=h, | ||
[ | [a]="(?:left|right) side of operator converted from negative value to unsigned\\: (.*?)", | ||
[ | [e]=K, | ||
[ | [c]=x, | ||
[ | [f]={"7f5ff2175f68",1447466995,"Use %select to merge similar diagnostics. NFC\n\nllvm-svn: 253119","Use %select to merge similar diagnostics. NFC\n\nllvm-svn: 253119"}, | ||
[ | [g]={{ac,688,"/// 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 default:\n // ...\n // If this just promoted something from signed to unsigned, and if the\n // value was negative, warn about it.\n if (ValueLive && Res.isUnsigned()) {\n if (!LHS.isUnsigned() && LHS.Val.isNegative())\n PP.Diag(OpLoc, diag::warn_pp_convert_to_positive) << 0 << toString(LHS.Val, 10, true) + \" to \" + toString(LHS.Val, 10, false) << LHS.getRange() << RHS.getRange();"},{ac,693,"/// 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 default:\n // ...\n // If this just promoted something from signed to unsigned, and if the\n // value was negative, warn about it.\n if (ValueLive && Res.isUnsigned()) {\n // ...\n if (!RHS.isUnsigned() && RHS.Val.isNegative())\n PP.Diag(OpLoc, diag::warn_pp_convert_to_positive) << 1 << toString(RHS.Val, 10, true) + \" to \" + toString(RHS.Val, 10, false) << LHS.getRange() << RHS.getRange();"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/overflow.c"]={"clang/test/Preprocessor/overflow.c:24:23: warning: right side of operator converted from negative value to unsigned: -1 to 18446744073709551615"} | ["clang/test/Preprocessor/overflow.c"]={"clang/test/Preprocessor/overflow.c:24:23: warning: right side of operator converted from negative value to unsigned: -1 to 18446744073709551615"} | ||
} | } | ||
}, | }, | ||
["warn_pp_date_time"]={ | ["warn_pp_date_time"]={ | ||
[ | [i]={"date-time"}, | ||
[j]="date-time", | |||
[ | |||
[b]="expansion of date or time macro is not reproducible", | [b]="expansion of date or time macro is not reproducible", | ||
[ | [d]=h, | ||
[ | [a]="expansion of date or time macro is not reproducible", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdate\\-time[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"4f43e554081e",1402380531,"Implement -Wdate-time preprocessor warning\n\nThis GCC warning is useful for validating reproducible b...","Implement -Wdate-time preprocessor warning\n\nThis GCC warning is useful for validating reproducible builds\nand might help when tracking down issues with modules too.\n\nllvm-svn: 210511"}, | ||
[ | [g]={{"clang/lib/Lex/PPMacroExpansion.cpp",1573,"/// ExpandBuiltinMacro - If an identifier token is read that is to be expanded\n/// as a builtin macro, handle it and return the next token as \'Tok\'.\nvoid Preprocessor::ExpandBuiltinMacro(Token &Tok) {\n // ...\n if (II == Ident__LINE__) {\n // ...\n } else if (II == Ident__FILE__ || II == Ident__BASE_FILE__ || II == Ident__FILE_NAME__) {\n // ...\n } else if (II == Ident__DATE__) {\n Diag(Tok.getLocation(), diag::warn_pp_date_time);"},{"clang/lib/Lex/PPMacroExpansion.cpp",1583,"/// ExpandBuiltinMacro - If an identifier token is read that is to be expanded\n/// as a builtin macro, handle it and return the next token as \'Tok\'.\nvoid Preprocessor::ExpandBuiltinMacro(Token &Tok) {\n // ...\n if (II == Ident__LINE__) {\n // ...\n } else if (II == Ident__FILE__ || II == Ident__BASE_FILE__ || II == Ident__FILE_NAME__) {\n // ...\n } else if (II == Ident__DATE__) {\n // ...\n } else if (II == Ident__TIME__) {\n Diag(Tok.getLocation(), diag::warn_pp_date_time);"},{"clang/lib/Lex/PPMacroExpansion.cpp",1608,"/// ExpandBuiltinMacro - If an identifier token is read that is to be expanded\n/// as a builtin macro, handle it and return the next token as \'Tok\'.\nvoid Preprocessor::ExpandBuiltinMacro(Token &Tok) {\n // ...\n if (II == Ident__LINE__) {\n // ...\n } else if (II == Ident__FILE__ || II == Ident__BASE_FILE__ || II == Ident__FILE_NAME__) {\n // ...\n } else if (II == Ident__DATE__) {\n // ...\n } else if (II == Ident__TIME__) {\n // ...\n } else if (II == Ident__INCLUDE_LEVEL__) {\n // ...\n } else if (II == Ident__TIMESTAMP__) {\n Diag(Tok.getLocation(), diag::warn_pp_date_time);"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/SOURCE_DATE_EPOCH.c"]={"clang/test/Preprocessor/SOURCE_DATE_EPOCH.c:30:21: warning: expansion of date or time macro is not reproducible [-Wdate-time]","clang/test/Preprocessor/SOURCE_DATE_EPOCH.c:31:21: warning: expansion of date or time macro is not reproducible [-Wdate-time]","clang/test/Preprocessor/SOURCE_DATE_EPOCH.c:32:26: warning: expansion of date or time macro is not reproducible [-Wdate-time]"} | ["clang/test/Preprocessor/SOURCE_DATE_EPOCH.c"]={"clang/test/Preprocessor/SOURCE_DATE_EPOCH.c:30:21: warning: expansion of date or time macro is not reproducible [-Wdate-time]","clang/test/Preprocessor/SOURCE_DATE_EPOCH.c:31:21: warning: expansion of date or time macro is not reproducible [-Wdate-time]","clang/test/Preprocessor/SOURCE_DATE_EPOCH.c:32:26: warning: expansion of date or time macro is not reproducible [-Wdate-time]"} | ||
} | } | ||
}, | }, | ||
["warn_pp_expr_overflow"]={ | ["warn_pp_expr_overflow"]={ | ||
[b]="integer overflow in preprocessor expression", | |||
[d]=h, | |||
[a]="integer overflow in preprocessor expression", | [a]="integer overflow in preprocessor expression", | ||
[e]=K, | |||
[e]= | [c]=x, | ||
[ | [f]={W,1236199783,V,X}, | ||
[g]={{ac,493,"/// 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::minus: {\n // ...\n // If this operator is live and overflowed, report the issue.\n if (Overflow && ValueLive)\n PP.Diag(Loc, diag::warn_pp_expr_overflow) << Result.getRange();"},{ac,858,"/// 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 // If this operator is live and overflowed, report the issue.\n if (Overflow && ValueLive)\n PP.Diag(OpLoc, diag::warn_pp_expr_overflow) << LHS.getRange() << RHS.getRange();"}}, | |||
[f | [k]={ | ||
[ | |||
[ | |||
["clang/test/Preprocessor/overflow.c"]={"clang/test/Preprocessor/overflow.c:4:23: warning: integer overflow in preprocessor expression","clang/test/Preprocessor/overflow.c:12:23: warning: integer overflow in preprocessor expression","clang/test/Preprocessor/overflow.c:20:23: warning: integer overflow in preprocessor expression"} | ["clang/test/Preprocessor/overflow.c"]={"clang/test/Preprocessor/overflow.c:4:23: warning: integer overflow in preprocessor expression","clang/test/Preprocessor/overflow.c:12:23: warning: integer overflow in preprocessor expression","clang/test/Preprocessor/overflow.c:20:23: warning: integer overflow in preprocessor expression"} | ||
} | } | ||
}, | }, | ||
["warn_pp_hdrstop_filename_ignored"]={ | ["warn_pp_hdrstop_filename_ignored"]={ | ||
[ | [i]={"clang-cl-pch"}, | ||
[j]="clang-cl-pch", | |||
[ | |||
[b]="#pragma hdrstop filename not supported, /Fp can be used to specify precompiled header filename", | [b]="#pragma hdrstop filename not supported, /Fp can be used to specify precompiled header filename", | ||
[ | [d]=h, | ||
[ | [a]="\\#pragma hdrstop filename not supported, \\/Fp can be used to specify precompiled header filename", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wclang\\-cl\\-pch[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"58df1affedc0",1536685844,"[clang-cl, PCH] Support for /Yc and /Yu without filename and #pragma hdrstop\n\nWith clang-cl, when th...","[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"}, | ||
[ | [g]={{C,885,"void Preprocessor::HandlePragmaHdrstop(Token &Tok) {\n // ...\n if (Tok.is(tok::l_paren)) {\n Diag(Tok.getLocation(), diag::warn_pp_hdrstop_filename_ignored);"}}, | ||
[ | [k]={ | ||
["clang/test/PCH/pch-hdrstop-warn.cpp"]={"clang/test/PCH/pch-hdrstop-warn.cpp:10:16: warning: #pragma hdrstop filename not supported, /Fp can be used to specify precompiled header filename [-Wclang-cl-pch]"} | ["clang/test/PCH/pch-hdrstop-warn.cpp"]={"clang/test/PCH/pch-hdrstop-warn.cpp:10:16: warning: #pragma hdrstop filename not supported, /Fp can be used to specify precompiled header filename [-Wclang-cl-pch]"} | ||
} | } | ||
}, | }, | ||
["warn_pp_invalid_directive"]={ | ["warn_pp_invalid_directive"]={ | ||
[ | [i]={"unknown-directives"}, | ||
[j]="unknown-directives", | |||
[ | |||
[b]="invalid preprocessing directive%select{|, did you mean \'#%1\'?}0", | [b]="invalid preprocessing directive%select{|, did you mean \'#%1\'?}0", | ||
[ | [d]=h, | ||
[ | [a]="invalid preprocessing directive(?:|, did you mean \'\\#(.*?)\'\\?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunknown\\-directives[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={lb,1625925174,mb,nb}, | ||
[ | [g]={{Kc,465,"void Preprocessor::SuggestTypoedDirective(const Token &Tok, StringRef Directive) const {\n // ...\n if (std::optional<StringRef> Sugg = findSimilarStr(Directive, Candidates)) {\n // ...\n Diag(Tok, diag::warn_pp_invalid_directive) << 1 << SuggValue << Hint;"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/suggest-typoed-directive.c"]={"clang/test/Preprocessor/suggest-typoed-directive.c:18:2: warning: invalid preprocessing directive, did you mean \'#if\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:19:2: warning: invalid preprocessing directive, did you mean \'#if\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:20:2: warning: invalid preprocessing directive, did you mean \'#ifdef\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:21:3: warning: invalid preprocessing directive, did you mean \'#elif\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:22:4: warning: invalid preprocessing directive, did you mean \'#elif\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:23:2: warning: invalid preprocessing directive, did you mean \'#elif\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:24:2: warning: invalid preprocessing directive, did you mean \'#elifdef\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:25:2: warning: invalid preprocessing directive, did you mean \'#elifdef\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:26:2: warning: invalid preprocessing directive, did you mean \'#elifndef\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:27:2: warning: invalid preprocessing directive, did you mean \'#else\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:28:2: warning: invalid preprocessing directive, did you mean \'#endif\'? [-Wunknown-directives]"} | ["clang/test/Preprocessor/suggest-typoed-directive.c"]={"clang/test/Preprocessor/suggest-typoed-directive.c:18:2: warning: invalid preprocessing directive, did you mean \'#if\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:19:2: warning: invalid preprocessing directive, did you mean \'#if\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:20:2: warning: invalid preprocessing directive, did you mean \'#ifdef\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:21:3: warning: invalid preprocessing directive, did you mean \'#elif\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:22:4: warning: invalid preprocessing directive, did you mean \'#elif\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:23:2: warning: invalid preprocessing directive, did you mean \'#elif\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:24:2: warning: invalid preprocessing directive, did you mean \'#elifdef\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:25:2: warning: invalid preprocessing directive, did you mean \'#elifdef\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:26:2: warning: invalid preprocessing directive, did you mean \'#elifndef\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:27:2: warning: invalid preprocessing directive, did you mean \'#else\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:28:2: warning: invalid preprocessing directive, did you mean \'#endif\'? [-Wunknown-directives]"} | ||
} | } | ||
}, | }, | ||
["warn_pp_line_decimal"]={ | ["warn_pp_line_decimal"]={ | ||
[b]="%select{#line|GNU line marker}0 directive interprets number as decimal, not octal", | [b]="%select{#line|GNU line marker}0 directive interprets number as decimal, not octal", | ||
[ | [d]=h, | ||
[ | [a]="(?:\\#line|GNU line marker) directive interprets number as decimal, not octal", | ||
[ | [e]=K, | ||
[ | [c]=x, | ||
[ | [f]={"ca556cb3e365",1240011469,"implement PR3940: #line numbers not fully checked\n\nllvm-svn: 69403","implement PR3940: #line numbers not fully checked\n\nllvm-svn: 69403"}, | ||
[ | [g]={{Kc,1390,"/// 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 if (DigitTokBegin[0] == \'0\' && Val)\n PP.Diag(DigitTok.getLocation(), diag::warn_pp_line_decimal) << IsGNULineDirective;"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/line-directive.c"]={"foo.c:10:7: warning: #line directive interprets number as decimal, not octal","foo.c:12:3: warning: GNU line marker directive interprets number as decimal, not octal"} | ["clang/test/Preprocessor/line-directive.c"]={"foo.c:10:7: warning: #line directive interprets number as decimal, not octal","foo.c:12:3: warning: GNU line marker directive interprets number as decimal, not octal"} | ||
} | } | ||
}, | }, | ||
["warn_pp_macro_def_mismatch_with_pch"]={ | ["warn_pp_macro_def_mismatch_with_pch"]={ | ||
[ | [i]={"clang-cl-pch"}, | ||
[j]="clang-cl-pch", | |||
[ | |||
[b]="definition of macro %0 does not match definition in precompiled header", | [b]="definition of macro %0 does not match definition in precompiled header", | ||
[ | [d]=h, | ||
[ | [a]="definition of macro (.*?) does not match definition in precompiled header", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wclang\\-cl\\-pch[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"76675de15cfc",1530811333,"[clang-cl, PCH] Implement support for MS-style PCH through headers\n\nImplement support for MS-style P...","[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"}, | ||
[ | [g]={{Kc,3090,"/// 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 // When skipping just warn about macros that do not match.\n if (SkippingUntilPCHThroughHeader) {\n // ...\n if (!OtherMI || !MI->isIdenticalTo(*OtherMI, *this,\n // ...\n Diag(MI->getDefinitionLoc(), diag::warn_pp_macro_def_mismatch_with_pch) << MacroNameTok.getIdentifierInfo();"}} | ||
}, | }, | ||
["warn_pp_macro_hides_keyword"]={ | ["warn_pp_macro_hides_keyword"]={ | ||
[ | [i]={"keyword-macro","pedantic"}, | ||
[j]="keyword-macro", | |||
[ | |||
[b]="keyword is hidden by macro definition", | [b]="keyword is hidden by macro definition", | ||
[ | [d]=h, | ||
[ | [a]="keyword is hidden by macro definition", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wkeyword\\-macro[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"1ecb41c09b7d",1417518369,"Emit warning if define or undef reserved identifier or keyword.\n\nSummary:\nThis change implements war...","Emit warning if define or undef reserved identifier or keyword.\n\nSummary:\nThis change implements warnings if macro name is identical to a keyword or\nreserved identifier. The warnings are different depending on the \"danger\"\nof the operation. Defining macro that replaces a keyword is on by default.\nOther cases produce warning that is off by default but can be turned on\nusing option -Wreserved-id-macro.\n\nThis change fixes PR11488.\n\nReviewers: rnk\n\nReviewed By: rnk\n\nSubscribers: rnk, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D6194\n\nllvm-svn: 223114"}, | ||
[ | [g]={{Kc,3069,"/// 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 (MacroShadowsKeyword && !isConfigurationPattern(MacroNameTok, MI, getLangOpts())) {\n Diag(MacroNameTok, diag::warn_pp_macro_hides_keyword);"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/macro-reserved.c"]={"clang/test/Preprocessor/macro-reserved.c:3:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:44:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:46:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:48:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:50:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:53:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:55:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:60:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]"} | ["clang/test/Preprocessor/macro-reserved.c"]={"clang/test/Preprocessor/macro-reserved.c:3:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:44:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:46:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:48:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:50:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:53:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:55:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:60:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]"} | ||
} | } | ||
}, | }, | ||
["warn_pp_macro_is_reserved_id"]={ | ["warn_pp_macro_is_reserved_id"]={ | ||
[ | [i]={"reserved-id-macro",Xc,"reserved-macro-identifier"}, | ||
[j]="reserved-macro-identifier", | |||
[ | |||
[b]="macro name is a reserved identifier", | [b]="macro name is a reserved identifier", | ||
[ | [d]=h, | ||
[ | [a]="macro name is a reserved identifier", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wreserved\\-macro\\-identifier[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"1ecb41c09b7d",1417518369,"Emit warning if define or undef reserved identifier or keyword.\n\nSummary:\nThis change implements war...","Emit warning if define or undef reserved identifier or keyword.\n\nSummary:\nThis change implements warnings if macro name is identical to a keyword or\nreserved identifier. The warnings are different depending on the \"danger\"\nof the operation. Defining macro that replaces a keyword is on by default.\nOther cases produce warning that is off by default but can be turned on\nusing option -Wreserved-id-macro.\n\nThis change fixes PR11488.\n\nReviewers: rnk\n\nReviewed By: rnk\n\nSubscribers: rnk, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D6194\n\nllvm-svn: 223114"}, | ||
[ | [g]={{Kc,368,"bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef, bool *ShadowFlag) {\n // ...\n if (!SourceMgr.isInSystemHeader(MacroNameLoc) && (SourceMgr.getBufferName(MacroNameLoc) != \"<built-in>\")) {\n // ...\n if (D == MD_ReservedMacro)\n Diag(MacroNameTok, diag::warn_pp_macro_is_reserved_id);"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/macro-reserved.c"]={"clang/test/Preprocessor/macro-reserved.c:62:9: warning: macro name is a reserved identifier [-Wreserved-macro-identifier]","clang/test/Preprocessor/macro-reserved.c:63:9: warning: macro name is a reserved identifier [-Wreserved-macro-identifier]","clang/test/Preprocessor/macro-reserved.c:64:9: warning: macro name is a reserved identifier [-Wreserved-macro-identifier]","clang/test/Preprocessor/macro-reserved.c:69:8: warning: macro name is a reserved identifier [-Wreserved-macro-identifier]","clang/test/Preprocessor/macro-reserved.c:70:8: warning: macro name is a reserved identifier [-Wreserved-macro-identifier]"} | ["clang/test/Preprocessor/macro-reserved.c"]={"clang/test/Preprocessor/macro-reserved.c:62:9: warning: macro name is a reserved identifier [-Wreserved-macro-identifier]","clang/test/Preprocessor/macro-reserved.c:63:9: warning: macro name is a reserved identifier [-Wreserved-macro-identifier]","clang/test/Preprocessor/macro-reserved.c:64:9: warning: macro name is a reserved identifier [-Wreserved-macro-identifier]","clang/test/Preprocessor/macro-reserved.c:69:8: warning: macro name is a reserved identifier [-Wreserved-macro-identifier]","clang/test/Preprocessor/macro-reserved.c:70:8: warning: macro name is a reserved identifier [-Wreserved-macro-identifier]"} | ||
} | } | ||
}, | }, | ||
["warn_pp_objc_macro_redef_ignored"]={ | ["warn_pp_objc_macro_redef_ignored"]={ | ||
[ | [i]={"objc-macro-redefinition"}, | ||
[j]="objc-macro-redefinition", | |||
[ | |||
[b]="ignoring redefinition of Objective-C qualifier macro", | [b]="ignoring redefinition of Objective-C qualifier macro", | ||
[ | [d]=h, | ||
[ | [a]="ignoring redefinition of Objective\\-C qualifier macro", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-macro\\-redefinition[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"83760378617d",1449790261,"In Objective-C, ignore attempts to redefine the ARC/GC qualifier macros.\n\nThis works around existing...","In Objective-C, ignore attempts to redefine the ARC/GC qualifier macros.\n\nThis works around existing system headers which unconditionally\nredefine these macros.\n\nThis is reasonably safe to do because we used to warn about it anyway\n(outside of system headers). Continue to warn if the redefinition\nwould have changed the expansion. Still permit redefinition if the\nmacro is explicitly #undef\'ed first.\n\nrdar://23788307\n\nllvm-svn: 255311"}, | ||
[ | [g]={{Kc,3118,"/// HandleDefineDirective - Implements \\#define. This consumes the entire macro\n/// line then lets the caller lex the next real token.\nvoid Preprocessor::HandleDefineDirective(Token &DefineTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n // Finally, if this identifier already had a macro defined for it, verify that\n // the macro bodies are identical, and issue diagnostics if they are not.\n if (const MacroInfo *OtherMI = getMacroInfo(MacroNameTok.getIdentifierInfo())) {\n // ...\n // In Objective-C, ignore attempts to directly redefine the builtin\n // definitions of the ownership qualifiers. It\'s still possible to\n // #undef them.\n if (getLangOpts().ObjC && SourceMgr.getFileID(OtherMI->getDefinitionLoc()) == getPredefinesFileID() && isObjCProtectedMacro(MacroNameTok.getIdentifierInfo())) {\n // Warn if it changes the tokens.\n if ((!getDiagnostics().getSuppressSystemWarnings() || !SourceMgr.isInSystemHeader(DefineTok.getLocation())) && !MI->isIdenticalTo(*OtherMI, *this,\n // ...\n Diag(MI->getDefinitionLoc(), diag::warn_pp_objc_macro_redef_ignored);"}}, | ||
[ | [k]={ | ||
["clang/test/Lexer/objc_macros.m"]={"clang/test/Lexer/objc_macros.m:3:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]","clang/test/Lexer/objc_macros.m:5:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]","clang/test/Lexer/objc_macros.m:7:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]","clang/test/Lexer/objc_macros.m:3:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]","clang/test/Lexer/objc_macros.m:5:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]","clang/test/Lexer/objc_macros.m:7:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]"} | ["clang/test/Lexer/objc_macros.m"]={"clang/test/Lexer/objc_macros.m:3:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]","clang/test/Lexer/objc_macros.m:5:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]","clang/test/Lexer/objc_macros.m:7:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]","clang/test/Lexer/objc_macros.m:3:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]","clang/test/Lexer/objc_macros.m:5:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]","clang/test/Lexer/objc_macros.m:7:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]"} | ||
} | } | ||
}, | }, | ||
["warn_pp_undef_identifier"]={ | ["warn_pp_undef_identifier"]={ | ||
[ | [i]={"undef"}, | ||
[j]="undef", | |||
[ | |||
[b]="%0 is not defined, evaluates to 0", | [b]="%0 is not defined, evaluates to 0", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) is not defined, evaluates to 0", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wundef[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{ac,260,"/// 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 // If this token\'s spelling is a pp-identifier, check to see if it is\n // \'defined\' or if it is a macro. Note that we check here because many\n // keywords are pp-identifiers, so we can\'t check the kind.\n if (IdentifierInfo *II = PeekTok.getIdentifierInfo()) {\n // ...\n if (!II->isCPlusPlusOperatorKeyword()) {\n // If this identifier isn\'t \'defined\' or one of the special\n // preprocessor keywords and it wasn\'t macro expanded, it turns\n // into a simple 0\n if (ValueLive) {\n PP.Diag(PeekTok, diag::warn_pp_undef_identifier) << II;"},{ac,264,"/// 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 // If this token\'s spelling is a pp-identifier, check to see if it is\n // \'defined\' or if it is a macro. Note that we check here because many\n // keywords are pp-identifiers, so we can\'t check the kind.\n if (IdentifierInfo *II = PeekTok.getIdentifierInfo()) {\n // ...\n if (!II->isCPlusPlusOperatorKeyword()) {\n // If this identifier isn\'t \'defined\' or one of the special\n // preprocessor keywords and it wasn\'t macro expanded, it turns\n // into a simple 0\n if (ValueLive) {\n // ...\n if (DiagEngine.isIgnored(diag::warn_pp_undef_identifier, PeekTok.getLocation())) {"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/if_warning.c"]={"clang/test/Preprocessor/if_warning.c:5:5: error: \'foo\' is not defined, evaluates to 0 [-Werror,-Wundef]"} | ["clang/test/Preprocessor/if_warning.c"]={"clang/test/Preprocessor/if_warning.c:5:5: error: \'foo\' is not defined, evaluates to 0 [-Werror,-Wundef]"} | ||
} | } | ||
}, | }, | ||
["warn_pp_undef_prefix"]={ | ["warn_pp_undef_prefix"]={ | ||
[ | [i]={"undef-prefix"}, | ||
[j]="undef-prefix", | |||
[ | |||
[b]="%0 is not defined, evaluates to 0", | [b]="%0 is not defined, evaluates to 0", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) is not defined, evaluates to 0", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wundef\\-prefix[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"89a0c4066b0e",1593534486,"[clang][diagnostics] Add \'-Wundef-prefix\' warning option\n\nSummary:\nAdd an `-Wundef-prefix=<arg1>,<ar...","[clang][diagnostics] Add \'-Wundef-prefix\' warning option\n\nSummary:\nAdd an `-Wundef-prefix=<arg1>,<arg2>...` option, which is similar to `-Wundef`, but only give warnings for undefined macros with the given prefixes.\n\nReviewers: ributzka, steven_wu, cishida, bruno, arphaman, rsmith\n\nReviewed By: ributzka, arphaman\n\nSubscribers: riccibruno, dexonsmith, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D80751\n\nThis patch was authored by Zixu Wang <zixu_wang@apple.com>"}, | ||
[ | [g]={{ac,273,"/// 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 // If this token\'s spelling is a pp-identifier, check to see if it is\n // \'defined\' or if it is a macro. Note that we check here because many\n // keywords are pp-identifiers, so we can\'t check the kind.\n if (IdentifierInfo *II = PeekTok.getIdentifierInfo()) {\n // ...\n if (!II->isCPlusPlusOperatorKeyword()) {\n // If this identifier isn\'t \'defined\' or one of the special\n // preprocessor keywords and it wasn\'t macro expanded, it turns\n // into a simple 0\n if (ValueLive) {\n // ...\n // If \'Wundef\' is enabled, do not emit \'undef-prefix\' diagnostics.\n if (DiagEngine.isIgnored(diag::warn_pp_undef_identifier, PeekTok.getLocation())) {\n // ...\n if (llvm::any_of(UndefPrefixes, [&IdentifierName](const std::string &Prefix) { return IdentifierName.startswith(Prefix); }))\n PP.Diag(PeekTok, diag::warn_pp_undef_prefix) << AddFlagValue{llvm::join(UndefPrefixes, \",\")} << II;"}} | ||
}, | }, | ||
["warn_pragma_align_expected_equal"]={ | ["warn_pragma_align_expected_equal"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected \'=\' following \'#pragma %select{align|options align}0\' - ignored", | [b]="expected \'=\' following \'#pragma %select{align|options align}0\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="expected \'\\=\' following \'\\#pragma (?:align|options align)\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"cb82acb884fb",1280603827,"Parser: Add support for #pragma align, which is just another spelling of #pragma\noptions align.\n\nllv...","Parser: Add support for #pragma align, which is just another spelling of #pragma\noptions align.\n\nllvm-svn: 109952"}, | ||
[ | [g]={{m,2269,"// #pragma \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'options \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'align\' \'(\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'} \')\'\nstatic void ParseAlignPragma(Preprocessor &PP, Token &FirstTok, bool IsOptions) {\n // ...\n if (PP.getLangOpts().XLPragmaPack) {\n // ...\n } else if (Tok.isNot(tok::equal)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_align_expected_equal) << IsOptions;"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/pragma-options.c"]={"clang/test/Parser/pragma-options.c:4:96: warning: expected \'=\' following \'#pragma options align\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-options.c:14:80: warning: expected \'=\' following \'#pragma align\' - ignored [-Wignored-pragmas]"} | ["clang/test/Parser/pragma-options.c"]={"clang/test/Parser/pragma-options.c:4:96: warning: expected \'=\' following \'#pragma options align\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-options.c:14:80: warning: expected \'=\' following \'#pragma align\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_align_invalid_option"]={ | ["warn_pragma_align_invalid_option"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="invalid alignment option in \'#pragma %select{align|options align}0\' - ignored", | [b]="invalid alignment option in \'#pragma %select{align|options align}0\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="invalid alignment option in \'\\#pragma (?:align|options align)\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"cb82acb884fb",1280603827,"Parser: Add support for #pragma align, which is just another spelling of #pragma\noptions align.\n\nllv...","Parser: Add support for #pragma align, which is just another spelling of #pragma\noptions align.\n\nllvm-svn: 109952"}, | ||
[ | [g]={{m,2296,"// #pragma \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'options \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'align\' \'(\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'} \')\'\nstatic void ParseAlignPragma(Preprocessor &PP, Token &FirstTok, bool IsOptions) {\n // ...\n if (II->isStr(\"native\"))\n // ...\n else if (II->isStr(\"natural\"))\n // ...\n else if (II->isStr(\"packed\"))\n // ...\n else if (II->isStr(\"power\"))\n // ...\n else if (II->isStr(\"mac68k\"))\n // ...\n else if (II->isStr(\"reset\"))\n // ...\n else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_align_invalid_option) << IsOptions;"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/pragma-options.c"]={"clang/test/Parser/pragma-options.c:6:104: warning: invalid alignment option in \'#pragma options align\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-options.c:16:88: warning: invalid alignment option in \'#pragma align\' - ignored [-Wignored-pragmas]"} | ["clang/test/Parser/pragma-options.c"]={"clang/test/Parser/pragma-options.c:6:104: warning: invalid alignment option in \'#pragma options align\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-options.c:16:88: warning: invalid alignment option in \'#pragma align\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_align_not_xl_compatible"]={ | ["warn_pragma_align_not_xl_compatible"]={ | ||
[ | [i]={"aix-compat"}, | ||
[j]="aix-compat", | |||
[ | |||
[b]="#pragma align(packed) may not be compatible with objects generated with AIX XL C/C++", | [b]="#pragma align(packed) may not be compatible with objects generated with AIX XL C/C++", | ||
[ | [d]=h, | ||
[ | [a]="\\#pragma align\\(packed\\) may not be compatible with objects generated with AIX XL C\\/C\\+\\+", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Waix\\-compat[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={Xb,1615397021,Ub,Rb}, | ||
[ | [g]={{B,17845,"void Sema::ActOnTagFinishDefinition(Scope *S, Decl *TagD, SourceRange BraceRange) {\n // ...\n // Clangs implementation of #pragma align(packed) differs in bitfield layout\n // from XLs and instead matches the XL #pragma pack(1) behavior.\n if (Context.getTargetInfo().getTriple().isOSAIX() && AlignPackStack.hasValue()) {\n // ...\n // Only warn if there is at least 1 bitfield member.\n if (llvm::any_of(RD->fields(), [](const FieldDecl *FD) { return FD->isBitField(); }))\n Diag(BraceRange.getBegin(), diag::warn_pragma_align_not_xl_compatible);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/aix-pragma-align-packed-warn.c"]={"clang/test/Sema/aix-pragma-align-packed-warn.c:5:10: warning: #pragma align(packed) may not be compatible with objects generated with AIX XL C/C++ [-Waix-compat]","clang/test/Sema/aix-pragma-align-packed-warn.c:11:10: warning: #pragma align(packed) may not be compatible with objects generated with AIX XL C/C++ [-Waix-compat]"} | ["clang/test/Sema/aix-pragma-align-packed-warn.c"]={"clang/test/Sema/aix-pragma-align-packed-warn.c:5:10: warning: #pragma align(packed) may not be compatible with objects generated with AIX XL C/C++ [-Waix-compat]","clang/test/Sema/aix-pragma-align-packed-warn.c:11:10: warning: #pragma align(packed) may not be compatible with objects generated with AIX XL C/C++ [-Waix-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_attribute_unused"]={ | ["warn_pragma_attribute_unused"]={ | ||
[ | [i]={"pragma-clang-attribute",t}, | ||
[j]="pragma-clang-attribute", | |||
[ | |||
[b]="unused attribute %0 in \'#pragma clang attribute push\' region", | [b]="unused attribute %0 in \'#pragma clang attribute push\' region", | ||
[ | [d]=h, | ||
[ | [a]="unused attribute (.*?) in \'\\#pragma clang attribute push\' region", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpragma\\-clang\\-attribute[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"0a849f47d2f7",1492508507,"Add #pragma clang attribute\n\nThe new \'#pragma clang attribute\' directive can be used to apply attrib...","Add #pragma clang attribute\n\nThe new \'#pragma clang attribute\' directive can be used to apply attributes to\nmultiple declarations. An attribute must satisfy the following conditions to\nbe supported by the pragma:\n- It must have a subject list that\'s defined in the TableGen file.\n- It must be documented.\n- It must not be late parsed.\n- It must have a GNU/C++11 spelling.\n\nDifferential Revision: https://reviews.llvm.org/D30009\n\nllvm-svn: 300539"}, | ||
[ | [g]={{gb,1083,"void Sema::ActOnPragmaAttributePop(SourceLocation PragmaLoc, const IdentifierInfo *Namespace) {\n // ...\n // Dig back through the stack trying to find the most recently pushed group\n // that in Namespace. Note that this works fine if no namespace is present,\n // think of push/pops without namespaces as having an implicit \"nullptr\"\n // namespace.\n for (size_t Index = PragmaAttributeStack.size(); Index;) {\n // ...\n if (PragmaAttributeStack[Index].Namespace == Namespace) {\n for (const PragmaAttributeEntry &Entry : PragmaAttributeStack[Index].Entries) {\n if (!Entry.IsUsed) {\n // ...\n Diag(Entry.Attribute->getLoc(), diag::warn_pragma_attribute_unused) << *Entry.Attribute;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/pragma-attribute.c"]={"clang/test/Sema/pragma-attribute.c:6:46: warning: unused attribute \'annotate\' in \'#pragma clang attribute push\' region [-Wpragma-clang-attribute]"} | ["clang/test/Sema/pragma-attribute.c"]={"clang/test/Sema/pragma-attribute.c:6:46: warning: unused attribute \'annotate\' in \'#pragma clang attribute push\' region [-Wpragma-clang-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_comment_ignored"]={ | ["warn_pragma_comment_ignored"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="\'#pragma comment %0\' ignored", | [b]="\'#pragma comment %0\' ignored", | ||
[ | [d]=h, | ||
[ | [a]="\'\\#pragma comment (.*?)\' ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"99efc0361b2d",1427143302,"Adds a warning for unrecognized argument to #pragma comment() on PS4.\n\nPS4 target recognizes the #pr...","Adds a warning for unrecognized argument to #pragma comment() on PS4.\n\nPS4 target recognizes the #pragma comment() syntax as in -fms-extensions, but\nonly handles the case of #pragma comment(lib). This patch adds a warning if any\nother arguments are encountered.\n\nThis patch also refactors the code in ParsePragma.cpp a little bit to make it\nmore obvious that some codes are being shared between -fms-extensions and PS4.\n\nllvm-svn: 233015"}, | ||
[ | [g]={{m,3116,"/// 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 (PP.getTargetInfo().getTriple().isOSBinFormatELF() && Kind != PCK_Lib) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_comment_ignored) << II->getName();"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/pragma-comment-elf.c"]={"clang/test/Preprocessor/pragma-comment-elf.c:12:17: warning: \'#pragma comment linker\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:13:17: warning: \'#pragma comment linker\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:14:18: warning: \'#pragma comment linker\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:16:17: warning: \'#pragma comment user\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:17:17: warning: \'#pragma comment user\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:18:18: warning: \'#pragma comment user\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:20:17: warning: \'#pragma comment compiler\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:21:17: warning: \'#pragma comment compiler\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:22:18: warning: \'#pragma comment compiler\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:24:17: warning: \'#pragma comment exestr\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:25:17: warning: \'#pragma comment exestr\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:26:18: warning: \'#pragma comment exestr\' ignored [-Wignored-pragmas]"} | ["clang/test/Preprocessor/pragma-comment-elf.c"]={"clang/test/Preprocessor/pragma-comment-elf.c:12:17: warning: \'#pragma comment linker\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:13:17: warning: \'#pragma comment linker\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:14:18: warning: \'#pragma comment linker\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:16:17: warning: \'#pragma comment user\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:17:17: warning: \'#pragma comment user\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:18:18: warning: \'#pragma comment user\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:20:17: warning: \'#pragma comment compiler\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:21:17: warning: \'#pragma comment compiler\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:22:18: warning: \'#pragma comment compiler\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:24:17: warning: \'#pragma comment exestr\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:25:17: warning: \'#pragma comment exestr\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:26:18: warning: \'#pragma comment exestr\' ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_debug_dependent_argument"]={ | ["warn_pragma_debug_dependent_argument"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="%select{value|type}0-dependent expression passed as an argument to debug command", | [b]="%select{value|type}0-dependent expression passed as an argument to debug command", | ||
[ | [d]=h, | ||
[ | [a]="(?:value|type)\\-dependent expression passed as an argument to debug command", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"ef9ec4bbcca2",1677810915,"[OpenMP] Add the `ompx_attribute` clause for target directives\n\nCUDA and HIP have kernel attributes ...","[OpenMP] Add the `ompx_attribute` clause for target directives\n\nCUDA and HIP have kernel attributes to tune the code generation (in the\nbackend). To reuse this functionality for OpenMP target regions we\nintroduce the `ompx_attribute` clause that takes these kernel\nattributes and emits code as if they had been attached to the kernel\nfuction (which is implicitly generated).\n\nTo limit the impact, we only support three kernel attributes:\n`amdgpu_waves_per_eu`, for AMDGPU\n`amdgpu_flat_work_group_size`, for AMDGPU\n`launch_bounds`, for NVPTX\n\nThe existing implementations of those attributes are used for error\nchecking and code generation. `ompx_attribute` can be attached to any\nexecutable target region and it can hold more than one kernel attribute.\n\nDifferential Revision: https://reviews.llvm.org/D156184"}, | ||
[ | [g]={{m,732,"void Parser::HandlePragmaDump() {\n // ...\n if (Tok.is(tok::eod)) {\n // ...\n } else if (NextToken().is(tok::eod)) {\n // ...\n } else {\n // ...\n if (!E.isUsable() || E.get()->containsErrors()) {\n // ...\n } else if (E.get()->getDependence() != ExprDependence::None) {\n PP.Diag(StartLoc, diag::warn_pragma_debug_dependent_argument) << E.get()->isTypeDependent() << SourceRange(StartLoc, Tok.getLocation());"}}, | ||
[ | [k]={ | ||
["clang/test/AST/ast-dump-lookups.cpp"]={"clang/test/AST/ast-dump-lookups.cpp:79:28: warning: type-dependent expression passed as an argument to debug command [-Wignored-pragmas]","clang/test/AST/ast-dump-lookups.cpp:80:28: warning: value-dependent expression passed as an argument to debug command [-Wignored-pragmas]"} | ["clang/test/AST/ast-dump-lookups.cpp"]={"clang/test/AST/ast-dump-lookups.cpp:79:28: warning: type-dependent expression passed as an argument to debug command [-Wignored-pragmas]","clang/test/AST/ast-dump-lookups.cpp:80:28: warning: value-dependent expression passed as an argument to debug command [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_debug_missing_argument"]={ | ["warn_pragma_debug_missing_argument"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="missing argument to debug command \'%0\'", | [b]="missing argument to debug command \'%0\'", | ||
[ | [d]=h, | ||
[ | [a]="missing argument to debug command \'(.*?)\'", | ||
[ | [e]=z, | ||
[ | [c]=x, | ||
[ | [f]={"ba3a4f917f2d",1452635966,"Improve AST dumping:\n\n 1) When dumping a declaration that declares a name for a type, also dump the ...","Improve AST dumping:\n\n 1) When dumping a declaration that declares a name for a type, also dump the named type.\n 2) Add a #pragma clang __debug dump X, that dumps the lookup results for X in\n the current context.\n\nllvm-svn: 257529"}, | ||
[ | [g]={{C,1098,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (II->isStr(\"assert\")) {\n // ...\n } else if (II->isStr(\"crash\")) {\n // ...\n } else if (II->isStr(\"parser_crash\")) {\n // ...\n } else if (II->isStr(\"dump\")) {\n // ...\n } else if (II->isStr(\"diag_mapping\")) {\n // ...\n if (DiagName.is(tok::eod))\n // ...\n else if (DiagName.is(tok::string_literal) && !DiagName.hasUDSuffix()) {\n // ...\n } else {\n PP.Diag(DiagName, diag::warn_pragma_debug_missing_argument) << II->getName();"},{C,1114,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (II->isStr(\"assert\")) {\n // ...\n } else if (II->isStr(\"crash\")) {\n // ...\n } else if (II->isStr(\"parser_crash\")) {\n // ...\n } else if (II->isStr(\"dump\")) {\n // ...\n } else if (II->isStr(\"diag_mapping\")) {\n // ...\n } else if (II->isStr(\"llvm_fatal_error\")) {\n // ...\n } else if (II->isStr(\"llvm_unreachable\")) {\n // ...\n } else if (II->isStr(\"macro\")) {\n // ...\n if (MacroII)\n // ...\n else\n PP.Diag(MacroName, diag::warn_pragma_debug_missing_argument) << II->getName();"},{C,1166,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (II->isStr(\"assert\")) {\n // ...\n } else if (II->isStr(\"crash\")) {\n // ...\n } else if (II->isStr(\"parser_crash\")) {\n // ...\n } else if (II->isStr(\"dump\")) {\n // ...\n } else if (II->isStr(\"diag_mapping\")) {\n // ...\n } else if (II->isStr(\"llvm_fatal_error\")) {\n // ...\n } else if (II->isStr(\"llvm_unreachable\")) {\n // ...\n } else if (II->isStr(\"macro\")) {\n // ...\n } else if (II->isStr(\"module_map\")) {\n // ...\n } else if (II->isStr(\"overflow_stack\")) {\n // ...\n } else if (II->isStr(\"captured\")) {\n // ...\n } else if (II->isStr(\"modules\")) {\n // ...\n if (!DumpII) {\n PP.Diag(Kind, diag::warn_pragma_debug_missing_argument) << II->getName();"},{m,713,"void Parser::HandlePragmaDump() {\n // ...\n if (Tok.is(tok::eod)) {\n PP.Diag(Tok, diag::warn_pragma_debug_missing_argument) << \"dump\";"}} | ||
}, | }, | ||
["warn_pragma_debug_missing_command"]={ | ["warn_pragma_debug_missing_command"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="missing debug command", | [b]="missing debug command", | ||
[ | [d]=h, | ||
[ | [a]="missing debug command", | ||
[ | [e]=z, | ||
[ | [c]=x, | ||
[ | [f]={lb,1625925174,mb,nb}, | ||
[ | [g]={{C,1059,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok, diag::warn_pragma_debug_missing_command);"}} | ||
}, | }, | ||
["warn_pragma_debug_unexpected_argument"]={ | ["warn_pragma_debug_unexpected_argument"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="unexpected argument to debug command", | [b]="unexpected argument to debug command", | ||
[ | [d]=h, | ||
[ | [a]="unexpected argument to debug command", | ||
[ | [e]=z, | ||
[ | [c]=x, | ||
[ | [f]={"31f4859c3e4d",1667168400,"[Clang] Allow additional mathematical symbols in identifiers.\n\nImplement the proposed UAX Profile\n\"M...","[Clang] Allow additional mathematical symbols in identifiers.\n\nImplement the proposed UAX Profile\n\"Mathematical notation profile for default identifiers\".\n\nThis implements a not-yet approved Unicode for a vetted\nUAX31 identifier profile\nhttps://www.unicode.org/L2/L2022/22230-math-profile.pdf\n\nThis change mitigates the reported disruption caused\nby the implementation of UAX31 in C++ and C2x,\nas these mathematical symbols are commonly used in the\nscientific community.\n\nFixes #54732\n\nReviewed By: tahonermann, #clang-language-wg\n\nDifferential Revision: https://reviews.llvm.org/D137051"}, | ||
[ | [g]={{C,1199,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (II->isStr(\"assert\")) {\n // ...\n } else if (II->isStr(\"crash\")) {\n // ...\n } else if (II->isStr(\"parser_crash\")) {\n // ...\n } else if (II->isStr(\"dump\")) {\n // ...\n } else if (II->isStr(\"diag_mapping\")) {\n // ...\n } else if (II->isStr(\"llvm_fatal_error\")) {\n // ...\n } else if (II->isStr(\"llvm_unreachable\")) {\n // ...\n } else if (II->isStr(\"macro\")) {\n // ...\n } else if (II->isStr(\"module_map\")) {\n // ...\n } else if (II->isStr(\"overflow_stack\")) {\n // ...\n } else if (II->isStr(\"captured\")) {\n // ...\n } else if (II->isStr(\"modules\")) {\n // ...\n } else if (II->isStr(\"sloc_usage\")) {\n // ...\n if (ArgToken.is(tok::numeric_constant) && PP.parseSimpleIntegerLiteral(ArgToken, Value)) {\n // ...\n } else if (ArgToken.isNot(tok::eod)) {\n PP.Diag(ArgToken, diag::warn_pragma_debug_unexpected_argument);"},{m,716,"void Parser::HandlePragmaDump() {\n // ...\n if (Tok.is(tok::eod)) {\n // ...\n } else if (NextToken().is(tok::eod)) {\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok, diag::warn_pragma_debug_unexpected_argument);"}} | ||
}, | }, | ||
["warn_pragma_debug_unexpected_command"]={ | ["warn_pragma_debug_unexpected_command"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="unexpected debug command \'%0\'", | [b]="unexpected debug command \'%0\'", | ||
[ | [d]=h, | ||
[ | [a]="unexpected debug command \'(.*?)\'", | ||
[ | [e]=z, | ||
[ | [c]=x, | ||
[ | [f]={"f2cf329ccd1b",1282084368,"Lex: Add #pragma clang __debug {llvm_fatal_error, llvm_unreachable}, for testing\nthose crash paths.\n...","Lex: Add #pragma clang __debug {llvm_fatal_error, llvm_unreachable}, for testing\nthose crash paths.\n\nllvm-svn: 111311"}, | ||
[ | [g]={{C,1185,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (II->isStr(\"assert\")) {\n // ...\n } else if (II->isStr(\"crash\")) {\n // ...\n } else if (II->isStr(\"parser_crash\")) {\n // ...\n } else if (II->isStr(\"dump\")) {\n // ...\n } else if (II->isStr(\"diag_mapping\")) {\n // ...\n } else if (II->isStr(\"llvm_fatal_error\")) {\n // ...\n } else if (II->isStr(\"llvm_unreachable\")) {\n // ...\n } else if (II->isStr(\"macro\")) {\n // ...\n } else if (II->isStr(\"module_map\")) {\n // ...\n } else if (II->isStr(\"overflow_stack\")) {\n // ...\n } else if (II->isStr(\"captured\")) {\n // ...\n } else if (II->isStr(\"modules\")) {\n // ...\n if (!DumpII) {\n // ...\n } else if (DumpII->isStr(\"all\")) {\n // ...\n } else if (DumpII->isStr(\"visible\")) {\n // ...\n } else if (DumpII->isStr(\"building\")) {\n // ...\n } else {\n PP.Diag(Tok, diag::warn_pragma_debug_unexpected_command) << DumpII->getName();"},{C,1206,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (II->isStr(\"assert\")) {\n // ...\n } else if (II->isStr(\"crash\")) {\n // ...\n } else if (II->isStr(\"parser_crash\")) {\n // ...\n } else if (II->isStr(\"dump\")) {\n // ...\n } else if (II->isStr(\"diag_mapping\")) {\n // ...\n } else if (II->isStr(\"llvm_fatal_error\")) {\n // ...\n } else if (II->isStr(\"llvm_unreachable\")) {\n // ...\n } else if (II->isStr(\"macro\")) {\n // ...\n } else if (II->isStr(\"module_map\")) {\n // ...\n } else if (II->isStr(\"overflow_stack\")) {\n // ...\n } else if (II->isStr(\"captured\")) {\n // ...\n } else if (II->isStr(\"modules\")) {\n // ...\n } else if (II->isStr(\"sloc_usage\")) {\n // ...\n } else {\n PP.Diag(Tok, diag::warn_pragma_debug_unexpected_command) << II->getName();"}} | ||
}, | }, | ||
["warn_pragma_debug_unknown_module"]={ | ["warn_pragma_debug_unknown_module"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="unknown module \'%0\'", | [b]="unknown module \'%0\'", | ||
[ | [d]=h, | ||
[ | [a]="unknown module \'(.*?)\'", | ||
[ | [e]=z, | ||
[ | [c]=x, | ||
[ | [f]={"77e53cbe8473",1555549021,"Add \'#pragma clang __debug module_map module.name\' to dump the module\nmap being used for the module ...","Add \'#pragma clang __debug module_map module.name\' to dump the module\nmap being used for the module \'module.name\'.\n\nllvm-svn: 358632"}, | ||
[ | [g]={{C,1126,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (II->isStr(\"assert\")) {\n // ...\n } else if (II->isStr(\"crash\")) {\n // ...\n } else if (II->isStr(\"parser_crash\")) {\n // ...\n } else if (II->isStr(\"dump\")) {\n // ...\n } else if (II->isStr(\"diag_mapping\")) {\n // ...\n } else if (II->isStr(\"llvm_fatal_error\")) {\n // ...\n } else if (II->isStr(\"llvm_unreachable\")) {\n // ...\n } else if (II->isStr(\"macro\")) {\n // ...\n } else if (II->isStr(\"module_map\")) {\n // ...\n for (auto IIAndLoc : ModuleName) {\n // ...\n if (!M) {\n PP.Diag(IIAndLoc.second, diag::warn_pragma_debug_unknown_module) << IIAndLoc.first;"}} | ||
}, | }, | ||
["warn_pragma_deprecated_macro_use"]={ | ["warn_pragma_deprecated_macro_use"]={ | ||
[ | [i]={wb,"deprecated-pragma","pedantic-macros"}, | ||
[j]="deprecated-pragma", | |||
[ | |||
[b]="macro %0 has been marked as deprecated%select{|: %2}1", | [b]="macro %0 has been marked as deprecated%select{|: %2}1", | ||
[ | [d]=h, | ||
[ | [a]="macro (.*?) has been marked as deprecated(?:|\\: (.*?))", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-pragma[^\\]]*\\]", | ||
[ | [c]=Tb, | ||
[ | [f]={lb,1625925174,mb,nb}, | ||
[ | [g]={{Hc,1455,"void Preprocessor::emitMacroDeprecationWarning(const Token &Identifier) const {\n // ...\n if (Info.Message.empty())\n Diag(Identifier, diag::warn_pragma_deprecated_macro_use) << Identifier.getIdentifierInfo() << 0;"},{Hc,1458,"void Preprocessor::emitMacroDeprecationWarning(const Token &Identifier) const {\n // ...\n if (Info.Message.empty())\n // ...\n else\n Diag(Identifier, diag::warn_pragma_deprecated_macro_use) << Identifier.getIdentifierInfo() << 1 << Info.Message;"}}, | ||
[ | [k]={ | ||
["clang/test/Lexer/deprecate-macro.c"]={"clang/test/Lexer/deprecate-macro.c:17:5: warning: macro \'bar\' has been marked as deprecated: bar is deprecated use 1 [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:35:5: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:39:13: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:43:8: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:47:9: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:55:10: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:73:7: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:80:10: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:87:11: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]"} | ["clang/test/Lexer/deprecate-macro.c"]={"clang/test/Lexer/deprecate-macro.c:17:5: warning: macro \'bar\' has been marked as deprecated: bar is deprecated use 1 [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:35:5: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:39:13: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:43:8: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:47:9: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:55:10: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:73:7: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:80:10: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:87:11: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_diagnostic_cannot_pop"]={ | ["warn_pragma_diagnostic_cannot_pop"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="pragma diagnostic pop could not pop, no matching push", | [b]="pragma diagnostic pop could not pop, no matching push", | ||
[ | [d]=h, | ||
[ | [a]="pragma diagnostic pop could not pop, no matching push", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"3cc2648b476e",1283181334,"Now that GCC will have #pragma push/pop (in GCC 4.6), allow the\n#pragma without requiring it to be i...","Now that GCC will have #pragma push/pop (in GCC 4.6), allow the\n#pragma without requiring it to be in the \"clang\" namespace, from\nLouis Gerbarg!\n\nllvm-svn: 112484"}, | ||
[ | [g]={{C,1302,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (II->isStr(\"pop\")) {\n if (!PP.getDiagnostics().popMappings(DiagLoc))\n PP.Diag(Tok, diag::warn_pragma_diagnostic_cannot_pop);"},{C,1424,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n } else if (II && II->isStr(\"pop\")) {\n // ...\n if (!PP.getDiagnostics().popMappings(DiagLoc))\n PP.Diag(Tok, diag::warn_pragma_diagnostic_cannot_pop);"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/pushable-diagnostics.c"]={"clang/test/Preprocessor/pushable-diagnostics.c:3:106: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]","clang/test/Preprocessor/pushable-diagnostics.c:17:106: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]"} | ["clang/test/Preprocessor/pushable-diagnostics.c"]={"clang/test/Preprocessor/pushable-diagnostics.c:3:106: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]","clang/test/Preprocessor/pushable-diagnostics.c:17:106: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_diagnostic_invalid"]={ | ["warn_pragma_diagnostic_invalid"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="pragma diagnostic expected \'error\', \'warning\', \'ignored\', \'fatal\', \'push\', or \'pop\'", | [b]="pragma diagnostic expected \'error\', \'warning\', \'ignored\', \'fatal\', \'push\', or \'pop\'", | ||
[ | [d]=h, | ||
[ | [a]="pragma diagnostic expected \'error\', \'warning\', \'ignored\', \'fatal\', \'push\', or \'pop\'", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"504af1177d9c",1240183018,"implement \"#pragma GCC diagnostic\". Besides being a nice feature, this\nwill let us test for multipl...","implement \"#pragma GCC diagnostic\". Besides being a nice feature, this\nwill let us test for multiple different warning modes in the same\nfile in regression tests.\n\nThis implements rdar://2362963, a 10-year old feature request :)\n\nllvm-svn: 69560"}, | ||
[ | [g]={{C,1290,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok, diag::warn_pragma_diagnostic_invalid);"},{C,1327,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (SV == diag::Severity()) {\n PP.Diag(Tok, diag::warn_pragma_diagnostic_invalid);"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/pushable-diagnostics.c"]={"clang/test/Preprocessor/pushable-diagnostics.c:5:138: warning: pragma diagnostic expected \'error\', \'warning\', \'ignored\', \'fatal\', \'push\', or \'pop\' [-Wunknown-pragmas]"} | ["clang/test/Preprocessor/pushable-diagnostics.c"]={"clang/test/Preprocessor/pushable-diagnostics.c:5:138: warning: pragma diagnostic expected \'error\', \'warning\', \'ignored\', \'fatal\', \'push\', or \'pop\' [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_diagnostic_invalid_option"]={ | ["warn_pragma_diagnostic_invalid_option"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="pragma diagnostic expected option name (e.g. \"-Wundef\")", | [b]="pragma diagnostic expected option name (e.g. \"-Wundef\")", | ||
[ | [d]=h, | ||
[ | [a]="pragma diagnostic expected option name \\(e\\.g\\. \"\\-Wundef\"\\)", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"504af1177d9c",1240183018,"implement \"#pragma GCC diagnostic\". Besides being a nice feature, this\nwill let us test for multipl...","implement \"#pragma GCC diagnostic\". Besides being a nice feature, this\nwill let us test for multiple different warning modes in the same\nfile in regression tests.\n\nThis implements rdar://2362963, a 10-year old feature request :)\n\nllvm-svn: 69560"}, | ||
[ | [g]={{C,1345,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (WarningName.size() < 3 || WarningName[0] != \'-\' || (WarningName[1] != \'W\' && WarningName[1] != \'R\')) {\n PP.Diag(StringLoc, diag::warn_pragma_diagnostic_invalid_option);"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/pragma_diagnostic.c"]={"clang/test/Preprocessor/pragma_diagnostic.c:30:30: warning: pragma diagnostic expected option name (e.g. \"-Wundef\") [-Wunknown-pragmas]"} | ["clang/test/Preprocessor/pragma_diagnostic.c"]={"clang/test/Preprocessor/pragma_diagnostic.c:30:30: warning: pragma diagnostic expected option name (e.g. \"-Wundef\") [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_diagnostic_invalid_token"]={ | ["warn_pragma_diagnostic_invalid_token"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="unexpected token in pragma diagnostic", | [b]="unexpected token in pragma diagnostic", | ||
[ | [d]=h, | ||
[ | [a]="unexpected token in pragma diagnostic", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"504af1177d9c",1240183018,"implement \"#pragma GCC diagnostic\". Besides being a nice feature, this\nwill let us test for multipl...","implement \"#pragma GCC diagnostic\". Besides being a nice feature, this\nwill let us test for multiple different warning modes in the same\nfile in regression tests.\n\nThis implements rdar://2362963, a 10-year old feature request :)\n\nllvm-svn: 69560"}, | ||
[ | [g]={{C,1307,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (II->isStr(\"pop\")) {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok.getLocation(), diag::warn_pragma_diagnostic_invalid_token);"},{C,1315,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (II->isStr(\"pop\")) {\n // ...\n } else if (II->isStr(\"push\")) {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok.getLocation(), diag::warn_pragma_diagnostic_invalid_token);"},{C,1339,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_diagnostic_invalid_token);"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/pragma_diagnostic.c"]={"clang/test/Preprocessor/pragma_diagnostic.c:29:40: warning: unexpected token in pragma diagnostic [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_diagnostic.c:38:31: warning: unexpected token in pragma diagnostic [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_diagnostic.c:39:30: warning: unexpected token in pragma diagnostic [-Wunknown-pragmas]"} | ["clang/test/Preprocessor/pragma_diagnostic.c"]={"clang/test/Preprocessor/pragma_diagnostic.c:29:40: warning: unexpected token in pragma diagnostic [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_diagnostic.c:38:31: warning: unexpected token in pragma diagnostic [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_diagnostic.c:39:30: warning: unexpected token in pragma diagnostic [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_diagnostic_unknown_warning"]={ | ["warn_pragma_diagnostic_unknown_warning"]={ | ||
[ | [i]={qc}, | ||
[j]=qc, | |||
[ | |||
[b]="unknown warning group \'%0\', ignored", | [b]="unknown warning group \'%0\', ignored", | ||
[ | [d]=h, | ||
[ | [a]="unknown warning group \'(.*?)\', ignored", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunknown\\-warning\\-option[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"504af1177d9c",1240183018,"implement \"#pragma GCC diagnostic\". Besides being a nice feature, this\nwill let us test for multipl...","implement \"#pragma GCC diagnostic\". Besides being a nice feature, this\nwill let us test for multiple different warning modes in the same\nfile in regression tests.\n\nThis implements rdar://2362963, a 10-year old feature request :)\n\nllvm-svn: 69560"}, | ||
[ | [g]={{C,1362,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (unknownDiag)\n PP.Diag(StringLoc, diag::warn_pragma_diagnostic_unknown_warning) << WarningName;"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/pragma_diagnostic.c"]={"clang/test/Preprocessor/pragma_diagnostic.c:32:30: warning: unknown warning group \'-Winvalid-name\', ignored [-Wunknown-warning-option]"} | ["clang/test/Preprocessor/pragma_diagnostic.c"]={"clang/test/Preprocessor/pragma_diagnostic.c:32:30: warning: unknown warning group \'-Winvalid-name\', ignored [-Wunknown-warning-option]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_exec_charset_expected"]={ | ["warn_pragma_exec_charset_expected"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="#pragma execution_character_set expected \'%0\'", | [b]="#pragma execution_character_set expected \'%0\'", | ||
[ | [d]=h, | ||
[ | [a]="\\#pragma execution_character_set expected \'(.*?)\'", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"0f56b22614c8",1552587137,"Add PragmaHandler for MSVC pragma execution_character_set\n\n__pragma(execution_character_set(push, \"U...","Add PragmaHandler for MSVC pragma execution_character_set\n\n__pragma(execution_character_set(push, \"UTF-8\")) is used in\nTraceLoggingProvider.h. This commit implements a no-op handler for\ncompatability, similar to how the flag -fexec_charset is handled.\n\nPatch by Matt Gardner!\n\nDifferential Revision: https://reviews.llvm.org/D58530\n\nllvm-svn: 356185"}, | ||
[ | [g]={{C,1542,"/// \"\\#pragma execution_character_set(...)\". MSVC supports this pragma only\n/// for \"UTF-8\". We parse it and ignore it if UTF-8 is provided and warn\n/// otherwise to avoid -Wunknown-pragma warnings.\nstruct PragmaExecCharsetHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok, diag::warn_pragma_exec_charset_expected) << \"(\";"},{C,1580,"/// \"\\#pragma execution_character_set(...)\". MSVC supports this pragma only\n/// for \"UTF-8\". We parse it and ignore it if UTF-8 is provided and warn\n/// otherwise to avoid -Wunknown-pragma warnings.\nstruct PragmaExecCharsetHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok, diag::warn_pragma_exec_charset_expected) << \")\";"}}, | ||
[ | [k]={ | ||
[ | [ub]={"clang/test/Preprocessor/pragma_microsoft.c:244:85: warning: #pragma execution_character_set expected \'(\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:249:85: warning: #pragma execution_character_set expected \')\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:250:36: warning: #pragma execution_character_set expected \')\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:251:36: warning: #pragma execution_character_set expected \')\' [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_exec_charset_push_invalid"]={ | ["warn_pragma_exec_charset_push_invalid"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="#pragma execution_character_set invalid value \'%0\', only \'UTF-8\' is supported", | [b]="#pragma execution_character_set invalid value \'%0\', only \'UTF-8\' is supported", | ||
[ | [d]=h, | ||
[ | [a]="\\#pragma execution_character_set invalid value \'(.*?)\', only \'UTF\\-8\' is supported", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"0f56b22614c8",1552587137,"Add PragmaHandler for MSVC pragma execution_character_set\n\n__pragma(execution_character_set(push, \"U...","Add PragmaHandler for MSVC pragma execution_character_set\n\n__pragma(execution_character_set(push, \"UTF-8\")) is used in\nTraceLoggingProvider.h. This commit implements a no-op handler for\ncompatability, similar to how the flag -fexec_charset is handled.\n\nPatch by Matt Gardner!\n\nDifferential Revision: https://reviews.llvm.org/D58530\n\nllvm-svn: 356185"}, | ||
[ | [g]={{C,1563,"/// \"\\#pragma execution_character_set(...)\". MSVC supports this pragma only\n/// for \"UTF-8\". We parse it and ignore it if UTF-8 is provided and warn\n/// otherwise to avoid -Wunknown-pragma warnings.\nstruct PragmaExecCharsetHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n // MSVC supports either of these, but nothing else.\n if (ExecCharset != \"UTF-8\" && ExecCharset != \"utf-8\") {\n PP.Diag(Tok, diag::warn_pragma_exec_charset_push_invalid) << ExecCharset;"}}, | ||
[ | [k]={ | ||
[ | [ub]={"clang/test/Preprocessor/pragma_microsoft.c:255:45: warning: #pragma execution_character_set invalid value \'asdf\', only \'UTF-8\' is supported [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_exec_charset_spec_invalid"]={ | ["warn_pragma_exec_charset_spec_invalid"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="#pragma execution_character_set expected \'push\' or \'pop\'", | [b]="#pragma execution_character_set expected \'push\' or \'pop\'", | ||
[ | [d]=h, | ||
[ | [a]="\\#pragma execution_character_set expected \'push\' or \'pop\'", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"0f56b22614c8",1552587137,"Add PragmaHandler for MSVC pragma execution_character_set\n\n__pragma(execution_character_set(push, \"U...","Add PragmaHandler for MSVC pragma execution_character_set\n\n__pragma(execution_character_set(push, \"UTF-8\")) is used in\nTraceLoggingProvider.h. This commit implements a no-op handler for\ncompatability, similar to how the flag -fexec_charset is handled.\n\nPatch by Matt Gardner!\n\nDifferential Revision: https://reviews.llvm.org/D58530\n\nllvm-svn: 356185"}, | ||
[ | [g]={{C,1575,"/// \"\\#pragma execution_character_set(...)\". MSVC supports this pragma only\n/// for \"UTF-8\". We parse it and ignore it if UTF-8 is provided and warn\n/// otherwise to avoid -Wunknown-pragma warnings.\nstruct PragmaExecCharsetHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n } else if (II && II->isStr(\"pop\")) {\n // ...\n } else {\n PP.Diag(Tok, diag::warn_pragma_exec_charset_spec_invalid);"}}, | ||
[ | [k]={ | ||
[ | [ub]={"clang/test/Preprocessor/pragma_microsoft.c:245:97: warning: #pragma execution_character_set expected \'push\' or \'pop\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:246:33: warning: #pragma execution_character_set expected \'push\' or \'pop\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:247:33: warning: #pragma execution_character_set expected \'push\' or \'pop\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:248:33: warning: #pragma execution_character_set expected \'push\' or \'pop\' [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_expected_action_or_r_paren"]={ | ["warn_pragma_expected_action_or_r_paren"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected action or \')\' in \'#pragma %0\' - ignored", | [b]="expected action or \')\' in \'#pragma %0\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="expected action or \'\\)\' in \'\\#pragma (.*?)\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={oc,1396996247,pc,rc}, | ||
[ | [g]={{m,1014,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n while (Tok.is(tok::comma)) {\n // ...\n if (!Tok.isAnyIdentifier()) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_action_or_r_paren) << PragmaName;"}}, | ||
[ | [k]={ | ||
[ | [uc]={"clang/test/Sema/pragma-section.c:39:9: warning: expected action or \')\' in \'#pragma section\' - ignored [-Wignored-pragmas]","clang/test/Sema/pragma-section.c:44:9: warning: expected action or \')\' in \'#pragma section\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_expected_colon"]={ | ["warn_pragma_expected_colon"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="missing \':\' after %0 - ignoring", | [b]="missing \':\' after %0 - ignoring", | ||
[ | [d]=h, | ||
[ | [a]="missing \'\\:\' after (.*?) \\- ignoring", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"7ce13fc940de",1297647773,"OpenCL: add support for __kernel, kernel keywords and EXTENSION,\nFP_CONTRACT pragmas. Patch origina...","OpenCL: add support for __kernel, kernel keywords and EXTENSION,\nFP_CONTRACT pragmas. Patch originally by ARM.\n\nllvm-svn: 125475"}, | ||
[ | [g]={{F,3614,"/// Parses a comma-separated list of interop-types and a prefer_type list.\n///\nbool Parser::ParseOMPInteropInfo(OMPInteropInfo &InteropInfo, OpenMPClauseKind Kind) {\n // ...\n if (Kind == OMPC_init) {\n if (Tok.isNot(tok::colon) && (IsTarget || IsTargetSync))\n Diag(Tok, diag::warn_pragma_expected_colon) << \"interop types\";"},{F,3830,"/// Parsing of OpenMP clauses with single expressions and some additional\n/// argument like \'schedule\' or \'dist_schedule\'.\n///\n/// schedule-clause:\n/// \'schedule\' \'(\' [ modifier [ \',\' modifier ] \':\' ] kind [\',\' expression ]\n/// \')\'\n///\n/// if-clause:\n/// \'if\' \'(\' [ directive-name-modifier \':\' ] expression \')\'\n///\n/// defaultmap:\n/// \'defaultmap\' \'(\' modifier [ \':\' kind ] \')\'\n///\n/// device-clause:\n/// \'device\' \'(\' [ device-modifier \':\' ] expression \')\'\n///\nOMPClause *Parser::ParseOpenMPSingleExprWithArgClause(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, bool ParseOnly) {\n // ...\n if (Kind == OMPC_schedule) {\n // ...\n if (KindModifier > OMPC_SCHEDULE_unknown) {\n // ...\n // Parse \':\'\n if (Tok.is(tok::colon))\n // ...\n else\n Diag(Tok, diag::warn_pragma_expected_colon) << \"schedule modifier\";"},{F,3871,"/// Parsing of OpenMP clauses with single expressions and some additional\n/// argument like \'schedule\' or \'dist_schedule\'.\n///\n/// schedule-clause:\n/// \'schedule\' \'(\' [ modifier [ \',\' modifier ] \':\' ] kind [\',\' expression ]\n/// \')\'\n///\n/// if-clause:\n/// \'if\' \'(\' [ directive-name-modifier \':\' ] expression \')\'\n///\n/// defaultmap:\n/// \'defaultmap\' \'(\' modifier [ \':\' kind ] \')\'\n///\n/// device-clause:\n/// \'device\' \'(\' [ device-modifier \':\' ] expression \')\'\n///\nOMPClause *Parser::ParseOpenMPSingleExprWithArgClause(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, bool ParseOnly) {\n // ...\n if (Kind == OMPC_schedule) {\n // ...\n } else if (Kind == OMPC_dist_schedule) {\n // ...\n } else if (Kind == OMPC_defaultmap) {\n // ...\n // Parse \':\'\n if (Tok.is(tok::colon) || getLangOpts().OpenMP < 50) {\n if (Tok.is(tok::colon))\n // ...\n else if (Arg.back() != OMPC_DEFAULTMAP_MODIFIER_unknown)\n Diag(Tok, diag::warn_pragma_expected_colon) << \"defaultmap modifier\";"},{F,3902,"/// Parsing of OpenMP clauses with single expressions and some additional\n/// argument like \'schedule\' or \'dist_schedule\'.\n///\n/// schedule-clause:\n/// \'schedule\' \'(\' [ modifier [ \',\' modifier ] \':\' ] kind [\',\' expression ]\n/// \')\'\n///\n/// if-clause:\n/// \'if\' \'(\' [ directive-name-modifier \':\' ] expression \')\'\n///\n/// defaultmap:\n/// \'defaultmap\' \'(\' modifier [ \':\' kind ] \')\'\n///\n/// device-clause:\n/// \'device\' \'(\' [ device-modifier \':\' ] expression \')\'\n///\nOMPClause *Parser::ParseOpenMPSingleExprWithArgClause(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, bool ParseOnly) {\n // ...\n if (Kind == OMPC_schedule) {\n // ...\n } else if (Kind == OMPC_dist_schedule) {\n // ...\n } else if (Kind == OMPC_defaultmap) {\n // ...\n } else if (Kind == OMPC_order) {\n // ...\n if (KindModifier > OMPC_ORDER_unknown) {\n // ...\n // Parse \':\'\n if (Tok.is(tok::colon))\n // ...\n else\n Diag(Tok, diag::warn_pragma_expected_colon) << \"order modifier\";"},{F,4373,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n if (Tok.is(tok::colon))\n // ...\n else\n Diag(Tok, diag::warn_pragma_expected_colon) << \"reduction identifier\";"},{F,4419,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n } else if (Kind == OMPC_depend || Kind == OMPC_doacross) {\n // ...\n if (Tok.is(tok::colon)) {\n // ...\n } else if (Kind != OMPC_doacross || Tok.isNot(tok::r_paren)) {\n Diag(Tok, DKind == OMPD_ordered ? diag::warn_pragma_expected_colon_r_paren : diag::warn_pragma_expected_colon) << (Kind == OMPC_depend ? \"dependency type\" : \"dependence-type\");"},{F,4575,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n } else if (Kind == OMPC_depend || Kind == OMPC_doacross) {\n // ...\n } else if (Kind == OMPC_linear) {\n // ...\n } else if (Kind == OMPC_lastprivate) {\n // ...\n } else if (Kind == OMPC_map) {\n // ...\n } else if (Kind == OMPC_to || Kind == OMPC_from) {\n // ...\n if (!Data.MotionModifiers.empty() && Tok.isNot(tok::colon)) {\n if (!IsInvalidMapperModifier) {\n if (getLangOpts().OpenMP < 51)\n Diag(Tok, diag::warn_pragma_expected_colon) << \")\";"},{F,4577,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n } else if (Kind == OMPC_depend || Kind == OMPC_doacross) {\n // ...\n } else if (Kind == OMPC_linear) {\n // ...\n } else if (Kind == OMPC_lastprivate) {\n // ...\n } else if (Kind == OMPC_map) {\n // ...\n } else if (Kind == OMPC_to || Kind == OMPC_from) {\n // ...\n if (!Data.MotionModifiers.empty() && Tok.isNot(tok::colon)) {\n if (!IsInvalidMapperModifier) {\n if (getLangOpts().OpenMP < 51)\n // ...\n else\n Diag(Tok, diag::warn_pragma_expected_colon) << \"motion modifier\";"},{F,4637,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n } else if (Kind == OMPC_depend || Kind == OMPC_doacross) {\n // ...\n } else if (Kind == OMPC_linear) {\n // ...\n } else if (Kind == OMPC_lastprivate) {\n // ...\n } else if (Kind == OMPC_map) {\n // ...\n } else if (Kind == OMPC_to || Kind == OMPC_from) {\n // ...\n } else if (Kind == OMPC_allocate || (Kind == OMPC_affinity && Tok.is(tok::identifier) && PP.getSpelling(Tok) == \"iterator\")) {\n // ...\n } else if (Kind == OMPC_adjust_args) {\n // ...\n if (Data.ExtraModifier == OMPC_ADJUST_ARGS_unknown) {\n // ...\n } else {\n // ...\n ExpectAndConsume(tok::colon, diag::warn_pragma_expected_colon, \"adjust-op\");"},{m,2562,"void PragmaOpenCLExtensionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::colon)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_colon) << Ext;"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/parallel_reduction_messages.c"]={"clang/test/OpenMP/parallel_reduction_messages.c:7:213: warning: missing \':\' after reduction identifier - ignoring [-Wignored-pragmas]","clang/test/OpenMP/parallel_reduction_messages.c:9:220: warning: missing \':\' after reduction identifier - ignoring [-Wignored-pragmas]","clang/test/OpenMP/parallel_reduction_messages.c:11:221: warning: missing \':\' after reduction identifier - ignoring [-Wignored-pragmas]"} | ["clang/test/OpenMP/parallel_reduction_messages.c"]={"clang/test/OpenMP/parallel_reduction_messages.c:7:213: warning: missing \':\' after reduction identifier - ignoring [-Wignored-pragmas]","clang/test/OpenMP/parallel_reduction_messages.c:9:220: warning: missing \':\' after reduction identifier - ignoring [-Wignored-pragmas]","clang/test/OpenMP/parallel_reduction_messages.c:11:221: warning: missing \':\' after reduction identifier - ignoring [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_expected_colon_r_paren"]={ | ["warn_pragma_expected_colon_r_paren"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="missing \':\' or \')\' after %0 - ignoring", | [b]="missing \':\' or \')\' after %0 - ignoring", | ||
[ | [d]=h, | ||
[ | [a]="missing \'\\:\' or \'\\)\' after (.*?) \\- ignoring", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"eb4823503331",1450415156,"[OPENMP 4.5] Parsing/sema analysis for \'depend(source)\' clause in \'ordered\' directive.\nOpenMP 4.5 ad...","[OPENMP 4.5] Parsing/sema analysis for \'depend(source)\' clause in \'ordered\' directive.\nOpenMP 4.5 adds \'depend(source)\' clause for \'ordered\' directive to support cross-iteration dependence. Patch adds parsing and semantic analysis for this construct.\n\nllvm-svn: 255986"}, | ||
[ | [g]={{F,4418,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n } else if (Kind == OMPC_depend || Kind == OMPC_doacross) {\n // ...\n if (Tok.is(tok::colon)) {\n // ...\n } else if (Kind != OMPC_doacross || Tok.isNot(tok::r_paren)) {\n Diag(Tok, DKind == OMPD_ordered ? diag::warn_pragma_expected_colon_r_paren : diag::warn_pragma_expected_colon) << (Kind == OMPC_depend ? \"dependency type\" : \"dependence-type\");"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/ordered_messages.cpp"]={"clang/test/OpenMP/ordered_messages.cpp:190:376: warning: missing \':\' or \')\' after dependency type - ignoring [-Wignored-pragmas]","clang/test/OpenMP/ordered_messages.cpp:192:271: warning: missing \':\' or \')\' after dependency type - ignoring [-Wignored-pragmas]","clang/test/OpenMP/ordered_messages.cpp:369:376: warning: missing \':\' or \')\' after dependency type - ignoring [-Wignored-pragmas]","clang/test/OpenMP/ordered_messages.cpp:371:271: warning: missing \':\' or \')\' after dependency type - ignoring [-Wignored-pragmas]"} | ["clang/test/OpenMP/ordered_messages.cpp"]={"clang/test/OpenMP/ordered_messages.cpp:190:376: warning: missing \':\' or \')\' after dependency type - ignoring [-Wignored-pragmas]","clang/test/OpenMP/ordered_messages.cpp:192:271: warning: missing \':\' or \')\' after dependency type - ignoring [-Wignored-pragmas]","clang/test/OpenMP/ordered_messages.cpp:369:376: warning: missing \':\' or \')\' after dependency type - ignoring [-Wignored-pragmas]","clang/test/OpenMP/ordered_messages.cpp:371:271: warning: missing \':\' or \')\' after dependency type - ignoring [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_expected_comma"]={ | ["warn_pragma_expected_comma"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected \',\' in \'#pragma %0\'", | [b]="expected \',\' in \'#pragma %0\'", | ||
[ | [d]=h, | ||
[ | [a]="expected \',\' in \'\\#pragma (.*?)\'", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"1bbe00e0ca2d",1521535991,"[ms] Parse #pragma optimize and ignore it behind its own flag\n\nThis allows users to turn off warning...","[ms] Parse #pragma optimize and ignore it behind its own flag\n\nThis allows users to turn off warnings about this pragma specifically,\nwhile still receiving warnings about other ignored pragmas.\n\nDifferential Revision: https://reviews.llvm.org/D44630\n\nllvm-svn: 327959"}, | ||
[ | [g]={{m,1286,"bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::comma, diag::warn_pragma_expected_comma, PragmaName))"},{m,3760,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::comma, diag::warn_pragma_expected_comma, PragmaName))"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:4:20: warning: expected \',\' in \'#pragma alloc_text\' [-Wignored-pragmas]"} | ["clang/test/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:4:20: warning: expected \',\' in \'#pragma alloc_text\' [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_expected_identifier"]={ | ["warn_pragma_expected_identifier"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected identifier in \'#pragma %0\' - ignored", | [b]="expected identifier in \'#pragma %0\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="expected identifier in \'\\#pragma (.*?)\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"fd14fade2ffc",1237847305,Kb,Kb}, | ||
[ | [g]={{m,1293,"bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n while (true) {\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << PragmaName;"},{m,2001,"// #pragma GCC visibility comes in two variants:\n// \'push\' \'(\' [visibility] \')\'\n// \'pop\'\nvoid PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &VisTok) {\n // ...\n if (PushPop && PushPop->isStr(\"pop\")) {\n // ...\n } else if (PushPop && PushPop->isStr(\"push\")) {\n // ...\n if (!VisType) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"visibility\";"},{m,2012,"// #pragma GCC visibility comes in two variants:\n// \'push\' \'(\' [visibility] \')\'\n// \'pop\'\nvoid PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &VisTok) {\n // ...\n if (PushPop && PushPop->isStr(\"pop\")) {\n // ...\n } else if (PushPop && PushPop->isStr(\"push\")) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"visibility\";"},{m,2276,"// #pragma \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'options \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'align\' \'(\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'} \')\'\nstatic void ParseAlignPragma(Preprocessor &PP, Token &FirstTok, bool IsOptions) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << (IsOptions ? \"options\" : \"align\");"},{m,2432,"// #pragma weak identifier\n// #pragma weak identifier \'=\' identifier\nvoid PragmaWeakHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &WeakTok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"weak\";"},{m,2445,"// #pragma weak identifier\n// #pragma weak identifier \'=\' identifier\nvoid PragmaWeakHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &WeakTok) {\n // ...\n if (Tok.is(tok::equal)) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"weak\";"},{m,2493,"// #pragma redefine_extname identifier identifier\nvoid PragmaRedefineExtnameHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &RedefToken) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"redefine_extname\";"},{m,2502,"// #pragma redefine_extname identifier identifier\nvoid PragmaRedefineExtnameHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &RedefToken) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"redefine_extname\";"},{m,2553,"void PragmaOpenCLExtensionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"OPENCL\";"},{m,2688,"/// 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) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"pointers_to_members\";"},{m,3351,"void PragmaSTDC_FENV_ROUNDHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << PragmaName.getIdentifierInfo()->getName();"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/pragma-weak.c"]={"clang/test/Parser/pragma-weak.c:7:77: warning: expected identifier in \'#pragma weak\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-weak.c:11:82: warning: expected identifier in \'#pragma weak\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-weak.c:12:81: warning: expected identifier in \'#pragma weak\' - ignored [-Wignored-pragmas]"} | ["clang/test/Parser/pragma-weak.c"]={"clang/test/Parser/pragma-weak.c:7:77: warning: expected identifier in \'#pragma weak\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-weak.c:11:82: warning: expected identifier in \'#pragma weak\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-weak.c:12:81: warning: expected identifier in \'#pragma weak\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_expected_init_seg"]={ | ["warn_pragma_expected_init_seg"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected \'compiler\', \'lib\', \'user\', or a string literal for the section name in \'#pragma %0\' - ignored", | [b]="expected \'compiler\', \'lib\', \'user\', or a string literal for the section name in \'#pragma %0\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="expected \'compiler\', \'lib\', \'user\', or a string literal for the section name in \'\\#pragma (.*?)\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"1a711b169619",1405990385,"-fms-extensions: Implement half of #pragma init_seg\n\nSummary:\nThis pragma is very rare. We could *h...","-fms-extensions: Implement half of #pragma init_seg\n\nSummary:\nThis pragma is very rare. We could *hypothetically* lower some uses of\nit down to @llvm.global_ctors, but given that GlobalOpt isn\'t able to\noptimize prioritized global ctors today, there\'s really no point.\n\nIf we wanted to do this in the future, I would check if the section used\nin the pragma started with \".CRT$XC\" and had up to two characters after\nit. Those two characters could form the 16-bit initialization priority\nthat we support in @llvm.global_ctors. We would have to teach LLVM to\nlower prioritized global ctors on COFF as well.\n\nThis should let us compile some silly uses of this pragma in WebKit /\nBlink.\n\nReviewers: rsmith, majnemer\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D4549\n\nllvm-svn: 213593"}, | ||
[ | [g]={{m,1191,"// #pragma init_seg({ compiler | lib | user | \"section-name\" [, func-name]} )\nbool Parser::HandlePragmaMSInitSeg(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (!SegmentName) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_init_seg) << PragmaName;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/pragma-init_seg.cpp"]={"clang/test/SemaCXX/pragma-init_seg.cpp:9:9: warning: expected \'compiler\', \'lib\', \'user\', or a string literal for the section name in \'#pragma init_seg\' - ignored [-Wignored-pragmas]","clang/test/SemaCXX/pragma-init_seg.cpp:10:9: warning: expected \'compiler\', \'lib\', \'user\', or a string literal for the section name in \'#pragma init_seg\' - ignored [-Wignored-pragmas]"} | ["clang/test/SemaCXX/pragma-init_seg.cpp"]={"clang/test/SemaCXX/pragma-init_seg.cpp:9:9: warning: expected \'compiler\', \'lib\', \'user\', or a string literal for the section name in \'#pragma init_seg\' - ignored [-Wignored-pragmas]","clang/test/SemaCXX/pragma-init_seg.cpp:10:9: warning: expected \'compiler\', \'lib\', \'user\', or a string literal for the section name in \'#pragma init_seg\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_expected_integer"]={ | ["warn_pragma_expected_integer"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected integer between %0 and %1 inclusive in \'#pragma %2\' - ignored", | [b]="expected integer between %0 and %1 inclusive in \'#pragma %2\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="expected integer between (.*?) and (.*?) inclusive in \'\\#pragma (.*?)\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"c0dca6ded731",1392249026,"MS ABI: Implement #pragma vtordisp() and clang-cl /vdN\n\nThese features are new in VS 2013 and are ne...","MS ABI: Implement #pragma vtordisp() and clang-cl /vdN\n\nThese features are new in VS 2013 and are necessary in order to layout\nstd::ostream correctly. Currently we have an ABI incompatibility when\nself-hosting with the 2013 stdlib in our convertible_fwd_ostream wrapper\nin gtest.\n\nThis change adds another implicit attribute, MSVtorDispAttr, because\nimplicit attributes are currently the best way to make sure the\ninformation stays on class templates through instantiation.\n\nReviewers: majnemer\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2746\n\nllvm-svn: 201274"}, | ||
[ | [g]={{m,2822,"/// Handle \'#pragma vtordisp\'\n// The grammar for this pragma is as follows:\n//\n// <vtordisp-mode> ::= (\'off\' | \'on\' | \'0\' | \'1\' | \'2\' )\n//\n// #pragma vtordisp \'(\' [\'push\' \',\'] vtordisp-mode \')\'\n// #pragma vtordisp \'(\' \'pop\' \')\'\n// #pragma vtordisp \'(\' \')\'\nvoid PragmaMSVtorDisp::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Action & Sema::PSK_Push || Action & Sema::PSK_Set) {\n // ...\n if (II && II->isStr(\"off\")) {\n // ...\n } else if (II && II->isStr(\"on\")) {\n // ...\n } else if (Tok.is(tok::numeric_constant) && PP.parseSimpleIntegerLiteral(Tok, Value)) {\n if (Value > 2) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_integer) << 0 << 2 << \"vtordisp\";"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/pragma-vtordisp.cpp"]={"clang/test/SemaCXX/pragma-vtordisp.cpp:15:25: warning: expected integer between 0 and 2 inclusive in \'#pragma vtordisp\' - ignored [-Wignored-pragmas]","clang/test/SemaCXX/pragma-vtordisp.cpp:32:19: warning: expected integer between 0 and 2 inclusive in \'#pragma vtordisp\' - ignored [-Wignored-pragmas]"} | ["clang/test/SemaCXX/pragma-vtordisp.cpp"]={"clang/test/SemaCXX/pragma-vtordisp.cpp:15:25: warning: expected integer between 0 and 2 inclusive in \'#pragma vtordisp\' - ignored [-Wignored-pragmas]","clang/test/SemaCXX/pragma-vtordisp.cpp:32:19: warning: expected integer between 0 and 2 inclusive in \'#pragma vtordisp\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_expected_lparen"]={ | ["warn_pragma_expected_lparen"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="missing \'(\' after \'#pragma %0\' - ignoring", | [b]="missing \'(\' after \'#pragma %0\' - ignoring", | ||
[ | [d]=h, | ||
[ | [a]="missing \'\\(\' after \'\\#pragma (.*?)\' \\- ignoring", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"fd14fade2ffc",1237847305,Kb,Kb}, | ||
[ | [g]={{m,276,"// \"\\#pragma fenv_access (on)\".\nstruct PragmaMSFenvAccessHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen) << PragmaName;"},{m,982,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_lparen) << PragmaName;"},{m,1063,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_lparen) << PragmaName;"},{m,1151,"// #pragma init_seg({ compiler | lib | user | \"section-name\" [, func-name]} )\nbool Parser::HandlePragmaMSInitSeg(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::l_paren, diag::warn_pragma_expected_lparen, PragmaName))"},{m,1210,"// #pragma strict_gs_check(pop)\n// #pragma strict_gs_check(push, \"on\" | \"off\")\n// #pragma strict_gs_check(\"on\" | \"off\")\nbool Parser::HandlePragmaMSStrictGuardStackCheck(StringRef PragmaName, SourceLocation PragmaLocation) {\n if (ExpectAndConsume(tok::l_paren, diag::warn_pragma_expected_lparen, PragmaName))"},{m,1261,"bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::l_paren, diag::warn_pragma_expected_lparen, PragmaName))"},{m,1994,"// #pragma GCC visibility comes in two variants:\n// \'push\' \'(\' [visibility] \')\'\n// \'pop\'\nvoid PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &VisTok) {\n // ...\n if (PushPop && PushPop->isStr(\"pop\")) {\n // ...\n } else if (PushPop && PushPop->isStr(\"push\")) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen) << \"visibility\";"},{m,2047,"// #pragma pack(...) comes in the following delicious flavors:\n// pack \'(\' [integer] \')\'\n// pack \'(\' \'show\' \')\'\n// pack \'(\' (\'push\' | \'pop\') [\',\' identifier] [, integer] \')\'\nvoid PragmaPackHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PackTok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen) << \"pack\";"},{m,2265,"// #pragma \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'options \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'align\' \'(\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'} \')\'\nstatic void ParseAlignPragma(Preprocessor &PP, Token &FirstTok, bool IsOptions) {\n // ...\n if (PP.getLangOpts().XLPragmaPack) {\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen) << \"align\";"},{m,2352,"// #pragma unused(identifier)\nvoid PragmaUnusedHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &UnusedTok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen) << \"unused\";"},{m,2681,"/// 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 (Tok.isNot(tok::l_paren)) {\n PP.Diag(PointersToMembersLoc, diag::warn_pragma_expected_lparen) << \"pointers_to_members\";"},{m,2778,"/// Handle \'#pragma vtordisp\'\n// The grammar for this pragma is as follows:\n//\n// <vtordisp-mode> ::= (\'off\' | \'on\' | \'0\' | \'1\' | \'2\' )\n//\n// #pragma vtordisp \'(\' [\'push\' \',\'] vtordisp-mode \')\'\n// #pragma vtordisp \'(\' \'pop\' \')\'\n// #pragma vtordisp \'(\' \')\'\nvoid PragmaMSVtorDisp::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(VtorDispLoc, diag::warn_pragma_expected_lparen) << \"vtordisp\";"},{m,3671,"/// Handle the Microsoft \\#pragma intrinsic extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma intrinsic(memset)\n/// #pragma intrinsic(strlen, memcpy)\n/// \\endcode\n///\n/// Pragma intrisic tells the compiler to use a builtin version of the\n/// function. Clang does it anyway, so the pragma doesn\'t really do anything.\n/// Anyway, we emit a warning if the function specified in \\#pragma intrinsic\n/// isn\'t an intrinsic in clang and suggest to include intrin.h.\nvoid PragmaMSIntrinsicHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen) << \"intrinsic\";"},{m,3707,"bool Parser::HandlePragmaMSFunction(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::l_paren, diag::warn_pragma_expected_lparen, PragmaName))"},{m,3742,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::l_paren, diag::warn_pragma_expected_lparen, PragmaName))"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/pragma-pack.c"]={"clang/test/Parser/pragma-pack.c:6:73: warning: missing \'(\' after \'#pragma pack\' - ignoring [-Wignored-pragmas]"} | ["clang/test/Parser/pragma-pack.c"]={"clang/test/Parser/pragma-pack.c:6:73: warning: missing \'(\' after \'#pragma pack\' - ignoring [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_expected_non_wide_string"]={ | ["warn_pragma_expected_non_wide_string"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected non-wide string literal in \'#pragma %0\'", | [b]="expected non-wide string literal in \'#pragma %0\'", | ||
[ | [d]=h, | ||
[ | [a]="expected non\\-wide string literal in \'\\#pragma (.*?)\'", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"722b1df86968",1405642396,"Fix parsing certain kinds of strings in the MS section pragmas\n\nWe were crashing on the relevant tes...","Fix parsing certain kinds of strings in the MS section pragmas\n\nWe were crashing on the relevant test case inputs. Also, refactor this\ncode a bit so we can report failure and slurp the pragma tokens without\nreturning a diagnostic id. This is more consistent with the rest of the\nparser and sema code.\n\nllvm-svn: 213337"}, | ||
[ | [g]={{m,997,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (SegmentName->getCharByteWidth() != 1) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_non_wide_string) << PragmaName;"},{m,1119,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n // ...\n if (SegmentName->getCharByteWidth() != 1) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_non_wide_string) << PragmaName;"},{m,1183,"// #pragma init_seg({ compiler | lib | user | \"section-name\" [, func-name]} )\nbool Parser::HandlePragmaMSInitSeg(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isAnyIdentifier()) {\n // ...\n } else if (Tok.is(tok::string_literal)) {\n // ...\n if (SegmentName->getCharByteWidth() != 1) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_non_wide_string) << PragmaName;"},{m,1272,"bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.is(tok::string_literal)) {\n // ...\n if (SegmentName->getCharByteWidth() != 1) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_non_wide_string) << PragmaName;"},{m,3755,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (OptimizationList->getCharByteWidth() != 1) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_non_wide_string) << PragmaName;"}}, | ||
[ | [k]={ | ||
[ | [uc]={"clang/test/Sema/pragma-section.c:12:9: warning: expected non-wide string literal in \'#pragma data_seg\' [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_expected_predicate"]={ | ["warn_pragma_expected_predicate"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected %select{\'enable\', \'disable\', \'begin\' or \'end\'|\'disable\'}0 - ignoring", | [b]="expected %select{\'enable\', \'disable\', \'begin\' or \'end\'|\'disable\'}0 - ignoring", | ||
[ | [d]=h, | ||
[ | [a]="expected (?:\'enable\', \'disable\', \'begin\' or \'end\'|\'disable\') \\- ignoring", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"2e8331cab616",1481916128,"[OpenCL] Allow disabling types and declarations associated with extensions\n\nAdded a map to associate...","[OpenCL] Allow disabling types and declarations associated with extensions\n\nAdded a map to associate types and declarations with extensions.\n\nRefactored existing diagnostic for disabled types associated with extensions and extended it to declarations for generic situation.\n\nFixed some bugs for types associated with extensions.\n\nAllow users to use pragma to declare types and functions for supported extensions, e.g.\n\n#pragma OPENCL EXTENSION the_new_extension_name : begin\n// declare types and functions associated with the extension here\n#pragma OPENCL EXTENSION the_new_extension_name : end\n\nDifferential Revision: https://reviews.llvm.org/D21698\n\nllvm-svn: 289979"}, | ||
[ | [g]={{m,902,"void Parser::HandlePragmaOpenCLExtension() {\n // ...\n // OpenCL 1.1 9.1: \"The all variant sets the behavior for all extensions,\n // overriding all previously issued extension directives, but only if the\n // behavior is set to disable.\"\n if (Name == \"all\") {\n if (State == Disable)\n // ...\n else\n PP.Diag(NameLoc, diag::warn_pragma_expected_predicate) << 1;"},{m,2568,"void PragmaOpenCLExtensionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_predicate) << 0;"},{m,2583,"void PragmaOpenCLExtensionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Pred->isStr(\"enable\")) {\n // ...\n } else if (Pred->isStr(\"disable\")) {\n // ...\n } else if (Pred->isStr(\"begin\"))\n // ...\n else if (Pred->isStr(\"end\"))\n // ...\n else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_predicate) << Ext->isStr(\"all\");"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/opencl-pragma.cl"]={"clang/test/Parser/opencl-pragma.cl:10:40: warning: expected \'enable\', \'disable\', \'begin\' or \'end\' - ignoring [-Wignored-pragmas]","clang/test/Parser/opencl-pragma.cl:8:26: warning: expected \'disable\' - ignoring [-Wignored-pragmas]"} | ["clang/test/Parser/opencl-pragma.cl"]={"clang/test/Parser/opencl-pragma.cl:10:40: warning: expected \'enable\', \'disable\', \'begin\' or \'end\' - ignoring [-Wignored-pragmas]","clang/test/Parser/opencl-pragma.cl:8:26: warning: expected \'disable\' - ignoring [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_expected_punc"]={ | ["warn_pragma_expected_punc"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected \')\' or \',\' in \'#pragma %0\'", | [b]="expected \')\' or \',\' in \'#pragma %0\'", | ||
[ | [d]=h, | ||
[ | [a]="expected \'\\)\' or \',\' in \'\\#pragma (.*?)\'", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"88969810565a",1392059197,"Basic: Clean up malformed pragma diagnostics\n\nCreate a new diagnostic, -Wignored-pragmas and use it ...","Basic: Clean up malformed pragma diagnostics\n\nCreate a new diagnostic, -Wignored-pragmas and use it to handle any\ncase where a pragma would have a side effect but is ignored.\n\nllvm-svn: 201102"}, | ||
[ | [g]={{m,1092,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isAnyIdentifier()) {\n // ...\n if (Action != Sema::PSK_Reset) {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n // If we\'ve got a comma, we either need a label or a string.\n if (Tok.isAnyIdentifier()) {\n // ...\n if (Tok.is(tok::comma))\n // ...\n else if (Tok.isNot(tok::r_paren)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_punc) << PragmaName;"},{m,1098,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isAnyIdentifier()) {\n // ...\n if (Action != Sema::PSK_Reset) {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n } else if (Tok.isNot(tok::r_paren)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_punc) << PragmaName;"},{m,1220,"// #pragma strict_gs_check(pop)\n// #pragma strict_gs_check(push, \"on\" | \"off\")\n// #pragma strict_gs_check(\"on\" | \"off\")\nbool Parser::HandlePragmaMSStrictGuardStackCheck(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.is(tok::identifier)) {\n // ...\n if (PushPop == \"push\") {\n // ...\n if (ExpectAndConsume(tok::comma, diag::warn_pragma_expected_punc, PragmaName))"},{m,2388,"// #pragma unused(identifier)\nvoid PragmaUnusedHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &UnusedTok) {\n // ...\n while (true) {\n // ...\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_punc) << \"unused\";"},{m,2790,"/// Handle \'#pragma vtordisp\'\n// The grammar for this pragma is as follows:\n//\n// <vtordisp-mode> ::= (\'off\' | \'on\' | \'0\' | \'1\' | \'2\' )\n//\n// #pragma vtordisp \'(\' [\'push\' \',\'] vtordisp-mode \')\'\n// #pragma vtordisp \'(\' \'pop\' \')\'\n// #pragma vtordisp \'(\' \')\'\nvoid PragmaMSVtorDisp::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (II) {\n if (II->isStr(\"push\")) {\n // ...\n if (Tok.isNot(tok::comma)) {\n PP.Diag(VtorDispLoc, diag::warn_pragma_expected_punc) << \"vtordisp\";"}} | ||
}, | }, | ||
["warn_pragma_expected_rparen"]={ | ["warn_pragma_expected_rparen"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="missing \')\' after \'#pragma %0\' - ignoring", | [b]="missing \')\' after \'#pragma %0\' - ignoring", | ||
[ | [d]=h, | ||
[ | [a]="missing \'\\)\' after \'\\#pragma (.*?)\' \\- ignoring", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"fd14fade2ffc",1237847305,Kb,Kb}, | ||
[ | [g]={{m,298,"// \"\\#pragma fenv_access (on)\".\nstruct PragmaMSFenvAccessHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_rparen) << PragmaName;"},{m,1046,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_rparen) << PragmaName;"},{m,1128,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_rparen) << PragmaName;"},{m,1195,"// #pragma init_seg({ compiler | lib | user | \"section-name\" [, func-name]} )\nbool Parser::HandlePragmaMSInitSeg(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName) || ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{m,1246,"// #pragma strict_gs_check(pop)\n// #pragma strict_gs_check(push, \"on\" | \"off\")\n// #pragma strict_gs_check(\"on\" | \"off\")\nbool Parser::HandlePragmaMSStrictGuardStackCheck(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName))"},{m,1307,"bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName) || ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{m,2007,"// #pragma GCC visibility comes in two variants:\n// \'push\' \'(\' [visibility] \')\'\n// \'pop\'\nvoid PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &VisTok) {\n // ...\n if (PushPop && PushPop->isStr(\"pop\")) {\n // ...\n } else if (PushPop && PushPop->isStr(\"push\")) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_rparen) << \"visibility\";"},{m,2124,"// #pragma pack(...) comes in the following delicious flavors:\n// pack \'(\' [integer] \')\'\n// pack \'(\' \'show\' \')\'\n// pack \'(\' (\'push\' | \'pop\') [\',\' identifier] [, integer] \')\'\nvoid PragmaPackHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PackTok) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_rparen) << \"pack\";"},{m,2304,"// #pragma \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'options \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'align\' \'(\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'} \')\'\nstatic void ParseAlignPragma(Preprocessor &PP, Token &FirstTok, bool IsOptions) {\n // ...\n if (PP.getLangOpts().XLPragmaPack) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_rparen) << \"align\";"},{m,2835,"/// Handle \'#pragma vtordisp\'\n// The grammar for this pragma is as follows:\n//\n// <vtordisp-mode> ::= (\'off\' | \'on\' | \'0\' | \'1\' | \'2\' )\n//\n// #pragma vtordisp \'(\' [\'push\' \',\'] vtordisp-mode \')\'\n// #pragma vtordisp \'(\' \'pop\' \')\'\n// #pragma vtordisp \'(\' \')\'\nvoid PragmaMSVtorDisp::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n // Finish the pragma: \')\' $\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(VtorDispLoc, diag::warn_pragma_expected_rparen) << \"vtordisp\";"},{m,3692,"/// Handle the Microsoft \\#pragma intrinsic extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma intrinsic(memset)\n/// #pragma intrinsic(strlen, memcpy)\n/// \\endcode\n///\n/// Pragma intrisic tells the compiler to use a builtin version of the\n/// function. Clang does it anyway, so the pragma doesn\'t really do anything.\n/// Anyway, we emit a warning if the function specified in \\#pragma intrinsic\n/// isn\'t an intrinsic in clang and suggest to include intrin.h.\nvoid PragmaMSIntrinsicHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_rparen) << \"intrinsic\";"},{m,3728,"bool Parser::HandlePragmaMSFunction(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName) || ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{m,3779,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName))"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:5:22: warning: missing \')\' after \'#pragma alloc_text\' - ignoring [-Wignored-pragmas]","clang/test/Sema/pragma-ms-alloc-text.cpp:15:22: warning: missing \')\' after \'#pragma alloc_text\' - ignoring [-Wignored-pragmas]"} | ["clang/test/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:5:22: warning: missing \')\' after \'#pragma alloc_text\' - ignoring [-Wignored-pragmas]","clang/test/Sema/pragma-ms-alloc-text.cpp:15:22: warning: missing \')\' after \'#pragma alloc_text\' - ignoring [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_expected_section_label_or_name"]={ | ["warn_pragma_expected_section_label_or_name"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected a stack label or a string literal for the section name in \'#pragma %0\' - ignored", | [b]="expected a stack label or a string literal for the section name in \'#pragma %0\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="expected a stack label or a string literal for the section name in \'\\#pragma (.*?)\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={oc,1396996247,pc,rc}, | ||
[ | [g]={{m,1109,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n if (Tok.isNot(tok::string_literal)) {\n unsigned DiagID = Action != Sema::PSK_Reset ? !SlotLabel.empty() ? diag::warn_pragma_expected_section_name : diag::warn_pragma_expected_section_label_or_name : diag::warn_pragma_expected_section_push_pop_or_name;"}}, | ||
[ | [k]={ | ||
[ | [uc]={"clang/test/Sema/pragma-section.c:28:9: warning: expected a stack label or a string literal for the section name in \'#pragma bss_seg\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_expected_section_name"]={ | ["warn_pragma_expected_section_name"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected a string literal for the section name in \'#pragma %0\' - ignored", | [b]="expected a string literal for the section name in \'#pragma %0\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="expected a string literal for the section name in \'\\#pragma (.*?)\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={oc,1396996247,pc,rc}, | ||
[ | [g]={{m,988,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n // Parsing code for pragma section\n if (Tok.isNot(tok::string_literal)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_section_name) << PragmaName;"},{m,1108,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n if (Tok.isNot(tok::string_literal)) {\n unsigned DiagID = Action != Sema::PSK_Reset ? !SlotLabel.empty() ? diag::warn_pragma_expected_section_name : diag::warn_pragma_expected_section_label_or_name : diag::warn_pragma_expected_section_push_pop_or_name;"},{m,1281,"bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.is(tok::string_literal)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n } else {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_section_name) << PragmaName;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:3:9: warning: expected a string literal for the section name in \'#pragma alloc_text\' - ignored [-Wignored-pragmas]","clang/test/Sema/pragma-ms-alloc-text.cpp:7:9: warning: expected a string literal for the section name in \'#pragma alloc_text\' - ignored [-Wignored-pragmas]"} | ["clang/test/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:3:9: warning: expected a string literal for the section name in \'#pragma alloc_text\' - ignored [-Wignored-pragmas]","clang/test/Sema/pragma-ms-alloc-text.cpp:7:9: warning: expected a string literal for the section name in \'#pragma alloc_text\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_expected_section_push_pop_or_name"]={ | ["warn_pragma_expected_section_push_pop_or_name"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected push, pop or a string literal for the section name in \'#pragma %0\' - ignored", | [b]="expected push, pop or a string literal for the section name in \'#pragma %0\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="expected push, pop or a string literal for the section name in \'\\#pragma (.*?)\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={oc,1396996247,pc,rc}, | ||
[ | [g]={{m,1077,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isAnyIdentifier()) {\n // ...\n if (PushPop == \"push\")\n // ...\n else if (PushPop == \"pop\")\n // ...\n else {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_section_push_pop_or_name) << PragmaName;"},{m,1110,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n if (Tok.isNot(tok::string_literal)) {\n unsigned DiagID = Action != Sema::PSK_Reset ? !SlotLabel.empty() ? diag::warn_pragma_expected_section_name : diag::warn_pragma_expected_section_label_or_name : diag::warn_pragma_expected_section_push_pop_or_name;"}}, | ||
[ | [k]={ | ||
[ | [uc]={"clang/test/Sema/pragma-section.c:24:9: warning: expected push, pop or a string literal for the section name in \'#pragma bss_seg\' - ignored [-Wignored-pragmas]","clang/test/Sema/pragma-section.c:25:9: warning: expected push, pop or a string literal for the section name in \'#pragma bss_seg\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_expected_string"]={ | ["warn_pragma_expected_string"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected string literal in \'#pragma %0\' - ignoring", | [b]="expected string literal in \'#pragma %0\' - ignoring", | ||
[ | [d]=h, | ||
[ | [a]="expected string literal in \'\\#pragma (.*?)\' \\- ignoring", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"1bbe00e0ca2d",1521535991,"[ms] Parse #pragma optimize and ignore it behind its own flag\n\nThis allows users to turn off warning...","[ms] Parse #pragma optimize and ignore it behind its own flag\n\nThis allows users to turn off warnings about this pragma specifically,\nwhile still receiving warnings about other ignored pragmas.\n\nDifferential Revision: https://reviews.llvm.org/D44630\n\nllvm-svn: 327959"}, | ||
[ | [g]={{m,3747,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::string_literal)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_string) << PragmaName;"}}, | ||
[ | [k]={ | ||
[ | [ub]={"clang/test/Preprocessor/pragma_microsoft.c:225:9: warning: expected string literal in \'#pragma optimize\' - ignoring [-Wignored-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:226:9: warning: expected string literal in \'#pragma optimize\' - ignoring [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_extension_is_core"]={ | ["warn_pragma_extension_is_core"]={ | ||
[ | [i]={"pedantic-core-features"}, | ||
[j]="pedantic-core-features", | |||
[ | |||
[b]="OpenCL extension %0 is core feature or supported optional core feature - ignoring", | [b]="OpenCL extension %0 is core feature or supported optional core feature - ignoring", | ||
[ | [d]=h, | ||
[ | [a]="OpenCL extension (.*?) is core feature or supported optional core feature \\- ignoring", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpedantic\\-core\\-features[^\\]]*\\]", | ||
[ | [c]=v, | ||
[ | [f]={"64936ce91dba",1463154277,"[OpenCL] Add supported OpenCL extensions to target info.\n\nAdd supported OpenCL extensions to target ...","[OpenCL] Add supported OpenCL extensions to target info.\n\nAdd supported OpenCL extensions to target info. It serves as default values to save the users of the burden setting each supported extensions and optional core features in command line.\n\nDifferential Revision: http://reviews.llvm.org/D19484\n\nllvm-svn: 269431"}, | ||
[ | [g]={{m,918,"void Parser::HandlePragmaOpenCLExtension() {\n // ...\n // OpenCL 1.1 9.1: \"The all variant sets the behavior for all extensions,\n // overriding all previously issued extension directives, but only if the\n // behavior is set to disable.\"\n if (Name == \"all\") {\n // ...\n } else if (State == Begin) {\n // ...\n } else if (State == End) {\n // ...\n } else if (!Opt.isKnown(Name) || !Opt.isWithPragma(Name))\n // ...\n else if (Opt.isSupportedExtension(Name, getLangOpts()))\n // ...\n else if (Opt.isSupportedCoreOrOptionalCore(Name, getLangOpts()))\n PP.Diag(NameLoc, diag::warn_pragma_extension_is_core) << Ident;"}}, | ||
[ | [k]={ | ||
["clang/test/Misc/amdgcn.languageOptsOpenCL.cl"]={"clang/test/Misc/amdgcn.languageOptsOpenCL.cl:57:26: warning: OpenCL extension \'cl_khr_byte_addressable_store\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:65:26: warning: OpenCL extension \'cl_khr_global_int32_base_atomics\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:73:26: warning: OpenCL extension \'cl_khr_global_int32_extended_atomics\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:81:26: warning: OpenCL extension \'cl_khr_local_int32_base_atomics\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:89:26: warning: OpenCL extension \'cl_khr_local_int32_extended_atomics\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:98:26: warning: OpenCL extension \'cl_khr_fp64\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:107:26: warning: OpenCL extension \'cl_khr_3d_image_writes\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]"} | ["clang/test/Misc/amdgcn.languageOptsOpenCL.cl"]={"clang/test/Misc/amdgcn.languageOptsOpenCL.cl:57:26: warning: OpenCL extension \'cl_khr_byte_addressable_store\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:65:26: warning: OpenCL extension \'cl_khr_global_int32_base_atomics\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:73:26: warning: OpenCL extension \'cl_khr_global_int32_extended_atomics\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:81:26: warning: OpenCL extension \'cl_khr_local_int32_base_atomics\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:89:26: warning: OpenCL extension \'cl_khr_local_int32_extended_atomics\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:98:26: warning: OpenCL extension \'cl_khr_fp64\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:107:26: warning: OpenCL extension \'cl_khr_3d_image_writes\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_extra_tokens_at_eol"]={ | ["warn_pragma_extra_tokens_at_eol"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="extra tokens at end of \'#pragma %0\' - ignored", | [b]="extra tokens at end of \'#pragma %0\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="extra tokens at end of \'\\#pragma (.*?)\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"f5867dd51a83",1244162998,"Add parser support for #pragma weak.\n\nllvm-svn: 72907","Add parser support for #pragma weak.\n\nllvm-svn: 72907"}, | ||
[ | [g]={{m,305,"// \"\\#pragma fenv_access (on)\".\nstruct PragmaMSFenvAccessHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << PragmaName;"},{m,1051,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::eof)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_extra_tokens_at_eol) << PragmaName;"},{m,1133,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::eof)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_extra_tokens_at_eol) << PragmaName;"},{m,1197,"// #pragma init_seg({ compiler | lib | user | \"section-name\" [, func-name]} )\nbool Parser::HandlePragmaMSInitSeg(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName) || ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{m,1250,"// #pragma strict_gs_check(pop)\n// #pragma strict_gs_check(push, \"on\" | \"off\")\n// #pragma strict_gs_check(\"on\" | \"off\")\nbool Parser::HandlePragmaMSStrictGuardStackCheck(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{m,1309,"bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName) || ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{m,1422,"bool Parser::HandlePragmaLoopHint(LoopHint &Hint) {\n // ...\n // Validate the argument.\n if (StateOption) {\n // ...\n if (Toks.size() > 2)\n Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << PragmaLoopHintString(Info->PragmaName, Info->Option);"},{m,1439,"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 if (Toks.size() > 2) {\n Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << PragmaLoopHintString(Info->PragmaName, Info->Option);"},{m,1478,"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 // Tokens following an error in an ill-formed constant expression will\n // remain in the token stream and must be removed.\n if (Tok.isNot(tok::eof)) {\n Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << PragmaLoopHintString(Info->PragmaName, Info->Option);"},{m,1503,"bool Parser::HandlePragmaLoopHint(LoopHint &Hint) {\n // ...\n // Validate the argument.\n if (StateOption) {\n // ...\n } else if (OptionInfo && OptionInfo->getName() == \"vectorize_width\") {\n // ...\n } else {\n // ...\n // Tokens following an error in an ill-formed constant expression will\n // remain in the token stream and must be removed.\n if (Tok.isNot(tok::eof)) {\n Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << PragmaLoopHintString(Info->PragmaName, Info->Option);"},{m,2019,"// #pragma GCC visibility comes in two variants:\n// \'push\' \'(\' [visibility] \')\'\n// \'pop\'\nvoid PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &VisTok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"visibility\";"},{m,2131,"// #pragma pack(...) comes in the following delicious flavors:\n// pack \'(\' [integer] \')\'\n// pack \'(\' \'show\' \')\'\n// pack \'(\' (\'push\' | \'pop\') [\',\' identifier] [, integer] \')\'\nvoid PragmaPackHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PackTok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"pack\";"},{m,2179,"// #pragma ms_struct on\n// #pragma ms_struct off\nvoid PragmaMSStructHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &MSStructTok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"ms_struct\";"},{m,2312,"// #pragma \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'options \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'align\' \'(\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'} \')\'\nstatic void ParseAlignPragma(Preprocessor &PP, Token &FirstTok, bool IsOptions) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << (IsOptions ? \"options\" : \"align\");"},{m,2394,"// #pragma unused(identifier)\nvoid PragmaUnusedHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &UnusedTok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"unused\";"},{m,2454,"// #pragma weak identifier\n// #pragma weak identifier \'=\' identifier\nvoid PragmaWeakHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &WeakTok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"weak\";"},{m,2511,"// #pragma redefine_extname identifier identifier\nvoid PragmaRedefineExtnameHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &RedefToken) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"redefine_extname\";"},{m,2591,"void PragmaOpenCLExtensionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"OPENCL EXTENSION\";"},{m,2750,"/// 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 (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"pointers_to_members\";"},{m,2841,"/// Handle \'#pragma vtordisp\'\n// The grammar for this pragma is as follows:\n//\n// <vtordisp-mode> ::= (\'off\' | \'on\' | \'0\' | \'1\' | \'2\' )\n//\n// #pragma vtordisp \'(\' [\'push\' \',\'] vtordisp-mode \')\'\n// #pragma vtordisp \'(\' \'pop\' \')\'\n// #pragma vtordisp \'(\' \')\'\nvoid PragmaMSVtorDisp::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"vtordisp\";"},{m,2996,"/// 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::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"float_control\";"},{m,3318,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"clang fp\";"},{m,3373,"void PragmaSTDC_FENV_ROUNDHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"STDC FENV_ROUND\";"},{m,3566,"/// 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::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"clang loop\";"},{m,3613,"/// Handle the loop unroll optimization pragmas.\n/// #pragma unroll\n/// #pragma unroll unroll-hint-value\n/// #pragma unroll \'(\' unroll-hint-value \')\'\n/// #pragma nounroll\n/// #pragma unroll_and_jam\n/// #pragma unroll_and_jam unroll-hint-value\n/// #pragma unroll_and_jam \'(\' unroll-hint-value \')\'\n/// #pragma nounroll_and_jam\n///\n/// unroll-hint-value:\n/// constant-expression\n///\n/// Loop unrolling hints can be specified with \'#pragma unroll\' or\n/// \'#pragma nounroll\'. \'#pragma unroll\' can take a numeric argument optionally\n/// contained in parentheses. With no argument the directive instructs llvm to\n/// try to unroll the loop completely. A positive integer argument can be\n/// specified to indicate the number of times the loop should be unrolled. To\n/// maximize compatibility with other compilers the unroll count argument can be\n/// specified with or without parentheses. Specifying, \'#pragma nounroll\'\n/// disables unrolling of the loop.\nvoid PragmaUnrollHintHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.is(tok::eod)) {\n // ...\n } else if (PragmaName.getIdentifierInfo()->getName() == \"nounroll\" || PragmaName.getIdentifierInfo()->getName() == \"nounroll_and_jam\") {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << PragmaName.getIdentifierInfo()->getName();"},{m,3636,"/// Handle the loop unroll optimization pragmas.\n/// #pragma unroll\n/// #pragma unroll unroll-hint-value\n/// #pragma unroll \'(\' unroll-hint-value \')\'\n/// #pragma nounroll\n/// #pragma unroll_and_jam\n/// #pragma unroll_and_jam unroll-hint-value\n/// #pragma unroll_and_jam \'(\' unroll-hint-value \')\'\n/// #pragma nounroll_and_jam\n///\n/// unroll-hint-value:\n/// constant-expression\n///\n/// Loop unrolling hints can be specified with \'#pragma unroll\' or\n/// \'#pragma nounroll\'. \'#pragma unroll\' can take a numeric argument optionally\n/// contained in parentheses. With no argument the directive instructs llvm to\n/// try to unroll the loop completely. A positive integer argument can be\n/// specified to indicate the number of times the loop should be unrolled. To\n/// maximize compatibility with other compilers the unroll count argument can be\n/// specified with or without parentheses. Specifying, \'#pragma nounroll\'\n/// disables unrolling of the loop.\nvoid PragmaUnrollHintHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.is(tok::eod)) {\n // ...\n } else if (PragmaName.getIdentifierInfo()->getName() == \"nounroll\" || PragmaName.getIdentifierInfo()->getName() == \"nounroll_and_jam\") {\n // ...\n } else {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"unroll\";"},{m,3699,"/// Handle the Microsoft \\#pragma intrinsic extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma intrinsic(memset)\n/// #pragma intrinsic(strlen, memcpy)\n/// \\endcode\n///\n/// Pragma intrisic tells the compiler to use a builtin version of the\n/// function. Clang does it anyway, so the pragma doesn\'t really do anything.\n/// Anyway, we emit a warning if the function specified in \\#pragma intrinsic\n/// isn\'t an intrinsic in clang and suggest to include intrin.h.\nvoid PragmaMSIntrinsicHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"intrinsic\";"},{m,3730,"bool Parser::HandlePragmaMSFunction(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName) || ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{m,3791,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{m,3954,"/// 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.isNot(tok::eod))\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"clang attribute\";"},{m,3989,"// Handle \'#pragma clang max_tokens 12345\'.\nvoid PragmaMaxTokensHereHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"clang max_tokens_here\";"},{m,4021,"// Handle \'#pragma clang max_tokens_total 12345\'.\nvoid PragmaMaxTokensTotalHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"clang max_tokens_total\";"},{m,4055,"// Handle \'#pragma clang riscv intrinsic vector\'.\n// \'#pragma clang riscv intrinsic sifive_vector\'.\nvoid PragmaRISCVHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"clang riscv intrinsic\";"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:14:29: warning: extra tokens at end of \'#pragma alloc_text\' - ignored [-Wignored-pragmas]"} | ["clang/test/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:14:29: warning: extra tokens at end of \'#pragma alloc_text\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_final_macro"]={ | ["warn_pragma_final_macro"]={ | ||
[ | [i]={"final-macro","pedantic-macros"}, | ||
[j]="final-macro", | |||
[ | |||
[b]="macro %0 has been marked as final and should not be %select{undefined|redefined}1", | [b]="macro %0 has been marked as final and should not be %select{undefined|redefined}1", | ||
[ | [d]=h, | ||
[ | [a]="macro (.*?) has been marked as final and should not be (?:undefined|redefined)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wfinal\\-macro[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={lb,1625925174,mb,nb}, | ||
[ | [g]={{Hc,1485,"void Preprocessor::emitFinalMacroWarning(const Token &Identifier, bool IsUndef) const {\n // ...\n Diag(Identifier, diag::warn_pragma_final_macro) << Identifier.getIdentifierInfo() << (IsUndef ? 0 : 1);"}}, | ||
[ | [k]={ | ||
["clang/test/Lexer/final-macro.c"]={"clang/test/Lexer/final-macro.c:10:9: warning: macro \'Foo\' has been marked as final and should not be redefined [-Wfinal-macro]","clang/test/Lexer/final-macro.c:14:9: warning: macro \'Foo\' has been marked as final and should not be redefined [-Wfinal-macro]","clang/test/Lexer/final-macro.c:23:8: warning: macro \'Foo\' has been marked as final and should not be undefined [-Wfinal-macro]","clang/test/Lexer/final-macro.c:25:9: warning: macro \'Foo\' has been marked as final and should not be redefined [-Wfinal-macro]","clang/test/Lexer/Inputs/final-macro-system.h:2:8: warning: macro \'SYSTEM_MACRO\' has been marked as final and should not be undefined [-Wfinal-macro]","clang/test/Lexer/Inputs/final-macro-system.h:4:9: warning: macro \'SYSTEM_MACRO\' has been marked as final and should not be redefined [-Wfinal-macro]"} | ["clang/test/Lexer/final-macro.c"]={"clang/test/Lexer/final-macro.c:10:9: warning: macro \'Foo\' has been marked as final and should not be redefined [-Wfinal-macro]","clang/test/Lexer/final-macro.c:14:9: warning: macro \'Foo\' has been marked as final and should not be redefined [-Wfinal-macro]","clang/test/Lexer/final-macro.c:23:8: warning: macro \'Foo\' has been marked as final and should not be undefined [-Wfinal-macro]","clang/test/Lexer/final-macro.c:25:9: warning: macro \'Foo\' has been marked as final and should not be redefined [-Wfinal-macro]","clang/test/Lexer/Inputs/final-macro-system.h:2:8: warning: macro \'SYSTEM_MACRO\' has been marked as final and should not be undefined [-Wfinal-macro]","clang/test/Lexer/Inputs/final-macro-system.h:4:9: warning: macro \'SYSTEM_MACRO\' has been marked as final and should not be redefined [-Wfinal-macro]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_force_cuda_host_device_bad_arg"]={ | ["warn_pragma_force_cuda_host_device_bad_arg"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="incorrect use of #pragma clang force_cuda_host_device begin|end", | [b]="incorrect use of #pragma clang force_cuda_host_device begin|end", | ||
[ | [d]=h, | ||
[ | [a]="incorrect use of \\#pragma clang force_cuda_host_device begin\\|end", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"67a78a6cc021",1475964958,"[CUDA] Add #pragma clang force_cuda_host_device_{begin,end} pragmas.\n\nSummary:\nThese cause us to con...","[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"}, | ||
[ | [g]={{m,3807,"void PragmaForceCUDAHostDeviceHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (!Info || (!Info->isStr(\"begin\") && !Info->isStr(\"end\"))) {\n PP.Diag(FirstTok.getLocation(), diag::warn_pragma_force_cuda_host_device_bad_arg);"},{m,3820,"void PragmaForceCUDAHostDeviceHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (!Tok.is(tok::eod))\n PP.Diag(FirstTok.getLocation(), diag::warn_pragma_force_cuda_host_device_bad_arg);"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/cuda-force-host-device.cu"]={"clang/test/Parser/cuda-force-host-device.cu:29:15: warning: incorrect use of #pragma clang force_cuda_host_device begin|end [-Wignored-pragmas]","clang/test/Parser/cuda-force-host-device.cu:32:15: warning: incorrect use of #pragma clang force_cuda_host_device begin|end [-Wignored-pragmas]","clang/test/Parser/cuda-force-host-device.cu:35:15: warning: incorrect use of #pragma clang force_cuda_host_device begin|end [-Wignored-pragmas]"} | ["clang/test/Parser/cuda-force-host-device.cu"]={"clang/test/Parser/cuda-force-host-device.cu:29:15: warning: incorrect use of #pragma clang force_cuda_host_device begin|end [-Wignored-pragmas]","clang/test/Parser/cuda-force-host-device.cu:32:15: warning: incorrect use of #pragma clang force_cuda_host_device begin|end [-Wignored-pragmas]","clang/test/Parser/cuda-force-host-device.cu:35:15: warning: incorrect use of #pragma clang force_cuda_host_device begin|end [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_fp_ignored"]={ | ["warn_pragma_fp_ignored"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="\'#pragma %0\' is not supported on this target - ignored", | [b]="\'#pragma %0\' is not supported on this target - ignored", | ||
[ | [d]=h, | ||
[ | [a]="\'\\#pragma (.*?)\' is not supported on this target \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"38d18d93534d",1601621202,"[SVE] Add support to vectorize_width loop pragma for scalable vectors\n\nThis patch adds support for t...","[SVE] Add support to vectorize_width loop pragma for scalable vectors\n\nThis patch adds support for two new variants of the vectorize_width\npragma:\n\n1. vectorize_width(X[, fixed|scalable]) where an optional second\nparameter is passed to the vectorize_width pragma, which indicates if\nthe user wishes to use fixed width or scalable vectorization. For\nexample the user can now write something like:\n\n #pragma clang loop vectorize_width(4, fixed)\nor\n #pragma clang loop vectorize_width(4, scalable)\n\nIn the absence of a second parameter it is assumed the user wants\nfixed width vectorization, in order to maintain compatibility with\nexisting code.\n2. vectorize_width(fixed|scalable) where the width is left unspecified,\nbut the user hints what type of vectorization they prefer, either\nfixed width or scalable.\n\nI have implemented this by making use of the LLVM loop hint attribute:\n\n llvm.loop.vectorize.scalable.enable\n\nTests were added to\n\n clang/test/CodeGenCXX/pragma-loop.cpp\n\nfor both the \'fixed\' and \'scalable\' optional parameter.\n\nSee this thread for context: http://lists.llvm.org/pipermail/cfe-dev/2020-November/067262.html\n\nDifferential Revision: https://reviews.llvm.org/D89031"}, | ||
[ | [g]={{m,113,"/// PragmaSTDC_FENV_ACCESSHandler - \"\\#pragma STDC FENV_ACCESS ...\".\nstruct PragmaSTDC_FENV_ACCESSHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (!PP.getTargetInfo().hasStrictFP() && !PP.getLangOpts().ExpStrictFP) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_fp_ignored) << PragmaName.getIdentifierInfo()->getName();"},{m,268,"// \"\\#pragma fenv_access (on)\".\nstruct PragmaMSFenvAccessHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (!PP.getTargetInfo().hasStrictFP() && !PP.getLangOpts().ExpStrictFP) {\n PP.Diag(FirstToken.getLocation(), diag::warn_pragma_fp_ignored) << PragmaName;"},{m,2906,"/// 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 (!PP.getTargetInfo().hasStrictFP() && !PP.getLangOpts().ExpStrictFP) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_fp_ignored) << PragmaName.getIdentifierInfo()->getName();"},{m,3344,"void PragmaSTDC_FENV_ROUNDHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (!PP.getTargetInfo().hasStrictFP() && !PP.getLangOpts().ExpStrictFP) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_fp_ignored) << PragmaName.getIdentifierInfo()->getName();"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/pragma-fp-warn.c"]={"clang/test/Parser/pragma-fp-warn.c:15:9: warning: \'#pragma float_control\' is not supported on this target - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-fp-warn.c:17:14: warning: \'#pragma FENV_ACCESS\' is not supported on this target - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-fp-warn.c:19:14: warning: \'#pragma FENV_ROUND\' is not supported on this target - ignored [-Wignored-pragmas]"} | ["clang/test/Parser/pragma-fp-warn.c"]={"clang/test/Parser/pragma-fp-warn.c:15:9: warning: \'#pragma float_control\' is not supported on this target - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-fp-warn.c:17:14: warning: \'#pragma FENV_ACCESS\' is not supported on this target - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-fp-warn.c:19:14: warning: \'#pragma FENV_ROUND\' is not supported on this target - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_ignored"]={ | ["warn_pragma_ignored"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="unknown pragma ignored", | [b]="unknown pragma ignored", | ||
[ | [d]=h, | ||
[ | [a]="unknown pragma ignored", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"21656f22dbb9",1240175426,"basic support for -Wunknown-pragmas, more coming.\n\nllvm-svn: 69547","basic support for -Wunknown-pragmas, more coming.\n\nllvm-svn: 69547"}, | ||
[ | [g]={{C,120,"void PragmaNamespace::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (!Handler) {\n PP.Diag(Tok, diag::warn_pragma_ignored);"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/_Pragma.c"]={"clang/test/Preprocessor/_Pragma.c:6:1: warning: unknown pragma ignored [-Wunknown-pragmas]","clang/test/Preprocessor/_Pragma.c:8:1: warning: unknown pragma ignored [-Wunknown-pragmas]"} | ["clang/test/Preprocessor/_Pragma.c"]={"clang/test/Preprocessor/_Pragma.c:6:1: warning: unknown pragma ignored [-Wunknown-pragmas]","clang/test/Preprocessor/_Pragma.c:8:1: warning: unknown pragma ignored [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_include_alias_expected"]={ | ["warn_pragma_include_alias_expected"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="pragma include_alias expected \'%0\'", | [b]="pragma include_alias expected \'%0\'", | ||
[ | [d]=h, | ||
[ | [a]="pragma include_alias expected \'(.*?)\'", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"cd5092dfba30",1330575529,"Implements support for #pragma include_alias in ms compatibility mode. Fixes PR10705.\n\nllvm-svn: 15...","Implements support for #pragma include_alias in ms compatibility mode. Fixes PR10705.\n\nllvm-svn: 151800"}, | ||
[ | [g]={{C,695,"void Preprocessor::HandlePragmaIncludeAlias(Token &Tok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n Diag(Tok, diag::warn_pragma_include_alias_expected) << \"(\";"},{C,717,"void Preprocessor::HandlePragmaIncludeAlias(Token &Tok) {\n // ...\n if (Tok.isNot(tok::comma)) {\n Diag(Tok, diag::warn_pragma_include_alias_expected) << \",\";"},{C,736,"void Preprocessor::HandlePragmaIncludeAlias(Token &Tok) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::warn_pragma_include_alias_expected) << \")\";"}}, | ||
[ | [k]={ | ||
[ | [ub]={"clang/test/Preprocessor/pragma_microsoft.c:89:31: warning: pragma include_alias expected \',\' [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_include_alias_expected_filename"]={ | ["warn_pragma_include_alias_expected_filename"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="pragma include_alias expected include filename", | [b]="pragma include_alias expected include filename", | ||
[ | [d]=h, | ||
[ | [a]="pragma include_alias expected include filename", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"611306eae6c9",1330728714,"Adding support for #pragma include_alias in MS compatibility mode. This implements PR 10705.\n\nllvm-...","Adding support for #pragma include_alias in MS compatibility mode. This implements PR 10705.\n\nllvm-svn: 151949"}, | ||
[ | [g]={{C,709,"void Preprocessor::HandlePragmaIncludeAlias(Token &Tok) {\n // ...\n if (SourceFilenameTok.is(tok::header_name)) {\n // ...\n } else {\n Diag(Tok, diag::warn_pragma_include_alias_expected_filename);"},{C,729,"void Preprocessor::HandlePragmaIncludeAlias(Token &Tok) {\n // ...\n if (ReplaceFilenameTok.is(tok::header_name)) {\n // ...\n } else {\n Diag(Tok, diag::warn_pragma_include_alias_expected_filename);"}}, | ||
[ | [k]={ | ||
[ | [ub]={"clang/test/Preprocessor/pragma_microsoft.c:96:22: warning: pragma include_alias expected include filename [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_include_alias_mismatch_angle"]={ | ["warn_pragma_include_alias_mismatch_angle"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="angle-bracketed include <%0> cannot be aliased to double-quoted include \"%1\"", | [b]="angle-bracketed include <%0> cannot be aliased to double-quoted include \"%1\"", | ||
[ | [d]=h, | ||
[ | [a]="angle\\-bracketed include \\<(.*?)\\> cannot be aliased to double\\-quoted include \"(.*?)\"", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"611306eae6c9",1330728714,"Adding support for #pragma include_alias in MS compatibility mode. This implements PR 10705.\n\nllvm-...","Adding support for #pragma include_alias in MS compatibility mode. This implements PR 10705.\n\nllvm-svn: 151949"}, | ||
[ | [g]={{C,754,"void Preprocessor::HandlePragmaIncludeAlias(Token &Tok) {\n // ...\n if (!SourceFileName.empty() && !ReplaceFileName.empty() && (SourceIsAngled != ReplaceIsAngled)) {\n // ...\n if (SourceIsAngled)\n DiagID = diag::warn_pragma_include_alias_mismatch_angle;"}}, | ||
[ | [k]={ | ||
[ | [ub]={"clang/test/Preprocessor/pragma_microsoft.c:87:23: warning: angle-bracketed include <bar.h> cannot be aliased to double-quoted include \"bar.h\" [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_include_alias_mismatch_quote"]={ | ["warn_pragma_include_alias_mismatch_quote"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="double-quoted include \"%0\" cannot be aliased to angle-bracketed include <%1>", | [b]="double-quoted include \"%0\" cannot be aliased to angle-bracketed include <%1>", | ||
[ | [d]=h, | ||
[ | [a]="double\\-quoted include \"(.*?)\" cannot be aliased to angle\\-bracketed include \\<(.*?)\\>", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"611306eae6c9",1330728714,"Adding support for #pragma include_alias in MS compatibility mode. This implements PR 10705.\n\nllvm-...","Adding support for #pragma include_alias in MS compatibility mode. This implements PR 10705.\n\nllvm-svn: 151949"}, | ||
[ | [g]={{C,756,"void Preprocessor::HandlePragmaIncludeAlias(Token &Tok) {\n // ...\n if (!SourceFileName.empty() && !ReplaceFileName.empty() && (SourceIsAngled != ReplaceIsAngled)) {\n // ...\n if (SourceIsAngled)\n // ...\n else\n DiagID = diag::warn_pragma_include_alias_mismatch_quote;"}}, | ||
[ | [k]={ | ||
[ | [ub]={"clang/test/Preprocessor/pragma_microsoft.c:88:23: warning: double-quoted include \"foo.h\" cannot be aliased to angle-bracketed include <bar.h> [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_init_seg_unsupported_target"]={ | ["warn_pragma_init_seg_unsupported_target"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="\'#pragma init_seg\' is only supported when targeting a Microsoft environment", | [b]="\'#pragma init_seg\' is only supported when targeting a Microsoft environment", | ||
[ | [d]=h, | ||
[ | [a]="\'\\#pragma init_seg\' is only supported when targeting a Microsoft environment", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"ad2986efcefe",1407998108,"Parse: Don\'t attempt to act on #pragma init_seg when not targeting MSVC\n\nIt doesn\'t really make sens...","Parse: Don\'t attempt to act on #pragma init_seg when not targeting MSVC\n\nIt doesn\'t really make sense to try and do stuff with #pragma init_seg\nwhen targeting non-Microsoft platforms; notions like library vs user\ninitializers don\'t exist for other targets.\n\nThis fixes PR20639.\n\nllvm-svn: 215618"}, | ||
[ | [g]={{m,1147,"// #pragma init_seg({ compiler | lib | user | \"section-name\" [, func-name]} )\nbool Parser::HandlePragmaMSInitSeg(StringRef PragmaName, SourceLocation PragmaLocation) {\n if (getTargetInfo().getTriple().getEnvironment() != llvm::Triple::MSVC) {\n PP.Diag(PragmaLocation, diag::warn_pragma_init_seg_unsupported_target);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/pragma-init_seg.cpp"]={"clang/test/SemaCXX/pragma-init_seg.cpp:21:9: warning: \'#pragma init_seg\' is only supported when targeting a Microsoft environment [-Wignored-pragmas]"} | ["clang/test/SemaCXX/pragma-init_seg.cpp"]={"clang/test/SemaCXX/pragma-init_seg.cpp:21:9: warning: \'#pragma init_seg\' is only supported when targeting a Microsoft environment [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_intrinsic_builtin"]={ | ["warn_pragma_intrinsic_builtin"]={ | ||
[ | [i]={"ignored-pragma-intrinsic",q,t}, | ||
[j]="ignored-pragma-intrinsic", | |||
[ | |||
[b]="%0 is not a recognized builtin%select{|; consider including <intrin.h> to access non-builtin intrinsics}1", | [b]="%0 is not a recognized builtin%select{|; consider including <intrin.h> to access non-builtin intrinsics}1", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) is not a recognized builtin(?:|; consider including \\<intrin\\.h\\> to access non\\-builtin intrinsics)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wignored\\-pragma\\-intrinsic[^\\]]*\\]", | ||
[ | [c]=v, | ||
[ | [f]={"3f1ec62a8397",1473266312,"Parsing MS pragma intrinsic\n\nParse pragma intrinsic, display warning if the function isn\'t a builtin...","Parsing MS pragma intrinsic\n\nParse pragma intrinsic, display warning if the function isn\'t a builtin\nfunction in clang and suggest including intrin.h.\n\nPatch by Albert Gutowski!\n\nReviewers: aaron.ballman, rnk\n\nSubscribers: aaron.ballman, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D23944\n\nllvm-svn: 280825"}, | ||
[ | [g]={{m,3682,"/// Handle the Microsoft \\#pragma intrinsic extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma intrinsic(memset)\n/// #pragma intrinsic(strlen, memcpy)\n/// \\endcode\n///\n/// Pragma intrisic tells the compiler to use a builtin version of the\n/// function. Clang does it anyway, so the pragma doesn\'t really do anything.\n/// Anyway, we emit a warning if the function specified in \\#pragma intrinsic\n/// isn\'t an intrinsic in clang and suggest to include intrin.h.\nvoid PragmaMSIntrinsicHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (!II->getBuiltinID())\n PP.Diag(Tok.getLocation(), diag::warn_pragma_intrinsic_builtin) << II << SuggestIntrinH;"},{m,3717,"bool Parser::HandlePragmaMSFunction(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (!II->getBuiltinID())\n PP.Diag(Tok.getLocation(), diag::warn_pragma_intrinsic_builtin) << II << SuggestIntrinH;"}}, | ||
[ | [k]={ | ||
[ | [ub]={"clang/test/Preprocessor/pragma_microsoft.c:179:19: warning: \'asdf\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:180:19: warning: \'main\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:186:19: warning: \'asdf\' is not a recognized builtin [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:189:19: warning: \'asdf\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:195:19: warning: \'asdf\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:201:19: warning: \'asdf\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:207:18: warning: \'asdf\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:208:18: warning: \'main\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:214:18: warning: \'asdf\' is not a recognized builtin [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:217:18: warning: \'asdf\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_invalid_action"]={ | ["warn_pragma_invalid_action"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="unknown action for \'#pragma %0\' - ignored", | [b]="unknown action for \'#pragma %0\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="unknown action for \'\\#pragma (.*?)\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"c0dca6ded731",1392249026,"MS ABI: Implement #pragma vtordisp() and clang-cl /vdN\n\nThese features are new in VS 2013 and are ne...","MS ABI: Implement #pragma vtordisp() and clang-cl /vdN\n\nThese features are new in VS 2013 and are necessary in order to layout\nstd::ostream correctly. Currently we have an ABI incompatibility when\nself-hosting with the 2013 stdlib in our convertible_fwd_ostream wrapper\nin gtest.\n\nThis change adds another implicit attribute, MSVtorDispAttr, because\nimplicit attributes are currently the best way to make sure the\ninformation stays on class templates through instantiation.\n\nReviewers: majnemer\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2746\n\nllvm-svn: 201274"}, | ||
[ | [g]={{m,1239,"// #pragma strict_gs_check(pop)\n// #pragma strict_gs_check(push, \"on\" | \"off\")\n// #pragma strict_gs_check(\"on\" | \"off\")\nbool Parser::HandlePragmaMSStrictGuardStackCheck(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Action & Sema::PSK_Push || Action & Sema::PSK_Set) {\n // ...\n if (II && II->isStr(\"off\")) {\n // ...\n } else if (II && II->isStr(\"on\")) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_invalid_action) << PragmaName;"},{m,2078,"// #pragma pack(...) comes in the following delicious flavors:\n// pack \'(\' [integer] \')\'\n// pack \'(\' \'show\' \')\'\n// pack \'(\' (\'push\' | \'pop\') [\',\' identifier] [, integer] \')\'\nvoid PragmaPackHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PackTok) {\n // ...\n if (Tok.is(tok::numeric_constant)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n if (II->isStr(\"show\")) {\n // ...\n } else {\n if (II->isStr(\"push\")) {\n // ...\n } else if (II->isStr(\"pop\")) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_invalid_action) << \"pack\";"},{m,2827,"/// Handle \'#pragma vtordisp\'\n// The grammar for this pragma is as follows:\n//\n// <vtordisp-mode> ::= (\'off\' | \'on\' | \'0\' | \'1\' | \'2\' )\n//\n// #pragma vtordisp \'(\' [\'push\' \',\'] vtordisp-mode \')\'\n// #pragma vtordisp \'(\' \'pop\' \')\'\n// #pragma vtordisp \'(\' \')\'\nvoid PragmaMSVtorDisp::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Action & Sema::PSK_Push || Action & Sema::PSK_Set) {\n // ...\n if (II && II->isStr(\"off\")) {\n // ...\n } else if (II && II->isStr(\"on\")) {\n // ...\n } else if (Tok.is(tok::numeric_constant) && PP.parseSimpleIntegerLiteral(Tok, Value)) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_invalid_action) << \"vtordisp\";"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/pragma-pack.c"]={"clang/test/Parser/pragma-pack.c:10:73: warning: unknown action for \'#pragma pack\' - ignored [-Wignored-pragmas]"} | ["clang/test/Parser/pragma-pack.c"]={"clang/test/Parser/pragma-pack.c:10:73: warning: unknown action for \'#pragma pack\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_invalid_argument"]={ | ["warn_pragma_invalid_argument"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="unexpected argument \'%0\' to \'#pragma %1\'%select{|; expected %3}2", | [b]="unexpected argument \'%0\' to \'#pragma %1\'%select{|; expected %3}2", | ||
[ | [d]=h, | ||
[ | [a]="unexpected argument \'(.*?)\' to \'\\#pragma (.*?)\'(?:|; expected (.*?))", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"1bbe00e0ca2d",1521535991,"[ms] Parse #pragma optimize and ignore it behind its own flag\n\nThis allows users to turn off warning...","[ms] Parse #pragma optimize and ignore it behind its own flag\n\nThis allows users to turn off warnings about this pragma specifically,\nwhile still receiving warnings about other ignored pragmas.\n\nDifferential Revision: https://reviews.llvm.org/D44630\n\nllvm-svn: 327959"}, | ||
[ | [g]={{m,3771,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (!II || (!II->isStr(\"on\") && !II->isStr(\"off\"))) {\n PP.Diag(PragmaLocation, diag::warn_pragma_invalid_argument) << PP.getSpelling(Tok) << PragmaName << /*Expected=*/true << \"\'on\' or \'off\'\";"},{m,3785,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n // TODO: Add support for \"sgty\"\n if (!OptimizationList->getString().empty()) {\n PP.Diag(PragmaLocation, diag::warn_pragma_invalid_argument) << OptimizationList->getString() << PragmaName << /*Expected=*/true << \"\\\"\\\"\";"},{m,4039,"// Handle \'#pragma clang riscv intrinsic vector\'.\n// \'#pragma clang riscv intrinsic sifive_vector\'.\nvoid PragmaRISCVHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (!II || !II->isStr(\"intrinsic\")) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_invalid_argument) << PP.getSpelling(Tok) << \"riscv\" << /*Expected=*/true << \"\'intrinsic\'\";"},{m,4047,"// Handle \'#pragma clang riscv intrinsic vector\'.\n// \'#pragma clang riscv intrinsic sifive_vector\'.\nvoid PragmaRISCVHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (!II || !(II->isStr(\"vector\") || II->isStr(\"sifive_vector\"))) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_invalid_argument) << PP.getSpelling(Tok) << \"riscv\" << /*Expected=*/true << \"\'vector\' or \'sifive_vector\'\";"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/riscv-bad-intrinsic-pragma.c"]={"clang/test/Sema/riscv-bad-intrinsic-pragma.c:4:31: warning: unexpected argument \'vvvv\' to \'#pragma riscv\'; expected \'vector\' or \'sifive_vector\' [-Wignored-pragmas]","clang/test/Sema/riscv-bad-intrinsic-pragma.c:7:21: warning: unexpected argument \'what\' to \'#pragma riscv\'; expected \'intrinsic\' [-Wignored-pragmas]","clang/test/Sema/riscv-bad-intrinsic-pragma.c:9:21: warning: unexpected argument \'int\' to \'#pragma riscv\'; expected \'intrinsic\' [-Wignored-pragmas]"} | ["clang/test/Sema/riscv-bad-intrinsic-pragma.c"]={"clang/test/Sema/riscv-bad-intrinsic-pragma.c:4:31: warning: unexpected argument \'vvvv\' to \'#pragma riscv\'; expected \'vector\' or \'sifive_vector\' [-Wignored-pragmas]","clang/test/Sema/riscv-bad-intrinsic-pragma.c:7:21: warning: unexpected argument \'what\' to \'#pragma riscv\'; expected \'intrinsic\' [-Wignored-pragmas]","clang/test/Sema/riscv-bad-intrinsic-pragma.c:9:21: warning: unexpected argument \'int\' to \'#pragma riscv\'; expected \'intrinsic\' [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_invalid_specific_action"]={ | ["warn_pragma_invalid_specific_action"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="unknown action \'%1\' for \'#pragma %0\' - ignored", | [b]="unknown action \'%1\' for \'#pragma %0\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="unknown action \'(.*?)\' for \'\\#pragma (.*?)\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={oc,1396996247,pc,rc}, | ||
[ | [g]={{m,1032,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n while (Tok.is(tok::comma)) {\n // ...\n if (Flag == ASTContext::PSF_None || Flag == ASTContext::PSF_Invalid) {\n PP.Diag(PragmaLocation, Flag == ASTContext::PSF_None ? diag::warn_pragma_invalid_specific_action : diag::warn_pragma_unsupported_action) << PragmaName << Tok.getIdentifierInfo()->getName();"}}, | ||
[ | [k]={ | ||
[ | [uc]={"clang/test/Sema/pragma-section.c:41:9: warning: unknown action \'bogus\' for \'#pragma section\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_message"]={ | ["warn_pragma_message"]={ | ||
[ | [i]={"#pragma-messages"}, | ||
[j]="#pragma-messages", | |||
[ | |||
[b]="%0", | [b]="%0", | ||
[ | [d]=h, | ||
[ | [a]="(.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-W\\#pragma\\-messages[^\\]]*\\]", | ||
[ | [c]="#pragma message Directive", | ||
[ | [f]={"30c924b3e874",1277572299,"Implement support for #pragma message, patch by Michael Spencer!\n\nllvm-svn: 106950","Implement support for #pragma message, patch by Michael Spencer!\n\nllvm-svn: 106950"}, | ||
[ | [g]={{C,1678,"/// 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 PP.Diag(MessageLoc, (Kind == PPCallbacks::PMK_Error) ? diag::err_pragma_message : diag::warn_pragma_message) << MessageString;"},{"clang/utils/TableGen/ClangDiagnosticsEmitter.cpp",1407,"/// /* DiagArray1 */ diag::warn_pragma_message,"}}, | ||
[ | [k]={ | ||
["clang/test/Lexer/pragma-operators.cpp"]={"clang/test/Lexer/pragma-operators.cpp:37:65: warning: \"Hello\", world! [-W#pragma-messages]"} | ["clang/test/Lexer/pragma-operators.cpp"]={"clang/test/Lexer/pragma-operators.cpp:37:65: warning: \"Hello\", world! [-W#pragma-messages]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_missing_argument"]={ | ["warn_pragma_missing_argument"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="missing argument to \'#pragma %0\'%select{|; expected %2}1", | [b]="missing argument to \'#pragma %0\'%select{|; expected %2}1", | ||
[ | [d]=h, | ||
[ | [a]="missing argument to \'\\#pragma (.*?)\'(?:|; expected (.*?))", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"1bbe00e0ca2d",1521535991,"[ms] Parse #pragma optimize and ignore it behind its own flag\n\nThis allows users to turn off warning...","[ms] Parse #pragma optimize and ignore it behind its own flag\n\nThis allows users to turn off warnings about this pragma specifically,\nwhile still receiving warnings about other ignored pragmas.\n\nDifferential Revision: https://reviews.llvm.org/D44630\n\nllvm-svn: 327959"}, | ||
[ | [g]={{m,3765,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.is(tok::eof) || Tok.is(tok::r_paren)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_missing_argument) << PragmaName << /*Expected=*/true << \"\'on\' or \'off\'\";"}}, | ||
[ | [k]={ | ||
[ | [ub]={"clang/test/Preprocessor/pragma_microsoft.c:228:9: warning: missing argument to \'#pragma optimize\'; expected \'on\' or \'off\' [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_ms_fenv_access"]={ | ["warn_pragma_ms_fenv_access"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="incorrect use of \'#pragma fenv_access (on|off)\' - ignored", | [b]="incorrect use of \'#pragma fenv_access (on|off)\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="incorrect use of \'\\#pragma fenv_access \\(on\\|off\\)\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"69350e569dc4",1612659633,"[C++20][Modules][3/8] Initial handling for module partitions.\n\nThis implements the parsing and recog...","[C++20][Modules][3/8] Initial handling for module partitions.\n\nThis implements the parsing and recognition of module partition CMIs\nand removes the FIXMEs in the parser.\n\nModule partitions are recognised in the base computation of visibility,\nhowever additional amendments to visibility follow in subsequent patches.\n\nDifferential Revision: https://reviews.llvm.org/D118586"}, | ||
[ | [g]={{m,282,"// \"\\#pragma fenv_access (on)\".\nstruct PragmaMSFenvAccessHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_ms_fenv_access);"},{m,294,"// \"\\#pragma fenv_access (on)\".\nstruct PragmaMSFenvAccessHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (II->isStr(\"on\")) {\n // ...\n } else if (II->isStr(\"off\")) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_ms_fenv_access);"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/pragma-fenv_access-ms.c"]={"clang/test/Parser/pragma-fenv_access-ms.c:9:83: warning: incorrect use of \'#pragma fenv_access (on|off)\' - ignored [-Wignored-pragmas]"} | ["clang/test/Parser/pragma-fenv_access-ms.c"]={"clang/test/Parser/pragma-fenv_access-ms.c:9:83: warning: incorrect use of \'#pragma fenv_access (on|off)\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_ms_struct"]={ | ["warn_pragma_ms_struct"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="incorrect use of \'#pragma ms_struct on|off\' - ignored", | [b]="incorrect use of \'#pragma ms_struct on|off\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="incorrect use of \'\\#pragma ms_struct on\\|off\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"743dda49d972",1303757355,"Recognize gcc\'s ms_struct pragma (and ignore for now).\nThis is wip.\n\nllvm-svn: 130138","Recognize gcc\'s ms_struct pragma (and ignore for now).\nThis is wip.\n\nllvm-svn: 130138"}, | ||
[ | [g]={{m,2162,"// #pragma ms_struct on\n// #pragma ms_struct off\nvoid PragmaMSStructHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &MSStructTok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_ms_struct);"},{m,2174,"// #pragma ms_struct on\n// #pragma ms_struct off\nvoid PragmaMSStructHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &MSStructTok) {\n // ...\n if (II->isStr(\"on\")) {\n // ...\n } else if (II->isStr(\"off\") || II->isStr(\"reset\"))\n // ...\n else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_ms_struct);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/pragma-ms_struct.c"]={"clang/test/Sema/pragma-ms_struct.c:9:96: warning: incorrect use of \'#pragma ms_struct on|off\' - ignored [-Wignored-pragmas]"} | ["clang/test/Sema/pragma-ms_struct.c"]={"clang/test/Sema/pragma-ms_struct.c:9:96: warning: incorrect use of \'#pragma ms_struct on|off\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_omp_ignored"]={ | ["warn_pragma_omp_ignored"]={ | ||
[ | [i]={J,jb}, | ||
[j]=jb, | |||
[ | |||
[b]="unexpected \'#pragma omp ...\' in program", | [b]="unexpected \'#pragma omp ...\' in program", | ||
[ | [d]=h, | ||
[ | [a]="unexpected \'\\#pragma omp \\.\\.\\.\' in program", | ||
[ | [e]=Qb, | ||
[ | [c]=v, | ||
[ | [f]={"5d61097dd909",1351328745,"Feature:\n OpenMP support.\n\nSub-Feature:\n Support for \"#pragma omp ...\" registration with\n Preproc...","Feature:\n OpenMP support.\n\nSub-Feature:\n Support for \"#pragma omp ...\" registration with\n Preprocessor.\n\nFiles Changed/Added:\n * include/clang/Basic/DiagnosticGroups.td (C)\n * include/clang/Basic/DiagnosticParseKinds.td (C)\n * include/clang/Basic/TokenKinds.def (C)\n * include/clang/Parse/Parser.h (C)\n * lib/Parse/Parser.cpp (C)\n\nTest Cases Changed/Added:\n * test/Preprocessor/pragma_omp.c (A)\n * test/Preprocessor/pragma_omp_ignored_warning.c (A)\n\nllvm-svn: 166869"}, | ||
[ | [g]={{m,2619,"/// Handle \'#pragma omp ...\' when OpenMP is disabled.\n///\nvoid PragmaNoOpenMPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstTok) {\n if (!PP.getDiagnostics().isIgnored(diag::warn_pragma_omp_ignored, FirstTok.getLocation())) {"},{m,2621,"/// Handle \'#pragma omp ...\' when OpenMP is disabled.\n///\nvoid PragmaNoOpenMPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstTok) {\n if (!PP.getDiagnostics().isIgnored(diag::warn_pragma_omp_ignored, FirstTok.getLocation())) {\n PP.Diag(FirstTok, diag::warn_pragma_omp_ignored);"},{m,2622,"/// Handle \'#pragma omp ...\' when OpenMP is disabled.\n///\nvoid PragmaNoOpenMPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstTok) {\n if (!PP.getDiagnostics().isIgnored(diag::warn_pragma_omp_ignored, FirstTok.getLocation())) {\n // ...\n PP.getDiagnostics().setSeverity(diag::warn_pragma_omp_ignored, diag::Severity::Ignored, SourceLocation());"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/option_warn.c"]={"clang/test/OpenMP/option_warn.c:7:9: warning: unexpected \'#pragma omp ...\' in program [-Wsource-uses-openmp]"} | ["clang/test/OpenMP/option_warn.c"]={"clang/test/OpenMP/option_warn.c:7:9: warning: unexpected \'#pragma omp ...\' in program [-Wsource-uses-openmp]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_options_align_reset_failed"]={ | ["warn_pragma_options_align_reset_failed"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="#pragma options align=reset failed: %0", | [b]="#pragma options align=reset failed: %0", | ||
[ | [d]=h, | ||
[ | [a]="\\#pragma options align\\=reset failed\\: (.*?)", | ||
[ | [e]=z, | ||
[ | [c]=l, | ||
[ | [f]={"69dac58e7d42",1274918680,"Sema: Support for #pragma options align={reset,natural}. \'#pragma options align\'\nshares the stack wi...","Sema: Support for #pragma options align={reset,natural}. \'#pragma options align\'\nshares the stack with \'#pragma pack\', who knew!?\n\nllvm-svn: 104786"}, | ||
[ | [g]={{gb,261,"void Sema::ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc) {\n // ...\n case POAK_Reset:\n // ...\n if (AlignPackStack.Stack.empty()) {\n if (AlignPackStack.CurrentValue.getAlignMode() != AlignPackInfo::Native || AlignPackStack.CurrentValue.IsPackAttr()) {\n // ...\n } else {\n Diag(PragmaLoc, diag::warn_pragma_options_align_reset_failed) << \"stack empty\";"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/pragma-pack-and-options-align.c"]={"clang/test/Sema/pragma-pack-and-options-align.c:51:84: warning: #pragma options align=reset failed: stack empty [-Wignored-pragmas]"} | ["clang/test/Sema/pragma-pack-and-options-align.c"]={"clang/test/Sema/pragma-pack-and-options-align.c:51:84: warning: #pragma options align=reset failed: stack empty [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_options_expected_align"]={ | ["warn_pragma_options_expected_align"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected \'align\' following \'#pragma options\' - ignored", | [b]="expected \'align\' following \'#pragma options\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="expected \'align\' following \'\\#pragma options\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"75c9be7e8048",1274916546,"Parse: Add support for \'#pragma options align\'.\n\nAlso, fix a source location bug with the rparen in ...","Parse: Add support for \'#pragma options align\'.\n\nAlso, fix a source location bug with the rparen in #pragma pack.\n\nllvm-svn: 104784"}, | ||
[ | [g]={{m,2257,"// #pragma \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'options \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'align\' \'(\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'} \')\'\nstatic void ParseAlignPragma(Preprocessor &PP, Token &FirstTok, bool IsOptions) {\n // ...\n if (IsOptions) {\n // ...\n if (Tok.isNot(tok::identifier) || !Tok.getIdentifierInfo()->isStr(\"align\")) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_options_expected_align);"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/pragma-options.c"]={"clang/test/Parser/pragma-options.c:3:88: warning: expected \'align\' following \'#pragma options\' - ignored [-Wignored-pragmas]"} | ["clang/test/Parser/pragma-options.c"]={"clang/test/Parser/pragma-options.c:3:88: warning: expected \'align\' following \'#pragma options\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_pack_invalid_alignment"]={ | ["warn_pragma_pack_invalid_alignment"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected #pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\'", | [b]="expected #pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\'", | ||
[ | [d]=h, | ||
[ | [a]="expected \\#pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\'", | ||
[ | [e]=z, | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{gb,347,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n if (Alignment) {\n // ...\n // pack(0) is like pack(), which just works out since that is what\n // we use 0 for in PackAttr.\n if (Alignment->isTypeDependent() || !Val || !(*Val == 0 || Val->isPowerOf2()) || Val->getZExtValue() > 16) {\n Diag(PragmaLoc, diag::warn_pragma_pack_invalid_alignment);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/pragma-pack.c"]={"clang/test/Sema/pragma-pack.c:4:74: warning: expected #pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\' [-Wignored-pragmas]"} | ["clang/test/Sema/pragma-pack.c"]={"clang/test/Sema/pragma-pack.c:4:74: warning: expected #pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\' [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_pack_malformed"]={ | ["warn_pragma_pack_malformed"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected integer or identifier in \'#pragma pack\' - ignored", | [b]="expected integer or identifier in \'#pragma pack\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="expected integer or identifier in \'\\#pragma pack\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{m,2099,"// #pragma pack(...) comes in the following delicious flavors:\n// pack \'(\' [integer] \')\'\n// pack \'(\' \'show\' \')\'\n// pack \'(\' (\'push\' | \'pop\') [\',\' identifier] [, integer] \')\'\nvoid PragmaPackHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PackTok) {\n // ...\n if (Tok.is(tok::numeric_constant)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n if (II->isStr(\"show\")) {\n // ...\n } else {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n if (Tok.is(tok::numeric_constant)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n if (Tok.isNot(tok::numeric_constant)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_pack_malformed);"},{m,2109,"// #pragma pack(...) comes in the following delicious flavors:\n// pack \'(\' [integer] \')\'\n// pack \'(\' \'show\' \')\'\n// pack \'(\' (\'push\' | \'pop\') [\',\' identifier] [, integer] \')\'\nvoid PragmaPackHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PackTok) {\n // ...\n if (Tok.is(tok::numeric_constant)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n if (II->isStr(\"show\")) {\n // ...\n } else {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n if (Tok.is(tok::numeric_constant)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_pack_malformed);"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/pragma-pack.c"]={"clang/test/Parser/pragma-pack.c:14:94: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:15:94: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:16:94: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:19:97: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:20:96: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:21:96: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:32:76: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]"} | ["clang/test/Parser/pragma-pack.c"]={"clang/test/Parser/pragma-pack.c:14:94: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:15:94: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:16:94: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:19:97: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:20:96: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:21:96: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:32:76: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_pack_modified_after_include"]={ | ["warn_pragma_pack_modified_after_include"]={ | ||
[ | [i]={Vc,t}, | ||
[j]=Vc, | |||
[ | |||
[b]="the current #pragma pack alignment value is modified in the included file", | [b]="the current #pragma pack alignment value is modified in the included file", | ||
[ | [d]=h, | ||
[ | [a]="the current \\#pragma pack alignment value is modified in the included file", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpragma\\-pack[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"ad273341a452",1500398631,"Add a warning for missing \'#pragma pack (pop)\' and suspicious uses\nof \'#pragma pack\' in included fil...","Add a warning for missing \'#pragma pack (pop)\' and suspicious uses\nof \'#pragma pack\' in included files\n\nThis commit adds a new -Wpragma-pack warning. It warns in the following cases:\n\n- When a translation unit is missing terminating #pragma pack (pop) directives.\n- When entering an included file if the current alignment value as determined\n by \'#pragma pack\' directives is different from the default alignment value.\n- When leaving an included file that changed the state of the current alignment\n value.\n\nrdar://10184173\n\nDifferential Revision: https://reviews.llvm.org/D35484\n\nllvm-svn: 308327"}, | ||
[ | [g]={{gb,471,"void Sema::DiagnoseNonDefaultPragmaAlignPack(PragmaAlignPackDiagnoseKind Kind, SourceLocation IncludeLoc) {\n // ...\n // Warn about modified alignment after #includes.\n if (PrevAlignPackState.CurrentValue != AlignPackStack.CurrentValue) {\n Diag(IncludeLoc, diag::warn_pragma_pack_modified_after_include);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/misleading-pragma-align-pack-diagnostics.c"]={"clang/test/Sema/misleading-pragma-align-pack-diagnostics.c:15:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]"} | ["clang/test/Sema/misleading-pragma-align-pack-diagnostics.c"]={"clang/test/Sema/misleading-pragma-align-pack-diagnostics.c:15:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_pack_no_pop_eof"]={ | ["warn_pragma_pack_no_pop_eof"]={ | ||
[ | [i]={Vc,t}, | ||
[j]=Vc, | |||
[ | |||
[b]="unterminated \'#pragma pack (push, ...)\' at end of file", | [b]="unterminated \'#pragma pack (push, ...)\' at end of file", | ||
[ | [d]=h, | ||
[ | [a]="unterminated \'\\#pragma pack \\(push, \\.\\.\\.\\)\' at end of file", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpragma\\-pack[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"ad273341a452",1500398631,"Add a warning for missing \'#pragma pack (pop)\' and suspicious uses\nof \'#pragma pack\' in included fil...","Add a warning for missing \'#pragma pack (pop)\' and suspicious uses\nof \'#pragma pack\' in included files\n\nThis commit adds a new -Wpragma-pack warning. It warns in the following cases:\n\n- When a translation unit is missing terminating #pragma pack (pop) directives.\n- When entering an included file if the current alignment value as determined\n by \'#pragma pack\' directives is different from the default alignment value.\n- When leaving an included file that changed the state of the current alignment\n value.\n\nrdar://10184173\n\nDifferential Revision: https://reviews.llvm.org/D35484\n\nllvm-svn: 308327"}, | ||
[ | [g]={{gb,485,"void Sema::DiagnoseUnterminatedPragmaAlignPack() {\n // ...\n // FIXME: AlignPackStack may contain both #pragma align and #pragma pack\n // information, diagnostics below might not be accurate if we have mixed\n // pragmas.\n for (const auto &StackSlot : llvm::reverse(AlignPackStack.Stack)) {\n Diag(StackSlot.PragmaPushLocation, diag::warn_pragma_pack_no_pop_eof);"}}, | ||
[ | [k]={ | ||
["clang/test/FixIt/fixit-pragma-pack.c"]={"clang/test/FixIt/fixit-pragma-pack.c:3:9: warning: unterminated \'#pragma pack (push, ...)\' at end of file [-Wpragma-pack]"} | ["clang/test/FixIt/fixit-pragma-pack.c"]={"clang/test/FixIt/fixit-pragma-pack.c:3:9: warning: unterminated \'#pragma pack (push, ...)\' at end of file [-Wpragma-pack]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_pack_non_default_at_include"]={ | ["warn_pragma_pack_non_default_at_include"]={ | ||
[ | [i]={Vc,"pragma-pack-suspicious-include",t}, | ||
[j]="pragma-pack-suspicious-include", | |||
[ | |||
[b]="non-default #pragma pack value changes the alignment of struct or union members in the included file", | [b]="non-default #pragma pack value changes the alignment of struct or union members in the included file", | ||
[ | [d]=h, | ||
[ | [a]="non\\-default \\#pragma pack value changes the alignment of struct or union members in the included file", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpragma\\-pack\\-suspicious\\-include[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"ad273341a452",1500398631,"Add a warning for missing \'#pragma pack (pop)\' and suspicious uses\nof \'#pragma pack\' in included fil...","Add a warning for missing \'#pragma pack (pop)\' and suspicious uses\nof \'#pragma pack\' in included files\n\nThis commit adds a new -Wpragma-pack warning. It warns in the following cases:\n\n- When a translation unit is missing terminating #pragma pack (pop) directives.\n- When entering an included file if the current alignment value as determined\n by \'#pragma pack\' directives is different from the default alignment value.\n- When leaving an included file that changed the state of the current alignment\n value.\n\nrdar://10184173\n\nDifferential Revision: https://reviews.llvm.org/D35484\n\nllvm-svn: 308327"}, | ||
[ | [g]={{gb,466,"void Sema::DiagnoseNonDefaultPragmaAlignPack(PragmaAlignPackDiagnoseKind Kind, SourceLocation IncludeLoc) {\n // ...\n // FIXME: AlignPackStack may contain both #pragma align and #pragma pack\n // information, diagnostics below might not be accurate if we have mixed\n // pragmas.\n if (PrevAlignPackState.ShouldWarnOnInclude) {\n // ...\n Diag(IncludeLoc, diag::warn_pragma_pack_non_default_at_include);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/suspicious-pragma-pack.m"]={"clang/test/SemaObjC/suspicious-pragma-pack.m:4:9: warning: non-default #pragma pack value changes the alignment of struct or union members in the included file [-Wpragma-pack-suspicious-include]"} | ["clang/test/SemaObjC/suspicious-pragma-pack.m"]={"clang/test/SemaObjC/suspicious-pragma-pack.m:4:9: warning: non-default #pragma pack value changes the alignment of struct or union members in the included file [-Wpragma-pack-suspicious-include]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_pack_pop_identifier_and_alignment"]={ | ["warn_pragma_pack_pop_identifier_and_alignment"]={ | ||
[b]="specifying both a name and alignment to \'pop\' is undefined", | |||
[d]=h, | |||
[a]="specifying both a name and alignment to \'pop\' is undefined", | [a]="specifying both a name and alignment to \'pop\' is undefined", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[f]={"2a8c18d99118",1523027672,"Fix typos in clang\n\nFound via codespell -q 3 -I ../clang-whitelist.txt\nWhere whitelist consists of:\n...","Fix typos in clang\n\nFound via codespell -q 3 -I ../clang-whitelist.txt\nWhere whitelist consists of:\n\n archtype\n cas\n classs\n checkk\n compres\n definit\n frome\n iff\n inteval\n ith\n lod\n methode\n nd\n optin\n ot\n pres\n statics\n te\n thru\n\nPatch by luzpaz! (This is a subset of D44188 that applies cleanly with a few\nfiles that have dubious fixes reverted.)\n\nDifferential revision: https://reviews.llvm.org/D44188\n\nllvm-svn: 329399"}, | |||
[g]={{gb,376,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n // MSDN, C/C++ Preprocessor Reference > Pragma Directives > pack:\n // \"#pragma pack(pop, identifier, n) is undefined\"\n if (Action & Sema::PSK_Pop) {\n if (Alignment && !SlotLabel.empty())\n Diag(PragmaLoc, diag::warn_pragma_pack_pop_identifier_and_alignment);"}} | |||
[f | |||
[ | |||
}, | }, | ||
["warn_pragma_pack_show"]={ | ["warn_pragma_pack_show"]={ | ||
[b]="value of #pragma pack(show) == %0", | [b]="value of #pragma pack(show) == %0", | ||
[ | [d]=h, | ||
[ | [a]="value of \\#pragma pack\\(show\\) \\=\\= (.*?)", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{gb,367,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n if (Action == Sema::PSK_Show) {\n // ...\n if (ModeVal == AlignPackInfo::Mac68k && (IsXLPragma || CurVal.IsAlignAttr()))\n Diag(PragmaLoc, diag::warn_pragma_pack_show) << \"mac68k\";"},{gb,369,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n if (Action == Sema::PSK_Show) {\n // ...\n if (ModeVal == AlignPackInfo::Mac68k && (IsXLPragma || CurVal.IsAlignAttr()))\n // ...\n else\n Diag(PragmaLoc, diag::warn_pragma_pack_show) << AlignmentVal;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/pragma-pack.c"]={"clang/test/Sema/pragma-pack.c:3:69: warning: value of #pragma pack(show) == 8","clang/test/Sema/pragma-pack.c:5:69: warning: value of #pragma pack(show) == 8","clang/test/Sema/pragma-pack.c:7:69: warning: value of #pragma pack(show) == 4","clang/test/Sema/pragma-pack.c:9:69: warning: value of #pragma pack(show) == 8","clang/test/Sema/pragma-pack.c:12:70: warning: value of #pragma pack(show) == 16","clang/test/Sema/pragma-pack.c:14:70: warning: value of #pragma pack(show) == 16","clang/test/Sema/pragma-pack.c:17:69: warning: value of #pragma pack(show) == 8","clang/test/Sema/pragma-pack.c:19:69: warning: value of #pragma pack(show) == 1","clang/test/Sema/pragma-pack.c:21:69: warning: value of #pragma pack(show) == 2","clang/test/Sema/pragma-pack.c:26:70: warning: value of #pragma pack(show) == 16"} | ["clang/test/Sema/pragma-pack.c"]={"clang/test/Sema/pragma-pack.c:3:69: warning: value of #pragma pack(show) == 8","clang/test/Sema/pragma-pack.c:5:69: warning: value of #pragma pack(show) == 8","clang/test/Sema/pragma-pack.c:7:69: warning: value of #pragma pack(show) == 4","clang/test/Sema/pragma-pack.c:9:69: warning: value of #pragma pack(show) == 8","clang/test/Sema/pragma-pack.c:12:70: warning: value of #pragma pack(show) == 16","clang/test/Sema/pragma-pack.c:14:70: warning: value of #pragma pack(show) == 16","clang/test/Sema/pragma-pack.c:17:69: warning: value of #pragma pack(show) == 8","clang/test/Sema/pragma-pack.c:19:69: warning: value of #pragma pack(show) == 1","clang/test/Sema/pragma-pack.c:21:69: warning: value of #pragma pack(show) == 2","clang/test/Sema/pragma-pack.c:26:70: warning: value of #pragma pack(show) == 16"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_pop_failed"]={ | ["warn_pragma_pop_failed"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="#pragma %0(pop, ...) failed: %1", | [b]="#pragma %0(pop, ...) failed: %1", | ||
[ | [d]=h, | ||
[ | [a]="\\#pragma (.*?)\\(pop, \\.\\.\\.\\) failed\\: (.*?)", | ||
[ | [e]=z, | ||
[ | [c]=l, | ||
[ | [f]={"c0dca6ded731",1392249026,"MS ABI: Implement #pragma vtordisp() and clang-cl /vdN\n\nThese features are new in VS 2013 and are ne...","MS ABI: Implement #pragma vtordisp() and clang-cl /vdN\n\nThese features are new in VS 2013 and are necessary in order to layout\nstd::ostream correctly. Currently we have an ABI incompatibility when\nself-hosting with the 2013 stdlib in our convertible_fwd_ostream wrapper\nin gtest.\n\nThis change adds another implicit attribute, MSVtorDispAttr, because\nimplicit attributes are currently the best way to make sure the\ninformation stays on class templates through instantiation.\n\nReviewers: majnemer\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2746\n\nllvm-svn: 201274"}, | ||
[ | [g]={{gb,380,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n // MSDN, C/C++ Preprocessor Reference > Pragma Directives > pack:\n // \"#pragma pack(pop, identifier, n) is undefined\"\n if (Action & Sema::PSK_Pop) {\n // ...\n if (AlignPackStack.Stack.empty()) {\n // ...\n Diag(PragmaLoc, diag::warn_pragma_pop_failed) << \"pack\""},{gb,593,"void Sema::ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value) {\n // ...\n case PFC_Pop:\n if (FpPragmaStack.Stack.empty()) {\n Diag(Loc, diag::warn_pragma_pop_failed) << \"float_control\""},{gb,615,"void Sema::ActOnPragmaMSVtorDisp(PragmaMsStackAction Action, SourceLocation PragmaLoc, MSVtorDispMode Mode) {\n if (Action & PSK_Pop && VtorDispStack.Stack.empty())\n Diag(PragmaLoc, diag::warn_pragma_pop_failed) << \"vtordisp\""},{gb,748,"/// Called on well formed \\#pragma bss_seg().\nvoid Sema::ActOnPragmaMSSeg(SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, StringLiteral *SegmentName, llvm::StringRef PragmaName) {\n // ...\n if (Action & PSK_Pop && Stack->Stack.empty())\n Diag(PragmaLocation, diag::warn_pragma_pop_failed) << PragmaName << \"stack empty\";"},{gb,767,"/// Called on well formed \\#pragma strict_gs_check().\nvoid Sema::ActOnPragmaMSStrictGuardStackCheck(SourceLocation PragmaLocation, PragmaMsStackAction Action, bool Value) {\n if (Action & PSK_Pop && StrictGuardStackCheckStack.Stack.empty())\n Diag(PragmaLocation, diag::warn_pragma_pop_failed) << \"strict_gs_check\""}}, | ||
[ | [k]={ | ||
["clang/test/Sema/pragma-pack-and-options-align.c"]={"clang/test/Sema/pragma-pack-and-options-align.c:52:79: warning: #pragma pack(pop, ...) failed: stack empty [-Wignored-pragmas]"} | ["clang/test/Sema/pragma-pack-and-options-align.c"]={"clang/test/Sema/pragma-pack-and-options-align.c:52:79: warning: #pragma pack(pop, ...) failed: stack empty [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_pop_macro_no_push"]={ | ["warn_pragma_pop_macro_no_push"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="pragma pop_macro could not pop \'%0\', no matching push_macro", | [b]="pragma pop_macro could not pop \'%0\', no matching push_macro", | ||
[ | [d]=h, | ||
[ | [a]="pragma pop_macro could not pop \'(.*?)\', no matching push_macro", | ||
[ | [e]=z, | ||
[ | [c]=x, | ||
[ | [f]={"c0a585d63c6c",1282060545,"Implement #pragma push_macro, patch by Francois Pichet!\n\nllvm-svn: 111234","Implement #pragma push_macro, patch by Francois Pichet!\n\nllvm-svn: 111234"}, | ||
[ | [g]={{C,681,"/// Handle \\#pragma pop_macro.\n///\n/// The syntax is:\n/// \\code\n/// #pragma pop_macro(\"macro\")\n/// \\endcode\nvoid Preprocessor::HandlePragmaPopMacro(Token &PopMacroTok) {\n // ...\n if (iter != PragmaPushMacroInfo.end()) {\n // ...\n } else {\n Diag(MessageLoc, diag::warn_pragma_pop_macro_no_push) << IdentInfo->getName();"}} | ||
}, | }, | ||
["warn_pragma_restrict_expansion_macro_use"]={ | ["warn_pragma_restrict_expansion_macro_use"]={ | ||
[ | [i]={"pedantic-macros","restrict-expansion"}, | ||
[j]="restrict-expansion", | |||
[ | |||
[b]="macro %0 has been marked as unsafe for use in headers%select{|: %2}1", | [b]="macro %0 has been marked as unsafe for use in headers%select{|: %2}1", | ||
[ | [d]=h, | ||
[ | [a]="macro (.*?) has been marked as unsafe for use in headers(?:|\\: (.*?))", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wrestrict\\-expansion[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={lb,1625925174,mb,nb}, | ||
[ | [g]={{Hc,1470,"void Preprocessor::emitRestrictExpansionWarning(const Token &Identifier) const {\n // ...\n if (Info.Message.empty())\n Diag(Identifier, diag::warn_pragma_restrict_expansion_macro_use) << Identifier.getIdentifierInfo() << 0;"},{Hc,1473,"void Preprocessor::emitRestrictExpansionWarning(const Token &Identifier) const {\n // ...\n if (Info.Message.empty())\n // ...\n else\n Diag(Identifier, diag::warn_pragma_restrict_expansion_macro_use) << Identifier.getIdentifierInfo() << 1 << Info.Message;"}}, | ||
[ | [k]={ | ||
["clang/test/Lexer/unsafe-macro.c"]={"clang/test/Lexer/Inputs/unsafe-macro-2.h:2:5: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:6:13: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:10:8: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:14:9: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:18:15: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:21:15: warning: macro \'UNSAFE_MACRO_2\' has been marked as unsafe for use in headers [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:34:7: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:41:10: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:48:11: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]"} | ["clang/test/Lexer/unsafe-macro.c"]={"clang/test/Lexer/Inputs/unsafe-macro-2.h:2:5: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:6:13: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:10:8: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:14:9: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:18:15: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:21:15: warning: macro \'UNSAFE_MACRO_2\' has been marked as unsafe for use in headers [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:34:7: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:41:10: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:48:11: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_unknown_extension"]={ | ["warn_pragma_unknown_extension"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="OpenCL extension %0 unknown or does not require pragma - ignoring", | [b]="OpenCL extension %0 unknown or does not require pragma - ignoring", | ||
[ | [d]=h, | ||
[ | [a]="OpenCL extension (.*?) unknown or does not require pragma \\- ignoring", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"7ce13fc940de",1297647773,"OpenCL: add support for __kernel, kernel keywords and EXTENSION,\nFP_CONTRACT pragmas. Patch origina...","OpenCL: add support for __kernel, kernel keywords and EXTENSION,\nFP_CONTRACT pragmas. Patch originally by ARM.\n\nllvm-svn: 125475"}, | ||
[ | [g]={{m,914,"void Parser::HandlePragmaOpenCLExtension() {\n // ...\n // OpenCL 1.1 9.1: \"The all variant sets the behavior for all extensions,\n // overriding all previously issued extension directives, but only if the\n // behavior is set to disable.\"\n if (Name == \"all\") {\n // ...\n } else if (State == Begin) {\n // ...\n } else if (State == End) {\n // ...\n } else if (!Opt.isKnown(Name) || !Opt.isWithPragma(Name))\n PP.Diag(NameLoc, diag::warn_pragma_unknown_extension) << Ident;"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/opencl-pragma.cl"]={"clang/test/Parser/opencl-pragma.cl:5:26: warning: OpenCL extension \'cl_no_such_extension\' unknown or does not require pragma - ignoring [-Wignored-pragmas]"} | ["clang/test/Parser/opencl-pragma.cl"]={"clang/test/Parser/opencl-pragma.cl:5:26: warning: OpenCL extension \'cl_no_such_extension\' unknown or does not require pragma - ignoring [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_unroll_cuda_value_in_parens"]={ | ["warn_pragma_unroll_cuda_value_in_parens"]={ | ||
[ | [i]={"cuda-compat"}, | ||
[j]="cuda-compat", | |||
[ | |||
[b]="argument to \'#pragma unroll\' should not be in parentheses in CUDA C/C++", | [b]="argument to \'#pragma unroll\' should not be in parentheses in CUDA C/C++", | ||
[ | [d]=h, | ||
[ | [a]="argument to \'\\#pragma unroll\' should not be in parentheses in CUDA C\\/C\\+\\+", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wcuda\\-compat[^\\]]*\\]", | ||
[ | [c]=v, | ||
[ | [f]={"bd26f5ea4d9c",1405966114,"Add support for \'#pragma unroll\'.\n\nllvm-svn: 213574","Add support for \'#pragma unroll\'.\n\nllvm-svn: 213574"}, | ||
[ | [g]={{m,3633,"/// Handle the loop unroll optimization pragmas.\n/// #pragma unroll\n/// #pragma unroll unroll-hint-value\n/// #pragma unroll \'(\' unroll-hint-value \')\'\n/// #pragma nounroll\n/// #pragma unroll_and_jam\n/// #pragma unroll_and_jam unroll-hint-value\n/// #pragma unroll_and_jam \'(\' unroll-hint-value \')\'\n/// #pragma nounroll_and_jam\n///\n/// unroll-hint-value:\n/// constant-expression\n///\n/// Loop unrolling hints can be specified with \'#pragma unroll\' or\n/// \'#pragma nounroll\'. \'#pragma unroll\' can take a numeric argument optionally\n/// contained in parentheses. With no argument the directive instructs llvm to\n/// try to unroll the loop completely. A positive integer argument can be\n/// specified to indicate the number of times the loop should be unrolled. To\n/// maximize compatibility with other compilers the unroll count argument can be\n/// specified with or without parentheses. Specifying, \'#pragma nounroll\'\n/// disables unrolling of the loop.\nvoid PragmaUnrollHintHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.is(tok::eod)) {\n // ...\n } else if (PragmaName.getIdentifierInfo()->getName() == \"nounroll\" || PragmaName.getIdentifierInfo()->getName() == \"nounroll_and_jam\") {\n // ...\n } else {\n // ...\n // In CUDA, the argument to \'#pragma unroll\' should not be contained in\n // parentheses.\n if (PP.getLangOpts().CUDA && ValueInParens)\n PP.Diag(Info->Toks[0].getLocation(), diag::warn_pragma_unroll_cuda_value_in_parens);"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/warn-cuda-compat.cu"]={"clang/test/Parser/warn-cuda-compat.cu:9:114: warning: argument to \'#pragma unroll\' should not be in parentheses in CUDA C/C++ [-Wcuda-compat]"} | ["clang/test/Parser/warn-cuda-compat.cu"]={"clang/test/Parser/warn-cuda-compat.cu:9:114: warning: argument to \'#pragma unroll\' should not be in parentheses in CUDA C/C++ [-Wcuda-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_unsupported_action"]={ | ["warn_pragma_unsupported_action"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="known but unsupported action \'%1\' for \'#pragma %0\' - ignored", | [b]="known but unsupported action \'%1\' for \'#pragma %0\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="known but unsupported action \'(.*?)\' for \'\\#pragma (.*?)\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={oc,1396996247,pc,rc}, | ||
[ | [g]={{m,1033,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n while (Tok.is(tok::comma)) {\n // ...\n if (Flag == ASTContext::PSF_None || Flag == ASTContext::PSF_Invalid) {\n PP.Diag(PragmaLocation, Flag == ASTContext::PSF_None ? diag::warn_pragma_invalid_specific_action : diag::warn_pragma_unsupported_action) << PragmaName << Tok.getIdentifierInfo()->getName();"}}, | ||
[ | [k]={ | ||
[ | [uc]={"clang/test/Sema/pragma-section.c:42:9: warning: known but unsupported action \'nopage\' for \'#pragma section\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_unsupported_extension"]={ | ["warn_pragma_unsupported_extension"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="unsupported OpenCL extension %0 - ignoring", | [b]="unsupported OpenCL extension %0 - ignoring", | ||
[ | [d]=h, | ||
[ | [a]="unsupported OpenCL extension (.*?) \\- ignoring", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"64936ce91dba",1463154277,"[OpenCL] Add supported OpenCL extensions to target info.\n\nAdd supported OpenCL extensions to target ...","[OpenCL] Add supported OpenCL extensions to target info.\n\nAdd supported OpenCL extensions to target info. It serves as default values to save the users of the burden setting each supported extensions and optional core features in command line.\n\nDifferential Revision: http://reviews.llvm.org/D19484\n\nllvm-svn: 269431"}, | ||
[ | [g]={{m,920,"void Parser::HandlePragmaOpenCLExtension() {\n // ...\n // OpenCL 1.1 9.1: \"The all variant sets the behavior for all extensions,\n // overriding all previously issued extension directives, but only if the\n // behavior is set to disable.\"\n if (Name == \"all\") {\n // ...\n } else if (State == Begin) {\n // ...\n } else if (State == End) {\n // ...\n } else if (!Opt.isKnown(Name) || !Opt.isWithPragma(Name))\n // ...\n else if (Opt.isSupportedExtension(Name, getLangOpts()))\n // ...\n else if (Opt.isSupportedCoreOrOptionalCore(Name, getLangOpts()))\n // ...\n else\n PP.Diag(NameLoc, diag::warn_pragma_unsupported_extension) << Ident;"}}, | ||
[ | [k]={ | ||
["clang/test/Misc/amdgcn.languageOptsOpenCL.cl"]={"clang/test/Misc/amdgcn.languageOptsOpenCL.cl:115:26: warning: unsupported OpenCL extension \'cl_khr_gl_msaa_sharing\' - ignoring [-Wignored-pragmas]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:133:26: warning: unsupported OpenCL extension \'cl_khr_srgb_image_writes\' - ignoring [-Wignored-pragmas]"} | ["clang/test/Misc/amdgcn.languageOptsOpenCL.cl"]={"clang/test/Misc/amdgcn.languageOptsOpenCL.cl:115:26: warning: unsupported OpenCL extension \'cl_khr_gl_msaa_sharing\' - ignoring [-Wignored-pragmas]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:133:26: warning: unsupported OpenCL extension \'cl_khr_srgb_image_writes\' - ignoring [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_unused_expected_var"]={ | ["warn_pragma_unused_expected_var"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="expected \'#pragma unused\' argument to be a variable name", | [b]="expected \'#pragma unused\' argument to be a variable name", | ||
[ | [d]=h, | ||
[ | [a]="expected \'\\#pragma unused\' argument to be a variable name", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"fd14fade2ffc",1237847305,Kb,Kb}, | ||
[ | [g]={{m,2372,"// #pragma unused(identifier)\nvoid PragmaUnusedHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &UnusedTok) {\n // ...\n while (true) {\n // ...\n if (LexID) {\n // ...\n PP.Diag(Tok.getLocation(), diag::warn_pragma_unused_expected_var);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/pragma-unused.c"]={"clang/test/Sema/pragma-unused.c:14:20: warning: expected \'#pragma unused\' argument to be a variable name [-Wignored-pragmas]","clang/test/Sema/pragma-unused.c:15:18: warning: expected \'#pragma unused\' argument to be a variable name [-Wignored-pragmas]","clang/test/Sema/pragma-unused.c:24:18: warning: expected \'#pragma unused\' argument to be a variable name [-Wignored-pragmas]"} | ["clang/test/Sema/pragma-unused.c"]={"clang/test/Sema/pragma-unused.c:14:20: warning: expected \'#pragma unused\' argument to be a variable name [-Wignored-pragmas]","clang/test/Sema/pragma-unused.c:15:18: warning: expected \'#pragma unused\' argument to be a variable name [-Wignored-pragmas]","clang/test/Sema/pragma-unused.c:24:18: warning: expected \'#pragma unused\' argument to be a variable name [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_unused_expected_var_arg"]={ | ["warn_pragma_unused_expected_var_arg"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="only variables can be arguments to \'#pragma unused\'", | [b]="only variables can be arguments to \'#pragma unused\'", | ||
[ | [d]=h, | ||
[ | [a]="only variables can be arguments to \'\\#pragma unused\'", | ||
[ | [e]=z, | ||
[ | [c]=l, | ||
[ | [f]={"ff115a2f351d",1296152208,"Allow #pragma unused to be used on global variables like gcc. Fixes rdar://8793832.\n\nllvm-svn: 12438...","Allow #pragma unused to be used on global variables like gcc. Fixes rdar://8793832.\n\nllvm-svn: 124383"}, | ||
[ | [g]={{gb,839,"void Sema::ActOnPragmaUnused(const Token &IdTok, Scope *curScope, SourceLocation PragmaLoc) {\n // ...\n if (!VD) {\n Diag(PragmaLoc, diag::warn_pragma_unused_expected_var_arg) << Name << SourceRange(IdTok.getLocation());"}} | ||
}, | }, | ||
["warn_pragma_unused_undeclared_var"]={ | ["warn_pragma_unused_undeclared_var"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="undeclared variable %0 used as an argument for \'#pragma unused\'", | [b]="undeclared variable %0 used as an argument for \'#pragma unused\'", | ||
[ | [d]=h, | ||
[ | [a]="undeclared variable (.*?) used as an argument for \'\\#pragma unused\'", | ||
[ | [e]=z, | ||
[ | [c]=l, | ||
[ | [f]={"fb50bf5a6f16",1249341897,"Per advice that Doug Gregor gave me several months ago, clean up the\nimplementation of \'#pragma unus...","Per advice that Doug Gregor gave me several months ago, clean up the\nimplementation of \'#pragma unused\' by not constructing intermediate\nDeclRefExprs, but instead do the name lookup directly. The\nimplementation is greatly simplified.\n\nAlong the way, degrade \'#pragma unused(undeclaredvariable)\' to a\nwarning instead of being a hard error. This implements:\n\n<rdar://problem/6761874> [sema] allow #pragma unused to reference undefined variable (with warning)\n\nllvm-svn: 78019"}, | ||
[ | [g]={{gb,832,"void Sema::ActOnPragmaUnused(const Token &IdTok, Scope *curScope, SourceLocation PragmaLoc) {\n // ...\n if (Lookup.empty()) {\n Diag(PragmaLoc, diag::warn_pragma_unused_undeclared_var) << Name << SourceRange(IdTok.getLocation());"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/pragma-unused.c"]={"clang/test/Sema/pragma-unused.c:19:11: warning: undeclared variable \'x\' used as an argument for \'#pragma unused\' [-Wignored-pragmas]","clang/test/Sema/pragma-unused.c:36:11: warning: undeclared variable \'undeclared\' used as an argument for \'#pragma unused\' [-Wignored-pragmas]","clang/test/Sema/pragma-unused.c:36:11: warning: undeclared variable \'undefined\' used as an argument for \'#pragma unused\' [-Wignored-pragmas]"} | ["clang/test/Sema/pragma-unused.c"]={"clang/test/Sema/pragma-unused.c:19:11: warning: undeclared variable \'x\' used as an argument for \'#pragma unused\' [-Wignored-pragmas]","clang/test/Sema/pragma-unused.c:36:11: warning: undeclared variable \'undeclared\' used as an argument for \'#pragma unused\' [-Wignored-pragmas]","clang/test/Sema/pragma-unused.c:36:11: warning: undeclared variable \'undefined\' used as an argument for \'#pragma unused\' [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_warning_expected"]={ | ["warn_pragma_warning_expected"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="#pragma warning expected \'%0\'", | [b]="#pragma warning expected \'%0\'", | ||
[ | [d]=h, | ||
[ | [a]="\\#pragma warning expected \'(.*?)\'", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"881dff36831f",1379109630,"Lex and ignore Microsoft\'s #pragma warning(...)\n\nSummary:\nThis fixes PR17145 and avoids unknown prag...","Lex and ignore Microsoft\'s #pragma warning(...)\n\nSummary:\nThis fixes PR17145 and avoids unknown pragma warnings.\n\nThis change does not attempt to map MSVC warning numbers to clang\nwarning flags. Perhaps in the future we will implement a mapping for\nsome common subset of Microsoft warnings, but for now we don\'t.\n\nReviewers: rsmith\n\nCC: cfe-commits\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D1652\n\nllvm-svn: 190726"}, | ||
[ | [g]={{C,1395,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok, diag::warn_pragma_warning_expected) << \"(\";"},{C,1473,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n } else if (II && II->isStr(\"pop\")) {\n // ...\n } else {\n // #pragma warning( warning-specifier : warning-number-list\n // [; warning-specifier : warning-number-list...] )\n while (true) {\n // ...\n if (Tok.isNot(tok::colon)) {\n PP.Diag(Tok, diag::warn_pragma_warning_expected) << \":\";"},{C,1516,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok, diag::warn_pragma_warning_expected) << \")\";"}}, | ||
[ | [k]={ | ||
[ | [ub]={"clang/test/Preprocessor/pragma_microsoft.c:154:54: warning: #pragma warning expected \'(\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:157:22: warning: #pragma warning expected \')\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:159:59: warning: #pragma warning expected \')\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:162:20: warning: #pragma warning expected \')\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:166:25: warning: #pragma warning expected \':\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:168:25: warning: #pragma warning expected \':\' [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_warning_expected_number"]={ | ["warn_pragma_warning_expected_number"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="#pragma warning expected a warning number", | [b]="#pragma warning expected a warning number", | ||
[ | [d]=h, | ||
[ | [a]="\\#pragma warning expected a warning number", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"881dff36831f",1379109630,"Lex and ignore Microsoft\'s #pragma warning(...)\n\nSummary:\nThis fixes PR17145 and avoids unknown prag...","Lex and ignore Microsoft\'s #pragma warning(...)\n\nSummary:\nThis fixes PR17145 and avoids unknown pragma warnings.\n\nThis change does not attempt to map MSVC warning numbers to clang\nwarning flags. Perhaps in the future we will implement a mapping for\nsome common subset of Microsoft warnings, but for now we don\'t.\n\nReviewers: rsmith\n\nCC: cfe-commits\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D1652\n\nllvm-svn: 190726"}, | ||
[ | [g]={{C,1484,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n } else if (II && II->isStr(\"pop\")) {\n // ...\n } else {\n // #pragma warning( warning-specifier : warning-number-list\n // [; warning-specifier : warning-number-list...] )\n while (true) {\n // ...\n while (Tok.is(tok::numeric_constant)) {\n // ...\n if (!PP.parseSimpleIntegerLiteral(Tok, Value) || Value == 0 || Value > INT_MAX) {\n PP.Diag(Tok, diag::warn_pragma_warning_expected_number);"}}, | ||
[ | [k]={ | ||
[ | [ub]={"clang/test/Preprocessor/pragma_microsoft.c:167:28: warning: #pragma warning expected a warning number [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_warning_push_level"]={ | ["warn_pragma_warning_push_level"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="#pragma warning(push, level) requires a level between 0 and 4", | [b]="#pragma warning(push, level) requires a level between 0 and 4", | ||
[ | [d]=h, | ||
[ | [a]="\\#pragma warning\\(push, level\\) requires a level between 0 and 4", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"881dff36831f",1379109630,"Lex and ignore Microsoft\'s #pragma warning(...)\n\nSummary:\nThis fixes PR17145 and avoids unknown prag...","Lex and ignore Microsoft\'s #pragma warning(...)\n\nSummary:\nThis fixes PR17145 and avoids unknown pragma warnings.\n\nThis change does not attempt to map MSVC warning numbers to clang\nwarning flags. Perhaps in the future we will implement a mapping for\nsome common subset of Microsoft warnings, but for now we don\'t.\n\nReviewers: rsmith\n\nCC: cfe-commits\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D1652\n\nllvm-svn: 190726"}, | ||
[ | [g]={{C,1413,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n if (Level < 0 || Level > 4) {\n PP.Diag(Tok, diag::warn_pragma_warning_push_level);"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/pragma_microsoft.cpp"]={"clang/test/Preprocessor/pragma_microsoft.cpp:3:23: warning: #pragma warning(push, level) requires a level between 0 and 4 [-Wunknown-pragmas]"} | ["clang/test/Preprocessor/pragma_microsoft.cpp"]={"clang/test/Preprocessor/pragma_microsoft.cpp:3:23: warning: #pragma warning(push, level) requires a level between 0 and 4 [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pragma_warning_spec_invalid"]={ | ["warn_pragma_warning_spec_invalid"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="#pragma warning expected \'push\', \'pop\', \'default\', \'disable\', \'error\', \'once\', \'suppress\', 1, 2, 3, or 4", | [b]="#pragma warning expected \'push\', \'pop\', \'default\', \'disable\', \'error\', \'once\', \'suppress\', 1, 2, 3, or 4", | ||
[ | [d]=h, | ||
[ | [a]="\\#pragma warning expected \'push\', \'pop\', \'default\', \'disable\', \'error\', \'once\', \'suppress\', 1, 2, 3, or 4", | ||
[ | [e]=hb, | ||
[ | [c]=x, | ||
[ | [f]={"881dff36831f",1379109630,"Lex and ignore Microsoft\'s #pragma warning(...)\n\nSummary:\nThis fixes PR17145 and avoids unknown prag...","Lex and ignore Microsoft\'s #pragma warning(...)\n\nSummary:\nThis fixes PR17145 and avoids unknown pragma warnings.\n\nThis change does not attempt to map MSVC warning numbers to clang\nwarning flags. Perhaps in the future we will implement a mapping for\nsome common subset of Microsoft warnings, but for now we don\'t.\n\nReviewers: rsmith\n\nCC: cfe-commits\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D1652\n\nllvm-svn: 190726"}, | ||
[ | [g]={{C,1433,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n } else if (II && II->isStr(\"pop\")) {\n // ...\n } else {\n // #pragma warning( warning-specifier : warning-number-list\n // [; warning-specifier : warning-number-list...] )\n while (true) {\n // ...\n if (!II && !Tok.is(tok::numeric_constant)) {\n PP.Diag(Tok, diag::warn_pragma_warning_spec_invalid);"},{C,1469,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n } else if (II && II->isStr(\"pop\")) {\n // ...\n } else {\n // #pragma warning( warning-specifier : warning-number-list\n // [; warning-specifier : warning-number-list...] )\n while (true) {\n // ...\n if (!SpecifierValid) {\n PP.Diag(Tok, diag::warn_pragma_warning_spec_invalid);"}}, | ||
[ | [k]={ | ||
[ | [ub]={"clang/test/Preprocessor/pragma_microsoft.c:146:18: warning: #pragma warning expected \'push\', \'pop\', \'default\', \'disable\', \'error\', \'once\', \'suppress\', 1, 2, 3, or 4 [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:155:132: warning: #pragma warning expected \'push\', \'pop\', \'default\', \'disable\', \'error\', \'once\', \'suppress\', 1, 2, 3, or 4 [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:156:17: warning: #pragma warning expected \'push\', \'pop\', \'default\', \'disable\', \'error\', \'once\', \'suppress\', 1, 2, 3, or 4 [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:169:17: warning: #pragma warning expected \'push\', \'pop\', \'default\', \'disable\', \'error\', \'once\', \'suppress\', 1, 2, 3, or 4 [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_pre_c2x_compat_attributes"]={ | ["warn_pre_c2x_compat_attributes"]={ | ||
[ | [i]={"pre-c2x-compat","pre-c2x-compat-pedantic"}, | ||
[j]="pre-c2x-compat", | |||
[ | |||
[b]="[[]] attributes are incompatible with C standards before C2x", | [b]="[[]] attributes are incompatible with C standards before C2x", | ||
[ | [d]=h, | ||
[ | [a]="\\[\\[\\]\\] attributes are incompatible with C standards before C2x", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpre\\-c2x\\-compat[^\\]]*\\]", | ||
[ | [c]=v, | ||
[ | [f]={"ef9ec4bbcca2",1677810915,"[OpenMP] Add the `ompx_attribute` clause for target directives\n\nCUDA and HIP have kernel attributes ...","[OpenMP] Add the `ompx_attribute` clause for target directives\n\nCUDA and HIP have kernel attributes to tune the code generation (in the\nbackend). To reuse this functionality for OpenMP target regions we\nintroduce the `ompx_attribute` clause that takes these kernel\nattributes and emits code as if they had been attached to the kernel\nfuction (which is implicitly generated).\n\nTo limit the impact, we only support three kernel attributes:\n`amdgpu_waves_per_eu`, for AMDGPU\n`amdgpu_flat_work_group_size`, for AMDGPU\n`launch_bounds`, for NVPTX\n\nThe existing implementations of those attributes are used for error\nchecking and code generation. `ompx_attribute` can be attached to any\nexecutable target region and it can hold more than one kernel attribute.\n\nDifferential Revision: https://reviews.llvm.org/D156184"}, | ||
[ | [g]={{"clang/lib/Parse/ParseDeclCXX.cpp",4527,"/// Parse a C++11 or C2x attribute-specifier.\n///\n/// [C++11] attribute-specifier:\n/// \'[\' \'[\' attribute-list \']\' \']\'\n/// alignment-specifier\n///\n/// [C++11] attribute-list:\n/// attribute[opt]\n/// attribute-list \',\' attribute[opt]\n/// attribute \'...\'\n/// attribute-list \',\' attribute \'...\'\n///\n/// [C++11] attribute:\n/// attribute-token attribute-argument-clause[opt]\n///\n/// [C++11] attribute-token:\n/// identifier\n/// attribute-scoped-token\n///\n/// [C++11] attribute-scoped-token:\n/// attribute-namespace \'::\' identifier\n///\n/// [C++11] attribute-namespace:\n/// identifier\nvoid Parser::ParseCXX11AttributeSpecifierInternal(ParsedAttributes &Attrs, CachedTokens &OpenMPTokens, SourceLocation *EndLoc) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n Diag(OpenLoc, getLangOpts().C2x ? diag::warn_pre_c2x_compat_attributes : diag::warn_ext_c2x_attributes);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/c2x-attr.c"]={"clang/test/Sema/c2x-attr.c:4:1: warning: [[]] attributes are incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ["clang/test/Sema/c2x-attr.c"]={"clang/test/Sema/c2x-attr.c:4:1: warning: [[]] attributes are incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_precedence_bitwise_conditional"]={ | ["warn_precedence_bitwise_conditional"]={ | ||
[ | [i]={n,o,"bitwise-conditional-parentheses",yc}, | ||
[j]="bitwise-conditional-parentheses", | |||
[ | |||
[b]="operator \'?:\' has lower precedence than \'%0\'; \'%0\' will be evaluated first", | [b]="operator \'?:\' has lower precedence than \'%0\'; \'%0\' will be evaluated first", | ||
[ | [d]=h, | ||
[ | [a]="operator \'\\?\\:\' has lower precedence than \'(.*?)\'; \'(.*?)\' will be evaluated first", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wbitwise\\-conditional\\-parentheses[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={tc,1567434909,kc,zc}, | ||
[ | [g]={{u,9508,"/// DiagnoseConditionalPrecedence - Emit a warning when a conditional operator\n/// and binary operator are mixed in a way that suggests the programmer assumed\n/// the conditional operator has higher precedence, for example:\n/// \"int x = a + someBinaryCondition ? 1 : 2\".\nstatic void DiagnoseConditionalPrecedence(Sema &Self, SourceLocation OpLoc, Expr *Condition, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n unsigned DiagID = BinaryOperator::isBitwiseOp(CondOpcode) ? diag::warn_precedence_bitwise_conditional : diag::warn_precedence_conditional;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/parentheses.c"]={"clang/test/Sema/parentheses.c:97:30: warning: operator \'?:\' has lower precedence than \'|\'; \'|\' will be evaluated first [-Wbitwise-conditional-parentheses]","clang/test/Sema/parentheses.c:102:16: warning: operator \'?:\' has lower precedence than \'|\'; \'|\' will be evaluated first [-Wbitwise-conditional-parentheses]","clang/test/Sema/parentheses.c:103:16: warning: operator \'?:\' has lower precedence than \'&\'; \'&\' will be evaluated first [-Wbitwise-conditional-parentheses]"} | ["clang/test/Sema/parentheses.c"]={"clang/test/Sema/parentheses.c:97:30: warning: operator \'?:\' has lower precedence than \'|\'; \'|\' will be evaluated first [-Wbitwise-conditional-parentheses]","clang/test/Sema/parentheses.c:102:16: warning: operator \'?:\' has lower precedence than \'|\'; \'|\' will be evaluated first [-Wbitwise-conditional-parentheses]","clang/test/Sema/parentheses.c:103:16: warning: operator \'?:\' has lower precedence than \'&\'; \'&\' will be evaluated first [-Wbitwise-conditional-parentheses]"} | ||
} | } | ||
}, | }, | ||
["warn_precedence_bitwise_rel"]={ | ["warn_precedence_bitwise_rel"]={ | ||
[ | [i]={n,o,yc}, | ||
[j]=yc, | |||
[ | |||
[b]="%0 has lower precedence than %1; %1 will be evaluated first", | [b]="%0 has lower precedence than %1; %1 will be evaluated first", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) has lower precedence than (.*?); (.*?) will be evaluated first", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wparentheses[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"4302824fe260",1256570655,"Implement a warning for mixing bitwise logical with comparison ops. Fixes PR5297.\n\nllvm-svn: 85117","Implement a warning for mixing bitwise logical with comparison ops. Fixes PR5297.\n\nllvm-svn: 85117"}, | ||
[ | [g]={{u,15763,"/// DiagnoseBitwisePrecedence - Emit a warning when bitwise and comparison\n/// operators are mixed in a way that suggests that the programmer forgot that\n/// comparison operators have higher precedence. The most typical example of\n/// such code is \"flags & 0x0020 != 0\", which is equivalent to \"flags & 1\".\nstatic void DiagnoseBitwisePrecedence(Sema &Self, BinaryOperatorKind Opc, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n Self.Diag(OpLoc, diag::warn_precedence_bitwise_rel) << DiagRange << BinaryOperator::getOpcodeStr(Opc) << OpStr;"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGen/2008-10-13-FrontendCrash.c"]={"clang/test/CodeGen/2008-10-13-FrontendCrash.c:8:18: warning: ^ has lower precedence than !=; != will be evaluated first [-Wparentheses]"} | ["clang/test/CodeGen/2008-10-13-FrontendCrash.c"]={"clang/test/CodeGen/2008-10-13-FrontendCrash.c:8:18: warning: ^ has lower precedence than !=; != will be evaluated first [-Wparentheses]"} | ||
} | } | ||
}, | }, | ||
["warn_precedence_conditional"]={ | ["warn_precedence_conditional"]={ | ||
[ | [i]={n,o,yc}, | ||
[j]=yc, | |||
[ | |||
[b]="operator \'?:\' has lower precedence than \'%0\'; \'%0\' will be evaluated first", | [b]="operator \'?:\' has lower precedence than \'%0\'; \'%0\' will be evaluated first", | ||
[ | [d]=h, | ||
[ | [a]="operator \'\\?\\:\' has lower precedence than \'(.*?)\'; \'(.*?)\' will be evaluated first", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wparentheses[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"cf9bac4bc9dd",1307124036,"Warn about missing parentheses for conditional operator.\n\nWarn in cases such as \"x + someCondition ?...","Warn about missing parentheses for conditional operator.\n\nWarn in cases such as \"x + someCondition ? 42 : 0;\",\nwhere the condition expression looks arithmetic, and has\na right-hand side that looks boolean.\n\nThis (partly) addresses http://llvm.org/bugs/show_bug.cgi?id=9969\n\nllvm-svn: 132565"}, | ||
[ | [g]={{u,9516,"/// DiagnoseConditionalPrecedence - Emit a warning when a conditional operator\n/// and binary operator are mixed in a way that suggests the programmer assumed\n/// the conditional operator has higher precedence, for example:\n/// \"int x = a + someBinaryCondition ? 1 : 2\".\nstatic void DiagnoseConditionalPrecedence(Sema &Self, SourceLocation OpLoc, Expr *Condition, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n unsigned DiagID = BinaryOperator::isBitwiseOp(CondOpcode) ? diag::warn_precedence_bitwise_conditional : diag::warn_precedence_conditional;"}}, | ||
[ | [k]={ | ||
["clang/test/Misc/caret-diags-macros.c"]={"clang/test/Misc/caret-diags-macros.c:125:38: warning: operator \'?:\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wparentheses]","clang/test/Misc/caret-diags-macros.c:139:9: warning: operator \'?:\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wparentheses]","clang/test/Misc/caret-diags-macros.c:158:9: warning: operator \'?:\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wparentheses]","clang/test/Misc/caret-diags-macros.c:174:21: warning: operator \'?:\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wparentheses]"} | ["clang/test/Misc/caret-diags-macros.c"]={"clang/test/Misc/caret-diags-macros.c:125:38: warning: operator \'?:\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wparentheses]","clang/test/Misc/caret-diags-macros.c:139:9: warning: operator \'?:\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wparentheses]","clang/test/Misc/caret-diags-macros.c:158:9: warning: operator \'?:\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wparentheses]","clang/test/Misc/caret-diags-macros.c:174:21: warning: operator \'?:\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wparentheses]"} | ||
} | } | ||
}, | }, | ||
["warn_printf_ObjCflags_without_ObjCConversion"]={ | ["warn_printf_ObjCflags_without_ObjCConversion"]={ | ||
[ | [i]={n,o,H,p}, | ||
[j]=H, | |||
[ | |||
[b]="object format flags cannot be used with \'%0\' conversion specifier", | [b]="object format flags cannot be used with \'%0\' conversion specifier", | ||
[ | [d]=h, | ||
[ | [a]="object format flags cannot be used with \'(.*?)\' conversion specifier", | ||
[ | [e]=ob, | ||
[ | [c]=ab, | ||
[ | [f]={"2b4177190923",1435815556,"Parse \'technical term\' format specifier.\n\nObjective-C format strings now support modifier flags\nthat...","Parse \'technical term\' format specifier.\n\nObjective-C format strings now support modifier flags\nthat can be attached to a \'@\' conversion. Currently\nthe only one supported, as of iOS 9 and OS X 10.11,\nis the new \"technical term\", denoted by the flag \"tt\",\nfor example:\n\n %[tt]@\n\ninstead of just:\n\n %@\n\nThe \'tt\' stands for \"technical term\", which is used\nby the string-localization facilities on Darwin to\nadd the appropriate spacing or quotation depending\nthe language locale.\n\nImplements <rdar://problem/20374720>.\n\nllvm-svn: 241243"}, | ||
[ | [g]={{r,10660,"void CheckPrintfHandler::HandleObjCFlagsWithNonObjCConversion(const char *flagsStart, const char *flagsEnd, const char *conversionPosition) {\n // ...\n auto diag = diag::warn_printf_ObjCflags_without_ObjCConversion;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/format-strings-objc.m"]={"clang/test/SemaObjC/format-strings-objc.m:289:27: warning: object format flags cannot be used with \'s\' conversion specifier [-Wformat]"} | ["clang/test/SemaObjC/format-strings-objc.m"]={"clang/test/SemaObjC/format-strings-objc.m:289:27: warning: object format flags cannot be used with \'s\' conversion specifier [-Wformat]"} | ||
} | } | ||
}, | }, | ||
["warn_printf_asterisk_missing_arg"]={ | ["warn_printf_asterisk_missing_arg"]={ | ||
[ | [i]={n,o,H,p}, | ||
[j]=H, | |||
[ | |||
[b]="\'%select{*|.*}0\' specified field %select{width|precision}0 is missing a matching \'int\' argument", | [b]="\'%select{*|.*}0\' specified field %select{width|precision}0 is missing a matching \'int\' argument", | ||
[ | [d]=h, | ||
[ | [a]="\'(?:\\*|\\.\\*)\' specified field (?:width|precision) is missing a matching \'int\' argument", | ||
[ | [e]=ob, | ||
[ | [c]=ab, | ||
[ | [f]={"d166819c26a8",1267234863,"For printf format string checking, add support for positional format strings.\nAlong the way, coelesc...","For printf format string checking, add support for positional format strings.\nAlong the way, coelesce some of the diagnostics.\n\nllvm-svn: 97297"}, | ||
[ | [g]={{r,10541,"bool CheckPrintfHandler::HandleAmount(const analyze_format_string::OptionalAmount &Amt, unsigned k, const char *startSpecifier, unsigned specifierLen) {\n if (Amt.hasDataArgument()) {\n if (ArgPassingKind != Sema::FAPK_VAList) {\n // ...\n if (argIndex >= NumDataArgs) {\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_asterisk_missing_arg) << k, getLocationOfByte(Amt.getStart()),"}}, | ||
[ | [k]={ | ||
[ | [cc]={"clang/test/Sema/format-strings.c:238:13: warning: \'*\' specified field width is missing a matching \'int\' argument [-Wformat]","clang/test/Sema/format-strings.c:239:13: warning: \'.*\' specified field precision is missing a matching \'int\' argument [-Wformat]","clang/test/Sema/format-strings.c:290:13: warning: \'*\' specified field width is missing a matching \'int\' argument [-Wformat]","clang/test/Sema/format-strings.c:291:14: warning: \'.*\' specified field precision is missing a matching \'int\' argument [-Wformat]","clang/test/Sema/format-strings.c:402:14: warning: \'*\' specified field width is missing a matching \'int\' argument [-Wformat]","clang/test/Sema/format-strings.c:605:10: warning: \'*\' specified field width is missing a matching \'int\' argument [-Wformat]","clang/test/Sema/format-strings.c:606:13: warning: \'*\' specified field width is missing a matching \'int\' argument [-Wformat]"} | ||
} | } | ||
}, | }, | ||
["warn_printf_asterisk_wrong_type"]={ | ["warn_printf_asterisk_wrong_type"]={ | ||
[ | [i]={n,o,H,p}, | ||
[j]=H, | |||
[ | |||
[b]="field %select{width|precision}0 should have type %1, but argument has type %2", | [b]="field %select{width|precision}0 should have type %1, but argument has type %2", | ||
[ | [d]=h, | ||
[ | [a]="field (?:width|precision) should have type (.*?), but argument has type (.*?)", | ||
[ | [e]=ob, | ||
[ | [c]=ab, | ||
[ | [f]={"d166819c26a8",1267234863,"For printf format string checking, add support for positional format strings.\nAlong the way, coelesc...","For printf format string checking, add support for positional format strings.\nAlong the way, coelesce some of the diagnostics.\n\nllvm-svn: 97297"}, | ||
[ | [g]={{r,10566,"bool CheckPrintfHandler::HandleAmount(const analyze_format_string::OptionalAmount &Amt, unsigned k, const char *startSpecifier, unsigned specifierLen) {\n if (Amt.hasDataArgument()) {\n if (ArgPassingKind != Sema::FAPK_VAList) {\n // ...\n if (!AT.matchesType(S.Context, T)) {\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_asterisk_wrong_type) << k << AT.getRepresentativeTypeName(S.Context) << T << Arg->getSourceRange(), getLocationOfByte(Amt.getStart()),"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/format-strings-oslog.m"]={"clang/test/SemaObjC/format-strings-oslog.m:19:35: warning: field precision should have type \'int\', but argument has type \'void *\' [-Wformat]","clang/test/SemaObjC/format-strings-oslog.m:55:36: warning: field precision should have type \'int\', but argument has type \'void *\' [-Wformat]"} | ["clang/test/SemaObjC/format-strings-oslog.m"]={"clang/test/SemaObjC/format-strings-oslog.m:19:35: warning: field precision should have type \'int\', but argument has type \'void *\' [-Wformat]","clang/test/SemaObjC/format-strings-oslog.m:55:36: warning: field precision should have type \'int\', but argument has type \'void *\' [-Wformat]"} | ||
} | } | ||
}, | }, | ||
["warn_printf_data_arg_not_used"]={ | ["warn_printf_data_arg_not_used"]={ | ||
[ | [i]={n,o,H,"format-extra-args",p}, | ||
[j]="format-extra-args", | |||
[ | |||
[b]="data argument not used by format string", | [b]="data argument not used by format string", | ||
[ | [d]=h, | ||
[ | [a]="data argument not used by format string", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wformat\\-extra\\-args[^\\]]*\\]", | ||
[ | [c]=ab, | ||
[ | [f]={"4a49d9818b4e",1267211921,"For printf format string checking, move the tracking of the data argument index out of\nSema and into...","For printf format string checking, move the tracking of the data argument index out of\nSema and into analyze_printf::ParseFormatString(). Also use a bitvector to determine\nwhat arguments have been covered (instead of just checking to see if the last argument consumed is the max argument). This is prep. for support positional arguments (an IEEE extension).\n\nllvm-svn: 97248"}, | ||
[ | [g]={{r,10284,"void UncoveredArgHandler::Diagnose(Sema &S, bool IsFunctionCall, const Expr *ArgExpr) {\n // ...\n PartialDiagnostic PDiag = S.PDiag(diag::warn_printf_data_arg_not_used);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaOpenCL/printf-format-string-warnings.cl"]={"clang/test/SemaOpenCL/printf-format-string-warnings.cl:11:32: warning: data argument not used by format string [-Wformat-extra-args]"} | ["clang/test/SemaOpenCL/printf-format-string-warnings.cl"]={"clang/test/SemaOpenCL/printf-format-string-warnings.cl:11:32: warning: data argument not used by format string [-Wformat-extra-args]"} | ||
} | } | ||
}, | }, | ||
["warn_printf_empty_objc_flag"]={ | ["warn_printf_empty_objc_flag"]={ | ||
[ | [i]={n,o,H,p}, | ||
[j]=H, | |||
[ | |||
[b]="missing object format flag", | [b]="missing object format flag", | ||
[ | [d]=h, | ||
[ | [a]="missing object format flag", | ||
[ | [e]=ob, | ||
[ | [c]=ab, | ||
[ | [f]={"2b4177190923",1435815556,"Parse \'technical term\' format specifier.\n\nObjective-C format strings now support modifier flags\nthat...","Parse \'technical term\' format specifier.\n\nObjective-C format strings now support modifier flags\nthat can be attached to a \'@\' conversion. Currently\nthe only one supported, as of iOS 9 and OS X 10.11,\nis the new \"technical term\", denoted by the flag \"tt\",\nfor example:\n\n %[tt]@\n\ninstead of just:\n\n %@\n\nThe \'tt\' stands for \"technical term\", which is used\nby the string-localization facilities on Darwin to\nadd the appropriate spacing or quotation depending\nthe language locale.\n\nImplements <rdar://problem/20374720>.\n\nllvm-svn: 241243"}, | ||
[ | [g]={{r,10639,"void CheckPrintfHandler::HandleEmptyObjCModifierFlag(const char *startFlag, unsigned flagLen) {\n // ...\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_empty_objc_flag), getLocationOfByte(startFlag),"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/format-strings-objc.m"]={"clang/test/SemaObjC/format-strings-objc.m:281:13: warning: missing object format flag [-Wformat]"} | ["clang/test/SemaObjC/format-strings-objc.m"]={"clang/test/SemaObjC/format-strings-objc.m:281:13: warning: missing object format flag [-Wformat]"} | ||
} | } | ||
}, | }, | ||
["warn_printf_format_string_contains_null_char"]={ | ["warn_printf_format_string_contains_null_char"]={ | ||
[ | [i]={n,o,H,p}, | ||
[j]=H, | |||
[ | |||
[b]="format string contains \'\\0\' within the string body", | [b]="format string contains \'\\0\' within the string body", | ||
[ | [d]=h, | ||
[ | [a]="format string contains \'\\\\0\' within the string body", | ||
[ | [e]=ob, | ||
[ | [c]=ab, | ||
[ | [f]={vc,1237025389,xb,xb}, | ||
[ | [g]={{r,10243,"void CheckFormatHandler::HandleNullChar(const char *nullCharacter) {\n if (!isa<ObjCStringLiteral>(OrigFormatExpr)) {\n // ...\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_format_string_contains_null_char), getLocationOfByte(nullCharacter), /*IsStringLocation*/ true, getFormatStringRange());"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-fortify-source.c"]={"clang/test/Sema/warn-fortify-source.c:102:43: warning: format string contains \'\\0\' within the string body [-Wformat]","clang/test/Sema/warn-fortify-source.c:103:43: warning: format string contains \'\\0\' within the string body [-Wformat]","clang/test/Sema/warn-fortify-source.c:153:21: warning: format string contains \'\\0\' within the string body [-Wformat]","clang/test/Sema/warn-fortify-source.c:154:24: warning: format string contains \'\\0\' within the string body [-Wformat]"} | ["clang/test/Sema/warn-fortify-source.c"]={"clang/test/Sema/warn-fortify-source.c:102:43: warning: format string contains \'\\0\' within the string body [-Wformat]","clang/test/Sema/warn-fortify-source.c:103:43: warning: format string contains \'\\0\' within the string body [-Wformat]","clang/test/Sema/warn-fortify-source.c:153:21: warning: format string contains \'\\0\' within the string body [-Wformat]","clang/test/Sema/warn-fortify-source.c:154:24: warning: format string contains \'\\0\' within the string body [-Wformat]"} | ||
} | } | ||
}, | }, | ||
["warn_printf_format_string_not_null_terminated"]={ | ["warn_printf_format_string_not_null_terminated"]={ | ||
[ | [i]={n,o,H,p}, | ||
[j]=H, | |||
[ | |||
[b]="format string is not null-terminated", | [b]="format string is not null-terminated", | ||
[ | [d]=h, | ||
[ | [a]="format string is not null\\-terminated", | ||
[ | [e]=ob, | ||
[ | [c]=ab, | ||
[ | [f]={"6c6a4f4081a8",1392915938,"Sema: Emit a warning for non-null terminated format strings and other pathological cases.\n\nPR18905.\n...","Sema: Emit a warning for non-null terminated format strings and other pathological cases.\n\nPR18905.\n\nllvm-svn: 201795"}, | ||
[ | [g]={{r,11647,"static void CheckFormatString(Sema &S, const FormatStringLiteral *FExpr, const Expr *OrigFormatExpr, ArrayRef<const Expr *> Args, Sema::FormatArgumentPassingKind APK, unsigned format_idx, unsigned firstDataArg, Sema::FormatStringType Type, bool inFunctionCall, Sema::VariadicCallType CallType, llvm::SmallBitVector &CheckedVarArgs, UncoveredArgHandler &UncoveredArg, bool IgnoreStringsWithoutSpecifiers) {\n // ...\n // Emit a warning if the string literal is truncated and does not contain an\n // embedded null character.\n if (TypeSize <= StrRef.size() && !StrRef.substr(0, TypeSize).contains(\'\\0\')) {\n CheckFormatHandler::EmitFormatDiagnostic(S, inFunctionCall, Args[format_idx], S.PDiag(diag::warn_printf_format_string_not_null_terminated), FExpr->getBeginLoc(),"}}, | ||
[ | [k]={ | ||
[ | [cc]={"clang/test/Sema/format-strings.c:657:10: warning: format string is not null-terminated [-Wformat]","clang/test/Sema/format-strings.c:660:10: warning: format string is not null-terminated [-Wformat]"} | ||
} | } | ||
}, | }, | ||
["warn_printf_ignored_flag"]={ | ["warn_printf_ignored_flag"]={ | ||
[ | [i]={n,o,H,p}, | ||
[j]=H, | |||
[ | |||
[b]="flag \'%0\' is ignored when flag \'%1\' is present", | [b]="flag \'%0\' is ignored when flag \'%1\' is present", | ||
[ | [d]=h, | ||
[ | [a]="flag \'(.*?)\' is ignored when flag \'(.*?)\' is present", | ||
[ | [e]=ob, | ||
[ | [c]=ab, | ||
[ | [f]={"b49ec6907b32",1276801227,"Bug 7377: Fixed several bad printf format string bugs.\n- Added warning for undefined behavior when u...","Bug 7377: Fixed several bad printf format string bugs.\n- Added warning for undefined behavior when using field specifier\n- Added warning for undefined behavior when using length modifier\n- Fixed warnings for invalid flags\n- Added warning for ignored flags\n- Added fixits for the above warnings\n- Fixed accuracy of detecting several undefined behavior conditions\n- Receive normal warnings in addition to security warnings when using %n\n- Fix bug where \'+\' flag would remain on unsigned conversion suggestions\n\nSummary of changes:\n- Added expanded tests\n- Added/expanded warnings\n- Added position info to OptionalAmounts for fixits\n- Extracted optional flags to a wrapper class with position info for fixits\n- Added several methods to validate a FormatSpecifier by component, each checking for undefined behavior\n- Fixed conversion specifier checking to conform to C99 standard\n- Added hooks to detect the invalid states in CheckPrintfHandler::HandleFormatSpecifier\n\nNote: warnings involving the \' \' (space) flag are temporarily disabled until whitespace highlighting no longer triggers assertions. I will make a post about this on cfe-dev shortly.\n\nM test/Sema/format-strings.c\nM include/clang/Basic/DiagnosticSemaKinds.td\nM include/clang/Analysis/Analyses/PrintfFormatString.h\nM lib/Analysis/PrintfFormatString.cpp\nM lib/Sema/SemaChecking.cpp\n\nllvm-svn: 106233"}, | ||
[ | [g]={{r,10627,"void CheckPrintfHandler::HandleIgnoredFlag(const analyze_printf::PrintfSpecifier &FS, const analyze_printf::OptionalFlag &ignoredFlag, const analyze_printf::OptionalFlag &flag, const char *startSpecifier, unsigned specifierLen) {\n // ...\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_ignored_flag) << ignoredFlag.toString() << flag.toString(), getLocationOfByte(ignoredFlag.getPosition()),"}}, | ||
[ | [k]={ | ||
[ | [cc]={"clang/test/Sema/format-strings.c:459:12: warning: flag \' \' is ignored when flag \'+\' is present [-Wformat]","clang/test/Sema/format-strings.c:460:13: warning: flag \' \' is ignored when flag \'+\' is present [-Wformat]","clang/test/Sema/format-strings.c:461:12: warning: flag \'0\' is ignored when flag \'-\' is present [-Wformat]","clang/test/Sema/format-strings.c:462:13: warning: flag \'0\' is ignored when flag \'-\' is present [-Wformat]","clang/test/Sema/format-strings.c:626:10: warning: flag \'0\' is ignored when flag \'-\' is present [-Wformat]","clang/test/Sema/format-strings.c:627:13: warning: flag \'0\' is ignored when flag \'-\' is present [-Wformat]"} | ||
} | } | ||
}, | }, | ||
["warn_printf_incomplete_specifier"]={ | ["warn_printf_incomplete_specifier"]={ | ||
[ | [i]={n,o,H,p}, | ||
[j]=H, | |||
[ | |||
[b]="incomplete format specifier", | [b]="incomplete format specifier", | ||
[ | [d]=h, | ||
[ | [a]="incomplete format specifier", | ||
[ | [e]=ob, | ||
[ | [c]=ab, | ||
[ | [f]={"c22f78ddfdde",1264734981,"Alternate format string checking: issue warnings for incomplete format specifiers.\n\nIn addition, mov...","Alternate format string checking: issue warnings for incomplete format specifiers.\n\nIn addition, move ParseFormatString() and FormatStringHandler() from\nthe clang::analyze_printf to the clang namespace. Hopefully this will\nresolve some link errors on Linux.\n\nllvm-svn: 94794"}, | ||
[ | [g]={{r,10117,"void CheckFormatHandler::HandleIncompleteSpecifier(const char *startSpecifier, unsigned specifierLen) {\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_incomplete_specifier), getLocationOfByte(startSpecifier),"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/block-printf-attribute-1.c"]={"clang/test/Sema/block-printf-attribute-1.c:20:18: warning: incomplete format specifier [-Wformat]"} | ["clang/test/Sema/block-printf-attribute-1.c"]={"clang/test/Sema/block-printf-attribute-1.c:20:18: warning: incomplete format specifier [-Wformat]"} | ||
} | } | ||
}, | }, | ||
["warn_printf_insufficient_data_args"]={ | ["warn_printf_insufficient_data_args"]={ | ||
[ | [i]={n,o,H,"format-insufficient-args",p}, | ||
[j]="format-insufficient-args", | |||
[ | |||
[b]="more \'%%\' conversions than data arguments", | [b]="more \'%%\' conversions than data arguments", | ||
[ | [d]=h, | ||
[ | [a]="more \'%\' conversions than data arguments", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wformat\\-insufficient\\-args[^\\]]*\\]", | ||
[ | [c]=ab, | ||
[ | [f]={vc,1237025389,xb,xb}, | ||
[ | [g]={{r,10372,"bool CheckFormatHandler::CheckNumArgs(const analyze_format_string::FormatSpecifier &FS, const analyze_format_string::ConversionSpecifier &CS, const char *startSpecifier, unsigned specifierLen, unsigned argIndex) {\n if (argIndex >= NumDataArgs) {\n PartialDiagnostic PDiag = FS.usesPositionalArg() ? (S.PDiag(diag::warn_printf_positional_arg_exceeds_data_args) << (argIndex + 1) << NumDataArgs) : S.PDiag(diag::warn_printf_insufficient_data_args);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-format_arg.c"]={"clang/test/Sema/attr-format_arg.c:12:15: warning: more \'%\' conversions than data arguments [-Wformat-insufficient-args]","clang/test/Sema/attr-format_arg.c:15:17: warning: more \'%\' conversions than data arguments [-Wformat-insufficient-args]"} | ["clang/test/Sema/attr-format_arg.c"]={"clang/test/Sema/attr-format_arg.c:12:15: warning: more \'%\' conversions than data arguments [-Wformat-insufficient-args]","clang/test/Sema/attr-format_arg.c:15:17: warning: more \'%\' conversions than data arguments [-Wformat-insufficient-args]"} | ||
} | } | ||
}, | }, | ||
["warn_printf_invalid_objc_flag"]={ | ["warn_printf_invalid_objc_flag"]={ | ||
[ | [i]={n,o,H,p}, | ||
[j]=H, | |||
[ | |||
[b]="\'%0\' is not a valid object format flag", | [b]="\'%0\' is not a valid object format flag", | ||
[ | [d]=h, | ||
[ | [a]="\'(.*?)\' is not a valid object format flag", | ||
[ | [e]=ob, | ||
[ | [c]=ab, | ||
[ | [f]={"2b4177190923",1435815556,"Parse \'technical term\' format specifier.\n\nObjective-C format strings now support modifier flags\nthat...","Parse \'technical term\' format specifier.\n\nObjective-C format strings now support modifier flags\nthat can be attached to a \'@\' conversion. Currently\nthe only one supported, as of iOS 9 and OS X 10.11,\nis the new \"technical term\", denoted by the flag \"tt\",\nfor example:\n\n %[tt]@\n\ninstead of just:\n\n %@\n\nThe \'tt\' stands for \"technical term\", which is used\nby the string-localization facilities on Darwin to\nadd the appropriate spacing or quotation depending\nthe language locale.\n\nImplements <rdar://problem/20374720>.\n\nllvm-svn: 241243"}, | ||
[ | [g]={{r,10650,"void CheckPrintfHandler::HandleInvalidObjCModifierFlag(const char *startFlag, unsigned flagLen) {\n // ...\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_invalid_objc_flag) << flag, getLocationOfByte(startFlag),"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/format-strings-objc.m"]={"clang/test/SemaObjC/format-strings-objc.m:287:13: warning: \'blark\' is not a valid object format flag [-Wformat]"} | ["clang/test/SemaObjC/format-strings-objc.m"]={"clang/test/SemaObjC/format-strings-objc.m:287:13: warning: \'blark\' is not a valid object format flag [-Wformat]"} | ||
} | } | ||
}, | }, | ||
["warn_printf_narg_not_supported"]={ | ["warn_printf_narg_not_supported"]={ | ||
[ | [i]={n,o,H,p}, | ||
[j]=H, | |||
[ | |||
[b]="\'%%n\' specifier not supported on this platform", | [b]="\'%%n\' specifier not supported on this platform", | ||
[ | [d]=h, | ||
[ | [a]="\'%n\' specifier not supported on this platform", | ||
[ | [e]=ob, | ||
[ | [c]=ab, | ||
[ | [f]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables i...","[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables into a record in task untied\nregions but clang does not support record with VLA data members.\n\nDifferential Revision: https://reviews.llvm.org/D99436"}, | ||
[ | [g]={{r,10876,"bool CheckPrintfHandler::HandlePrintfSpecifier(const analyze_printf::PrintfSpecifier &FS, const char *startSpecifier, unsigned specifierLen, const TargetInfo &Target) {\n // ...\n if (CS.getKind() == ConversionSpecifier::nArg && (Triple.isAndroid() || Triple.isOSFuchsia())) {\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_narg_not_supported), getLocationOfByte(CS.getStart()),"}}, | ||
[ | [k]={ | ||
[ | [cc]={"clang/test/Sema/format-strings.c:166:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:168:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:169:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:170:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:171:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:174:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:175:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:176:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:179:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:180:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:181:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:184:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:185:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:186:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:189:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:190:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:191:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:194:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:195:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:440:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:442:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:452:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:454:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:733:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:735:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:738:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:745:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:746:12: warning: \'%n\' specifier not supported on this platform [-Wformat]"} | ||
} | } | ||
}, | }, | ||
["warn_printf_nonsensical_flag"]={ | ["warn_printf_nonsensical_flag"]={ | ||
[ | [i]={n,o,H,p}, | ||
[j]=H, | |||
[ | |||
[b]="flag \'%0\' results in undefined behavior with \'%1\' conversion specifier", | [b]="flag \'%0\' results in undefined behavior with \'%1\' conversion specifier", | ||
[ | [d]=h, | ||
[ | [a]="flag \'(.*?)\' results in undefined behavior with \'(.*?)\' conversion specifier", | ||
[ | [e]=ob, | ||
[ | [c]=ab, | ||
[ | [f]={"d31b2637abd2",1265880461,"Patch by Cristian Draghici:\n\nEnhance the printf format string checking when using the format\nspecifi...","Patch by Cristian Draghici:\n\nEnhance the printf format string checking when using the format\nspecifier flags \' \', \'0\', \'+\' with the \'p\' or \'s\' conversions (since\nthey are nonsensical and undefined). This is similar to GCC\'s\nchecking.\n\nAlso warning when a precision is used with the \'p\' conversin\nspecifier, since it has no meaning.\n\nllvm-svn: 95869"}, | ||
[ | [g]={{r,10611,"void CheckPrintfHandler::HandleFlag(const analyze_printf::PrintfSpecifier &FS, const analyze_printf::OptionalFlag &flag, const char *startSpecifier, unsigned specifierLen) {\n // ...\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_nonsensical_flag) << flag.toString() << CS.toString(), getLocationOfByte(flag.getPosition()),"}}, | ||
[ | [k]={ | ||
[ | [cc]={"clang/test/Sema/format-strings.c:333:12: warning: flag \'+\' results in undefined behavior with \'p\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:334:12: warning: flag \' \' results in undefined behavior with \'p\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:335:12: warning: flag \'0\' results in undefined behavior with \'p\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:337:12: warning: flag \'+\' results in undefined behavior with \'s\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:339:12: warning: flag \' \' results in undefined behavior with \'s\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:341:12: warning: flag \'0\' results in undefined behavior with \'s\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:432:12: warning: flag \'#\' results in undefined behavior with \'p\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:440:12: warning: flag \'#\' results in undefined behavior with \'n\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:442:12: warning: flag \'-\' results in undefined behavior with \'n\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:514:12: warning: flag \'\'\' results in undefined behavior with \'p\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:515:12: warning: flag \'\'\' results in undefined behavior with \'b\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:516:12: warning: flag \'\'\' results in undefined behavior with \'B\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:618:10: warning: flag \'0\' results in undefined behavior with \'s\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:619:12: warning: flag \'0\' results in undefined behavior with \'s\' conversion specifier [-Wformat]"} | ||
} | } | ||
}, | }, | ||
["warn_printf_nonsensical_optional_amount"]={ | ["warn_printf_nonsensical_optional_amount"]={ | ||
[ | [i]={n,o,H,p}, | ||
[j]=H, | |||
[ | |||
[b]="%select{field width|precision}0 used with \'%1\' conversion specifier, resulting in undefined behavior", | [b]="%select{field width|precision}0 used with \'%1\' conversion specifier, resulting in undefined behavior", | ||
[ | [d]=h, | ||
[ | [a]="(?:field width|precision) used with \'(.*?)\' conversion specifier, resulting in undefined behavior", | ||
[ | [e]=ob, | ||
[ | [c]=ab, | ||
[ | [f]={"b49ec6907b32",1276801227,"Bug 7377: Fixed several bad printf format string bugs.\n- Added warning for undefined behavior when u...","Bug 7377: Fixed several bad printf format string bugs.\n- Added warning for undefined behavior when using field specifier\n- Added warning for undefined behavior when using length modifier\n- Fixed warnings for invalid flags\n- Added warning for ignored flags\n- Added fixits for the above warnings\n- Fixed accuracy of detecting several undefined behavior conditions\n- Receive normal warnings in addition to security warnings when using %n\n- Fix bug where \'+\' flag would remain on unsigned conversion suggestions\n\nSummary of changes:\n- Added expanded tests\n- Added/expanded warnings\n- Added position info to OptionalAmounts for fixits\n- Extracted optional flags to a wrapper class with position info for fixits\n- Added several methods to validate a FormatSpecifier by component, each checking for undefined behavior\n- Fixed conversion specifier checking to conform to C99 standard\n- Added hooks to detect the invalid states in CheckPrintfHandler::HandleFormatSpecifier\n\nNote: warnings involving the \' \' (space) flag are temporarily disabled until whitespace highlighting no longer triggers assertions. I will make a post about this on cfe-dev shortly.\n\nM test/Sema/format-strings.c\nM include/clang/Basic/DiagnosticSemaKinds.td\nM include/clang/Analysis/Analyses/PrintfFormatString.h\nM lib/Analysis/PrintfFormatString.cpp\nM lib/Sema/SemaChecking.cpp\n\nllvm-svn: 106233"}, | ||
[ | [g]={{r,10596,"void CheckPrintfHandler::HandleInvalidAmount(const analyze_printf::PrintfSpecifier &FS, const analyze_printf::OptionalAmount &Amt, unsigned type, const char *startSpecifier, unsigned specifierLen) {\n // ...\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_nonsensical_optional_amount) << type << CS.toString(), getLocationOfByte(Amt.getStart()),"}}, | ||
[ | [k]={ | ||
[ | [cc]={"clang/test/Sema/format-strings.c:332:12: warning: precision used with \'p\' conversion specifier, resulting in undefined behavior [-Wformat]","clang/test/Sema/format-strings.c:447:12: warning: precision used with \'c\' conversion specifier, resulting in undefined behavior [-Wformat]","clang/test/Sema/format-strings.c:452:12: warning: field width used with \'n\' conversion specifier, resulting in undefined behavior [-Wformat]","clang/test/Sema/format-strings.c:454:12: warning: precision used with \'n\' conversion specifier, resulting in undefined behavior [-Wformat]","clang/test/Sema/format-strings.c:614:10: warning: precision used with \'p\' conversion specifier, resulting in undefined behavior [-Wformat]","clang/test/Sema/format-strings.c:615:12: warning: precision used with \'p\' conversion specifier, resulting in undefined behavior [-Wformat]"} | ||
} | } | ||
}, | }, | ||
["warn_printf_positional_arg_exceeds_data_args"]={ | ["warn_printf_positional_arg_exceeds_data_args"]={ | ||
[ | [i]={n,o,H,p}, | ||
[j]=H, | |||
[ | |||
[b]="data argument position \'%0\' exceeds the number of data arguments (%1)", | [b]="data argument position \'%0\' exceeds the number of data arguments (%1)", | ||
[ | [d]=h, | ||
[ | [a]="data argument position \'(.*?)\' exceeds the number of data arguments \\((.*?)\\)", | ||
[ | [e]=ob, | ||
[ | [c]=ab, | ||
[ | [f]={"4d745dd5cb3c",1269489552,"Fix two bugs in format-string checking:\n(1) Do not assume the data arguments start after the format ...","Fix two bugs in format-string checking:\n(1) Do not assume the data arguments start after the format string\n(2) Do not use the fact that a function is variadic to treat it like a va_list printf function\n\nFixes PR 6697.\n\nllvm-svn: 99480"}, | ||
[ | [g]={{r,10370,"bool CheckFormatHandler::CheckNumArgs(const analyze_format_string::FormatSpecifier &FS, const analyze_format_string::ConversionSpecifier &CS, const char *startSpecifier, unsigned specifierLen, unsigned argIndex) {\n if (argIndex >= NumDataArgs) {\n PartialDiagnostic PDiag = FS.usesPositionalArg() ? (S.PDiag(diag::warn_printf_positional_arg_exceeds_data_args) << (argIndex + 1) << NumDataArgs) : S.PDiag(diag::warn_printf_insufficient_data_args);"}}, | ||
[ | [k]={ | ||
[ | [cc]={"clang/test/Sema/format-strings.c:415:24: warning: data argument position \'2\' exceeds the number of data arguments (1) [-Wformat]","clang/test/Sema/format-strings.c:416:25: warning: data argument position \'18\' exceeds the number of data arguments (1) [-Wformat]","clang/test/Sema/format-strings.c:573:10: warning: data argument position \'18\' exceeds the number of data arguments (2) [-Wformat]","clang/test/Sema/format-strings.c:574:15: warning: data argument position \'18\' exceeds the number of data arguments (2) [-Wformat]"} | ||
} | } | ||
}, | }, | ||
["warn_private_extern"]={ | ["warn_private_extern"]={ | ||
[ | [i]={n,o,p,"private-extern"}, | ||
[j]="private-extern", | |||
[ | |||
[b]="use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated", | [b]="use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated", | ||
[ | [d]=h, | ||
[ | [a]="use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wprivate\\-extern[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"05f4e7181a1e",1345056146,"Patch to warn about __private_extern__ on tentative definitions\nas it does something unexpected (but...","Patch to warn about __private_extern__ on tentative definitions\nas it does something unexpected (but gcc compatible).\nSuggest use of __attribute__((visibility(\"hidden\")))\non declaration instead. // rdar://7703982\n\nllvm-svn: 161972"}, | ||
[ | [g]={{B,13781,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n // ...\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n // ...\n case VarDecl::DeclarationOnly:\n // ...\n if (!Type->isDependentType() && !Var->isInvalidDecl() && Var->getStorageClass() == SC_PrivateExtern) {\n Diag(Var->getLocation(), diag::warn_private_extern);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/tentative-decls.c"]={"clang/test/Sema/tentative-decls.c:36:24: warning: use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated [-Wprivate-extern]"} | ["clang/test/Sema/tentative-decls.c"]={"clang/test/Sema/tentative-decls.c:36:24: warning: use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated [-Wprivate-extern]"} | ||
} | } | ||
}, | }, | ||
["warn_profile_data_misexpect"]={ | ["warn_profile_data_misexpect"]={ | ||
[ | [i]={"misexpect"}, | ||
[j]="misexpect", | |||
[ | |||
[b]="Potential performance regression from use of __builtin_expect(): Annotation was correct on %0 of profiled executions.", | [b]="Potential performance regression from use of __builtin_expect(): Annotation was correct on %0 of profiled executions.", | ||
[ | [d]=h, | ||
[ | [a]="Potential performance regression from use of __builtin_expect\\(\\)\\: Annotation was correct on (.*?) of profiled executions\\.", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wmisexpect[^\\]]*\\]", | ||
[ | [c]="Instrumentation Issue", | ||
[ | [f]={"a10802fd73f9",1568085099,"clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM\n\nThis patch contains t...","clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM\n\nThis patch contains the basic functionality for reporting potentially\nincorrect usage of __builtin_expect() by comparing the developer\'s\nannotation against a collected PGO profile. A more detailed proposal and\ndiscussion appears on the CFE-dev mailing list\n(http://lists.llvm.org/pipermail/cfe-dev/2019-July/062971.html) and a\nprototype of the initial frontend changes appear here in D65300\n\nWe revised the work in D65300 by moving the misexpect check into the\nLLVM backend, and adding support for IR and sampling based profiles, in\naddition to frontend instrumentation.\n\nWe add new misexpect metadata tags to those instructions directly\ninfluenced by the llvm.expect intrinsic (branch, switch, and select)\nwhen lowering the intrinsics. The misexpect metadata contains\ninformation about the expected target of the intrinsic so that we can\ncheck against the correct PGO counter when emitting diagnostics, and the\ncompiler\'s values for the LikelyBranchWeight and UnlikelyBranchWeight.\nWe use these branch weight values to determine when to emit the\ndiagnostic to the user.\n\nA future patch should address the comment at the top of\nLowerExpectIntrisic.cpp to hoist the LikelyBranchWeight and\nUnlikelyBranchWeight values into a shared space that can be accessed\noutside of the LowerExpectIntrinsic pass. Once that is done, the\nmisexpect metadata can be updated to be smaller.\n\nIn the long term, it is possible to reconstruct portions of the\nmisexpect metadata from the existing profile data. However, we have\navoided this to keep the code simple, and because some kind of metadata\ntag will be required to identify which branch/switch/select instructions\nare influenced by the use of llvm.expect\n\nPatch By: paulkirth\nDifferential Revision: https://reviews.llvm.org/D66324\n\nllvm-svn: 371484"}, | ||
[ | [g]={{"clang/lib/CodeGen/CodeGenAction.cpp",870,"void BackendConsumer::MisExpectDiagHandler(const llvm::DiagnosticInfoMisExpect &D) {\n // ...\n Diags.Report(Loc, diag::warn_profile_data_misexpect) << D.getMsg().str();"},{"clang/lib/Frontend/CompilerInvocation.cpp",4427,"bool CompilerInvocation::CreateFromArgsImpl(CompilerInvocation &Res, ArrayRef<const char *> CommandLineArgs, DiagnosticsEngine &Diags, const char *Argv0) {\n // ...\n for (auto Warning : Res.getDiagnosticOpts().Warnings) {\n if (Warning == \"misexpect\" && !Diags.isIgnored(diag::warn_profile_data_misexpect, SourceLocation())) {"}} | ||
}, | }, | ||
["warn_profile_data_missing"]={ | ["warn_profile_data_missing"]={ | ||
[ | [i]={"profile-instr-missing"}, | ||
[j]="profile-instr-missing", | |||
[ | |||
[b]="profile data may be incomplete: of %0 function%s0, %1 %plural{1:has|:have}1 no data", | [b]="profile data may be incomplete: of %0 function%s0, %1 %plural{1:has|:have}1 no data", | ||
[ | [d]=h, | ||
[ | [a]="profile data may be incomplete\\: of (.*?) function(.*?), (.*?) (?:has|have) no data", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wprofile\\-instr\\-missing[^\\]]*\\]", | ||
[ | [c]="Instrumentation Issue", | ||
[ | [f]={"96d6ca7e8c4f",1493314258,"[Profile] Add off-by-default -Wprofile-instr-missing warning\n\nClang warns that a profile is out-of-d...","[Profile] Add off-by-default -Wprofile-instr-missing warning\n\nClang warns that a profile is out-of-date if it can\'t find a profile\nrecord for any function in a TU. This warning became noisy after llvm\nstarted allowing dead-stripping of instrumented functions.\n\nTo fix this, this patch changes the existing profile out-of-date warning\n(-Wprofile-instr-out-of-date) so that it only complains about mismatched\ndata. Further, it introduces a new, off-by-default warning about missing\nfunction data (-Wprofile-instr-missing).\n\nDifferential Revision: https://reviews.llvm.org/D28867\n\nllvm-svn: 301570"}, | ||
[ | [g]={{"clang/lib/CodeGen/CodeGenModule.cpp",710,"void InstrProfStats::reportDiagnostics(DiagnosticsEngine &Diags, StringRef MainFile) {\n // ...\n if (VisitedInMainFile > 0 && VisitedInMainFile == MissingInMainFile) {\n // ...\n } else {\n // ...\n if (Missing > 0)\n Diags.Report(diag::warn_profile_data_missing) << Visited << Missing;"}}, | ||
[ | [k]={ | ||
["clang/test/Profile/c-outdated-data.c"]={"warning: profile data may be incomplete: of 3 functions, 1 has no data [-Wprofile-instr-missing]"} | ["clang/test/Profile/c-outdated-data.c"]={"warning: profile data may be incomplete: of 3 functions, 1 has no data [-Wprofile-instr-missing]"} | ||
} | } | ||
}, | }, | ||
["warn_profile_data_out_of_date"]={ | ["warn_profile_data_out_of_date"]={ | ||
[ | [i]={"profile-instr-out-of-date"}, | ||
[j]="profile-instr-out-of-date", | |||
[ | |||
[b]="profile data may be out of date: of %0 function%s0, %1 %plural{1:has|:have}1 mismatched data that will be ignored", | [b]="profile data may be out of date: of %0 function%s0, %1 %plural{1:has|:have}1 mismatched data that will be ignored", | ||
[ | [d]=h, | ||
[ | [a]="profile data may be out of date\\: of (.*?) function(.*?), (.*?) (?:has|have) mismatched data that will be ignored", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wprofile\\-instr\\-out\\-of\\-date[^\\]]*\\]", | ||
[ | [c]="Instrumentation Issue", | ||
[ | [f]={"e2ef2a09ef26",1397596955,"CodeGen: Emit warnings for out of date profile data during PGO\n\nThis adds a warning that triggers wh...","CodeGen: Emit warnings for out of date profile data during PGO\n\nThis adds a warning that triggers when profile data doesn\'t match for\nthe source that\'s being compiled with -fprofile-instr-use=. This fires\nonly once per translation unit, as warning on every mismatched\nfunction would be quite noisy.\n\nllvm-svn: 206322"}, | ||
[ | [g]={{"clang/lib/CodeGen/CodeGenModule.cpp",707,"void InstrProfStats::reportDiagnostics(DiagnosticsEngine &Diags, StringRef MainFile) {\n // ...\n if (VisitedInMainFile > 0 && VisitedInMainFile == MissingInMainFile) {\n // ...\n } else {\n if (Mismatched > 0)\n Diags.Report(diag::warn_profile_data_out_of_date) << Visited << Mismatched;"}}, | ||
[ | [k]={ | ||
["clang/test/Profile/profile-summary.c"]={"warning: profile data may be out of date: of 3 functions, 3 have mismatched data that will be ignored [-Wprofile-instr-out-of-date]"} | ["clang/test/Profile/profile-summary.c"]={"warning: profile data may be out of date: of 3 functions, 3 have mismatched data that will be ignored [-Wprofile-instr-out-of-date]"} | ||
} | } | ||
}, | }, | ||
["warn_profile_data_unprofiled"]={ | ["warn_profile_data_unprofiled"]={ | ||
[ | [i]={"profile-instr-unprofiled"}, | ||
[j]="profile-instr-unprofiled", | |||
[ | |||
[b]="no profile data available for file \"%0\"", | [b]="no profile data available for file \"%0\"", | ||
[ | [d]=h, | ||
[ | [a]="no profile data available for file \"(.*?)\"", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wprofile\\-instr\\-unprofiled[^\\]]*\\]", | ||
[ | [c]="Instrumentation Issue", | ||
[ | [f]={"40b8ba1496e5",1403747107,"CodeGen: Improve warnings about uninstrumented files when profiling\n\nImprove the warning when buildi...","CodeGen: Improve warnings about uninstrumented files when profiling\n\nImprove the warning when building with -fprofile-instr-use and a file\nappears not to have been profiled at all. This keys on whether a\nfunction is defined in the main file or not to avoid false negatives\nwhen one includes a header with functions that have been profiled.\n\nllvm-svn: 211760"}, | ||
[ | [g]={{"clang/lib/CodeGen/CodeGenModule.cpp",704,"void InstrProfStats::reportDiagnostics(DiagnosticsEngine &Diags, StringRef MainFile) {\n // ...\n if (VisitedInMainFile > 0 && VisitedInMainFile == MissingInMainFile) {\n // ...\n Diags.Report(diag::warn_profile_data_unprofiled) << MainFile;"}}, | ||
[ | [k]={ | ||
["clang/test/Profile/c-unprofiled.c"]={"warning: no profile data available for file \"c-unprofiled.c\" [-Wprofile-instr-unprofiled]"} | ["clang/test/Profile/c-unprofiled.c"]={"warning: no profile data available for file \"c-unprofiled.c\" [-Wprofile-instr-unprofiled]"} | ||
} | } | ||
}, | }, | ||
["warn_property_access_suggest"]={ | ["warn_property_access_suggest"]={ | ||
[ | [i]={"property-access-dot-syntax"}, | ||
[j]="property-access-dot-syntax", | |||
[ | |||
[b]="property %0 not found on object of type %1; did you mean to access property %2?", | [b]="property %0 not found on object of type %1; did you mean to access property %2?", | ||
[ | [d]=h, | ||
[ | [a]="property (.*?) not found on object of type (.*?); did you mean to access property (.*?)\\?", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wproperty\\-access\\-dot\\-syntax[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"0b1d28866c36",1407537204,"Objective-C [qoi]. Issue warning and fixit if property-dot syntax\nuse mis-cased property name (which...","Objective-C [qoi]. Issue warning and fixit if property-dot syntax\nuse mis-cased property name (which is currently accepted silently\ndue to the way property setters are named). rdar://17911746\n\nllvm-svn: 215250"}, | ||
[ | [g]={{U,2084,"/// 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 // Special warning if member name used in a property-dot for a setter accessor\n // does not use a property with same name; e.g. obj.X = ... for a property with\n // name \'x\'.\n if (Setter && Setter->isImplicit() && Setter->isPropertyAccessor() && !IFace->FindPropertyDeclaration(Member, ObjCPropertyQueryKind::OBJC_PR_query_instance)) {\n if (const ObjCPropertyDecl *PDecl = Setter->findPropertyDecl()) {\n // Do not warn if user is using property-dot syntax to make call to\n // user named setter.\n if (!(PDecl->getPropertyAttributes() & ObjCPropertyAttribute::kind_setter))\n Diag(MemberLoc, diag::warn_property_access_suggest) << MemberName << QualType(OPT, 0) << PDecl->getName() << FixItHint::CreateReplacement(MemberLoc, PDecl->getName());"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/property-user-setter.m"]={"clang/test/SemaObjC/property-user-setter.m:127:8: warning: property \'P\' not found on object of type \'rdar11363363 *\'; did you mean to access property p? [-Wproperty-access-dot-syntax]","clang/test/SemaObjC/property-user-setter.m:128:8: warning: property \'q\' not found on object of type \'rdar11363363 *\'; did you mean to access property Q? [-Wproperty-access-dot-syntax]","clang/test/SemaObjC/property-user-setter.m:135:15: warning: property \'R\' not found on object of type \'rdar11363363 *\'; did you mean to access property r? [-Wproperty-access-dot-syntax]"} | ["clang/test/SemaObjC/property-user-setter.m"]={"clang/test/SemaObjC/property-user-setter.m:127:8: warning: property \'P\' not found on object of type \'rdar11363363 *\'; did you mean to access property p? [-Wproperty-access-dot-syntax]","clang/test/SemaObjC/property-user-setter.m:128:8: warning: property \'q\' not found on object of type \'rdar11363363 *\'; did you mean to access property Q? [-Wproperty-access-dot-syntax]","clang/test/SemaObjC/property-user-setter.m:135:15: warning: property \'R\' not found on object of type \'rdar11363363 *\'; did you mean to access property r? [-Wproperty-access-dot-syntax]"} | ||
} | } | ||
}, | }, | ||
["warn_property_attr_mismatch"]={ | ["warn_property_attr_mismatch"]={ | ||
[ | [i]={Lb}, | ||
[j]=Lb, | |||
[ | |||
[b]="property attribute in class extension does not match the primary class", | [b]="property attribute in class extension does not match the primary class", | ||
[ | [d]=h, | ||
[ | [a]="property attribute in class extension does not match the primary class", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wproperty\\-attribute\\-mismatch[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{N,492,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // ...\n // Check for consistency with the previous declaration, if there is one.\n if (PIDecl) {\n // ...\n if (ExistingOwnership && NewOwnership != ExistingOwnership) {\n // If the ownership was written explicitly, complain.\n if (getOwnershipRule(AttributesAsWritten)) {\n Diag(AtLoc, diag::warn_property_attr_mismatch);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/property-in-class-extension-1.m"]={"clang/test/SemaObjC/property-in-class-extension-1.m:42:1: warning: property attribute in class extension does not match the primary class [-Wproperty-attribute-mismatch]"} | ["clang/test/SemaObjC/property-in-class-extension-1.m"]={"clang/test/SemaObjC/property-in-class-extension-1.m:42:1: warning: property attribute in class extension does not match the primary class [-Wproperty-attribute-mismatch]"} | ||
} | } | ||
}, | }, | ||
["warn_property_attribute"]={ | ["warn_property_attribute"]={ | ||
[ | [i]={Lb}, | ||
[j]=Lb, | |||
[ | |||
[b]="\'%1\' attribute on property %0 does not match the property inherited from %2", | [b]="\'%1\' attribute on property %0 does not match the property inherited from %2", | ||
[ | [d]=h, | ||
[ | [a]="\'(.*?)\' attribute on property (.*?) does not match the property inherited from (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wproperty\\-attribute\\-mismatch[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{N,399,"/// Check for a mismatch in the atomicity of the given properties.\nstatic void checkAtomicPropertyMismatch(Sema &S, ObjCPropertyDecl *OldProperty, ObjCPropertyDecl *NewProperty, bool PropagateAtomicity) {\n // ...\n S.Diag(NewProperty->getLocation(), diag::warn_property_attribute) << NewProperty->getDeclName() << \"atomic\" << OldContextName;"},{N,1655,"/// DiagnosePropertyMismatch - Compares two properties for their\n/// attributes and types and warns on a variety of inconsistencies.\n///\nvoid Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *inheritedName, bool OverridingProtocolProperty) {\n // ...\n // We allow readonly properties without an explicit ownership\n // (assign/unsafe_unretained/weak/retain/strong/copy) in super class\n // to be overridden by a property with any explicit ownership in the subclass.\n if (!OverridingProtocolProperty && !getOwnershipRule(SAttr) && getOwnershipRule(CAttr))\n // ...\n else {\n // ...\n if ((CAttr & ObjCPropertyAttribute::kind_copy) != (SAttr & ObjCPropertyAttribute::kind_copy))\n Diag(Property->getLocation(), diag::warn_property_attribute) << Property->getDeclName() << \"copy\" << inheritedName;"},{N,1665,"/// DiagnosePropertyMismatch - Compares two properties for their\n/// attributes and types and warns on a variety of inconsistencies.\n///\nvoid Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *inheritedName, bool OverridingProtocolProperty) {\n // ...\n // We allow readonly properties without an explicit ownership\n // (assign/unsafe_unretained/weak/retain/strong/copy) in super class\n // to be overridden by a property with any explicit ownership in the subclass.\n if (!OverridingProtocolProperty && !getOwnershipRule(SAttr) && getOwnershipRule(CAttr))\n // ...\n else {\n // ...\n if ((CAttr & ObjCPropertyAttribute::kind_copy) != (SAttr & ObjCPropertyAttribute::kind_copy))\n // ...\n else if (!(SAttr & ObjCPropertyAttribute::kind_readonly)) {\n // ...\n if (CStrong != SStrong)\n Diag(Property->getLocation(), diag::warn_property_attribute) << Property->getDeclName() << \"retain (or strong)\" << inheritedName;"},{N,1679,"/// DiagnosePropertyMismatch - Compares two properties for their\n/// attributes and types and warns on a variety of inconsistencies.\n///\nvoid Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *inheritedName, bool OverridingProtocolProperty) {\n // ...\n // Readonly properties from protocols can be implemented as \"readwrite\"\n // with a custom setter name.\n if (Property->getSetterName() != SuperProperty->getSetterName() && !(SuperProperty->isReadOnly() && isa<ObjCProtocolDecl>(SuperProperty->getDeclContext()))) {\n Diag(Property->getLocation(), diag::warn_property_attribute) << Property->getDeclName() << \"setter\" << inheritedName;"},{N,1684,"/// DiagnosePropertyMismatch - Compares two properties for their\n/// attributes and types and warns on a variety of inconsistencies.\n///\nvoid Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *inheritedName, bool OverridingProtocolProperty) {\n // ...\n if (Property->getGetterName() != SuperProperty->getGetterName()) {\n Diag(Property->getLocation(), diag::warn_property_attribute) << Property->getDeclName() << \"getter\" << inheritedName;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/property-ownership-attr.m"]={"clang/test/SemaObjC/property-ownership-attr.m:17:22: warning: \'copy\' attribute on property \'z\' does not match the property inherited from \'P\' [-Wproperty-attribute-mismatch]"} | ["clang/test/SemaObjC/property-ownership-attr.m"]={"clang/test/SemaObjC/property-ownership-attr.m:17:22: warning: \'copy\' attribute on property \'z\' does not match the property inherited from \'P\' [-Wproperty-attribute-mismatch]"} | ||
} | } | ||
}, | }, | ||
["warn_property_getter_owning_mismatch"]={ | ["warn_property_getter_owning_mismatch"]={ | ||
[b]="property declared as returning non-retained objects; getter returning retained objects", | [b]="property declared as returning non-retained objects; getter returning retained objects", | ||
[ | [d]=h, | ||
[ | [a]="property declared as returning non\\-retained objects; getter returning retained objects", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[ | [f]={"f4105f5cfeb3",1308961066,"objc-arc/mrc: Allow ns_returns_not_retained attribute on properties\nto turn off warning on those pro...","objc-arc/mrc: Allow ns_returns_not_retained attribute on properties\nto turn off warning on those properties which follow Cocoa naming\nconvention for retaining objects and yet they were not meant for\nsuch purposes. Also, perform consistancy checking for declared\ngetters of such methods. // rdar://9636091\n\nllvm-svn: 133849"}, | ||
[ | [g]={{N,1482,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n if (ObjCMethodDecl *getterMethod = property->getGetterMethodDecl()) {\n // ...\n if (property->hasAttr<NSReturnsNotRetainedAttr>() && !getterMethod->hasAttr<NSReturnsNotRetainedAttr>()) {\n Diag(getterMethod->getLocation(), diag::warn_property_getter_owning_mismatch);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/property-ns-returns-not-retained-attr.m"]={"clang/test/SemaObjC/property-ns-returns-not-retained-attr.m:11:1: warning: property declared as returning non-retained objects; getter returning retained objects"} | ["clang/test/SemaObjC/property-ns-returns-not-retained-attr.m"]={"clang/test/SemaObjC/property-ns-returns-not-retained-attr.m:11:1: warning: property declared as returning non-retained objects; getter returning retained objects"} | ||
} | } | ||
}, | }, | ||
["warn_property_implicitly_mismatched"]={ | ["warn_property_implicitly_mismatched"]={ | ||
[ | [i]={"objc-property-implicit-mismatch"}, | ||
[j]="objc-property-implicit-mismatch", | |||
[ | |||
[b]="primary property declaration is implicitly strong while redeclaration in class extension is weak", | [b]="primary property declaration is implicitly strong while redeclaration in class extension is weak", | ||
[ | [d]=h, | ||
[ | [a]="primary property declaration is implicitly strong while redeclaration in class extension is weak", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-implicit\\-mismatch[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"7196487de91a",1382747739,"ObjectiveC arc. Warn when an implicitly \'strong\' property \nis redeclared as \'weak\' in class extensio...","ObjectiveC arc. Warn when an implicitly \'strong\' property \nis redeclared as \'weak\' in class extension.\n// rdar://15304886\n\nllvm-svn: 193453"}, | ||
[ | [g]={{N,506,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // ...\n // Check for consistency with the previous declaration, if there is one.\n if (PIDecl) {\n // ...\n // If the redeclaration is \'weak\' but the original property is not,\n if ((Attributes & ObjCPropertyAttribute::kind_weak) && !(PIDecl->getPropertyAttributesAsWritten() & ObjCPropertyAttribute::kind_weak) && PIDecl->getType()->getAs<ObjCObjectPointerType>() && PIDecl->getType().getObjCLifetime() == Qualifiers::OCL_None) {\n Diag(AtLoc, diag::warn_property_implicitly_mismatched);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/arc-decls.m"]={"clang/test/SemaObjC/arc-decls.m:166:1: warning: primary property declaration is implicitly strong while redeclaration in class extension is weak [-Wobjc-property-implicit-mismatch]"} | ["clang/test/SemaObjC/arc-decls.m"]={"clang/test/SemaObjC/arc-decls.m:166:1: warning: primary property declaration is implicitly strong while redeclaration in class extension is weak [-Wobjc-property-implicit-mismatch]"} | ||
} | } | ||
}, | }, | ||
["warn_property_method_deprecated"]={ | ["warn_property_method_deprecated"]={ | ||
[ | [i]={wb,"deprecated-declarations"}, | ||
[j]="deprecated-declarations", | |||
[ | |||
[b]="property access is using %0 method which is deprecated", | [b]="property access is using %0 method which is deprecated", | ||
[ | [d]=h, | ||
[ | [a]="property access is using (.*?) method which is deprecated", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-declarations[^\\]]*\\]", | ||
[ | [c]=Tb, | ||
[ | [f]={"89ea9610b306",1402939541,"Objective-C. Diagnose when property access is using declared\nproperty accessor methods which have be...","Objective-C. Diagnose when property access is using declared\nproperty accessor methods which have become deprecated\nor available. // rdar://15951801\n\nllvm-svn: 211039"}, | ||
[ | [g]={{Mc,437,"/// 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_Deprecated:\n diag = !ObjCPropertyAccess ? diag::warn_deprecated : diag::warn_property_method_deprecated;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/property-deprecated-warning.m"]={"clang/test/SemaObjC/property-deprecated-warning.m:168:6: warning: property access is using \'setX:\' method which is deprecated [-Wdeprecated-declarations]"} | ["clang/test/SemaObjC/property-deprecated-warning.m"]={"clang/test/SemaObjC/property-deprecated-warning.m:168:6: warning: property access is using \'setX:\' method which is deprecated [-Wdeprecated-declarations]"} | ||
} | } | ||
}, | }, | ||
["warn_property_redecl_getter_mismatch"]={ | ["warn_property_redecl_getter_mismatch"]={ | ||
[ | [i]={Lb}, | ||
[j]=Lb, | |||
[ | |||
[b]="getter name mismatch between property redeclaration (%1) and its original declaration (%0)", | [b]="getter name mismatch between property redeclaration (%1) and its original declaration (%0)", | ||
[ | [d]=h, | ||
[ | [a]="getter name mismatch between property redeclaration \\((.*?)\\) and its original declaration \\((.*?)\\)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wproperty\\-attribute\\-mismatch[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"9dd25b769642",1449788529,"Objective-C properties: merge attributes when redeclaring \'readonly\' as \'readwrite\' in an extension....","Objective-C properties: merge attributes when redeclaring \'readonly\' as \'readwrite\' in an extension.\n\nr251874 stopped back-patching the AST when an Objective-C \'readonly\'\nproperty is redeclared in a class extension as \'readwrite\'. However,\nit did not properly handle merging of Objective-C property attributes\n(e.g., getter name, ownership, atomicity) to the redeclaration,\nleading to bad metadata. Merge (and check!) those property attributes\nso we get the right metadata and reasonable ASTs. Fixes\nrdar://problem/23823989.\n\nllvm-svn: 255309"}, | ||
[ | [g]={{N,475,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // ...\n // Check for consistency with the previous declaration, if there is one.\n if (PIDecl) {\n // ...\n // Check for consistency of getters.\n if (PIDecl->getGetterName() != GetterSel) {\n // If the getter was written explicitly, complain.\n if (AttributesAsWritten & ObjCPropertyAttribute::kind_getter) {\n Diag(AtLoc, diag::warn_property_redecl_getter_mismatch) << PIDecl->getGetterName() << GetterSel;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/property-3.m"]={"clang/test/SemaObjC/property-3.m:41:1: warning: getter name mismatch between property redeclaration (\'wasAvailable\') and its original declaration (\'isAvailable\') [-Wproperty-attribute-mismatch]"} | ["clang/test/SemaObjC/property-3.m"]={"clang/test/SemaObjC/property-3.m:41:1: warning: getter name mismatch between property redeclaration (\'wasAvailable\') and its original declaration (\'isAvailable\') [-Wproperty-attribute-mismatch]"} | ||
} | } | ||
}, | }, | ||
["warn_property_types_are_incompatible"]={ | ["warn_property_types_are_incompatible"]={ | ||
[ | [i]={"incompatible-property-type"}, | ||
[j]="incompatible-property-type", | |||
[ | |||
[b]="property type %0 is incompatible with type %1 inherited from %2", | [b]="property type %0 is incompatible with type %1 inherited from %2", | ||
[ | [d]=h, | ||
[ | [a]="property type (.*?) is incompatible with type (.*?) inherited from (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wincompatible\\-property\\-type[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{N,1702,"/// DiagnosePropertyMismatch - Compares two properties for their\n/// attributes and types and warns on a variety of inconsistencies.\n///\nvoid Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *inheritedName, bool OverridingProtocolProperty) {\n // ...\n if (!Context.propertyTypesAreCompatible(LHSType, RHSType)) {\n // ...\n if (!isObjCPointerConversion(RHSType, LHSType, ConvertedType, IncompatibleObjC) || IncompatibleObjC) {\n Diag(Property->getLocation(), diag::warn_property_types_are_incompatible) << Property->getType() << SuperProperty->getType() << inheritedName;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/property-category-3.m"]={"clang/test/SemaObjC/property-category-3.m:15:17: warning: property type \'float\' is incompatible with type \'int\' inherited from \'P\' [-Wincompatible-property-type]"} | ["clang/test/SemaObjC/property-category-3.m"]={"clang/test/SemaObjC/property-category-3.m:15:17: warning: property type \'float\' is incompatible with type \'int\' inherited from \'P\' [-Wincompatible-property-type]"} | ||
} | } | ||
}, | }, | ||
["warn_protocol_property_mismatch"]={ | ["warn_protocol_property_mismatch"]={ | ||
[ | [i]={"protocol-property-synthesis-ambiguity"}, | ||
[j]="protocol-property-synthesis-ambiguity", | |||
[ | |||
[b]="property %select{of type %1|with attribute \'%1\'|without attribute \'%1\'|with getter %1|with setter %1}0 was selected for synthesis", | [b]="property %select{of type %1|with attribute \'%1\'|without attribute \'%1\'|with getter %1|with setter %1}0 was selected for synthesis", | ||
[ | [d]=h, | ||
[ | [a]="property (?:of type (.*?)|with attribute \'(.*?)\'|without attribute \'(.*?)\'|with getter (.*?)|with setter (.*?)) was selected for synthesis", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wprotocol\\-property\\-synthesis\\-ambiguity[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"0ebf87959fff",1369084824,"Objective-C [qoi]: When an class conforms to multiple\nprotocols that declare the same property of in...","Objective-C [qoi]: When an class conforms to multiple\nprotocols that declare the same property of incompatible\ntypes, issue a warning when class implementation synthesizes \nthe property. // rdar://13075400\n\nllvm-svn: 182316"}, | ||
[ | [g]={{N,970,"/// 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);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/property-ambiguous-synthesis.m"]={"clang/test/SemaObjC/property-ambiguous-synthesis.m:10:18: warning: property of type \'double\' was selected for synthesis [-Wprotocol-property-synthesis-ambiguity]","clang/test/SemaObjC/property-ambiguous-synthesis.m:10:18: warning: property of type \'double\' was selected for synthesis [-Wprotocol-property-synthesis-ambiguity]","clang/test/SemaObjC/property-ambiguous-synthesis.m:5:23: warning: property of type \'id\' was selected for synthesis [-Wprotocol-property-synthesis-ambiguity]"} | ["clang/test/SemaObjC/property-ambiguous-synthesis.m"]={"clang/test/SemaObjC/property-ambiguous-synthesis.m:10:18: warning: property of type \'double\' was selected for synthesis [-Wprotocol-property-synthesis-ambiguity]","clang/test/SemaObjC/property-ambiguous-synthesis.m:10:18: warning: property of type \'double\' was selected for synthesis [-Wprotocol-property-synthesis-ambiguity]","clang/test/SemaObjC/property-ambiguous-synthesis.m:5:23: warning: property of type \'id\' was selected for synthesis [-Wprotocol-property-synthesis-ambiguity]"} | ||
} | } | ||
}, | }, | ||
["warn_pt_guarded_pass_by_reference"]={ | ["warn_pt_guarded_pass_by_reference"]={ | ||
[ | [i]={kb,"thread-safety-reference"}, | ||
[j]="thread-safety-reference", | |||
[ | |||
[b]="passing the value that %1 points to by reference requires holding %0 %select{\'%2\'|\'%2\' exclusively}3", | [b]="passing the value that %1 points to by reference requires holding %0 %select{\'%2\'|\'%2\' exclusively}3", | ||
[ | [d]=h, | ||
[ | [a]="passing the value that (.*?) points to by reference requires holding (.*?) (?:\'(.*?)\'|\'(.*?)\' exclusively)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wthread\\-safety\\-reference[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"c60dc2cfb9ad",1411081346,"Thread Safety Analysis: add new warning flag, -Wthread-safety-reference, which\nwarns when a guarded ...","Thread Safety Analysis: add new warning flag, -Wthread-safety-reference, which\nwarns when a guarded variable is passed by reference as a function argument.\nThis is released as a separate warning flag, because it could potentially\nbreak existing code that uses thread safety analysis.\n\nllvm-svn: 218087"}, | ||
[ | [g]={{y,1973,"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 case POK_PtPassByRef:\n DiagID = diag::warn_pt_guarded_pass_by_reference;"},{y,2003,"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 case POK_PtPassByRef:\n DiagID = diag::warn_pt_guarded_pass_by_reference;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-thread-safety-analysis.cpp"]={"clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5560:13: warning: passing the value that \'foop\' points to by reference requires holding mutex \'mu\' [-Wthread-safety-reference]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5561:17: warning: passing the value that \'foop\' points to by reference requires holding mutex \'mu\' [-Wthread-safety-reference]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5562:12: warning: passing the value that \'foop\' points to by reference requires holding mutex \'mu\' [-Wthread-safety-reference]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5563:16: warning: passing the value that \'foop\' points to by reference requires holding mutex \'mu\' [-Wthread-safety-reference]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5564:21: warning: passing the value that \'foop\' points to by reference requires holding mutex \'mu\' [-Wthread-safety-reference]"} | ["clang/test/SemaCXX/warn-thread-safety-analysis.cpp"]={"clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5560:13: warning: passing the value that \'foop\' points to by reference requires holding mutex \'mu\' [-Wthread-safety-reference]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5561:17: warning: passing the value that \'foop\' points to by reference requires holding mutex \'mu\' [-Wthread-safety-reference]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5562:12: warning: passing the value that \'foop\' points to by reference requires holding mutex \'mu\' [-Wthread-safety-reference]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5563:16: warning: passing the value that \'foop\' points to by reference requires holding mutex \'mu\' [-Wthread-safety-reference]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5564:21: warning: passing the value that \'foop\' points to by reference requires holding mutex \'mu\' [-Wthread-safety-reference]"} | ||
} | } | ||
}, | }, | ||
["warn_ptr_arith_exceeds_bounds"]={ | ["warn_ptr_arith_exceeds_bounds"]={ | ||
[ | [i]={"array-bounds-pointer-arithmetic"}, | ||
[j]="array-bounds-pointer-arithmetic", | |||
[ | |||
[b]="the pointer incremented by %0 refers past the end of the array (that has type %1)", | [b]="the pointer incremented by %0 refers past the end of the array (that has type %1)", | ||
[ | [d]=h, | ||
[ | [a]="the pointer incremented by (.*?) refers past the end of the array \\(that has type (.*?)\\)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Warray\\-bounds\\-pointer\\-arithmetic[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"980bdb9dfb55",1311645148,"Expand array bounds checking to work in the presence of unary & and *,\nand to work with pointer arit...","Expand array bounds checking to work in the presence of unary & and *,\nand to work with pointer arithmetic in addition to array indexing.\n\nThe new pointer arithmetic porition of the array bounds checking can be\nturned on by -Warray-bounds-pointer-arithmetic (and is off by default).\n\nllvm-svn: 136046"}, | ||
[ | [g]={{r,17169,"void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr, const ArraySubscriptExpr *ASE, bool AllowOnePastEnd, bool IndexNegated) {\n // ...\n if (index.isUnsigned() || !index.isNegative()) {\n // ...\n unsigned DiagID = ASE ? diag::warn_array_index_exceeds_bounds : diag::warn_ptr_arith_exceeds_bounds;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/array-bounds-ptr-arith.cpp"]={"clang/test/SemaCXX/array-bounds-ptr-arith.cpp:10:11: warning: the pointer incremented by 14 refers past the end of the array (that has type \'const char[13]\') [-Warray-bounds-pointer-arithmetic]","clang/test/SemaCXX/array-bounds-ptr-arith.cpp:15:11: warning: the pointer incremented by 14 refers past the end of the array (that has type \'const char[13]\') [-Warray-bounds-pointer-arithmetic]","clang/test/SemaCXX/array-bounds-ptr-arith.cpp:25:18: warning: the pointer incremented by 60 refers past the end of the array (that has type \'double[2]\') [-Warray-bounds-pointer-arithmetic]","clang/test/SemaCXX/array-bounds-ptr-arith.cpp:29:11: warning: the pointer incremented by 6 refers past the end of the array (that has type \'char[5]\') [-Warray-bounds-pointer-arithmetic]","clang/test/SemaCXX/array-bounds-ptr-arith.cpp:31:32: warning: the pointer incremented by 6 refers past the end of the array (that has type \'char[5]\') [-Warray-bounds-pointer-arithmetic]"} | ["clang/test/SemaCXX/array-bounds-ptr-arith.cpp"]={"clang/test/SemaCXX/array-bounds-ptr-arith.cpp:10:11: warning: the pointer incremented by 14 refers past the end of the array (that has type \'const char[13]\') [-Warray-bounds-pointer-arithmetic]","clang/test/SemaCXX/array-bounds-ptr-arith.cpp:15:11: warning: the pointer incremented by 14 refers past the end of the array (that has type \'const char[13]\') [-Warray-bounds-pointer-arithmetic]","clang/test/SemaCXX/array-bounds-ptr-arith.cpp:25:18: warning: the pointer incremented by 60 refers past the end of the array (that has type \'double[2]\') [-Warray-bounds-pointer-arithmetic]","clang/test/SemaCXX/array-bounds-ptr-arith.cpp:29:11: warning: the pointer incremented by 6 refers past the end of the array (that has type \'char[5]\') [-Warray-bounds-pointer-arithmetic]","clang/test/SemaCXX/array-bounds-ptr-arith.cpp:31:32: warning: the pointer incremented by 6 refers past the end of the array (that has type \'char[5]\') [-Warray-bounds-pointer-arithmetic]"} | ||
} | } | ||
}, | }, | ||
["warn_ptr_arith_exceeds_max_addressable_bounds"]={ | ["warn_ptr_arith_exceeds_max_addressable_bounds"]={ | ||
[ | [i]={"array-bounds"}, | ||
[j]="array-bounds", | |||
[ | |||
[b]="the pointer incremented by %0 refers past the last possible element for an array in %1-bit address space containing %2-bit (%3-byte) elements (max possible %4 element%s5)", | [b]="the pointer incremented by %0 refers past the last possible element for an array in %1-bit address space containing %2-bit (%3-byte) elements (max possible %4 element%s5)", | ||
[ | [d]=h, | ||
[ | [a]="the pointer incremented by (.*?) refers past the last possible element for an array in (.*?)\\-bit address space containing (.*?)\\-bit \\((.*?)\\-byte\\) elements \\(max possible (.*?) element(.*?)\\)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Warray\\-bounds[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"da55e9ba1273",1600125132,"[Sema] Address-space sensitive index check for unbounded arrays\n\nCheck applied to unbounded (incompl...","[Sema] Address-space sensitive index check for unbounded arrays\n\nCheck applied to unbounded (incomplete) arrays and pointers\nto spot cases where the computed address is beyond the\nlargest possible addressable extent of the array, based\non the address space in which the array is delcared, or\nwhich the pointer refers to.\n\nCheck helps to avoid cases of nonsense pointer math and\narray indexing which could lead to linker failures or\nruntime exceptions. Of particular interest when building\nfor embedded systems with small address spaces.\n\nReviewed By: aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D86796"}, | ||
[ | [g]={{r,17079,"void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr, const ArraySubscriptExpr *ASE, bool AllowOnePastEnd, bool IndexNegated) {\n // ...\n if (IsUnboundedArray) {\n // ...\n if (index.isUnsigned() || !index.isNegative()) {\n // ...\n unsigned DiagID = ASE ? diag::warn_array_index_exceeds_max_addressable_bounds : diag::warn_ptr_arith_exceeds_max_addressable_bounds;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/const-eval.c"]={"clang/test/Sema/const-eval.c:145:48: warning: the pointer incremented by 18446744073709551615 refers past the last possible element for an array in 64-bit address space containing 64-bit (8-byte) elements (max possible 2305843009213693952 elements) [-Warray-bounds]","clang/test/Sema/const-eval.c:146:18: warning: the pointer incremented by 18446744073709551615 refers past the last possible element for an array in 64-bit address space containing 64-bit (8-byte) elements (max possible 2305843009213693952 elements) [-Warray-bounds]","clang/test/Sema/const-eval.c:147:22: warning: the pointer incremented by 18446744073709551615 refers past the last possible element for an array in 64-bit address space containing 128-bit (16-byte) elements (max possible 1152921504606846976 elements) [-Warray-bounds]"} | ["clang/test/Sema/const-eval.c"]={"clang/test/Sema/const-eval.c:145:48: warning: the pointer incremented by 18446744073709551615 refers past the last possible element for an array in 64-bit address space containing 64-bit (8-byte) elements (max possible 2305843009213693952 elements) [-Warray-bounds]","clang/test/Sema/const-eval.c:146:18: warning: the pointer incremented by 18446744073709551615 refers past the last possible element for an array in 64-bit address space containing 64-bit (8-byte) elements (max possible 2305843009213693952 elements) [-Warray-bounds]","clang/test/Sema/const-eval.c:147:22: warning: the pointer incremented by 18446744073709551615 refers past the last possible element for an array in 64-bit address space containing 128-bit (16-byte) elements (max possible 1152921504606846976 elements) [-Warray-bounds]"} | ||
} | } | ||
}, | }, | ||
["warn_ptr_arith_precedes_bounds"]={ | ["warn_ptr_arith_precedes_bounds"]={ | ||
[ | [i]={"array-bounds-pointer-arithmetic"}, | ||
[j]="array-bounds-pointer-arithmetic", | |||
[ | |||
[b]="the pointer decremented by %0 refers before the beginning of the array", | [b]="the pointer decremented by %0 refers before the beginning of the array", | ||
[ | [d]=h, | ||
[ | [a]="the pointer decremented by (.*?) refers before the beginning of the array", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Warray\\-bounds\\-pointer\\-arithmetic[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"980bdb9dfb55",1311645148,"Expand array bounds checking to work in the presence of unary & and *,\nand to work with pointer arit...","Expand array bounds checking to work in the presence of unary & and *,\nand to work with pointer arithmetic in addition to array indexing.\n\nThe new pointer arithmetic porition of the array bounds checking can be\nturned on by -Warray-bounds-pointer-arithmetic (and is off by default).\n\nllvm-svn: 136046"}, | ||
[ | [g]={{r,17180,"void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr, const ArraySubscriptExpr *ASE, bool AllowOnePastEnd, bool IndexNegated) {\n // ...\n if (index.isUnsigned() || !index.isNegative()) {\n // ...\n } else {\n // ...\n if (!ASE) {\n DiagID = diag::warn_ptr_arith_precedes_bounds;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/array-bounds-ptr-arith.cpp"]={"clang/test/SemaCXX/array-bounds-ptr-arith.cpp:9:11: warning: the pointer decremented by 6 refers before the beginning of the array [-Warray-bounds-pointer-arithmetic]","clang/test/SemaCXX/array-bounds-ptr-arith.cpp:14:11: warning: the pointer decremented by 6 refers before the beginning of the array [-Warray-bounds-pointer-arithmetic]"} | ["clang/test/SemaCXX/array-bounds-ptr-arith.cpp"]={"clang/test/SemaCXX/array-bounds-ptr-arith.cpp:9:11: warning: the pointer decremented by 6 refers before the beginning of the array [-Warray-bounds-pointer-arithmetic]","clang/test/SemaCXX/array-bounds-ptr-arith.cpp:14:11: warning: the pointer decremented by 6 refers before the beginning of the array [-Warray-bounds-pointer-arithmetic]"} | ||
} | } | ||
}, | }, | ||
["warn_ptr_independentclass_attribute"]={ | ["warn_ptr_independentclass_attribute"]={ | ||
[ | [i]={"IndependentClass-attribute"}, | ||
[j]="IndependentClass-attribute", | |||
[ | |||
[b]="\'objc_independent_class\' attribute may be put on Objective-C object pointer type only; attribute is ignored", | [b]="\'objc_independent_class\' attribute may be put on Objective-C object pointer type only; attribute is ignored", | ||
[ | [d]=h, | ||
[ | [a]="\'objc_independent_class\' attribute may be put on Objective\\-C object pointer type only; attribute is ignored", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-WIndependentClass\\-attribute[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"7a60b6db76f5",1429209524,"[Objective-C Sema] patch to introduce IndependentClass\nattribute to be placed on Objective-C pointer...","[Objective-C Sema] patch to introduce IndependentClass\nattribute to be placed on Objective-C pointer typedef\nto make them strong enough so on their \"new\" method\nfamily no attempt is made to override these \ntypes. rdar://20255473\n\nllvm-svn: 235128"}, | ||
[ | [g]={{w,3021,"static void handleObjCIndependentClass(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (const auto *TD = dyn_cast<TypedefNameDecl>(D)) {\n // ...\n if (!T->isObjCObjectPointerType()) {\n S.Diag(TD->getLocation(), diag::warn_ptr_independentclass_attribute);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/objc-independent-class-attribute.m"]={"clang/test/SemaObjC/objc-independent-class-attribute.m:8:70: warning: \'objc_independent_class\' attribute may be put on Objective-C object pointer type only; attribute is ignored [-WIndependentClass-attribute]"} | ["clang/test/SemaObjC/objc-independent-class-attribute.m"]={"clang/test/SemaObjC/objc-independent-class-attribute.m:8:70: warning: \'objc_independent_class\' attribute may be put on Objective-C object pointer type only; attribute is ignored [-WIndependentClass-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_qual_return_type"]={ | ["warn_qual_return_type"]={ | ||
[ | [i]={s,n,Vb,Qc}, | ||
[j]=Qc, | |||
[ | |||
[b]="\'%0\' type qualifier%s1 on return type %plural{1:has|:have}1 no effect", | [b]="\'%0\' type qualifier%s1 on return type %plural{1:has|:have}1 no effect", | ||
[ | [d]=h, | ||
[ | [a]="\'(.*?)\' type qualifier(.*?) on return type (?:has|have) no effect", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wignored\\-qualifiers[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"603d81bf8d05",1279009102,"When forming a function call or message send expression, be sure to\nstrip cv-qualifiers from the exp...","When forming a function call or message send expression, be sure to\nstrip cv-qualifiers from the expression\'s type when the language calls\nfor it: in C, that\'s all the time, while C++ only does it for\nnon-class types. \n\nCentralized the computation of the call expression type in\nQualType::getCallResultType() and some helper functions in other nodes\n(FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant\ncallers of getResultType() to getCallResultType().\n\nFixes PR7598 and PR7463, along with a bunch of getResultType() call\nsites that weren\'t stripping references off the result type (nothing\nstripped cv-qualifiers properly before this change).\n\nllvm-svn: 108234"}, | ||
[ | [g]={{L,3328,"// Diagnose pointless type qualifiers on the return type of a function.\nstatic void diagnoseRedundantReturnTypeQualifiers(Sema &S, QualType RetTy, Declarator &D, unsigned FunctionChunkIndex) {\n // ...\n if (FTI.hasTrailingReturnType()) {\n S.diagnoseIgnoredQualifiers(diag::warn_qual_return_type, RetTy.getLocalCVRQualifiers(), FTI.getTrailingReturnTypeLoc());"},{L,3345,"// Diagnose pointless type qualifiers on the return type of a function.\nstatic void diagnoseRedundantReturnTypeQualifiers(Sema &S, QualType RetTy, Declarator &D, unsigned FunctionChunkIndex) {\n // ...\n for (unsigned OuterChunkIndex = FunctionChunkIndex + 1, End = D.getNumTypeObjects(); OuterChunkIndex != End; ++OuterChunkIndex) {\n // ...\n case DeclaratorChunk::Pointer: {\n // ...\n S.diagnoseIgnoredQualifiers(diag::warn_qual_return_type, PTI.TypeQuals, SourceLocation(), PTI.ConstQualLoc, PTI.VolatileQualLoc, PTI.RestrictQualLoc, PTI.AtomicQualLoc, PTI.UnalignedQualLoc);"},{L,3365,"// Diagnose pointless type qualifiers on the return type of a function.\nstatic void diagnoseRedundantReturnTypeQualifiers(Sema &S, QualType RetTy, Declarator &D, unsigned FunctionChunkIndex) {\n // ...\n for (unsigned OuterChunkIndex = FunctionChunkIndex + 1, End = D.getNumTypeObjects(); OuterChunkIndex != End; ++OuterChunkIndex) {\n // ...\n case DeclaratorChunk::Function:\n case DeclaratorChunk::BlockPointer:\n case DeclaratorChunk::Reference:\n case DeclaratorChunk::Array:\n case DeclaratorChunk::MemberPointer:\n case DeclaratorChunk::Pipe:\n // ...\n S.diagnoseIgnoredQualifiers(diag::warn_qual_return_type, RetTy.getCVRQualifiers() | AtomicQual, D.getIdentifierLoc());"},{L,3382,"// Diagnose pointless type qualifiers on the return type of a function.\nstatic void diagnoseRedundantReturnTypeQualifiers(Sema &S, QualType RetTy, Declarator &D, unsigned FunctionChunkIndex) {\n // ...\n S.diagnoseIgnoredQualifiers(diag::warn_qual_return_type, D.getDeclSpec().getTypeQualifiers(), D.getIdentifierLoc(), D.getDeclSpec().getConstSpecLoc(), D.getDeclSpec().getVolatileSpecLoc(), D.getDeclSpec().getRestrictSpecLoc(), D.getDeclSpec().getAtomicSpecLoc(), D.getDeclSpec().getUnalignedSpecLoc());"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/return.cpp"]={"clang/test/SemaCXX/return.cpp:26:1: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:27:5: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:31:1: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:36:1: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:39:7: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:40:7: warning: \'volatile\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:43:1: warning: \'const volatile\' type qualifiers on return type have no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:47:1: warning: \'const volatile\' type qualifiers on return type have no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:53:1: warning: \'volatile\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:55:1: warning: \'const volatile\' type qualifiers on return type have no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:60:1: warning: \'_Atomic\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:65:5: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:68:5: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:78:5: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]"} | ["clang/test/SemaCXX/return.cpp"]={"clang/test/SemaCXX/return.cpp:26:1: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:27:5: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:31:1: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:36:1: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:39:7: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:40:7: warning: \'volatile\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:43:1: warning: \'const volatile\' type qualifiers on return type have no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:47:1: warning: \'const volatile\' type qualifiers on return type have no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:53:1: warning: \'volatile\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:55:1: warning: \'const volatile\' type qualifiers on return type have no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:60:1: warning: \'_Atomic\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:65:5: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:68:5: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]","clang/test/SemaCXX/return.cpp:78:5: warning: \'const\' type qualifier on return type has no effect [-Wignored-qualifiers]"} | ||
} | } | ||
}, | }, | ||
["warn_quoted_include_in_framework_header"]={ | ["warn_quoted_include_in_framework_header"]={ | ||
[ | [i]={"quoted-include-in-framework-header"}, | ||
[j]="quoted-include-in-framework-header", | |||
[ | |||
[b]="double-quoted include \"%0\" in framework header, expected angle-bracketed instead", | [b]="double-quoted include \"%0\" in framework header, expected angle-bracketed instead", | ||
[ | [d]=h, | ||
[ | [a]="double\\-quoted include \"(.*?)\" in framework header, expected angle\\-bracketed instead", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wquoted\\-include\\-in\\-framework\\-header[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"d1d83df80764",1529532719,"Warning for framework headers using double quote includes\n\nIntroduce -Wquoted-include-in-framework-h...","Warning for framework headers using double quote includes\n\nIntroduce -Wquoted-include-in-framework-header, which should fire a warning\nwhenever a quote include appears in a framework header and suggest a fix-it.\nFor instance, for header A.h added in the tests, this is how the warning looks\nlike:\n\n./A.framework/Headers/A.h:2:10: warning: double-quoted include \"A0.h\" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header]\n#include \"A0.h\"\n ^~~~~~\n <A/A0.h>\n./A.framework/Headers/A.h:3:10: warning: double-quoted include \"B.h\" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header]\n#include \"B.h\"\n ^~~~~\n <B.h>\n\nThis helps users to prevent frameworks from using local headers when in fact\nthey should be targetting system level ones.\n\nThe warning is off by default.\n\nDifferential Revision: https://reviews.llvm.org/D47157\n\nrdar://problem/37077034\n\nllvm-svn: 335184"}, | ||
[ | [g]={{"clang/lib/Lex/HeaderSearch.cpp",843,"static void diagnoseFrameworkInclude(DiagnosticsEngine &Diags, SourceLocation IncludeLoc, StringRef Includer, StringRef IncludeFilename, const FileEntry *IncludeFE, bool isAngled = false, bool FoundByHeaderMap = false) {\n // ...\n if (!isAngled && !FoundByHeaderMap) {\n // ...\n Diags.Report(IncludeLoc, diag::warn_quoted_include_in_framework_header) << IncludeFilename << FixItHint::CreateReplacement(IncludeLoc, NewInclude);"}}, | ||
[ | [k]={ | ||
["clang/test/Modules/double-quotes.m"]={"clang/test/Modules/Inputs/double-quotes/A.framework/Headers/A.h:1:10: warning: double-quoted include \"A0.h\" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header]","clang/test/Modules/Inputs/double-quotes/A.framework/Headers/A.h:2:10: warning: double-quoted include \"B.h\" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/Modules/Inputs/double-quotes/flat-header-path/Z.h:1:9: warning: double-quoted include \"B.h\" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header]"} | ["clang/test/Modules/double-quotes.m"]={"clang/test/Modules/Inputs/double-quotes/A.framework/Headers/A.h:1:10: warning: double-quoted include \"A0.h\" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header]","clang/test/Modules/Inputs/double-quotes/A.framework/Headers/A.h:2:10: warning: double-quoted include \"B.h\" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/Modules/Inputs/double-quotes/flat-header-path/Z.h:1:9: warning: double-quoted include \"B.h\" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header]"} | ||
} | } | ||
}, | }, | ||
["warn_reading_std_cxx_module_by_implicit_paths"]={ | ["warn_reading_std_cxx_module_by_implicit_paths"]={ | ||
[ | [i]={"read-modules-implicitly"}, | ||
[j]="read-modules-implicitly", | |||
[ | |||
[b]="it is deprecated to read module \'%0\' implicitly; it is going to be removed in clang 18; consider to specify the dependencies explicitly", | [b]="it is deprecated to read module \'%0\' implicitly; it is going to be removed in clang 18; consider to specify the dependencies explicitly", | ||
[ | [d]=h, | ||
[ | [a]="it is deprecated to read module \'(.*?)\' implicitly; it is going to be removed in clang 18; consider to specify the dependencies explicitly", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wread\\-modules\\-implicitly[^\\]]*\\]", | ||
[ | [c]="AST Deserialization Issue", | ||
[ | [f]={"e22fa1d4c615",1684317067,"[C++20] [Modules] Emit a warning if the we load the modules by implicit generated path\n\nA step to ad...","[C++20] [Modules] Emit a warning if the we load the modules by implicit generated path\n\nA step to address https://github.com/llvm/llvm-project/issues/62707.\n\nIt is not user friendly enough to drop the implicitly generated path\ndirectly. Let\'s emit the warning first and drop it in the next version."}, | ||
[ | [g]={{"clang/lib/Serialization/ASTReader.cpp",2918,"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 (ImportedFile.empty()) {\n // It is deprecated for C++20 Named modules to use the implicitly\n // paths.\n if (IsImportingStdCXXModule)\n Diag(clang::diag::warn_reading_std_cxx_module_by_implicit_paths) << ImportedName;"}} | ||
}, | }, | ||
["warn_readonly_property"]={ | ["warn_readonly_property"]={ | ||
[ | [i]={Lb}, | ||
[j]=Lb, | |||
[ | |||
[b]="attribute \'readonly\' of property %0 restricts attribute \'readwrite\' of property inherited from %1", | [b]="attribute \'readonly\' of property %0 restricts attribute \'readwrite\' of property inherited from %1", | ||
[ | [d]=h, | ||
[ | [a]="attribute \'readonly\' of property (.*?) restricts attribute \'readwrite\' of property inherited from (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wproperty\\-attribute\\-mismatch[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{N,1651,"/// DiagnosePropertyMismatch - Compares two properties for their\n/// attributes and types and warns on a variety of inconsistencies.\n///\nvoid Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *inheritedName, bool OverridingProtocolProperty) {\n // ...\n // We allow readonly properties without an explicit ownership\n // (assign/unsafe_unretained/weak/retain/strong/copy) in super class\n // to be overridden by a property with any explicit ownership in the subclass.\n if (!OverridingProtocolProperty && !getOwnershipRule(SAttr) && getOwnershipRule(CAttr))\n // ...\n else {\n if ((CAttr & ObjCPropertyAttribute::kind_readonly) && (SAttr & ObjCPropertyAttribute::kind_readwrite))\n Diag(Property->getLocation(), diag::warn_readonly_property) << Property->getDeclName() << inheritedName;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/property-3.m"]={"clang/test/SemaObjC/property-3.m:12:25: warning: attribute \'readonly\' of property \'d1\' restricts attribute \'readwrite\' of property inherited from \'I\' [-Wproperty-attribute-mismatch]"} | ["clang/test/SemaObjC/property-3.m"]={"clang/test/SemaObjC/property-3.m:12:25: warning: attribute \'readonly\' of property \'d1\' restricts attribute \'readwrite\' of property inherited from \'I\' [-Wproperty-attribute-mismatch]"} | ||
} | } | ||
}, | }, | ||
["warn_receiver_forward_class"]={ | ["warn_receiver_forward_class"]={ | ||
[ | [i]={"receiver-forward-class"}, | ||
[j]="receiver-forward-class", | |||
[ | |||
[b]="receiver %0 is a forward class and corresponding @interface may not exist", | [b]="receiver %0 is a forward class and corresponding @interface may not exist", | ||
[ | [d]=h, | ||
[ | [a]="receiver (.*?) is a forward class and corresponding @interface may not exist", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wreceiver\\-forward\\-class[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"1bd844da8057",1241823756,"Warn if forward class is used as a receiver.\n\nllvm-svn: 71278","Warn if forward class is used as a receiver.\n\nllvm-svn: 71278"}, | ||
[ | [g]={{U,2664,"/// \\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)) {"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/forward-class-receiver.m"]={"clang/test/SemaObjC/forward-class-receiver.m:12:4: warning: receiver \'NotKnown\' is a forward class and corresponding @interface may not exist [-Wreceiver-forward-class]"} | ["clang/test/SemaObjC/forward-class-receiver.m"]={"clang/test/SemaObjC/forward-class-receiver.m:12:4: warning: receiver \'NotKnown\' is a forward class and corresponding @interface may not exist [-Wreceiver-forward-class]"} | ||
} | } | ||
}, | }, | ||
["warn_receiver_forward_instance"]={ | ["warn_receiver_forward_instance"]={ | ||
[ | [i]={"receiver-forward-class"}, | ||
[j]="receiver-forward-class", | |||
[ | |||
[b]="receiver type %0 for instance message is a forward declaration", | [b]="receiver type %0 for instance message is a forward declaration", | ||
[ | [d]=h, | ||
[ | [a]="receiver type (.*?) for instance message is a forward declaration", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wreceiver\\-forward\\-class[^\\]]*\\]", | ||
[ | [c]="ARC Semantic Issue", | ||
[ | [f]={"c934de67e0c6",1328230964,"objc: Issue diagnostic when receiver type is a forward class declaration and\nit is treated as of \'id...","objc: Issue diagnostic when receiver type is a forward class declaration and\nit is treated as of \'id\' type resulting in multiple method lookup.\n// rdar://10686120\n\nllvm-svn: 149653"}, | ||
[ | [g]={{U,3067,"/// Build an Objective-C instance message expression.\n///\n/// This routine takes care of both normal instance messages and\n/// instance messages to the superclass instance.\n///\n/// \\param Receiver The expression that computes the object that will\n/// receive this message. This may be empty, in which case we are\n/// sending to the superclass instance and \\p SuperLoc must be a valid\n/// source location.\n///\n/// \\param ReceiverType The (static) type of the object receiving the\n/// message. When a \\p Receiver expression is provided, this is the\n/// same type as that expression. For a superclass instance send, this\n/// is a pointer to the type of the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass instance message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this instance message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // ...\n if (!Method) {\n // ...\n if (receiverIsIdLike || ReceiverType->isBlockPointerType() || (Receiver && Context.isObjCNSObjectType(Receiver->getType()))) {\n // ...\n } else if (ReceiverType->isObjCClassOrClassKindOfType() || ReceiverType->isObjCQualifiedClassType()) {\n // ...\n } else {\n // ...\n // We allow sending a message to a qualified ID (\"id<foo>\"), which is ok as\n // long as one of the protocols implements the selector (if not, warn).\n // And as long as message is not deprecated/unavailable (warn if it is).\n if (const ObjCObjectPointerType *QIdTy = ReceiverType->getAsObjCQualifiedIdType()) {\n // ...\n } else if (const ObjCObjectPointerType *OCIType = ReceiverType->getAsObjCInterfacePointerType()) {\n // ...\n if (RequireCompleteType(Loc, OCIType->getPointeeType(), getLangOpts().ObjCAutoRefCount ? diag::err_arc_receiver_forward_instance : diag::warn_receiver_forward_instance, RecRange)) {"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/receiver-forward-class.m"]={"clang/test/SemaObjC/receiver-forward-class.m:15:11: warning: receiver type \'A\' for instance message is a forward declaration [-Wreceiver-forward-class]"} | ["clang/test/SemaObjC/receiver-forward-class.m"]={"clang/test/SemaObjC/receiver-forward-class.m:15:11: warning: receiver type \'A\' for instance message is a forward declaration [-Wreceiver-forward-class]"} | ||
} | } | ||
}, | }, | ||
["warn_redecl_library_builtin"]={ | ["warn_redecl_library_builtin"]={ | ||
[ | [i]={"incompatible-library-redeclaration"}, | ||
[j]="incompatible-library-redeclaration", | |||
[ | |||
[b]="incompatible redeclaration of library function %0", | [b]="incompatible redeclaration of library function %0", | ||
[ | [d]=h, | ||
[ | [a]="incompatible redeclaration of library function (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wincompatible\\-library\\-redeclaration[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{B,4296,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n if (Old->isImplicit() && (BuiltinID = Old->getBuiltinID())) {\n // If it\'s actually a library-defined builtin function like \'malloc\'\n // or \'printf\', just warn about the incompatible redeclaration.\n if (Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID)) {\n Diag(New->getLocation(), diag::warn_redecl_library_builtin) << New;"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/pragma_poison.c"]={"clang/test/Preprocessor/pragma_poison.c:4:1: warning: incompatible redeclaration of library function \'rindex\' [-Wincompatible-library-redeclaration]"} | ["clang/test/Preprocessor/pragma_poison.c"]={"clang/test/Preprocessor/pragma_poison.c:4:1: warning: incompatible redeclaration of library function \'rindex\' [-Wincompatible-library-redeclaration]"} | ||
} | } | ||
}, | }, | ||
["warn_redeclaration_without_attribute_prev_attribute_ignored"]={ | ["warn_redeclaration_without_attribute_prev_attribute_ignored"]={ | ||
[ | [i]={"inconsistent-dllimport","microsoft"}, | ||
[j]="inconsistent-dllimport", | |||
[ | |||
[b]="%q0 redeclared without %1 attribute: previous %1 ignored", | [b]="%q0 redeclared without %1 attribute: previous %1 ignored", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) redeclared without (.*?) attribute\\: previous (.*?) ignored", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Winconsistent\\-dllimport[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{B,7147,"static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl, NamedDecl *NewDecl, bool IsSpecialization, bool IsDefinition) {\n // ...\n if (OldImportAttr && !HasNewAttr && (!IsInline || (IsMicrosoftABI && IsTemplate)) && !IsStaticDataMember && !NewDecl->isLocalExternDecl() && !IsQualifiedFriend) {\n if (IsMicrosoftABI && IsDefinition) {\n // ...\n } else if (IsMicrosoftABI && IsSpecialization) {\n // ...\n } else {\n S.Diag(NewDecl->getLocation(), diag::warn_redeclaration_without_attribute_prev_attribute_ignored) << NewDecl << OldImportAttr;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/dllimport.c"]={"clang/test/Sema/dllimport.c:108:34: warning: \'GlobalRedecl3\' redeclared without \'dllimport\' attribute: previous \'dllimport\' ignored [-Winconsistent-dllimport]","clang/test/Sema/dllimport.c:180:28: warning: \'redecl2\' redeclared without \'dllimport\' attribute: previous \'dllimport\' ignored [-Winconsistent-dllimport]"} | ["clang/test/Sema/dllimport.c"]={"clang/test/Sema/dllimport.c:108:34: warning: \'GlobalRedecl3\' redeclared without \'dllimport\' attribute: previous \'dllimport\' ignored [-Winconsistent-dllimport]","clang/test/Sema/dllimport.c:180:28: warning: \'redecl2\' redeclared without \'dllimport\' attribute: previous \'dllimport\' ignored [-Winconsistent-dllimport]"} | ||
} | } | ||
}, | }, | ||
["warn_redeclaration_without_import_attribute"]={ | ["warn_redeclaration_without_import_attribute"]={ | ||
[ | [i]={"inconsistent-dllimport","microsoft"}, | ||
[j]="inconsistent-dllimport", | |||
[ | |||
[b]="%q0 redeclared without \'dllimport\' attribute: \'dllexport\' attribute added", | [b]="%q0 redeclared without \'dllimport\' attribute: \'dllexport\' attribute added", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) redeclared without \'dllimport\' attribute\\: \'dllexport\' attribute added", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Winconsistent\\-dllimport[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"eebc4af0ed2f",1464175962,"[ms][dll] #26935 Defining a dllimport function should cause it to be exported\n\nIf we have some funct...","[ms][dll] #26935 Defining a dllimport function should cause it to be exported\n\nIf we have some function with dllimport attribute and then we have the function\ndefinition in the same module but without dllimport attribute we should add\ndllexport attribute to this function definition.\nThe same should be done for variables.\n\nExample:\nstruct __declspec(dllimport) C3 {\n ~C3();\n};\nC3::~C3() {;} // we should export this definition.\n\nPatch by Andrew V. Tischenko\n\nDifferential revision: http://reviews.llvm.org/D18953\n\nllvm-svn: 270686"}, | ||
[ | [g]={{B,7135,"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 } else {\n S.Diag(NewDecl->getLocation(), diag::warn_redeclaration_without_import_attribute) << NewDecl;"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGen/flip-dllimport.c"]={"clang/test/CodeGen/flip-dllimport.c:7:6: warning: \'f\' redeclared without \'dllimport\' attribute: \'dllexport\' attribute added [-Winconsistent-dllimport]"} | ["clang/test/CodeGen/flip-dllimport.c"]={"clang/test/CodeGen/flip-dllimport.c:7:6: warning: \'f\' redeclared without \'dllimport\' attribute: \'dllexport\' attribute added [-Winconsistent-dllimport]"} | ||
} | } | ||
}, | }, | ||
["warn_redefine_extname_not_applied"]={ | ["warn_redefine_extname_not_applied"]={ | ||
[ | [i]={t}, | ||
[j]=t, | |||
[ | |||
[b]="#pragma redefine_extname is applicable to external C declarations only; not applied to %select{function|variable}0 %1", | [b]="#pragma redefine_extname is applicable to external C declarations only; not applied to %select{function|variable}0 %1", | ||
[ | [d]=h, | ||
[ | [a]="\\#pragma redefine_extname is applicable to external C declarations only; not applied to (?:function|variable) (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpragmas[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"7572e58b66bc",1437066413,"Disable #pragma redefine_extname for C++ code as it does not make sense in such a context.\n\nPatch by...","Disable #pragma redefine_extname for C++ code as it does not make sense in such a context.\n\nPatch by Andrey Bokhanko!\n\nllvm-svn: 242420"}, | ||
[ | [g]={{B,7985,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n // Handle GNU asm-label extension (encoded as an attribute).\n if (Expr *E = (Expr *)D.getAsmLabel()) {\n // ...\n } else if (!ExtnameUndeclaredIdentifiers.empty()) {\n // ...\n if (I != ExtnameUndeclaredIdentifiers.end()) {\n if (isDeclExternC(NewVD)) {\n // ...\n } else\n Diag(NewVD->getLocation(), diag::warn_redefine_extname_not_applied) << /*Variable*/ 1 << NewVD;"},{B,10102,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n // Handle GNU asm-label extension (encoded as an attribute).\n if (Expr *E = (Expr *)D.getAsmLabel()) {\n // ...\n } else if (!ExtnameUndeclaredIdentifiers.empty()) {\n // ...\n if (I != ExtnameUndeclaredIdentifiers.end()) {\n if (isDeclExternC(NewFD)) {\n // ...\n } else\n Diag(NewFD->getLocation(), diag::warn_redefine_extname_not_applied) << /*Variable*/ 0 << NewFD;"},{B,19979,"void Sema::ActOnPragmaRedefineExtname(IdentifierInfo *Name, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation NameLoc, SourceLocation AliasNameLoc) {\n // ...\n // If a declaration that:\n // 1) declares a function or a variable\n // 2) has external linkage\n // already exists, add a label attribute to it.\n if (PrevDecl && (isa<FunctionDecl>(PrevDecl) || isa<VarDecl>(PrevDecl))) {\n if (isDeclExternC(PrevDecl))\n // ...\n else\n Diag(PrevDecl->getLocation(), diag::warn_redefine_extname_not_applied) << /*Variable*/ (isa<FunctionDecl>(PrevDecl) ? 0 : 1) << PrevDecl;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/redefine_extname.cpp"]={"clang/test/SemaCXX/redefine_extname.cpp:6:12: warning: #pragma redefine_extname is applicable to external C declarations only; not applied to function \'foo_cpp\' [-Wpragmas]"} | ["clang/test/SemaCXX/redefine_extname.cpp"]={"clang/test/SemaCXX/redefine_extname.cpp:6:12: warning: #pragma redefine_extname is applicable to external C declarations only; not applied to function \'foo_cpp\' [-Wpragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_redefinition_in_param_list"]={ | ["warn_redefinition_in_param_list"]={ | ||
[ | [i]={"visibility"}, | ||
[j]="visibility", | |||
[ | |||
[b]="redefinition of %0 will not be visible outside of this function", | [b]="redefinition of %0 will not be visible outside of this function", | ||
[ | [d]=h, | ||
[ | [a]="redefinition of (.*?) will not be visible outside of this function", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wvisibility[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"051390fffab6",1330452731,"Correctly track tags and enum members defined in the prototype of a function, and ensure they are pr...","Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped.\n\nThis fixes code such as:\n\nenum e {x, y};\nint f(enum {y, x} n) {\n return 0;\n}\n\nThis finally fixes PR5464 and PR5477.\n\nllvm-svn: 151638"}, | ||
[ | [g]={{B,17367,"/// 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 Diag(NameLoc, diag::warn_redefinition_in_param_list) << Name;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/decl-in-prototype.c"]={"clang/test/Sema/decl-in-prototype.c:26:26: warning: redefinition of \'b\' will not be visible outside of this function [-Wvisibility]","clang/test/Sema/decl-in-prototype.c:34:27: warning: redefinition of \'ab\' will not be visible outside of this function [-Wvisibility]","clang/test/Sema/decl-in-prototype.c:34:51: warning: redefinition of \'ab\' will not be visible outside of this function [-Wvisibility]"} | ["clang/test/Sema/decl-in-prototype.c"]={"clang/test/Sema/decl-in-prototype.c:26:26: warning: redefinition of \'b\' will not be visible outside of this function [-Wvisibility]","clang/test/Sema/decl-in-prototype.c:34:27: warning: redefinition of \'ab\' will not be visible outside of this function [-Wvisibility]","clang/test/Sema/decl-in-prototype.c:34:51: warning: redefinition of \'ab\' will not be visible outside of this function [-Wvisibility]"} | ||
} | } | ||
}, | }, | ||
["warn_redundant_loop_iteration"]={ | ["warn_redundant_loop_iteration"]={ | ||
[ | [i]={n,o,"for-loop-analysis","loop-analysis",p}, | ||
[j]="for-loop-analysis", | |||
[ | |||
[b]="variable %0 is %select{decremented|incremented}1 both in the loop header and in the loop body", | [b]="variable %0 is %select{decremented|incremented}1 both in the loop header and in the loop body", | ||
[ | [d]=h, | ||
[ | [a]="variable (.*?) is (?:decremented|incremented) both in the loop header and in the loop body", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wfor\\-loop\\-analysis[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"4e7c9628917a",1375824714,"Add a new warning to -Wloop-analysis to detect suspicious increments or\ndecrements inside for loops....","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]={{M,2082,"// 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 if (S.Diags.isIgnored(diag::warn_redundant_loop_iteration, Third->getBeginLoc()))"},{M,2105,"// 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(LastDRE->getLocation(), diag::warn_redundant_loop_iteration) << LastDRE->getDecl() << LastIncrement;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-loop-analysis.cpp"]={"clang/test/SemaCXX/warn-loop-analysis.cpp:160:5: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:164:7: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:168:5: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:171:7: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:176:5: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:180:7: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:184:5: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:187:7: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:209:5: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:223:5: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:227:7: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:231:5: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:234:7: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:239:5: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:243:7: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:247:5: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:250:7: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:272:5: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]"} | ["clang/test/SemaCXX/warn-loop-analysis.cpp"]={"clang/test/SemaCXX/warn-loop-analysis.cpp:160:5: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:164:7: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:168:5: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:171:7: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:176:5: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:180:7: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:184:5: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:187:7: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:209:5: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:223:5: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:227:7: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:231:5: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:234:7: warning: variable \'i\' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:239:5: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:243:7: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:247:5: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:250:7: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:272:5: warning: variable \'i\' is decremented both in the loop header and in the loop body [-Wfor-loop-analysis]"} | ||
} | } | ||
}, | }, | ||
["warn_redundant_move_on_return"]={ | ["warn_redundant_move_on_return"]={ | ||
[ | [i]={n,o,p,"move","redundant-move"}, | ||
[j]="redundant-move", | |||
[ | |||
[b]="redundant move in return statement", | [b]="redundant move in return statement", | ||
[ | [d]=h, | ||
[ | [a]="redundant move in return statement", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wredundant\\-move[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"ac3eca536d3d",1430272337,"Add -Wpessimizing-move and -Wredundant-move warnings.\n\n-Wpessimizing-move warns when a call to std::...","Add -Wpessimizing-move and -Wredundant-move warnings.\n\n-Wpessimizing-move warns when a call to std::move would prevent copy elision\nif the argument was not wrapped in a call. This happens when moving a local\nvariable in a return statement when the variable is the same type as the\nreturn type or using a move to create a new object from a temporary object.\n\n-Wredundant-move warns when an implicit move would already be made, so the\nstd::move call is not needed, such as when moving a local variable in a return\nthat is different from the return type.\n\nDifferential Revision: http://reviews.llvm.org/D7633\n\nllvm-svn: 236075"}, | ||
[ | [g]={{sb,8403,"/// Provide warnings when std::move is used on construction.\nstatic void CheckMoveOnConstruction(Sema &S, const Expr *InitExpr, bool IsReturnStmt) {\n // ...\n if (IsReturnStmt) {\n // ...\n // If we\'re returning a function parameter, copy elision\n // is not possible.\n if (isa<ParmVarDecl>(VD))\n DiagID = diag::warn_redundant_move_on_return;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-redundant-move.cpp"]={"clang/test/SemaCXX/warn-redundant-move.cpp:82:10: warning: redundant move in return statement [-Wredundant-move]","clang/test/SemaCXX/warn-redundant-move.cpp:96:12: warning: redundant move in return statement [-Wredundant-move]"} | ["clang/test/SemaCXX/warn-redundant-move.cpp"]={"clang/test/SemaCXX/warn-redundant-move.cpp:82:10: warning: redundant move in return statement [-Wredundant-move]","clang/test/SemaCXX/warn-redundant-move.cpp:96:12: warning: redundant move in return statement [-Wredundant-move]"} | ||
} | } | ||
}, | }, | ||
["warn_redundant_parens_around_declarator"]={ | ["warn_redundant_parens_around_declarator"]={ | ||
[ | [i]={"redundant-parens"}, | ||
[j]="redundant-parens", | |||
[ | |||
[b]="redundant parentheses surrounding declarator", | [b]="redundant parentheses surrounding declarator", | ||
[ | [d]=h, | ||
[ | [a]="redundant parentheses surrounding declarator", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wredundant\\-parens[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"ac63d63543ca",1506729445,"Add a \"vexing parse\" warning for ambiguity between a variable declaration and a\nfunction-style cast....","Add a \"vexing parse\" warning for ambiguity between a variable declaration and a\nfunction-style cast.\n\nThis fires for cases such as\n\n T(x);\n\n... where \'x\' was previously declared and T is a type. This construct declares\na variable named \'x\' rather than the (probably expected) interpretation of a\nfunction-style cast of \'x\' to T.\n\nllvm-svn: 314570"}, | ||
[ | [g]={{L,4016,"/// Produce an appropriate diagnostic for a declarator with top-level\n/// parentheses.\nstatic void warnAboutRedundantParens(Sema &S, Declarator &D, QualType T) {\n // ...\n if (!CouldBeTemporaryObject) {\n // ...\n S.Diag(Paren.Loc, diag::warn_redundant_parens_around_declarator) << ParenRange << FixItHint::CreateRemoval(Paren.Loc) << FixItHint::CreateRemoval(Paren.EndLoc);"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/cxx-decl.cpp"]={"clang/test/Parser/cxx-decl.cpp:88:3: warning: redundant parentheses surrounding declarator [-Wredundant-parens]","clang/test/Parser/cxx-decl.cpp:270:5: warning: redundant parentheses surrounding declarator [-Wredundant-parens]","clang/test/Parser/cxx-decl.cpp:271:5: warning: redundant parentheses surrounding declarator [-Wredundant-parens]","clang/test/Parser/cxx-decl.cpp:274:5: warning: redundant parentheses surrounding declarator [-Wredundant-parens]","clang/test/Parser/cxx-decl.cpp:279:6: warning: redundant parentheses surrounding declarator [-Wredundant-parens]"} | ["clang/test/Parser/cxx-decl.cpp"]={"clang/test/Parser/cxx-decl.cpp:88:3: warning: redundant parentheses surrounding declarator [-Wredundant-parens]","clang/test/Parser/cxx-decl.cpp:270:5: warning: redundant parentheses surrounding declarator [-Wredundant-parens]","clang/test/Parser/cxx-decl.cpp:271:5: warning: redundant parentheses surrounding declarator [-Wredundant-parens]","clang/test/Parser/cxx-decl.cpp:274:5: warning: redundant parentheses surrounding declarator [-Wredundant-parens]","clang/test/Parser/cxx-decl.cpp:279:6: warning: redundant parentheses surrounding declarator [-Wredundant-parens]"} | ||
} | } | ||
}, | }, | ||
["warn_reference_field_is_uninit"]={ | ["warn_reference_field_is_uninit"]={ | ||
[ | [i]={n,o,p,tb}, | ||
[j]=tb, | |||
[ | |||
[b]="reference %0 is not yet bound to a value when used here", | [b]="reference %0 is not yet bound to a value when used here", | ||
[ | [d]=h, | ||
[ | [a]="reference (.*?) is not yet bound to a value when used here", | ||
[ | [e]=Yc, | ||
[ | [c]=l, | ||
[ | [f]={"d799a2b3b91f",1345452742,"Better wording for reference self-initialization warning.\n\nllvm-svn: 162198","Better wording for reference self-initialization warning.\n\nllvm-svn: 162198"}, | ||
[ | [g]={{T,3859,"class UninitializedFieldVisitor : public EvaluatedExprVisitor<UninitializedFieldVisitor> {\n // ...\n void HandleMemberExpr(MemberExpr *ME, bool CheckReferenceOnly, bool AddressOf) {\n // ...\n unsigned diag = IsReference ? diag::warn_reference_field_is_uninit : diag::warn_field_is_uninit;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/uninitialized.cpp"]={"clang/test/SemaCXX/uninitialized.cpp:840:13: warning: reference \'a\' is not yet bound to a value when used here [-Wuninitialized]","clang/test/SemaCXX/uninitialized.cpp:853:10: warning: reference \'b\' is not yet bound to a value when used here [-Wuninitialized]","clang/test/SemaCXX/uninitialized.cpp:855:14: warning: reference \'c\' is not yet bound to a value when used here [-Wuninitialized]","clang/test/SemaCXX/uninitialized.cpp:1086:9: warning: reference \'c\' is not yet bound to a value when used here [-Wuninitialized]","clang/test/SemaCXX/uninitialized.cpp:1087:9: warning: reference \'c\' is not yet bound to a value when used here [-Wuninitialized]"} | ["clang/test/SemaCXX/uninitialized.cpp"]={"clang/test/SemaCXX/uninitialized.cpp:840:13: warning: reference \'a\' is not yet bound to a value when used here [-Wuninitialized]","clang/test/SemaCXX/uninitialized.cpp:853:10: warning: reference \'b\' is not yet bound to a value when used here [-Wuninitialized]","clang/test/SemaCXX/uninitialized.cpp:855:14: warning: reference \'c\' is not yet bound to a value when used here [-Wuninitialized]","clang/test/SemaCXX/uninitialized.cpp:1086:9: warning: reference \'c\' is not yet bound to a value when used here [-Wuninitialized]","clang/test/SemaCXX/uninitialized.cpp:1087:9: warning: reference \'c\' is not yet bound to a value when used here [-Wuninitialized]"} | ||
} | } | ||
}, | }, | ||
["warn_register_objc_catch_parm"]={ | ["warn_register_objc_catch_parm"]={ | ||
[b]="\'register\' storage specifier on @catch parameter will be ignored", | |||
[d]=h, | |||
[a]="\'register\' storage specifier on @catch parameter will be ignored", | [a]="\'register\' storage specifier on @catch parameter will be ignored", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[f]={"f356419bf57b",1272303169,"Refactor Objective-C @catch parameter checking by detangling it from\nfunction-parameter checking and...","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"}, | |||
[g]={{I,5193,"Decl *Sema::ActOnObjCExceptionDecl(Scope *S, Declarator &D) {\n // ...\n // We allow the \"register\" storage class on exception variables because\n // GCC did, but we drop it completely. Any other storage class is an error.\n if (DS.getStorageClassSpec() == DeclSpec::SCS_register) {\n Diag(DS.getStorageClassSpecLoc(), diag::warn_register_objc_catch_parm) << FixItHint::CreateRemoval(SourceRange(DS.getStorageClassSpecLoc()));"}} | |||
[f | |||
[ | |||
}, | }, | ||
["warn_reinterpret_different_from_static"]={ | ["warn_reinterpret_different_from_static"]={ | ||
[ | [i]={"reinterpret-base-class"}, | ||
[j]="reinterpret-base-class", | |||
[ | |||
[b]="\'reinterpret_cast\' %select{from|to}3 class %0 %select{to|from}3 its %select{virtual base|base at non-zero offset}2 %1 behaves differently from \'static_cast\'", | [b]="\'reinterpret_cast\' %select{from|to}3 class %0 %select{to|from}3 its %select{virtual base|base at non-zero offset}2 %1 behaves differently from \'static_cast\'", | ||
[ | [d]=h, | ||
[ | [a]="\'reinterpret_cast\' (?:from|to) class (.*?) (?:to|from) its (?:virtual base|base at non\\-zero offset) (.*?) behaves differently from \'static_cast\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wreinterpret\\-base\\-class[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"cda80833090b",1363921094,"Warn about attempts to reinterpret_cast between two types that are\nhierarchy-related at a possibly n...","Warn about attempts to reinterpret_cast between two types that are\nhierarchy-related at a possibly nonzero offset.\n\nPatch by Alexander Zinenko!\n\nllvm-svn: 177698"}, | ||
[ | [g]={{Eb,1073,"/// Check that a reinterpret_cast\\<DestType\\>(SrcExpr) is not used as upcast\n/// or downcast between respective pointers or references.\nstatic void DiagnoseReinterpretUpDownCast(Sema &Self, const Expr *SrcExpr, QualType DestType, SourceRange OpRange) {\n // ...\n Self.Diag(BeginLoc, diag::warn_reinterpret_different_from_static) << DerivedType << BaseType << !VirtualBase << int(ReinterpretKind) << OpRange;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-reinterpret-base-class.cpp"]={"clang/test/SemaCXX/warn-reinterpret-base-class.cpp:123:10: warning: \'reinterpret_cast\' to class \'DVA *\' from its virtual base \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:128:10: warning: \'reinterpret_cast\' to class \'DDVA *\' from its virtual base \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:133:10: warning: \'reinterpret_cast\' to class \'DMA *\' from its virtual base \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:156:9: warning: \'reinterpret_cast\' to class \'DVA &\' from its virtual base \'A\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:161:9: warning: \'reinterpret_cast\' to class \'DDVA &\' from its virtual base \'A\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:166:9: warning: \'reinterpret_cast\' to class \'DMA &\' from its virtual base \'A\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:186:10: warning: \'reinterpret_cast\' from class \'DVA *\' to its virtual base \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:191:10: warning: \'reinterpret_cast\' from class \'DDVA *\' to its virtual base \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:196:10: warning: \'reinterpret_cast\' from class \'DDVA *\' to its virtual base \'DA *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:201:10: warning: \'reinterpret_cast\' from class \'DMA *\' to its virtual base \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:206:10: warning: \'reinterpret_cast\' from class \'DMA *\' to its virtual base \'DA *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:226:9: warning: \'reinterpret_cast\' from class \'DVA\' to its virtual base \'A &\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:231:9: warning: \'reinterpret_cast\' from class \'DDVA\' to its virtual base \'A &\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:236:9: warning: \'reinterpret_cast\' from class \'DDVA\' to its virtual base \'DA &\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:241:9: warning: \'reinterpret_cast\' from class \'DMA\' to its virtual base \'A &\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:246:9: warning: \'reinterpret_cast\' from class \'DMA\' to its virtual base \'DA &\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:273:9: warning: \'reinterpret_cast\' to class \'F *\' from its base at non-zero offset \'E *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:278:9: warning: \'reinterpret_cast\' to class \'G *\' from its base at non-zero offset \'E *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:284:9: warning: \'reinterpret_cast\' to class \'I *\' from its virtual base \'E *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:291:9: warning: \'reinterpret_cast\' to class \'I *\' from its virtual base \'F *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:299:9: warning: \'reinterpret_cast\' to class \'H *\' from its base at non-zero offset \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:303:9: warning: \'reinterpret_cast\' to class \'K\' (aka \'const F *\') from its base at non-zero offset \'E *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:310:9: warning: \'reinterpret_cast\' from class \'F *\' to its base at non-zero offset \'E *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:316:9: warning: \'reinterpret_cast\' from class \'G *\' to its base at non-zero offset \'E *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:326:9: warning: \'reinterpret_cast\' from class \'H *\' to its base at non-zero offset \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:330:9: warning: \'reinterpret_cast\' from class \'I *\' to its virtual base \'F *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:335:9: warning: \'reinterpret_cast\' from class \'I *\' to its virtual base \'E *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]"} | ["clang/test/SemaCXX/warn-reinterpret-base-class.cpp"]={"clang/test/SemaCXX/warn-reinterpret-base-class.cpp:123:10: warning: \'reinterpret_cast\' to class \'DVA *\' from its virtual base \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:128:10: warning: \'reinterpret_cast\' to class \'DDVA *\' from its virtual base \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:133:10: warning: \'reinterpret_cast\' to class \'DMA *\' from its virtual base \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:156:9: warning: \'reinterpret_cast\' to class \'DVA &\' from its virtual base \'A\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:161:9: warning: \'reinterpret_cast\' to class \'DDVA &\' from its virtual base \'A\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:166:9: warning: \'reinterpret_cast\' to class \'DMA &\' from its virtual base \'A\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:186:10: warning: \'reinterpret_cast\' from class \'DVA *\' to its virtual base \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:191:10: warning: \'reinterpret_cast\' from class \'DDVA *\' to its virtual base \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:196:10: warning: \'reinterpret_cast\' from class \'DDVA *\' to its virtual base \'DA *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:201:10: warning: \'reinterpret_cast\' from class \'DMA *\' to its virtual base \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:206:10: warning: \'reinterpret_cast\' from class \'DMA *\' to its virtual base \'DA *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:226:9: warning: \'reinterpret_cast\' from class \'DVA\' to its virtual base \'A &\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:231:9: warning: \'reinterpret_cast\' from class \'DDVA\' to its virtual base \'A &\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:236:9: warning: \'reinterpret_cast\' from class \'DDVA\' to its virtual base \'DA &\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:241:9: warning: \'reinterpret_cast\' from class \'DMA\' to its virtual base \'A &\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:246:9: warning: \'reinterpret_cast\' from class \'DMA\' to its virtual base \'DA &\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:273:9: warning: \'reinterpret_cast\' to class \'F *\' from its base at non-zero offset \'E *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:278:9: warning: \'reinterpret_cast\' to class \'G *\' from its base at non-zero offset \'E *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:284:9: warning: \'reinterpret_cast\' to class \'I *\' from its virtual base \'E *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:291:9: warning: \'reinterpret_cast\' to class \'I *\' from its virtual base \'F *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:299:9: warning: \'reinterpret_cast\' to class \'H *\' from its base at non-zero offset \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:303:9: warning: \'reinterpret_cast\' to class \'K\' (aka \'const F *\') from its base at non-zero offset \'E *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:310:9: warning: \'reinterpret_cast\' from class \'F *\' to its base at non-zero offset \'E *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:316:9: warning: \'reinterpret_cast\' from class \'G *\' to its base at non-zero offset \'E *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:326:9: warning: \'reinterpret_cast\' from class \'H *\' to its base at non-zero offset \'A *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:330:9: warning: \'reinterpret_cast\' from class \'I *\' to its virtual base \'F *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:335:9: warning: \'reinterpret_cast\' from class \'I *\' to its virtual base \'E *\' behaves differently from \'static_cast\' [-Wreinterpret-base-class]"} | ||
} | } | ||
}, | }, | ||
["warn_related_result_type_compatibility_class"]={ | ["warn_related_result_type_compatibility_class"]={ | ||
[b]="method is expected to return an instance of its class type %diff{$, but is declared to return $|, but is declared to return different type}0,1", | [b]="method is expected to return an instance of its class type %diff{$, but is declared to return $|, but is declared to return different type}0,1", | ||
[ | [d]=h, | ||
[ | [a]="method is expected to return an instance of its class type (?:(.*?), but is declared to return (.*?)|, but is declared to return different type)", | ||
[ | [e]=K, | ||
[ | [c]="Related Result Type Issue", | ||
[ | [f]={"33823727c80a",1307754570,"Implement Objective-C Related Result Type semantics.\n\nRelated result types apply Cocoa conventions t...","Implement Objective-C Related Result Type semantics.\n\nRelated result types apply Cocoa conventions to the type of message\nsends and property accesses to Objective-C methods that are known to\nalways return objects whose type is the same as the type of the\nreceiving class (or a subclass thereof), such as +alloc and\n-init. This tightens up static type safety for Objective-C, so that we\nnow diagnose mistakes like this:\n\nt.m:4:10: warning: incompatible pointer types initializing \'NSSet *\'\nwith an\n expression of type \'NSArray *\' [-Wincompatible-pointer-types]\n NSSet *array = [[NSArray alloc] init];\n ^ ~~~~~~~~~~~~~~~~~~~~~~\n/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:\nnote: \n instance method \'init\' is assumed to return an instance of its\n receiver\n type (\'NSArray *\')\n- (id)init;\n^\n\nIt also means that we get decent type inference when writing code in\nObjective-C++0x:\n\n auto array = [[NSMutableArray alloc] initWithObjects:@\"one\", @\"two\",nil];\n // ^ now infers NSMutableArray* rather than id\n\nllvm-svn: 132868"}, | ||
[ | [g]={{I,164,"void Sema::CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden) {\n if (Overridden->hasRelatedResultType() && !NewMethod->hasRelatedResultType()) {\n // ...\n if (CurrentClass) {\n Diag(NewMethod->getLocation(), diag::warn_related_result_type_compatibility_class) << Context.getObjCInterfaceType(CurrentClass) << ResultType << ResultTypeRange;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/related-result-type-inference.m"]={"clang/test/SemaObjC/related-result-type-inference.m:89:1: warning: method is expected to return an instance of its class type \'B\', but is declared to return \'Unrelated *\'","clang/test/SemaObjC/related-result-type-inference.m:96:1: warning: method is expected to return an instance of its class type \'C\', but is declared to return \'Unrelated *\'","clang/test/SemaObjC/related-result-type-inference.m:110:1: warning: method is expected to return an instance of its class type \'D\', but is declared to return \'Unrelated *\'","clang/test/SemaObjC/related-result-type-inference.m:114:1: warning: method is expected to return an instance of its class type \'D\', but is declared to return \'Unrelated *\'"} | ["clang/test/SemaObjC/related-result-type-inference.m"]={"clang/test/SemaObjC/related-result-type-inference.m:89:1: warning: method is expected to return an instance of its class type \'B\', but is declared to return \'Unrelated *\'","clang/test/SemaObjC/related-result-type-inference.m:96:1: warning: method is expected to return an instance of its class type \'C\', but is declared to return \'Unrelated *\'","clang/test/SemaObjC/related-result-type-inference.m:110:1: warning: method is expected to return an instance of its class type \'D\', but is declared to return \'Unrelated *\'","clang/test/SemaObjC/related-result-type-inference.m:114:1: warning: method is expected to return an instance of its class type \'D\', but is declared to return \'Unrelated *\'"} | ||
} | } | ||
}, | }, | ||
["warn_related_result_type_compatibility_protocol"]={ | ["warn_related_result_type_compatibility_protocol"]={ | ||
[b]="protocol method is expected to return an instance of the implementing class, but is declared to return %0", | [b]="protocol method is expected to return an instance of the implementing class, but is declared to return %0", | ||
[ | [d]=h, | ||
[ | [a]="protocol method is expected to return an instance of the implementing class, but is declared to return (.*?)", | ||
[ | [e]=K, | ||
[ | [c]="Related Result Type Issue", | ||
[ | [f]={"33823727c80a",1307754570,"Implement Objective-C Related Result Type semantics.\n\nRelated result types apply Cocoa conventions t...","Implement Objective-C Related Result Type semantics.\n\nRelated result types apply Cocoa conventions to the type of message\nsends and property accesses to Objective-C methods that are known to\nalways return objects whose type is the same as the type of the\nreceiving class (or a subclass thereof), such as +alloc and\n-init. This tightens up static type safety for Objective-C, so that we\nnow diagnose mistakes like this:\n\nt.m:4:10: warning: incompatible pointer types initializing \'NSSet *\'\nwith an\n expression of type \'NSArray *\' [-Wincompatible-pointer-types]\n NSSet *array = [[NSArray alloc] init];\n ^ ~~~~~~~~~~~~~~~~~~~~~~\n/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:\nnote: \n instance method \'init\' is assumed to return an instance of its\n receiver\n type (\'NSArray *\')\n- (id)init;\n^\n\nIt also means that we get decent type inference when writing code in\nObjective-C++0x:\n\n auto array = [[NSMutableArray alloc] initWithObjects:@\"one\", @\"two\",nil];\n // ^ now infers NSMutableArray* rather than id\n\nllvm-svn: 132868"}, | ||
[ | [g]={{I,170,"void Sema::CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden) {\n if (Overridden->hasRelatedResultType() && !NewMethod->hasRelatedResultType()) {\n // ...\n if (CurrentClass) {\n // ...\n } else {\n Diag(NewMethod->getLocation(), diag::warn_related_result_type_compatibility_protocol) << ResultType << ResultTypeRange;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/related-result-type-inference.m"]={"clang/test/SemaObjC/related-result-type-inference.m:125:1: warning: protocol method is expected to return an instance of the implementing class, but is declared to return \'int\'"} | ["clang/test/SemaObjC/related-result-type-inference.m"]={"clang/test/SemaObjC/related-result-type-inference.m:125:1: warning: protocol method is expected to return an instance of the implementing class, but is declared to return \'int\'"} | ||
} | } | ||
}, | }, | ||
["warn_remainder_division_by_zero"]={ | ["warn_remainder_division_by_zero"]={ | ||
[ | [i]={"div-by-zero","division-by-zero"}, | ||
[j]="division-by-zero", | |||
[ | |||
[b]="%select{remainder|division}0 by zero is undefined", | [b]="%select{remainder|division}0 by zero is undefined", | ||
[ | [d]=h, | ||
[ | [a]="(?:remainder|division) by zero is undefined", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdivision\\-by\\-zero[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"da7b27ff0b98",1447738809,Oc,Oc}, | ||
[ | [g]={{u,11430,"static void DiagnoseBadDivideOrRemainderValues(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsDiv) {\n // ...\n if (!RHS.get()->isValueDependent() && RHS.get()->EvaluateAsInt(RHSValue, S.Context) && RHSValue.Val.getInt() == 0)\n S.DiagRuntimeBehavior(Loc, RHS.get(), S.PDiag(diag::warn_remainder_division_by_zero) << IsDiv << RHS.get()->getSourceRange());"}}, | ||
[ | [k]={ | ||
["clang/test/Analysis/test-include.c"]={"clang/test/Analysis/test-include.c:12:13: warning: division by zero is undefined [-Wdivision-by-zero]","clang/test/Analysis/test-include.c:18:13: warning: division by zero is undefined [-Wdivision-by-zero]"} | ["clang/test/Analysis/test-include.c"]={"clang/test/Analysis/test-include.c:12:13: warning: division by zero is undefined [-Wdivision-by-zero]","clang/test/Analysis/test-include.c:18:13: warning: division by zero is undefined [-Wdivision-by-zero]"} | ||
} | } | ||
}, | }, | ||
["warn_require_const_init_added_too_late"]={ | ["warn_require_const_init_added_too_late"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="\'require_constant_initialization\' attribute added after initialization of variable", | [b]="\'require_constant_initialization\' attribute added after initialization of variable", | ||
[ | [d]=h, | ||
[ | [a]="\'require_constant_initialization\' attribute added after initialization of variable", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={tc,1567434909,kc,zc}, | ||
[ | [g]={{B,3173,"static void diagnoseMissingConstinit(Sema &S, const VarDecl *InitDecl, const ConstInitAttr *CIAttr, bool AttrBeforeInit) {\n // ...\n if (AttrBeforeInit) {\n // ...\n } else {\n // ...\n S.Diag(CIAttr->getLocation(), CIAttr->isConstinit() ? diag::err_constinit_added_too_late : diag::warn_require_const_init_added_too_late) << FixItHint::CreateRemoval(SourceRange(CIAttr->getLocation()));"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/attr-require-constant-initialization.cpp"]={"clang/test/SemaCXX/attr-require-constant-initialization.cpp:309:3: warning: \'require_constant_initialization\' attribute added after initialization of variable [-Wignored-attributes]","clang/test/SemaCXX/attr-require-constant-initialization.cpp:312:10: warning: \'require_constant_initialization\' attribute added after initialization of variable [-Wignored-attributes]"} | ["clang/test/SemaCXX/attr-require-constant-initialization.cpp"]={"clang/test/SemaCXX/attr-require-constant-initialization.cpp:309:3: warning: \'require_constant_initialization\' attribute added after initialization of variable [-Wignored-attributes]","clang/test/SemaCXX/attr-require-constant-initialization.cpp:312:10: warning: \'require_constant_initialization\' attribute added after initialization of variable [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_reserved_extern_symbol"]={ | ["warn_reserved_extern_symbol"]={ | ||
[ | [i]={Xc}, | ||
[j]=Xc, | |||
[ | |||
[b]="identifier %0 is reserved because %select{<ERROR>|it starts with \'_\' at global scope|it starts with \'_\' and has C language linkage|it starts with \'__\'|it starts with \'_\' followed by a capital letter|it contains \'__\'}1", | [b]="identifier %0 is reserved because %select{<ERROR>|it starts with \'_\' at global scope|it starts with \'_\' and has C language linkage|it starts with \'__\'|it starts with \'_\' followed by a capital letter|it contains \'__\'}1", | ||
[ | [d]=h, | ||
[ | [a]="identifier (.*?) is reserved because (?:it starts with \'_\' at global scope|it starts with \'_\' and has C language linkage|it starts with \'__\'|it starts with \'_\' followed by a capital letter|it contains \'__\')", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wreserved\\-identifier[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"b83b23275b74",1607502387,"Introduce -Wreserved-identifier\n\nWarn when a declaration uses an identifier that doesn\'t obey the re...","Introduce -Wreserved-identifier\n\nWarn when a declaration uses an identifier that doesn\'t obey the reserved\nidentifier rule from C and/or C++.\n\nDifferential Revision: https://reviews.llvm.org/D93095"}, | ||
[ | [g]={{B,6091,"void Sema::warnOnReservedIdentifier(const NamedDecl *D) {\n // ...\n if (Status != ReservedIdentifierStatus::NotReserved && !isFromSystemHeader(Context.getSourceManager(), D)) {\n Diag(D->getLocation(), diag::warn_reserved_extern_symbol) << D << static_cast<int>(Status);"},{Sb,512,"bool Sema::checkLiteralOperatorId(const CXXScopeSpec &SS, const UnqualifiedId &Name, bool IsUDSuffix) {\n // ...\n if (!IsUDSuffix) {\n // ...\n if (!PP.getSourceManager().isInSystemHeader(Loc)) {\n if (auto Hint = FixItHint::CreateReplacement(Name.getSourceRange(), (StringRef(\"operator\\\"\\\"\") + II->getName()).str()); isReservedInAllContexts(Status)) {\n Diag(Loc, diag::warn_reserved_extern_symbol) << II << static_cast<int>(Status) << Hint;"},{M,567,"StmtResult Sema::ActOnLabelStmt(SourceLocation IdentLoc, LabelDecl *TheDecl, SourceLocation ColonLoc, Stmt *SubStmt) {\n // ...\n if (isReservedInAllContexts(Status) && !Context.getSourceManager().isInSystemHeader(IdentLoc))\n Diag(IdentLoc, diag::warn_reserved_extern_symbol) << TheDecl << static_cast<int>(Status);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/reserved-identifier.cpp"]={"clang/test/SemaCXX/reserved-identifier.cpp:3:5: warning: identifier \'foo__bar\' is reserved because it contains \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:4:12: warning: identifier \'_bar\' is reserved because it starts with \'_\' at global scope [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:5:12: warning: identifier \'_Bar\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:6:5: warning: identifier \'_barbouille\' is reserved because it starts with \'_\' at global scope [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:8:23: warning: identifier \'_Reserved\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:9:16: warning: identifier \'__1\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:16:35: warning: identifier \'__toucan\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:19:9: warning: identifier \'_Barbotine\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:21:17: warning: identifier \'__\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:27:17: warning: identifier \'__\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:30:11: warning: identifier \'_Barbidur\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:32:8: warning: identifier \'__barbidou\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:35:5: warning: identifier \'__barbouille\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:38:5: warning: identifier \'__babar\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:43:7: warning: identifier \'__barbapapa\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:45:7: warning: identifier \'_Barbalala\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:48:12: warning: identifier \'__menu\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:49:3: warning: identifier \'__some\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:50:3: warning: identifier \'_Other\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:54:6: warning: identifier \'_Menu\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:55:3: warning: identifier \'_OtheR_\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:56:3: warning: identifier \'_other_\' is reserved because it starts with \'_\' at global scope [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:60:3: warning: identifier \'__some\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:61:3: warning: identifier \'_Other\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:62:3: warning: identifier \'_other\' is reserved because it starts with \'_\' at global scope [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:69:7: warning: identifier \'_Barbamama\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:79:24: warning: identifier \'_BarbeBleue\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:89:36: warning: identifier \'_SacreBleu\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:95:8: warning: identifier \'_BarbeRouge\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:97:8: warning: identifier \'_BarbeNoire\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:101:15: warning: identifier \'_barbegrise\' is reserved because it starts with \'_\' at global scope [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:111:18: warning: identifier \'_namespace_b\' is reserved because it starts with \'_\' and has C language linkage [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:113:19: warning: identifier \'_namespace_d\' is reserved because it starts with \'_\' and has C language linkage [-Wreserved-identifier]"} | ["clang/test/SemaCXX/reserved-identifier.cpp"]={"clang/test/SemaCXX/reserved-identifier.cpp:3:5: warning: identifier \'foo__bar\' is reserved because it contains \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:4:12: warning: identifier \'_bar\' is reserved because it starts with \'_\' at global scope [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:5:12: warning: identifier \'_Bar\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:6:5: warning: identifier \'_barbouille\' is reserved because it starts with \'_\' at global scope [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:8:23: warning: identifier \'_Reserved\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:9:16: warning: identifier \'__1\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:16:35: warning: identifier \'__toucan\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:19:9: warning: identifier \'_Barbotine\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:21:17: warning: identifier \'__\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:27:17: warning: identifier \'__\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:30:11: warning: identifier \'_Barbidur\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:32:8: warning: identifier \'__barbidou\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:35:5: warning: identifier \'__barbouille\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:38:5: warning: identifier \'__babar\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:43:7: warning: identifier \'__barbapapa\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:45:7: warning: identifier \'_Barbalala\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:48:12: warning: identifier \'__menu\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:49:3: warning: identifier \'__some\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:50:3: warning: identifier \'_Other\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:54:6: warning: identifier \'_Menu\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:55:3: warning: identifier \'_OtheR_\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:56:3: warning: identifier \'_other_\' is reserved because it starts with \'_\' at global scope [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:60:3: warning: identifier \'__some\' is reserved because it starts with \'__\' [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:61:3: warning: identifier \'_Other\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:62:3: warning: identifier \'_other\' is reserved because it starts with \'_\' at global scope [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:69:7: warning: identifier \'_Barbamama\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:79:24: warning: identifier \'_BarbeBleue\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:89:36: warning: identifier \'_SacreBleu\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:95:8: warning: identifier \'_BarbeRouge\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:97:8: warning: identifier \'_BarbeNoire\' is reserved because it starts with \'_\' followed by a capital letter [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:101:15: warning: identifier \'_barbegrise\' is reserved because it starts with \'_\' at global scope [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:111:18: warning: identifier \'_namespace_b\' is reserved because it starts with \'_\' and has C language linkage [-Wreserved-identifier]","clang/test/SemaCXX/reserved-identifier.cpp:113:19: warning: identifier \'_namespace_d\' is reserved because it starts with \'_\' and has C language linkage [-Wreserved-identifier]"} | ||
} | } | ||
}, | }, | ||
["warn_reserved_module_name"]={ | ["warn_reserved_module_name"]={ | ||
[ | [i]={Xc,"reserved-module-identifier"}, | ||
[j]="reserved-module-identifier", | |||
[ | |||
[b]="%0 is a reserved name for a module", | [b]="%0 is a reserved name for a module", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) is a reserved name for a module", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wreserved\\-module\\-identifier[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={lb,1625925174,mb,nb}, | ||
[ | [g]={{"clang/lib/Sema/SemaModule.cpp",167,"/// Tests whether the given identifier is reserved as a module name and\n/// diagnoses if it is. Returns true if a diagnostic is emitted and false\n/// otherwise.\nstatic bool DiagReservedModuleName(Sema &S, const IdentifierInfo *II, SourceLocation Loc) {\n // ...\n case Reserved:\n S.Diag(Loc, diag::warn_reserved_module_name) << II;"},{"clang/lib/Sema/SemaModule.cpp",274,"Sema::DeclGroupPtrTy Sema::ActOnModuleDecl(SourceLocation StartLoc, SourceLocation ModuleLoc, ModuleDeclKind MDK, ModuleIdPath Path, ModuleIdPath Partition, ModuleImportState &ImportState) {\n // ...\n if (!getSourceManager().isInSystemHeader(Path[0].second) && (FirstComponentName == \"std\" || (FirstComponentName.startswith(\"std\") && llvm::all_of(FirstComponentName.drop_front(3), &llvm::isDigit))))\n Diag(Path[0].second, diag::warn_reserved_module_name) << Path[0].first;"}} | ||
}, | }, | ||
["warn_ret_addr_label"]={ | ["warn_ret_addr_label"]={ | ||
[ | [i]={ic,"return-local-addr",Fc}, | ||
[j]=Fc, | |||
[ | |||
[b]="returning address of label, which is local", | [b]="returning address of label, which is local", | ||
[ | [d]=h, | ||
[ | [a]="returning address of label, which is local", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wreturn\\-stack\\-address[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"252d36e74caa",1256875318,"warn about returning the address of a label.\n\nllvm-svn: 85576","warn about returning the address of a label.\n\nllvm-svn: 85576"}, | ||
[ | [g]={{sb,8268,"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 // ...\n } else if (isa<AddrLabelExpr>(L)) {\n // ...\n Diag(DiagLoc, diag::warn_ret_addr_label) << DiagRange;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/statements.c"]={"clang/test/Sema/statements.c:34:10: warning: returning address of label, which is local [-Wreturn-stack-address]"} | ["clang/test/Sema/statements.c"]={"clang/test/Sema/statements.c:34:10: warning: returning address of label, which is local [-Wreturn-stack-address]"} | ||
} | } | ||
}, | }, | ||
["warn_ret_local_temp_addr_ref"]={ | ["warn_ret_local_temp_addr_ref"]={ | ||
[ | [i]={ic,"return-local-addr",Fc}, | ||
[j]=Fc, | |||
[ | |||
[b]="returning %select{address of|reference to}0 local temporary object", | [b]="returning %select{address of|reference to}0 local temporary object", | ||
[ | [d]=h, | ||
[ | [a]="returning (?:address of|reference to) local temporary object", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wreturn\\-stack\\-address[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"da7b27ff0b98",1447738809,Oc,Oc}, | ||
[ | [g]={{sb,8270,"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 // ...\n } else if (isa<AddrLabelExpr>(L)) {\n // ...\n } else {\n Diag(DiagLoc, diag::warn_ret_local_temp_addr_ref) << Entity.getType()->isReferenceType() << DiagRange;"}}, | ||
[ | [k]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15-star-this-capture.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15-star-this-capture.cpp:11:14: warning: returning reference to local temporary object [-Wreturn-stack-address]","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15-star-this-capture.cpp:17:14: warning: returning reference to local temporary object [-Wreturn-stack-address]"} | ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15-star-this-capture.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15-star-this-capture.cpp:11:14: warning: returning reference to local temporary object [-Wreturn-stack-address]","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15-star-this-capture.cpp:17:14: warning: returning reference to local temporary object [-Wreturn-stack-address]"} | ||
} | } | ||
}, | }, | ||
["warn_ret_stack_addr_ref"]={ | ["warn_ret_stack_addr_ref"]={ | ||
[ | [i]={ic,"return-local-addr",Fc}, | ||
[j]=Fc, | |||
[ | |||
[b]="%select{address of|reference to}0 stack memory associated with %select{local variable|parameter}2 %1 returned", | [b]="%select{address of|reference to}0 stack memory associated with %select{local variable|parameter}2 %1 returned", | ||
[ | [d]=h, | ||
[ | [a]="(?:address of|reference to) stack memory associated with (?:local variable|parameter) (.*?) returned", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wreturn\\-stack\\-address[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"da7b27ff0b98",1447738809,Oc,Oc}, | ||
[ | [g]={{sb,8258,"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 Diag(DiagLoc, diag::warn_ret_stack_addr_ref) << Entity.getType()->isReferenceType() << DRE->getDecl() << isa<ParmVarDecl>(DRE->getDecl()) << DiagRange;"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGen/pointer-to-int.c"]={"clang/test/CodeGen/pointer-to-int.c:11:10: warning: address of stack memory associated with local variable \'x\' returned [-Wreturn-stack-address]"} | ["clang/test/CodeGen/pointer-to-int.c"]={"clang/test/CodeGen/pointer-to-int.c:11:10: warning: address of stack memory associated with local variable \'x\' returned [-Wreturn-stack-address]"} | ||
} | } | ||
}, | }, | ||
["warn_return_missing_expr"]={ | ["warn_return_missing_expr"]={ | ||
[ | [i]={n,o,p,"return-type"}, | ||
[j]="return-type", | |||
[ | |||
[b]="non-void %select{function|method}1 %0 should return a value", | [b]="non-void %select{function|method}1 %0 should return a value", | ||
[ | [d]=Hb, | ||
[ | [a]="non\\-void (?:function|method) (.*?) should return a value", | ||
[ | [e]=" \\[[^\\]]*\\-Wreturn\\-type[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={vc,1237025389,xb,xb}, | ||
[ | [g]={{M,4141,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n // ...\n if (FnRetType->isVoidType()) {\n // ...\n } else if (!RetValExp && !HasDependentReturnType) {\n // ...\n if ((FD && FD->isInvalidDecl()) || FnRetType->containsErrors()) {\n // ...\n } else if (getLangOpts().CPlusPlus11 && FD && FD->isConstexpr()) {\n // ...\n } else {\n // ...\n unsigned DiagID = getLangOpts().C99 ? diag::ext_return_missing_expr : diag::warn_return_missing_expr;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/method-return-void.m"]={"clang/test/SemaObjC/method-return-void.m:8:14: error: non-void method \'foo\' should return a value [-Wreturn-type]"} | ["clang/test/SemaObjC/method-return-void.m"]={"clang/test/SemaObjC/method-return-void.m:8:14: error: non-void method \'foo\' should return a value [-Wreturn-type]"} | ||
} | } | ||
}, | }, | ||
["warn_return_typestate_for_unconsumable_type"]={ | ["warn_return_typestate_for_unconsumable_type"]={ | ||
[ | [i]={yb}, | ||
[j]=yb, | |||
[ | |||
[b]="return state set for an unconsumable type \'%0\'", | [b]="return state set for an unconsumable type \'%0\'", | ||
[ | [d]=h, | ||
[ | [a]="return state set for an unconsumable type \'(.*?)\'", | ||
[ | [e]=jc, | ||
[ | [c]=l, | ||
[ | [f]={"fc368259af1a",1378239098,"Consumed analysis: add return_typestate attribute.\nPatch by chris.wailes@gmail.com\n\nFunctions can no...","Consumed analysis: add return_typestate attribute.\nPatch by chris.wailes@gmail.com\n\nFunctions can now declare what state the consumable type the are returning will\nbe in. This is then used on the caller side and checked on the callee side.\nConstructors now use this attribute instead of the \'consumes\' attribute.\n\nllvm-svn: 189843"}, | ||
[ | [g]={{y,2122,"class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {\n // ...\n void warnReturnTypestateForUnconsumableType(SourceLocation Loc, StringRef TypeName) override {\n PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_return_typestate_for_unconsumable_type) << TypeName);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-consumed-parsing.cpp"]={"clang/test/SemaCXX/warn-consumed-parsing.cpp:14:38: warning: return state set for an unconsumable type \'int\' [-Wconsumed]"} | ["clang/test/SemaCXX/warn-consumed-parsing.cpp"]={"clang/test/SemaCXX/warn-consumed-parsing.cpp:14:38: warning: return state set for an unconsumable type \'int\' [-Wconsumed]"} | ||
} | } | ||
}, | }, | ||
["warn_return_typestate_mismatch"]={ | ["warn_return_typestate_mismatch"]={ | ||
[ | [i]={yb}, | ||
[j]=yb, | |||
[ | |||
[b]="return value not in expected state; expected \'%0\', observed \'%1\'", | [b]="return value not in expected state; expected \'%0\', observed \'%1\'", | ||
[ | [d]=h, | ||
[ | [a]="return value not in expected state; expected \'(.*?)\', observed \'(.*?)\'", | ||
[ | [e]=jc, | ||
[ | [c]=l, | ||
[ | [f]={"fc368259af1a",1378239098,"Consumed analysis: add return_typestate attribute.\nPatch by chris.wailes@gmail.com\n\nFunctions can no...","Consumed analysis: add return_typestate attribute.\nPatch by chris.wailes@gmail.com\n\nFunctions can now declare what state the consumable type the are returning will\nbe in. This is then used on the caller side and checked on the callee side.\nConstructors now use this attribute instead of the \'consumes\' attribute.\n\nllvm-svn: 189843"}, | ||
[ | [g]={{y,2131,"class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {\n // ...\n void warnReturnTypestateMismatch(SourceLocation Loc, StringRef ExpectedState, StringRef ObservedState) override {\n PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_return_typestate_mismatch) << ExpectedState << ObservedState);"}}, | ||
[ | [k]={ | ||
[ | [Tc]={"clang/test/SemaCXX/warn-consumed-analysis.cpp:78:3: warning: return value not in expected state; expected \'unconsumed\', observed \'consumed\' [-Wconsumed]"} | ||
} | } | ||
}, | }, | ||
["warn_return_value_size"]={ | ["warn_return_value_size"]={ | ||
[ | [i]={"large-by-value-copy"}, | ||
[j]="large-by-value-copy", | |||
[ | |||
[b]="return value of %0 is a large (%1 bytes) pass-by-value object; pass it by reference instead ?", | [b]="return value of %0 is a large (%1 bytes) pass-by-value object; pass it by reference instead ?", | ||
[ | [d]=h, | ||
[ | [a]="return value of (.*?) is a large \\((.*?) bytes\\) pass\\-by\\-value object; pass it by reference instead \\?", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wlarge\\-by\\-value\\-copy[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"af84ec0a9612",1290035514,"Introduce option -Wargument-larger-than[=N] which warns about function definitions if they take by-v...","Introduce option -Wargument-larger-than[=N] which warns about function definitions if they take by-value\nor return by-value any POD that is larger than some threshold (default is 64 bytes).\n\nImplements rdar://8548050.\n\nllvm-svn: 119583"}, | ||
[ | [g]={{B,14870,"void Sema::DiagnoseSizeOfParametersAndReturnValue(ArrayRef<ParmVarDecl *> Parameters, QualType ReturnTy, NamedDecl *D) {\n // ...\n // Warn if the return value is pass-by-value and larger than the specified\n // threshold.\n if (!ReturnTy->isDependentType() && ReturnTy.isPODType(Context)) {\n // ...\n if (Size > LangOpts.NumLargeByValueCopy)\n Diag(D->getLocation(), diag::warn_return_value_size) << D << Size;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-large-by-value-copy.cpp"]={"clang/test/SemaCXX/warn-large-by-value-copy.cpp:16:6: warning: return value of \'f101\' is a large (101 bytes) pass-by-value object; pass it by reference instead ? [-Wlarge-by-value-copy]","clang/test/SemaCXX/warn-large-by-value-copy.cpp:24:18: warning: return value of \'foo_template<rdar8548050::S101>\' is a large (101 bytes) pass-by-value object; pass it by reference instead ? [-Wlarge-by-value-copy]"} | ["clang/test/SemaCXX/warn-large-by-value-copy.cpp"]={"clang/test/SemaCXX/warn-large-by-value-copy.cpp:16:6: warning: return value of \'f101\' is a large (101 bytes) pass-by-value object; pass it by reference instead ? [-Wlarge-by-value-copy]","clang/test/SemaCXX/warn-large-by-value-copy.cpp:24:18: warning: return value of \'foo_template<rdar8548050::S101>\' is a large (101 bytes) pass-by-value object; pass it by reference instead ? [-Wlarge-by-value-copy]"} | ||
} | } | ||
}, | }, | ||
["warn_return_value_udt"]={ | ["warn_return_value_udt"]={ | ||
[ | [i]={n,o,p,"return-type","return-type-c-linkage"}, | ||
[j]="return-type-c-linkage", | |||
[ | |||
[b]="%0 has C-linkage specified, but returns user-defined type %1 which is incompatible with C", | [b]="%0 has C-linkage specified, but returns user-defined type %1 which is incompatible with C", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) has C\\-linkage specified, but returns user\\-defined type (.*?) which is incompatible with C", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wreturn\\-type\\-c\\-linkage[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"c2a9493a26f4",1328750494,"Adding support for warning when a non-C compatible user-defined type is returned from an extern \"C\" ...","Adding support for warning when a non-C compatible user-defined type is returned from an extern \"C\" function.\n\nFixes bug 6143\n\nllvm-svn: 150128"}, | ||
[ | [g]={{B,12022,"/// 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 (getLangOpts().CPlusPlus) {\n // ...\n // If this function is declared as being extern \"C\", then check to see if\n // the function returns a UDT (class, struct, or union type) that is not C\n // compatible, and if it does, warn the user.\n // But, issue any diagnostic on the first declaration only.\n if (Previous.empty() && NewFD->isExternC()) {\n // ...\n if (R->isIncompleteType() && !R->isVoidType())\n // ...\n else if (!R.isPODType(Context) && !R->isVoidType() && !R->isObjCObjectPointerType())\n Diag(NewFD->getLocation(), diag::warn_return_value_udt) << NewFD << R;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/function-extern-c.cpp"]={"clang/test/SemaCXX/function-extern-c.cpp:27:14: warning: \'f3\' has C-linkage specified, but returns user-defined type \'U\' which is incompatible with C [-Wreturn-type-c-linkage]","clang/test/SemaCXX/function-extern-c.cpp:28:14: warning: \'f0\' has C-linkage specified, but returns user-defined type \'S\' which is incompatible with C [-Wreturn-type-c-linkage]","clang/test/SemaCXX/function-extern-c.cpp:29:14: warning: \'f4\' has C-linkage specified, but returns user-defined type \'A\' which is incompatible with C [-Wreturn-type-c-linkage]","clang/test/SemaCXX/function-extern-c.cpp:77:3: warning: \'bbb\' has C-linkage specified, but returns user-defined type \'A\' which is incompatible with C [-Wreturn-type-c-linkage]","clang/test/SemaCXX/function-extern-c.cpp:78:3: warning: \'ccc\' has C-linkage specified, but returns user-defined type \'A\' which is incompatible with C [-Wreturn-type-c-linkage]"} | ["clang/test/SemaCXX/function-extern-c.cpp"]={"clang/test/SemaCXX/function-extern-c.cpp:27:14: warning: \'f3\' has C-linkage specified, but returns user-defined type \'U\' which is incompatible with C [-Wreturn-type-c-linkage]","clang/test/SemaCXX/function-extern-c.cpp:28:14: warning: \'f0\' has C-linkage specified, but returns user-defined type \'S\' which is incompatible with C [-Wreturn-type-c-linkage]","clang/test/SemaCXX/function-extern-c.cpp:29:14: warning: \'f4\' has C-linkage specified, but returns user-defined type \'A\' which is incompatible with C [-Wreturn-type-c-linkage]","clang/test/SemaCXX/function-extern-c.cpp:77:3: warning: \'bbb\' has C-linkage specified, but returns user-defined type \'A\' which is incompatible with C [-Wreturn-type-c-linkage]","clang/test/SemaCXX/function-extern-c.cpp:78:3: warning: \'ccc\' has C-linkage specified, but returns user-defined type \'A\' which is incompatible with C [-Wreturn-type-c-linkage]"} | ||
} | } | ||
}, | }, | ||
["warn_return_value_udt_incomplete"]={ | ["warn_return_value_udt_incomplete"]={ | ||
[ | [i]={n,o,p,"return-type","return-type-c-linkage"}, | ||
[j]="return-type-c-linkage", | |||
[ | |||
[b]="%0 has C-linkage specified, but returns incomplete type %1 which could be incompatible with C", | [b]="%0 has C-linkage specified, but returns incomplete type %1 which could be incompatible with C", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) has C\\-linkage specified, but returns incomplete type (.*?) which could be incompatible with C", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wreturn\\-type\\-c\\-linkage[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"84ce606b9108",1343152781,"Tweak warning text for returning incomplete type from extern \"C\" functions.\n\nA warning was added in ...","Tweak warning text for returning incomplete type from extern \"C\" functions.\n\nA warning was added in r150128 for returning non-C compatible\nuser-defined types from functions with C linkage.\n\nThis makes the text more clear for the case when the type isn\'t\ndecidedly non-C compatible, but incomplete.\n\nllvm-svn: 160681"}, | ||
[ | [g]={{B,12018,"/// 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 (getLangOpts().CPlusPlus) {\n // ...\n // If this function is declared as being extern \"C\", then check to see if\n // the function returns a UDT (class, struct, or union type) that is not C\n // compatible, and if it does, warn the user.\n // But, issue any diagnostic on the first declaration only.\n if (Previous.empty() && NewFD->isExternC()) {\n // ...\n if (R->isIncompleteType() && !R->isVoidType())\n Diag(NewFD->getLocation(), diag::warn_return_value_udt_incomplete) << NewFD << R;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/function-extern-c.cpp"]={"clang/test/SemaCXX/function-extern-c.cpp:40:31: warning: \'f12\' has C-linkage specified, but returns incomplete type \'struct mypodstruct\' which could be incompatible with C [-Wreturn-type-c-linkage]","clang/test/SemaCXX/function-extern-c.cpp:48:16: warning: \'f\' has C-linkage specified, but returns incomplete type \'A\' which could be incompatible with C [-Wreturn-type-c-linkage]"} | ["clang/test/SemaCXX/function-extern-c.cpp"]={"clang/test/SemaCXX/function-extern-c.cpp:40:31: warning: \'f12\' has C-linkage specified, but returns incomplete type \'struct mypodstruct\' which could be incompatible with C [-Wreturn-type-c-linkage]","clang/test/SemaCXX/function-extern-c.cpp:48:16: warning: \'f\' has C-linkage specified, but returns incomplete type \'A\' which could be incompatible with C [-Wreturn-type-c-linkage]"} | ||
} | } | ||
}, | }, | ||
["warn_riscv_repeated_interrupt_attribute"]={ | ["warn_riscv_repeated_interrupt_attribute"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="repeated RISC-V \'interrupt\' attribute", | [b]="repeated RISC-V \'interrupt\' attribute", | ||
[ | [d]=h, | ||
[ | [a]="repeated RISC\\-V \'interrupt\' attribute", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={"1eee1b771f43",1532626665," [RISCV] Add support for interrupt attribute\n\nSummary:\nClang supports the GNU style ``__attribute__(..."," [RISCV] Add support for interrupt attribute\n\nSummary:\nClang supports the GNU style ``__attribute__((interrupt))`` attribute on RISCV targets.\nPermissible values for this parameter are user, supervisor, and machine.\nIf there is no parameter, then it defaults to machine.\nReference: https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Function-Attributes.html\nBased on initial patch by Zhaoshi Zheng.\n\nReviewers: asb, aaron.ballman\n\nReviewed By: asb, aaron.ballman\n\nSubscribers: rkruppe, the_o, aaron.ballman, MartinMosbeck, brucehoult, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, mgrang, rogfer01, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D48412\n\nllvm-svn: 338045"}, | ||
[ | [g]={{w,7753,"static void handleRISCVInterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Warn about repeated attributes.\n if (const auto *A = D->getAttr<RISCVInterruptAttr>()) {\n S.Diag(AL.getRange().getBegin(), diag::warn_riscv_repeated_interrupt_attribute);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/riscv-interrupt-attr.c"]={"clang/test/Sema/riscv-interrupt-attr.c:41:38: warning: repeated RISC-V \'interrupt\' attribute [-Wignored-attributes]","clang/test/Sema/riscv-interrupt-attr.c:44:27: warning: repeated RISC-V \'interrupt\' attribute [-Wignored-attributes]"} | ["clang/test/Sema/riscv-interrupt-attr.c"]={"clang/test/Sema/riscv-interrupt-attr.c:41:38: warning: repeated RISC-V \'interrupt\' attribute [-Wignored-attributes]","clang/test/Sema/riscv-interrupt-attr.c:44:27: warning: repeated RISC-V \'interrupt\' attribute [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_root_inst_method_not_found"]={ | ["warn_root_inst_method_not_found"]={ | ||
[ | [i]={"objc-method-access"}, | ||
[j]="objc-method-access", | |||
[ | |||
[b]="instance method %0 is being used on \'Class\' which is not in the root class", | [b]="instance method %0 is being used on \'Class\' which is not in the root class", | ||
[ | [d]=h, | ||
[ | [a]="instance method (.*?) is being used on \'Class\' which is not in the root class", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-method\\-access[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"3baaffba6bc3",1241548477,"Issue a warning in odd case of instance method used\nin a \'Class\' receiver which is not a root instan...","Issue a warning in odd case of instance method used\nin a \'Class\' receiver which is not a root instance\nmethod.\n\nllvm-svn: 70987"}, | ||
[ | [g]={{U,3027,"/// 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 } else {\n // ...\n if (!Method) {\n // If not messaging \'self\', look for any factory method named \'Sel\'.\n if (!Receiver || !isSelfExpr(Receiver)) {\n // ...\n if (!Methods.empty()) {\n // ...\n // If we find an instance method, emit warning.\n if (Method->isInstanceMethod()) {\n if (const ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(Method->getDeclContext())) {\n if (ID->getSuperClass())\n Diag(SelLoc, diag::warn_root_inst_method_not_found) << Sel << SourceRange(LBracLoc, RBracLoc);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/inst-method-lookup-in-root.m"]={"clang/test/SemaObjC/inst-method-lookup-in-root.m:23:13: warning: instance method \'starboard\' is being used on \'Class\' which is not in the root class [-Wobjc-method-access]"} | ["clang/test/SemaObjC/inst-method-lookup-in-root.m"]={"clang/test/SemaObjC/inst-method-lookup-in-root.m:23:13: warning: instance method \'starboard\' is being used on \'Class\' which is not in the root class [-Wobjc-method-access]"} | ||
} | } | ||
}, | }, | ||
["warn_sampler_initializer_invalid_bits"]={ | ["warn_sampler_initializer_invalid_bits"]={ | ||
[ | [i]={"spir-compat","spirv-compat"}, | ||
[j]="spir-compat", | |||
[ | |||
[b]="sampler initializer has invalid %0 bits", | [b]="sampler initializer has invalid %0 bits", | ||
[ | [d]=h, | ||
[ | [a]="sampler initializer has invalid (.*?) bits", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wspir\\-compat[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"0bc4b2d33731",1469733990,"[OpenCL] Generate opaque type for sampler_t and function call for the initializer\n\nCurrently Clang u...","[OpenCL] Generate opaque type for sampler_t and function call for the initializer\n\nCurrently Clang use int32 to represent sampler_t, which have been a source of issue for some backends, because in some backends sampler_t cannot be represented by int32. They have to depend on kernel argument metadata and use IPA to find the sampler arguments and global variables and transform them to target specific sampler type.\n\nThis patch uses opaque pointer type opencl.sampler_t* for sampler_t. For each use of file-scope sampler variable, it generates a function call of __translate_sampler_initializer. For each initialization of function-scope sampler variable, it generates a function call of __translate_sampler_initializer.\n\nEach builtin library can implement its own __translate_sampler_initializer(). Since the real sampler type tends to be architecture dependent, allowing it to be initialized by a library function simplifies backend design. A typical implementation of __translate_sampler_initializer could be a table lookup of real sampler literal values. Since its argument is always a literal, the returned pointer is known at compile time and easily optimized to finally become some literal values directly put into image read instructions.\n\nThis patch is partially based on Alexey Sotkin\'s work in Khronos Clang (https://github.com/KhronosGroup/SPIR/commit/3d4eec61623502fc306e8c67c9868be2b136e42b).\n\nDifferential Revision: https://reviews.llvm.org/D21567\n\nllvm-svn: 277024"}, | ||
[ | [g]={{sb,9366,"ExprResult InitializationSequence::Perform(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType) {\n // ...\n for (step_iterator Step = step_begin(), StepEnd = step_end(); Step != StepEnd; ++Step) {\n // ...\n case SK_OCLSamplerInit: {\n // ...\n // Case 1\n if (Entity.isParameterKind()) {\n // ...\n } else {\n // ...\n if (FilterMode != 1 && FilterMode != 2 && !S.getOpenCLOptions().isAvailableOption(\"cl_intel_device_side_avc_motion_estimation\", S.getLangOpts()))\n S.Diag(Kind.getLocation(), diag::warn_sampler_initializer_invalid_bits) << \"Filter Mode\";"},{sb,9370,"ExprResult InitializationSequence::Perform(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType) {\n // ...\n for (step_iterator Step = step_begin(), StepEnd = step_end(); Step != StepEnd; ++Step) {\n // ...\n case SK_OCLSamplerInit: {\n // ...\n // Case 1\n if (Entity.isParameterKind()) {\n // ...\n } else {\n // ...\n if (AddressingMode > 4)\n S.Diag(Kind.getLocation(), diag::warn_sampler_initializer_invalid_bits) << \"Addressing Mode\";"}}, | ||
[ | [k]={ | ||
["clang/test/SemaOpenCL/sampler_t.cl"]={"clang/test/SemaOpenCL/sampler_t.cl:21:20: warning: sampler initializer has invalid Filter Mode bits [-Wspir-compat]","clang/test/SemaOpenCL/sampler_t.cl:26:20: warning: sampler initializer has invalid Addressing Mode bits [-Wspir-compat]"} | ["clang/test/SemaOpenCL/sampler_t.cl"]={"clang/test/SemaOpenCL/sampler_t.cl:21:20: warning: sampler initializer has invalid Filter Mode bits [-Wspir-compat]","clang/test/SemaOpenCL/sampler_t.cl:26:20: warning: sampler initializer has invalid Addressing Mode bits [-Wspir-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_scanf_nonzero_width"]={ | ["warn_scanf_nonzero_width"]={ | ||
[ | [i]={n,o,H,p}, | ||
[j]=H, | |||
[ | |||
[b]="zero field width in scanf format string is unused", | [b]="zero field width in scanf format string is unused", | ||
[ | [d]=h, | ||
[ | [a]="zero field width in scanf format string is unused", | ||
[ | [e]=ob, | ||
[ | [c]=ab, | ||
[ | [f]={"0208793e4101",1279246282,"Add most of the boilerplate support for scanf format string checking. This includes\nhandling the pa...","Add most of the boilerplate support for scanf format string checking. This includes\nhandling the parsing of scanf format strings and hooking the checking into Sema.\nMost of this checking logic piggybacks on what was already there for checking printf format\nstrings, but the checking logic has been refactored to support both.\n\nWhat is left to be done is to support argument type checking in format strings and of course\nfix the usual tail of bugs that will follow.\n\nllvm-svn: 108500"}, | ||
[ | [g]={{r,11516,"bool CheckScanfHandler::HandleScanfSpecifier(const analyze_scanf::ScanfSpecifier &FS, const char *startSpecifier, unsigned specifierLen) {\n // ...\n if (Amt.getHowSpecified() == OptionalAmount::Constant) {\n if (Amt.getConstantAmount() == 0) {\n // ...\n EmitFormatDiagnostic(S.PDiag(diag::warn_scanf_nonzero_width), getLocationOfByte(Amt.getStart()),"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/format-strings-scanf.c"]={"clang/test/Sema/format-strings-scanf.c:40:11: warning: zero field width in scanf format string is unused [-Wformat]","clang/test/Sema/format-strings-scanf.c:41:11: warning: zero field width in scanf format string is unused [-Wformat]","clang/test/Sema/format-strings-scanf.c:83:9: warning: zero field width in scanf format string is unused [-Wformat]","clang/test/Sema/format-strings-scanf.c:84:11: warning: zero field width in scanf format string is unused [-Wformat]"} | ["clang/test/Sema/format-strings-scanf.c"]={"clang/test/Sema/format-strings-scanf.c:40:11: warning: zero field width in scanf format string is unused [-Wformat]","clang/test/Sema/format-strings-scanf.c:41:11: warning: zero field width in scanf format string is unused [-Wformat]","clang/test/Sema/format-strings-scanf.c:83:9: warning: zero field width in scanf format string is unused [-Wformat]","clang/test/Sema/format-strings-scanf.c:84:11: warning: zero field width in scanf format string is unused [-Wformat]"} | ||
} | } | ||
}, | }, | ||
["warn_scanf_scanlist_incomplete"]={ | ["warn_scanf_scanlist_incomplete"]={ | ||
[ | [i]={n,o,H,p}, | ||
[j]=H, | |||
[ | |||
[b]="no closing \']\' for \'%%[\' in scanf format string", | [b]="no closing \']\' for \'%%[\' in scanf format string", | ||
[ | [d]=h, | ||
[ | [a]="no closing \'\\]\' for \'%\\[\' in scanf format string", | ||
[ | [e]=ob, | ||
[ | [c]=ab, | ||
[ | [f]={"c618728e8dbc",1279304876,"Tweak zero-field width in scanf format string diagnostic.\n\nllvm-svn: 108541","Tweak zero-field width in scanf format string diagnostic.\n\nllvm-svn: 108541"}, | ||
[ | [g]={{r,11469,"void CheckScanfHandler::HandleIncompleteScanList(const char *start, const char *end) { EmitFormatDiagnostic(S.PDiag(diag::warn_scanf_scanlist_incomplete), getLocationOfByte(end), /*IsStringLocation*/ true, getSpecifierRange(start, end - start)); }"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/format-strings-scanf.c"]={"clang/test/Sema/format-strings-scanf.c:42:22: warning: no closing \']\' for \'%[\' in scanf format string [-Wformat]","clang/test/Sema/format-strings-scanf.c:86:9: warning: no closing \']\' for \'%[\' in scanf format string [-Wformat]","clang/test/Sema/format-strings-scanf.c:87:12: warning: no closing \']\' for \'%[\' in scanf format string [-Wformat]","clang/test/Sema/format-strings-scanf.c:105:15: warning: no closing \']\' for \'%[\' in scanf format string [-Wformat]","clang/test/Sema/format-strings-scanf.c:106:19: warning: no closing \']\' for \'%[\' in scanf format string [-Wformat]","clang/test/Sema/format-strings-scanf.c:107:21: warning: no closing \']\' for \'%[\' in scanf format string [-Wformat]"} | ["clang/test/Sema/format-strings-scanf.c"]={"clang/test/Sema/format-strings-scanf.c:42:22: warning: no closing \']\' for \'%[\' in scanf format string [-Wformat]","clang/test/Sema/format-strings-scanf.c:86:9: warning: no closing \']\' for \'%[\' in scanf format string [-Wformat]","clang/test/Sema/format-strings-scanf.c:87:12: warning: no closing \']\' for \'%[\' in scanf format string [-Wformat]","clang/test/Sema/format-strings-scanf.c:105:15: warning: no closing \']\' for \'%[\' in scanf format string [-Wformat]","clang/test/Sema/format-strings-scanf.c:106:19: warning: no closing \']\' for \'%[\' in scanf format string [-Wformat]","clang/test/Sema/format-strings-scanf.c:107:21: warning: no closing \']\' for \'%[\' in scanf format string [-Wformat]"} | ||
} | } | ||
}, | }, | ||
["warn_second_arg_of_va_start_not_last_named_param"]={ | ["warn_second_arg_of_va_start_not_last_named_param"]={ | ||
[ | [i]={sc}, | ||
[j]=sc, | |||
[ | |||
[b]="second argument to \'va_start\' is not the last named parameter", | [b]="second argument to \'va_start\' is not the last named parameter", | ||
[ | [d]=h, | ||
[ | [a]="second argument to \'va_start\' is not the last named parameter", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wvarargs[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"05164816f0ea",1461003053,"Clarifying the wording of this diagnostic; it confused parameter and argument.\n\nllvm-svn: 266644","Clarifying the wording of this diagnostic; it confused parameter and argument.\n\nllvm-svn: 266644"}, | ||
[ | [g]={{r,8155,"/// Check the arguments to \'__builtin_va_start\' or \'__builtin_ms_va_start\'\n/// for validity. Emit an error and return true on failure; return false\n/// on success.\nbool Sema::SemaBuiltinVAStart(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (!SecondArgIsLastNamedArgument)\n Diag(TheCall->getArg(1)->getBeginLoc(), diag::warn_second_arg_of_va_start_not_last_named_param);"}}, | ||
[ | [k]={ | ||
["clang/test/C/C2x/n2975.c"]={"clang/test/C/C2x/n2975.c:49:28: warning: second argument to \'va_start\' is not the last named parameter [-Wvarargs]"} | ["clang/test/C/C2x/n2975.c"]={"clang/test/C/C2x/n2975.c:49:28: warning: second argument to \'va_start\' is not the last named parameter [-Wvarargs]"} | ||
} | } | ||
}, | }, | ||
["warn_second_parameter_to_va_arg_never_compatible"]={ | ["warn_second_parameter_to_va_arg_never_compatible"]={ | ||
[ | [i]={sc}, | ||
[j]=sc, | |||
[ | |||
[b]="second argument to \'va_arg\' is of promotable type %0; this va_arg has undefined behavior because arguments will be promoted to %1", | [b]="second argument to \'va_arg\' is of promotable type %0; this va_arg has undefined behavior because arguments will be promoted to %1", | ||
[ | [d]=h, | ||
[ | [a]="second argument to \'va_arg\' is of promotable type (.*?); this va_arg has undefined behavior because arguments will be promoted to (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wvarargs[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"6290ae476ee6",1310420759,"Add diagnostic for constructs like \"va_arg(l, float)\" which have undefined behavior. PR10201.\n\nllvm-...","Add diagnostic for constructs like \"va_arg(l, float)\" which have undefined behavior. PR10201.\n\nllvm-svn: 134926"}, | ||
[ | [g]={{u,17337,"ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc) {\n // ...\n if (!TInfo->getType()->isDependentType()) {\n // ...\n if (!PromoteType.isNull())\n DiagRuntimeBehavior(TInfo->getTypeLoc().getBeginLoc(), E, PDiag(diag::warn_second_parameter_to_va_arg_never_compatible) << TInfo->getType() << PromoteType << TInfo->getTypeLoc().getSourceRange());"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/varargs-x86-64.c"]={"clang/test/Sema/varargs-x86-64.c:71:32: warning: second argument to \'va_arg\' is of promotable type \'float\'; this va_arg has undefined behavior because arguments will be promoted to \'double\' [-Wvarargs]","clang/test/Sema/varargs-x86-64.c:73:32: warning: second argument to \'va_arg\' is of promotable type \'short\'; this va_arg has undefined behavior because arguments will be promoted to \'int\' [-Wvarargs]","clang/test/Sema/varargs-x86-64.c:74:32: warning: second argument to \'va_arg\' is of promotable type \'char\'; this va_arg has undefined behavior because arguments will be promoted to \'int\' [-Wvarargs]"} | ["clang/test/Sema/varargs-x86-64.c"]={"clang/test/Sema/varargs-x86-64.c:71:32: warning: second argument to \'va_arg\' is of promotable type \'float\'; this va_arg has undefined behavior because arguments will be promoted to \'double\' [-Wvarargs]","clang/test/Sema/varargs-x86-64.c:73:32: warning: second argument to \'va_arg\' is of promotable type \'short\'; this va_arg has undefined behavior because arguments will be promoted to \'int\' [-Wvarargs]","clang/test/Sema/varargs-x86-64.c:74:32: warning: second argument to \'va_arg\' is of promotable type \'char\'; this va_arg has undefined behavior because arguments will be promoted to \'int\' [-Wvarargs]"} | ||
} | } | ||
}, | }, | ||
["warn_second_parameter_to_va_arg_not_pod"]={ | ["warn_second_parameter_to_va_arg_not_pod"]={ | ||
[ | [i]={Wc,lc}, | ||
[j]=lc, | |||
[ | |||
[b]="second argument to \'va_arg\' is of non-POD type %0", | [b]="second argument to \'va_arg\' is of non-POD type %0", | ||
[ | [d]=Hb, | ||
[ | [a]="second argument to \'va_arg\' is of non\\-POD type (.*?)", | ||
[ | [e]=" \\[[^\\]]*\\-Wnon\\-pod\\-varargs[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"254a5c07e7c9",1307947023,"Give a diagnostic when using non-POD types in a va_arg\n\nllvm-svn: 132905","Give a diagnostic when using non-POD types in a va_arg\n\nllvm-svn: 132905"}, | ||
[ | [g]={{u,17289,"ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc) {\n // ...\n if (!TInfo->getType()->isDependentType()) {\n // ...\n if (!TInfo->getType().isPODType(Context)) {\n Diag(TInfo->getTypeLoc().getBeginLoc(), TInfo->getType()->isObjCLifetimeType() ? diag::warn_second_parameter_to_va_arg_ownership_qualified : diag::warn_second_parameter_to_va_arg_not_pod) << TInfo->getType() << TInfo->getTypeLoc().getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/vararg-non-pod.cpp"]={"clang/test/SemaCXX/vararg-non-pod.cpp:177:32: warning: second argument to \'va_arg\' is of non-POD type \'C\' [-Wnon-pod-varargs]"} | ["clang/test/SemaCXX/vararg-non-pod.cpp"]={"clang/test/SemaCXX/vararg-non-pod.cpp:177:32: warning: second argument to \'va_arg\' is of non-POD type \'C\' [-Wnon-pod-varargs]"} | ||
} | } | ||
}, | }, | ||
["warn_second_parameter_to_va_arg_ownership_qualified"]={ | ["warn_second_parameter_to_va_arg_ownership_qualified"]={ | ||
[ | [i]={Wc,lc}, | ||
[j]=lc, | |||
[ | |||
[b]="second argument to \'va_arg\' is of ARC ownership-qualified type %0", | [b]="second argument to \'va_arg\' is of ARC ownership-qualified type %0", | ||
[ | [d]=Hb, | ||
[ | [a]="second argument to \'va_arg\' is of ARC ownership\\-qualified type (.*?)", | ||
[ | [e]=" \\[[^\\]]*\\-Wnon\\-pod\\-varargs[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"7e1eb935dbc3",1312008327,"When complaining about a non-POD second argument to va_arg, use a\nspecial diagnostic for ARC ownersh...","When complaining about a non-POD second argument to va_arg, use a\nspecial diagnostic for ARC ownership-qualified types. We wouldn\'t want\nto expose Objective-C programmers to the term \"POD\", would we? Fixes\n<rdar://problem/9772982>.\n\nllvm-svn: 136558"}, | ||
[ | [g]={{u,17234,"ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc) {\n // ...\n if (!TInfo->getType()->isDependentType()) {\n // ...\n if (!TInfo->getType().isPODType(Context)) {\n Diag(TInfo->getTypeLoc().getBeginLoc(), TInfo->getType()->isObjCLifetimeType() ? diag::warn_second_parameter_to_va_arg_ownership_qualified : diag::warn_second_parameter_to_va_arg_not_pod) << TInfo->getType() << TInfo->getTypeLoc().getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/arc-non-pod-memaccess.m"]={"clang/test/SemaObjC/arc-non-pod-memaccess.m:61:35: error: second argument to \'va_arg\' is of ARC ownership-qualified type \'__strong id\' [-Wnon-pod-varargs]"} | ["clang/test/SemaObjC/arc-non-pod-memaccess.m"]={"clang/test/SemaObjC/arc-non-pod-memaccess.m:61:35: error: second argument to \'va_arg\' is of ARC ownership-qualified type \'__strong id\' [-Wnon-pod-varargs]"} | ||
} | } | ||
}, | }, | ||
["warn_self_assignment_builtin"]={ | ["warn_self_assignment_builtin"]={ | ||
[ | [i]={n,o,p,"self-assign"}, | ||
[j]="self-assign", | |||
[ | |||
[b]="explicitly assigning value of variable of type %0 to itself%select{|; did you mean to assign to member %2?}1", | [b]="explicitly assigning value of variable of type %0 to itself%select{|; did you mean to assign to member %2?}1", | ||
[ | [d]=h, | ||
[ | [a]="explicitly assigning value of variable of type (.*?) to itself(?:|; did you mean to assign to member (.*?)\\?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wself\\-assign[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"6ed0fad9996d",1524519321,"[Sema] Add -Wno-self-assign-overloaded\n\nSummary:\nIt seems there isn\'t much enthusiasm for `-wtest` D...","[Sema] Add -Wno-self-assign-overloaded\n\nSummary:\nIt seems there isn\'t much enthusiasm for `-wtest` D45685.\n\nThis is more conservative version, which i had in the very first\nrevision of D44883, but that \'erroneously\' got removed because of the review.\n\n**Based on some [irc] discussions, it must really be documented that\nwe want all the new diagnostics to have their own flags, to ease\nrollouts, transitions, etc.**\n\nPlease do note that i\'m only adding `-Wno-self-assign-overloaded`,\nbut not `-Wno-self-assign-field-overloaded`, because i\'m honestly\nnot aware of any false-positives from the `-field` variant,\nbut i can just as easily add it if wanted.\nhttps://reviews.llvm.org/D44883#1068561\n\nReviewers: dblaikie, aaron.ballman, thakis, rjmccall, rsmith\n\nReviewed By: dblaikie\n\nSubscribers: Quuxplusone, chandlerc, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D45766\n\nllvm-svn: 330651"}, | ||
[ | [g]={{u,15295,"/// DiagnoseSelfAssignment - Emits a warning if a value is assigned to itself.\n/// This warning suppressed in the event of macro expansions.\nstatic void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr, SourceLocation OpLoc, bool IsBuiltin) {\n // ...\n auto Diag = S.Diag(OpLoc, IsBuiltin ? diag::warn_self_assignment_builtin : diag::warn_self_assignment_overloaded) << LHSDeclRef->getType() << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/member-init.cpp"]={"clang/test/SemaCXX/member-init.cpp:103:25: warning: explicitly assigning value of variable of type \'Sprite\' to itself [-Wself-assign-overloaded]"} | ["clang/test/SemaCXX/member-init.cpp"]={"clang/test/SemaCXX/member-init.cpp:103:25: warning: explicitly assigning value of variable of type \'Sprite\' to itself [-Wself-assign-overloaded]"} | ||
} | } | ||
}, | }, | ||
["warn_self_assignment_overloaded"]={ | ["warn_self_assignment_overloaded"]={ | ||
[ | [i]={n,o,p,"self-assign","self-assign-overloaded"}, | ||
[j]="self-assign-overloaded", | |||
[ | |||
[b]="explicitly assigning value of variable of type %0 to itself%select{|; did you mean to assign to member %2?}1", | [b]="explicitly assigning value of variable of type %0 to itself%select{|; did you mean to assign to member %2?}1", | ||
[ | [d]=h, | ||
[ | [a]="explicitly assigning value of variable of type (.*?) to itself(?:|; did you mean to assign to member (.*?)\\?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wself\\-assign\\-overloaded[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"6ed0fad9996d",1524519321,"[Sema] Add -Wno-self-assign-overloaded\n\nSummary:\nIt seems there isn\'t much enthusiasm for `-wtest` D...","[Sema] Add -Wno-self-assign-overloaded\n\nSummary:\nIt seems there isn\'t much enthusiasm for `-wtest` D45685.\n\nThis is more conservative version, which i had in the very first\nrevision of D44883, but that \'erroneously\' got removed because of the review.\n\n**Based on some [irc] discussions, it must really be documented that\nwe want all the new diagnostics to have their own flags, to ease\nrollouts, transitions, etc.**\n\nPlease do note that i\'m only adding `-Wno-self-assign-overloaded`,\nbut not `-Wno-self-assign-field-overloaded`, because i\'m honestly\nnot aware of any false-positives from the `-field` variant,\nbut i can just as easily add it if wanted.\nhttps://reviews.llvm.org/D44883#1068561\n\nReviewers: dblaikie, aaron.ballman, thakis, rjmccall, rsmith\n\nReviewed By: dblaikie\n\nSubscribers: Quuxplusone, chandlerc, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D45766\n\nllvm-svn: 330651"}, | ||
[ | [g]={{u,15331,"/// DiagnoseSelfAssignment - Emits a warning if a value is assigned to itself.\n/// This warning suppressed in the event of macro expansions.\nstatic void DiagnoseSelfAssignment(Sema &S, Expr *LHSExpr, Expr *RHSExpr, SourceLocation OpLoc, bool IsBuiltin) {\n // ...\n auto Diag = S.Diag(OpLoc, IsBuiltin ? diag::warn_self_assignment_builtin : diag::warn_self_assignment_overloaded) << LHSDeclRef->getType() << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();"}} | ||
}, | }, | ||
["warn_self_move"]={ | ["warn_self_move"]={ | ||
[ | [i]={n,n,o,o,p,p,"move","self-move"}, | ||
[j]="self-move", | |||
[ | |||
[b]="explicitly moving variable of type %0 to itself%select{|; did you mean to move to member %2?}1", | [b]="explicitly moving variable of type %0 to itself%select{|; did you mean to move to member %2?}1", | ||
[ | [d]=h, | ||
[ | [a]="explicitly moving variable of type (.*?) to itself(?:|; did you mean to move to member (.*?)\\?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wself\\-move[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"17ddb829aaed",1420869858,"Add a new warning, -Wself-move, to Clang.\n\n-Wself-move is similiar to -Wself-assign. This warning i...","Add a new warning, -Wself-move, to Clang.\n\n-Wself-move is similiar to -Wself-assign. This warning is triggered when\na value is attempted to be moved to itself. See r221008 for a bug that\nwould have been caught with this warning.\n\nllvm-svn: 225581"}, | ||
[ | [g]={{r,17998,"/// DiagnoseSelfMove - Emits a warning if a value is moved to itself.\nvoid Sema::DiagnoseSelfMove(const Expr *LHSExpr, const Expr *RHSExpr, SourceLocation OpLoc) {\n // ...\n // Two DeclRefExpr\'s, check that the decls are the same.\n if (LHSDeclRef && RHSDeclRef) {\n // ...\n auto D = Diag(OpLoc, diag::warn_self_move) << LHSExpr->getType() << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();"},{r,18041,"/// DiagnoseSelfMove - Emits a warning if a value is moved to itself.\nvoid Sema::DiagnoseSelfMove(const Expr *LHSExpr, const Expr *RHSExpr, SourceLocation OpLoc) {\n // ...\n if (LHSDeclRef && RHSDeclRef) {\n // ...\n Diag(OpLoc, diag::warn_self_move) << LHSExpr->getType() << 0 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();"},{r,18048,"/// DiagnoseSelfMove - Emits a warning if a value is moved to itself.\nvoid Sema::DiagnoseSelfMove(const Expr *LHSExpr, const Expr *RHSExpr, SourceLocation OpLoc) {\n // ...\n if (isa<CXXThisExpr>(LHSBase) && isa<CXXThisExpr>(RHSBase))\n Diag(OpLoc, diag::warn_self_move) << LHSExpr->getType() << 0 << LHSExpr->getSourceRange() << RHSExpr->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-self-move.cpp"]={"clang/test/SemaCXX/warn-self-move.cpp:16:5: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:17:7: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:20:5: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:26:10: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:27:12: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:30:10: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:37:7: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:40:13: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:43:7: warning: explicitly moving variable of type \'int\' to itself; did you mean to move to member \'x\'? [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:52:5: warning: explicitly moving variable of type \'A\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:55:5: warning: explicitly moving variable of type \'B\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:56:7: warning: explicitly moving variable of type \'A\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:59:5: warning: explicitly moving variable of type \'C\' to itself [-Wself-move]"} | ["clang/test/SemaCXX/warn-self-move.cpp"]={"clang/test/SemaCXX/warn-self-move.cpp:16:5: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:17:7: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:20:5: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:26:10: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:27:12: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:30:10: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:37:7: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:40:13: warning: explicitly moving variable of type \'int\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:43:7: warning: explicitly moving variable of type \'int\' to itself; did you mean to move to member \'x\'? [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:52:5: warning: explicitly moving variable of type \'A\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:55:5: warning: explicitly moving variable of type \'B\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:56:7: warning: explicitly moving variable of type \'A\' to itself [-Wself-move]","clang/test/SemaCXX/warn-self-move.cpp:59:5: warning: explicitly moving variable of type \'C\' to itself [-Wself-move]"} | ||
} | } | ||
}, | }, | ||
["warn_semicolon_before_method_body"]={ | ["warn_semicolon_before_method_body"]={ | ||
[ | [i]={s,n,Vb,"semicolon-before-method-body"}, | ||
[j]="semicolon-before-method-body", | |||
[ | |||
[b]="semicolon before method body is ignored", | [b]="semicolon before method body is ignored", | ||
[ | [d]=h, | ||
[ | [a]="semicolon before method body is ignored", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wsemicolon\\-before\\-method\\-body[^\\]]*\\]", | ||
[ | [c]=v, | ||
[ | [f]={"f9a28abe8d1e",1257891389,"Make -Wsemicolon-before-method-body opt-in (and part of -Wextra). Addresses <rdar://problem/7381735...","Make -Wsemicolon-before-method-body opt-in (and part of -Wextra). Addresses <rdar://problem/7381735>.\n\nllvm-svn: 86731"}, | ||
[ | [g]={{"clang/lib/Parse/ParseObjc.cpp",2759,"/// objc-method-def: objc-method-proto \';\'[opt] \'{\' body \'}\'\n///\nDecl *Parser::ParseObjCMethodDefinition() {\n // ...\n // parse optional \';\'\n if (Tok.is(tok::semi)) {\n if (CurParsedObjCImpl) {\n Diag(Tok, diag::warn_semicolon_before_method_body) << FixItHint::CreateRemoval(Tok.getLocation());"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/objc-string-constant.m"]={"clang/test/SemaObjC/objc-string-constant.m:32:20: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]"} | ["clang/test/SemaObjC/objc-string-constant.m"]={"clang/test/SemaObjC/objc-string-constant.m:32:20: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]"} | ||
} | } | ||
}, | }, | ||
["warn_setter_getter_impl_required"]={ | ["warn_setter_getter_impl_required"]={ | ||
[ | [i]={"objc-property-implementation"}, | ||
[j]="objc-property-implementation", | |||
[ | |||
[b]="property %0 requires method %1 to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation", | [b]="property %0 requires method %1 to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation", | ||
[ | [d]=h, | ||
[ | [a]="property (.*?) requires method (.*?) to be defined \\- use @synthesize, @dynamic or provide a method implementation in this class implementation", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-implementation[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"6c6aea914ab0",1239750921,"Diagnose properties which have no implementations;\neither unimplemented setter/getter or no\nimplemen...","Diagnose properties which have no implementations;\neither unimplemented setter/getter or no\nimplementation directive.\n\nllvm-svn: 69098"}, | ||
[ | [g]={{N,2019,"static void DiagnoseUnimplementedAccessor(Sema &S, ObjCInterfaceDecl *PrimaryClass, Selector Method, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, ObjCCategoryDecl *C, ObjCPropertyDecl *Prop, llvm::SmallPtrSet<const ObjCMethodDecl *, 8> &SMap) {\n // ...\n // When reporting on missing property setter/getter implementation in\n // categories, do not report when they are declared in primary class,\n // class\'s protocol, or one of it super classes. This is because,\n // the class is going to implement them.\n if (I == SMap.end() && (PrimaryClass == nullptr || !PrimaryClass->lookupPropertyAccessor(Method, C, Prop->isClassProperty()))) {\n unsigned diag = isa<ObjCCategoryDecl>(CDecl) ? (Prop->isClassProperty() ? diag::warn_impl_required_in_category_for_class_property : diag::warn_setter_getter_impl_required_in_category) : (Prop->isClassProperty() ? diag::warn_impl_required_for_class_property : diag::warn_setter_getter_impl_required);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/property-category-1.m"]={"clang/test/SemaObjC/property-category-1.m:49:17: warning: property \'p0\' requires method \'p0\' to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation [-Wobjc-property-implementation]"} | ["clang/test/SemaObjC/property-category-1.m"]={"clang/test/SemaObjC/property-category-1.m:49:17: warning: property \'p0\' requires method \'p0\' to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation [-Wobjc-property-implementation]"} | ||
} | } | ||
}, | }, | ||
["warn_setter_getter_impl_required_in_category"]={ | ["warn_setter_getter_impl_required_in_category"]={ | ||
[ | [i]={"objc-property-implementation"}, | ||
[j]="objc-property-implementation", | |||
[ | |||
[b]="property %0 requires method %1 to be defined - use @dynamic or provide a method implementation in this category", | [b]="property %0 requires method %1 to be defined - use @dynamic or provide a method implementation in this category", | ||
[ | [d]=h, | ||
[ | [a]="property (.*?) requires method (.*?) to be defined \\- use @dynamic or provide a method implementation in this category", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-implementation[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"4f8a57112f13",1264016181,"Settled rule on warning on unimplemented property in\ncategory implementation when some implementatio...","Settled rule on warning on unimplemented property in\ncategory implementation when some implementations\nare missing in the primary class implementation.\n(fixes radar 6505200).\n\nllvm-svn: 94014"}, | ||
[ | [g]={{N,2016,"static void DiagnoseUnimplementedAccessor(Sema &S, ObjCInterfaceDecl *PrimaryClass, Selector Method, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, ObjCCategoryDecl *C, ObjCPropertyDecl *Prop, llvm::SmallPtrSet<const ObjCMethodDecl *, 8> &SMap) {\n // ...\n // When reporting on missing property setter/getter implementation in\n // categories, do not report when they are declared in primary class,\n // class\'s protocol, or one of it super classes. This is because,\n // the class is going to implement them.\n if (I == SMap.end() && (PrimaryClass == nullptr || !PrimaryClass->lookupPropertyAccessor(Method, C, Prop->isClassProperty()))) {\n unsigned diag = isa<ObjCCategoryDecl>(CDecl) ? (Prop->isClassProperty() ? diag::warn_impl_required_in_category_for_class_property : diag::warn_setter_getter_impl_required_in_category) : (Prop->isClassProperty() ? diag::warn_impl_required_for_class_property : diag::warn_setter_getter_impl_required);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/default-synthesize.m"]={"clang/test/SemaObjC/default-synthesize.m:110:17: warning: property \'p\' requires method \'p\' to be defined - use @dynamic or provide a method implementation in this category [-Wobjc-property-implementation]","clang/test/SemaObjC/default-synthesize.m:110:17: warning: property \'p\' requires method \'setP:\' to be defined - use @dynamic or provide a method implementation in this category [-Wobjc-property-implementation]"} | ["clang/test/SemaObjC/default-synthesize.m"]={"clang/test/SemaObjC/default-synthesize.m:110:17: warning: property \'p\' requires method \'p\' to be defined - use @dynamic or provide a method implementation in this category [-Wobjc-property-implementation]","clang/test/SemaObjC/default-synthesize.m:110:17: warning: property \'p\' requires method \'setP:\' to be defined - use @dynamic or provide a method implementation in this category [-Wobjc-property-implementation]"} | ||
} | } | ||
}, | }, | ||
["warn_shadow_field"]={ | ["warn_shadow_field"]={ | ||
[ | [i]={"shadow-all","shadow-field"}, | ||
[j]="shadow-field", | |||
[ | |||
[b]="%select{parameter|non-static data member}3 %0 %select{|of %1 }3shadows member inherited from type %2", | [b]="%select{parameter|non-static data member}3 %0 %select{|of %1 }3shadows member inherited from type %2", | ||
[ | [d]=h, | ||
[ | [a]="(?:parameter|non\\-static data member) (.*?) (?:|of (.*?) )shadows member inherited from type (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wshadow\\-field[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"a6ae060db4fd",1486524613,"Sema: add warning for c++ member variable shadowing\n\nAdd a warning for shadowed variables across rec...","Sema: add warning for c++ member variable shadowing\n\nAdd a warning for shadowed variables across records. Referencing a\nshadow\'ed variable may not give the desired variable. Add an optional\nwarning for the shadowing.\n\nPatch by James Sun!\n\nllvm-svn: 294401"}, | ||
[ | [g]={{T,3353,"// Check if there is a field shadowing.\nvoid Sema::CheckShadowInheritedFields(const SourceLocation &Loc, DeclarationName FieldName, const CXXRecordDecl *RD, bool DeclIsField) {\n if (Diags.isIgnored(diag::warn_shadow_field, Loc))"},{T,3391,"// Check if there is a field shadowing.\nvoid Sema::CheckShadowInheritedFields(const SourceLocation &Loc, DeclarationName FieldName, const CXXRecordDecl *RD, bool DeclIsField) {\n // ...\n for (const auto &P : Paths) {\n // ...\n if (AS_none != CXXRecordDecl::MergeAccess(P.Access, BaseField->getAccess())) {\n Diag(Loc, diag::warn_shadow_field) << FieldName << RD << Base << DeclIsField;"}}, | ||
[ | [k]={ | ||
["clang/test/CXX/class.derived/class.member.lookup/p10.cpp"]={"clang/test/CXX/class.derived/class.member.lookup/p10.cpp:39:12: warning: non-static data member \'x\' of \'E\' shadows member inherited from type \'A\' [-Wshadow-field]","clang/test/CXX/class.derived/class.member.lookup/p10.cpp:40:8: warning: non-static data member \'y\' of \'E\' shadows member inherited from type \'A\' [-Wshadow-field]","clang/test/CXX/class.derived/class.member.lookup/p10.cpp:42:8: warning: non-static data member \'w\' of \'E\' shadows member inherited from type \'D\' [-Wshadow-field]","clang/test/CXX/class.derived/class.member.lookup/p10.cpp:42:8: warning: non-static data member \'w\' of \'E\' shadows member inherited from type \'W\' [-Wshadow-field]","clang/test/CXX/class.derived/class.member.lookup/p10.cpp:53:7: warning: non-static data member \'x\' of \'H\' shadows member inherited from type \'A\' [-Wshadow-field]","clang/test/CXX/class.derived/class.member.lookup/p10.cpp:54:7: warning: non-static data member \'y\' of \'H\' shadows member inherited from type \'A\' [-Wshadow-field]","clang/test/CXX/class.derived/class.member.lookup/p10.cpp:67:7: warning: non-static data member \'x\' of \'J\' shadows member inherited from type \'I\' [-Wshadow-field]","clang/test/CXX/class.derived/class.member.lookup/p10.cpp:110:7: warning: non-static data member \'x\' of \'E1\' shadows member inherited from type \'A1\' [-Wshadow-field]"} | ["clang/test/CXX/class.derived/class.member.lookup/p10.cpp"]={"clang/test/CXX/class.derived/class.member.lookup/p10.cpp:39:12: warning: non-static data member \'x\' of \'E\' shadows member inherited from type \'A\' [-Wshadow-field]","clang/test/CXX/class.derived/class.member.lookup/p10.cpp:40:8: warning: non-static data member \'y\' of \'E\' shadows member inherited from type \'A\' [-Wshadow-field]","clang/test/CXX/class.derived/class.member.lookup/p10.cpp:42:8: warning: non-static data member \'w\' of \'E\' shadows member inherited from type \'D\' [-Wshadow-field]","clang/test/CXX/class.derived/class.member.lookup/p10.cpp:42:8: warning: non-static data member \'w\' of \'E\' shadows member inherited from type \'W\' [-Wshadow-field]","clang/test/CXX/class.derived/class.member.lookup/p10.cpp:53:7: warning: non-static data member \'x\' of \'H\' shadows member inherited from type \'A\' [-Wshadow-field]","clang/test/CXX/class.derived/class.member.lookup/p10.cpp:54:7: warning: non-static data member \'y\' of \'H\' shadows member inherited from type \'A\' [-Wshadow-field]","clang/test/CXX/class.derived/class.member.lookup/p10.cpp:67:7: warning: non-static data member \'x\' of \'J\' shadows member inherited from type \'I\' [-Wshadow-field]","clang/test/CXX/class.derived/class.member.lookup/p10.cpp:110:7: warning: non-static data member \'x\' of \'E1\' shadows member inherited from type \'A1\' [-Wshadow-field]"} | ||
} | } | ||
}, | }, | ||
["warn_shift_gt_typewidth"]={ | ["warn_shift_gt_typewidth"]={ | ||
[ | [i]={"shift-count-overflow"}, | ||
[j]="shift-count-overflow", | |||
[ | |||
[b]="shift count >= width of type", | [b]="shift count >= width of type", | ||
[ | [d]=h, | ||
[ | [a]="shift count \\>\\= width of type", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wshift\\-count\\-overflow[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"f53fab87d80b",1249662020,"PR3333: warn when shifting by invalid amount\n\nllvm-svn: 78385","PR3333: warn when shifting by invalid amount\n\nllvm-svn: 78385"}, | ||
[ | [g]={{u,12034,"static void DiagnoseBadShiftValues(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, QualType LHSType) {\n // ...\n if (Right.uge(LeftBits)) {\n S.DiagRuntimeBehavior(Loc, RHS.get(), S.PDiag(diag::warn_shift_gt_typewidth) << RHS.get()->getSourceRange());"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/runtimediag-ppe.cpp"]={"clang/test/SemaCXX/runtimediag-ppe.cpp:16:33: warning: shift count >= width of type [-Wshift-count-overflow]"} | ["clang/test/SemaCXX/runtimediag-ppe.cpp"]={"clang/test/SemaCXX/runtimediag-ppe.cpp:16:33: warning: shift count >= width of type [-Wshift-count-overflow]"} | ||
} | } | ||
}, | }, | ||
["warn_shift_lhs_negative"]={ | ["warn_shift_lhs_negative"]={ | ||
[ | [i]={"shift-negative-value"}, | ||
[j]="shift-negative-value", | |||
[ | |||
[b]="shifting a negative signed value is undefined", | [b]="shifting a negative signed value is undefined", | ||
[ | [d]=h, | ||
[ | [a]="shifting a negative signed value is undefined", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wshift\\-negative\\-value[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"bf0f7757e242",1436205729,"[Sema] Warn when shifting a negative value.\n\nExample:\n % ./clang -Wshift-negative-value emit.c\nemit....","[Sema] Warn when shifting a negative value.\n\nExample:\n % ./clang -Wshift-negative-value emit.c\nemit.c:3:14: warning: shifting a negative signed value is undefined [-Wshift-negative-value]\n int a = -1 << 3;\n ~~ ^\n1 warning generated.\n\nPR: 24026\nDifferential Revision: http://reviews.llvm.org/D10938\nReviewed by: rsmith\n\nllvm-svn: 241478"}, | ||
[ | [g]={{u,12056,"static void DiagnoseBadShiftValues(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, QualType LHSType) {\n // ...\n // If LHS does not have a non-negative value then, the\n // behavior is undefined before C++2a. Warn about it.\n if (Left.isNegative()) {\n S.DiagRuntimeBehavior(Loc, LHS.get(), S.PDiag(diag::warn_shift_lhs_negative) << LHS.get()->getSourceRange());"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/shift.c"]={"clang/test/Sema/shift.c:45:10: warning: shifting a negative signed value is undefined [-Wshift-negative-value]","clang/test/Sema/shift.c:46:10: warning: shifting a negative signed value is undefined [-Wshift-negative-value]","clang/test/Sema/shift.c:55:17: warning: shifting a negative signed value is undefined [-Wshift-negative-value]"} | ["clang/test/Sema/shift.c"]={"clang/test/Sema/shift.c:45:10: warning: shifting a negative signed value is undefined [-Wshift-negative-value]","clang/test/Sema/shift.c:46:10: warning: shifting a negative signed value is undefined [-Wshift-negative-value]","clang/test/Sema/shift.c:55:17: warning: shifting a negative signed value is undefined [-Wshift-negative-value]"} | ||
} | } | ||
}, | }, | ||
["warn_shift_negative"]={ | ["warn_shift_negative"]={ | ||
[ | [i]={"shift-count-negative"}, | ||
[j]="shift-count-negative", | |||
[ | |||
[b]="shift count is negative", | [b]="shift count is negative", | ||
[ | [d]=h, | ||
[ | [a]="shift count is negative", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wshift\\-count\\-negative[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"f53fab87d80b",1249662020,"PR3333: warn when shifting by invalid amount\n\nllvm-svn: 78385","PR3333: warn when shifting by invalid amount\n\nllvm-svn: 78385"}, | ||
[ | [g]={{u,12001,"static void DiagnoseBadShiftValues(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, QualType LHSType) {\n // ...\n if (Right.isNegative()) {\n S.DiagRuntimeBehavior(Loc, RHS.get(), S.PDiag(diag::warn_shift_negative) << RHS.get()->getSourceRange());"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/shift.c"]={"clang/test/Sema/shift.c:21:9: warning: shift count is negative [-Wshift-count-negative]","clang/test/Sema/shift.c:22:9: warning: shift count is negative [-Wshift-count-negative]","clang/test/Sema/shift.c:31:5: warning: shift count is negative [-Wshift-count-negative]","clang/test/Sema/shift.c:32:5: warning: shift count is negative [-Wshift-count-negative]"} | ["clang/test/Sema/shift.c"]={"clang/test/Sema/shift.c:21:9: warning: shift count is negative [-Wshift-count-negative]","clang/test/Sema/shift.c:22:9: warning: shift count is negative [-Wshift-count-negative]","clang/test/Sema/shift.c:31:5: warning: shift count is negative [-Wshift-count-negative]","clang/test/Sema/shift.c:32:5: warning: shift count is negative [-Wshift-count-negative]"} | ||
} | } | ||
}, | }, | ||
["warn_shift_result_gt_typewidth"]={ | ["warn_shift_result_gt_typewidth"]={ | ||
[ | [i]={"shift-overflow"}, | ||
[j]="shift-overflow", | |||
[ | |||
[b]="signed shift result (%0) requires %1 bits to represent, but %2 only has %3 bits", | [b]="signed shift result (%0) requires %1 bits to represent, but %2 only has %3 bits", | ||
[ | [d]=h, | ||
[ | [a]="signed shift result \\((.*?)\\) requires (.*?) bits to represent, but (.*?) only has (.*?) bits", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wshift\\-overflow[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"4c6fdca03573",1298504051,"Implement a warning for known shift overflows on constant shift\nexpressions. Consider the code:\n\n i...","Implement a warning for known shift overflows on constant shift\nexpressions. Consider the code:\n\n int64_t i = 10 << 30;\n\nThis compiles fine, but most developers expect it to produce the value\nfor 10 gigs, not -2 gigs. This is actually undefined behavior because\nthe LHS is a signed integer type.\n\nThe warning is currently gated behind -Wshift-overflow.\n\nThere is a special case where only the sign bit is overridden that gets\na custom error message and is by default ignored. This case is much less\nlikely to cause observed buggy behavior, it\'s just undefined behavior\naccording to the spec. This warning can be enabled with\n-Wshift-sign-overflow.\n\nOriginal patch by Oleg Slezberg, with style tweaks and some correctness\nfixes by me.\n\nllvm-svn: 126342"}, | ||
[ | [g]={{u,12075,"static void DiagnoseBadShiftValues(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, QualType LHSType) {\n // ...\n S.Diag(Loc, diag::warn_shift_result_gt_typewidth) << HexResult.str() << Result.getSignificantBits() << LHSType << Left.getBitWidth() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/shift.c"]={"clang/test/Sema/shift.c:43:9: warning: signed shift result (0x100000000) requires 34 bits to represent, but \'int\' only has 32 bits [-Wshift-overflow]"} | ["clang/test/Sema/shift.c"]={"clang/test/Sema/shift.c:43:9: warning: signed shift result (0x100000000) requires 34 bits to represent, but \'int\' only has 32 bits [-Wshift-overflow]"} | ||
} | } | ||
}, | }, | ||
["warn_shift_result_sets_sign_bit"]={ | ["warn_shift_result_sets_sign_bit"]={ | ||
[ | [i]={"shift-sign-overflow"}, | ||
[j]="shift-sign-overflow", | |||
[ | |||
[b]="signed shift result (%0) sets the sign bit of the shift expression\'s type (%1) and becomes negative", | [b]="signed shift result (%0) sets the sign bit of the shift expression\'s type (%1) and becomes negative", | ||
[ | [d]=h, | ||
[ | [a]="signed shift result \\((.*?)\\) sets the sign bit of the shift expression\'s type \\((.*?)\\) and becomes negative", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wshift\\-sign\\-overflow[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"70f05fdfeebd",1308099292,"Sema: show shift result in hexadecimal\n\nChange the output for -Wshift-overflow and\n-Wshift-sign-over...","Sema: show shift result in hexadecimal\n\nChange the output for -Wshift-overflow and\n-Wshift-sign-overflow to an unsigned hexadecimal. It makes\nmore sense for looking at bits than a signed decimal does.\nAlso, change the diagnostic\'s wording from \"overrides\"\nto \"sets\".\n\nThis uses a new optional argument in APInt::toString()\nthat adds the \'0x\' prefix to hexademical numbers.\n\nThis fixes PR 9651.\n\nPatch by nobled@dreamwidth.org!\n\nllvm-svn: 133033"}, | ||
[ | [g]={{u,12062,"static void DiagnoseBadShiftValues(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, QualType LHSType) {\n // ...\n // If we are only missing a sign bit, this is less likely to result in actual\n // bugs -- if the result is cast back to an unsigned type, it will have the\n // expected value. Thus we place this behind a different warning that can be\n // turned off separately if needed.\n if (LeftBits == ResultBits - 1) {\n S.Diag(Loc, diag::warn_shift_result_sets_sign_bit) << HexResult << LHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/shift.c"]={"clang/test/Sema/shift.c:44:9: warning: signed shift result (0x80000000) sets the sign bit of the shift expression\'s type (\'int\') and becomes negative [-Wshift-sign-overflow]"} | ["clang/test/Sema/shift.c"]={"clang/test/Sema/shift.c:44:9: warning: signed shift result (0x80000000) sets the sign bit of the shift expression\'s type (\'int\') and becomes negative [-Wshift-sign-overflow]"} | ||
} | } | ||
}, | }, | ||
["warn_side_effects_typeid"]={ | ["warn_side_effects_typeid"]={ | ||
[ | [i]={n,o,p,"potentially-evaluated-expression","unevaluated-expression",Q,Y}, | ||
[j]="potentially-evaluated-expression", | |||
[ | |||
[b]="expression with side effects will be evaluated despite being used as an operand to \'typeid\'", | [b]="expression with side effects will be evaluated despite being used as an operand to \'typeid\'", | ||
[ | [d]=h, | ||
[ | [a]="expression with side effects will be evaluated despite being used as an operand to \'typeid\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpotentially\\-evaluated\\-expression[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={"6c93b3e29c56",1418853437,"Adding a -Wunused-value warning for expressions with side effects used in an unevaluated expression ...","Adding a -Wunused-value warning for expressions with side effects used in an unevaluated expression context, such as sizeof(), or decltype(). Also adds a similar warning when the expression passed to typeid() *is* evaluated, since it is equally likely that the user would expect the expression operand to be unevaluated in that case.\n\nllvm-svn: 224465"}, | ||
[ | [g]={{Sb,641,"/// Build a C++ typeid expression with an expression operand.\nExprResult Sema::BuildCXXTypeId(QualType TypeInfoType, SourceLocation TypeidLoc, Expr *E, SourceLocation RParenLoc) {\n // ...\n if (E->getType()->isVariablyModifiedType())\n // ...\n else if (!inTemplateInstantiation() && E->HasSideEffects(Context, WasEvaluated)) {\n // ...\n Diag(E->getExprLoc(), WasEvaluated ? diag::warn_side_effects_typeid : diag::warn_side_effects_unevaluated_context);"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp"]={"clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp:20:35: warning: expression with side effects will be evaluated despite being used as an operand to \'typeid\' [-Wpotentially-evaluated-expression]"} | ["clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp"]={"clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp:20:35: warning: expression with side effects will be evaluated despite being used as an operand to \'typeid\' [-Wpotentially-evaluated-expression]"} | ||
} | } | ||
}, | }, | ||
["warn_side_effects_unevaluated_context"]={ | ["warn_side_effects_unevaluated_context"]={ | ||
[ | [i]={n,o,p,"unevaluated-expression",Q,Y}, | ||
[j]="unevaluated-expression", | |||
[ | |||
[b]="expression with side effects has no effect in an unevaluated context", | [b]="expression with side effects has no effect in an unevaluated context", | ||
[ | [d]=h, | ||
[ | [a]="expression with side effects has no effect in an unevaluated context", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunevaluated\\-expression[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={"6c93b3e29c56",1418853437,"Adding a -Wunused-value warning for expressions with side effects used in an unevaluated expression ...","Adding a -Wunused-value warning for expressions with side effects used in an unevaluated expression context, such as sizeof(), or decltype(). Also adds a similar warning when the expression passed to typeid() *is* evaluated, since it is equally likely that the user would expect the expression operand to be unevaluated in that case.\n\nllvm-svn: 224465"}, | ||
[ | [g]={{u,1701,"ExprResult Sema::CreateGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, bool PredicateIsExpr, void *ControllingExprOrType, ArrayRef<TypeSourceInfo *> Types, ArrayRef<Expr *> Exprs) {\n // ...\n // The controlling expression is an unevaluated operand, so side effects are\n // likely unintended.\n if (!inTemplateInstantiation() && !IsResultDependent && ControllingExpr && ControllingExpr->HasSideEffects(Context, false))\n Diag(ControllingExpr->getExprLoc(), diag::warn_side_effects_unevaluated_context);"},{u,4399,"/// 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 // The operand for sizeof and alignof is in an unevaluated expression context,\n // so side effects could result in unintended consequences.\n // Exclude instantiation-dependent expressions, because \'sizeof\' is sometimes\n // used to build SFINAE gadgets.\n // FIXME: Should we consider instantiation-dependent operands to \'alignof\'?\n if (IsUnevaluatedOperand && !inTemplateInstantiation() && !E->isInstantiationDependent() && !E->getType()->isVariableArrayType() && E->HasSideEffects(Context, false))\n Diag(E->getExprLoc(), diag::warn_side_effects_unevaluated_context);"},{Sb,642,"/// Build a C++ typeid expression with an expression operand.\nExprResult Sema::BuildCXXTypeId(QualType TypeInfoType, SourceLocation TypeidLoc, Expr *E, SourceLocation RParenLoc) {\n // ...\n if (E->getType()->isVariablyModifiedType())\n // ...\n else if (!inTemplateInstantiation() && E->HasSideEffects(Context, WasEvaluated)) {\n // ...\n Diag(E->getExprLoc(), WasEvaluated ? diag::warn_side_effects_typeid : diag::warn_side_effects_unevaluated_context);"},{Sb,8124,"ExprResult Sema::BuildCXXNoexceptExpr(SourceLocation KeyLoc, Expr *Operand, SourceLocation RParen) {\n // ...\n if (!inTemplateInstantiation() && !Operand->isInstantiationDependent() && Operand->HasSideEffects(Context, false)) {\n // ...\n Diag(Operand->getExprLoc(), diag::warn_side_effects_unevaluated_context);"},{L,9500,"QualType Sema::BuildDecltypeType(Expr *E, bool AsUnevaluated) {\n // ...\n if (AsUnevaluated && CodeSynthesisContexts.empty() && !E->isInstantiationDependent() && E->HasSideEffects(Context, false)) {\n // ...\n Diag(E->getExprLoc(), diag::warn_side_effects_unevaluated_context);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaOpenCL/vec_step.cl"]={"clang/test/SemaOpenCL/vec_step.cl:33:37: warning: expression with side effects has no effect in an unevaluated context [-Wunevaluated-expression]"} | ["clang/test/SemaOpenCL/vec_step.cl"]={"clang/test/SemaOpenCL/vec_step.cl:33:37: warning: expression with side effects has no effect in an unevaluated context [-Wunevaluated-expression]"} | ||
} | } | ||
}, | }, | ||
["warn_signed_bitfield_enum_conversion"]={ | ["warn_signed_bitfield_enum_conversion"]={ | ||
[ | [i]={"bitfield-enum-conversion",Ab,Pb}, | ||
[j]="bitfield-enum-conversion", | |||
[ | |||
[b]="signed bit-field %0 needs an extra bit to represent the largest positive enumerators of %1", | [b]="signed bit-field %0 needs an extra bit to represent the largest positive enumerators of %1", | ||
[ | [d]=h, | ||
[ | [a]="signed bit\\-field (.*?) needs an extra bit to represent the largest positive enumerators of (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wbitfield\\-enum\\-conversion[^\\]]*\\]", | ||
[ | [c]=Wb, | ||
[ | [f]={"329f24d6f6e7",1489514462,"Warn on enum assignment to bitfields that can\'t fit all values\n\nThis adds -Wbitfield-enum-conversion...","Warn on enum assignment to bitfields that can\'t fit all values\n\nThis adds -Wbitfield-enum-conversion, which warns on implicit\nconversions that happen on bitfield assignment that change the value of\nsome enumerators.\n\nValues of enum type typically take on a very small range of values, so\nthey are frequently stored in bitfields. Unfortunately, there is no\nconvenient way to calculate the minimum number of bits necessary to\nstore all possible values at compile time, so users usually hard code a\nbitwidth that works today and widen it as necessary to pass basic\ntesting and validation. This is very error-prone, and leads to stale\nwidths as enums grow. This warning aims to catch such bugs.\n\nThis would have found two real bugs in clang and two instances of\nquestionable code. See r297680 and r297654 for the full description of\nthe issues.\n\nThis warning is currently disabled by default while we investigate its\nusefulness outside of LLVM.\n\nThe major cause of false positives with this warning is this kind of\nenum:\n enum E { W, X, Y, Z, SENTINEL_LAST };\nThe last enumerator is an invalid value used to validate inputs or size\nan array. Depending on the prevalance of this style of enum across a\ncodebase, this warning may be more or less feasible to deploy. It also\nhas trouble on sentinel values such as ~0U.\n\nReviewers: rsmith, rtrieu, thakis\n\nReviewed By: thakis\n\nSubscribers: hfinkel, voskresensky.vladimir, sashab, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D30923\n\nllvm-svn: 297761"}, | ||
[ | [g]={{r,14087,"/// 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 (SignedEnum && !SignedBitfield) {\n // ...\n } else if (SignedBitfield && !SignedEnum && ED->getNumPositiveBits() == FieldWidth) {\n DiagID = diag::warn_signed_bitfield_enum_conversion;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp"]={"clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:32:21: warning: signed bit-field \'two_bits_signed\' needs an extra bit to represent the largest positive enumerators of \'TwoBits\' [-Wbitfield-enum-conversion]","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:44:23: warning: signed bit-field \'three_bits_signed\' needs an extra bit to represent the largest positive enumerators of \'ThreeBits\' [-Wbitfield-enum-conversion]"} | ["clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp"]={"clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:32:21: warning: signed bit-field \'two_bits_signed\' needs an extra bit to represent the largest positive enumerators of \'TwoBits\' [-Wbitfield-enum-conversion]","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:44:23: warning: signed bit-field \'three_bits_signed\' needs an extra bit to represent the largest positive enumerators of \'ThreeBits\' [-Wbitfield-enum-conversion]"} | ||
} | } | ||
}, | }, | ||
["warn_sizeof_array_decay"]={ | ["warn_sizeof_array_decay"]={ | ||
[ | [i]={n,o,p,"sizeof-array-decay"}, | ||
[j]="sizeof-array-decay", | |||
[ | |||
[b]="sizeof on pointer operation will return size of %0 instead of %1", | [b]="sizeof on pointer operation will return size of %0 instead of %1", | ||
[ | [d]=h, | ||
[ | [a]="sizeof on pointer operation will return size of (.*?) instead of (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wsizeof\\-array\\-decay[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"054faa5a4883",1364593401,"Sema: Warn on sizeof on binary ops on decayed arrays.\n\nThe array will decay into a pointer, creating...","Sema: Warn on sizeof on binary ops on decayed arrays.\n\nThe array will decay into a pointer, creating an unexpected result.\nsizeof(array + int) is an easy to make typo for sizeof(array) + int.\n\nThis was motivated by a NetBSD security bug, used sizeof(key - r) instead of\nsizeof(key) - r, reducing entropy in a random number generator.\nhttp://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/subr_cprng.c.diff?r1=1.14&r2=1.15&only_with_tag=MAIN&f=h\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D571\n\nllvm-svn: 178371"}, | ||
[ | [g]={{u,4384,"/// Check whether E is a pointer from a decayed array type (the decayed\n/// pointer type is equal to T) and emit a warning if it is.\nstatic void warnOnSizeofOnArrayDecay(Sema &S, SourceLocation Loc, QualType T, const Expr *E) {\n // ...\n S.Diag(Loc, diag::warn_sizeof_array_decay) << ICE->getSourceRange() << ICE->getType() << ICE->getSubExpr()->getType();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-sizeof-array-decay.c"]={"clang/test/Sema/warn-sizeof-array-decay.c:8:20: warning: sizeof on pointer operation will return size of \'int *\' instead of \'int[20]\' [-Wsizeof-array-decay]","clang/test/Sema/warn-sizeof-array-decay.c:9:20: warning: sizeof on pointer operation will return size of \'char *\' instead of \'char[10]\' [-Wsizeof-array-decay]","clang/test/Sema/warn-sizeof-array-decay.c:10:20: warning: sizeof on pointer operation will return size of \'int *\' instead of \'int[20]\' [-Wsizeof-array-decay]","clang/test/Sema/warn-sizeof-array-decay.c:11:20: warning: sizeof on pointer operation will return size of \'char *\' instead of \'char[10]\' [-Wsizeof-array-decay]","clang/test/Sema/warn-sizeof-array-decay.c:17:17: warning: sizeof on pointer operation will return size of \'char *\' instead of \'char[10]\' [-Wsizeof-array-decay]"} | ["clang/test/Sema/warn-sizeof-array-decay.c"]={"clang/test/Sema/warn-sizeof-array-decay.c:8:20: warning: sizeof on pointer operation will return size of \'int *\' instead of \'int[20]\' [-Wsizeof-array-decay]","clang/test/Sema/warn-sizeof-array-decay.c:9:20: warning: sizeof on pointer operation will return size of \'char *\' instead of \'char[10]\' [-Wsizeof-array-decay]","clang/test/Sema/warn-sizeof-array-decay.c:10:20: warning: sizeof on pointer operation will return size of \'int *\' instead of \'int[20]\' [-Wsizeof-array-decay]","clang/test/Sema/warn-sizeof-array-decay.c:11:20: warning: sizeof on pointer operation will return size of \'char *\' instead of \'char[10]\' [-Wsizeof-array-decay]","clang/test/Sema/warn-sizeof-array-decay.c:17:17: warning: sizeof on pointer operation will return size of \'char *\' instead of \'char[10]\' [-Wsizeof-array-decay]"} | ||
} | } | ||
}, | }, | ||
["warn_sizeof_array_param"]={ | ["warn_sizeof_array_param"]={ | ||
[ | [i]={n,o,p,"sizeof-array-argument"}, | ||
[j]="sizeof-array-argument", | |||
[ | |||
[b]="sizeof on array function parameter will return size of %0 instead of %1", | [b]="sizeof on array function parameter will return size of %0 instead of %1", | ||
[ | [d]=h, | ||
[ | [a]="sizeof on array function parameter will return size of (.*?) instead of (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wsizeof\\-array\\-argument[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"0870debb8b31",1308106023,"Warn on \"void f(int a[10]) { sizeof(a); }\"\n\nllvm-svn: 133036","Warn on \"void f(int a[10]) { sizeof(a); }\"\n\nllvm-svn: 133036"}, | ||
[ | [g]={{u,4443,"/// 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 Diag(E->getExprLoc(), diag::warn_sizeof_array_param) << Type << OType;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-sizeof-arrayarg.c"]={"clang/test/Sema/warn-sizeof-arrayarg.c:10:15: warning: sizeof on array function parameter will return size of \'int *\' instead of \'int[10]\' [-Wsizeof-array-argument]","clang/test/Sema/warn-sizeof-arrayarg.c:12:15: warning: sizeof on array function parameter will return size of \'int *\' instead of \'int[10]\' [-Wsizeof-array-argument]","clang/test/Sema/warn-sizeof-arrayarg.c:14:16: warning: sizeof on array function parameter will return size of \'int *\' instead of \'int[10]\' [-Wsizeof-array-argument]","clang/test/Sema/warn-sizeof-arrayarg.c:16:16: warning: sizeof on array function parameter will return size of \'int *\' instead of \'Arr\' (aka \'int[10]\') [-Wsizeof-array-argument]"} | ["clang/test/Sema/warn-sizeof-arrayarg.c"]={"clang/test/Sema/warn-sizeof-arrayarg.c:10:15: warning: sizeof on array function parameter will return size of \'int *\' instead of \'int[10]\' [-Wsizeof-array-argument]","clang/test/Sema/warn-sizeof-arrayarg.c:12:15: warning: sizeof on array function parameter will return size of \'int *\' instead of \'int[10]\' [-Wsizeof-array-argument]","clang/test/Sema/warn-sizeof-arrayarg.c:14:16: warning: sizeof on array function parameter will return size of \'int *\' instead of \'int[10]\' [-Wsizeof-array-argument]","clang/test/Sema/warn-sizeof-arrayarg.c:16:16: warning: sizeof on array function parameter will return size of \'int *\' instead of \'Arr\' (aka \'int[10]\') [-Wsizeof-array-argument]"} | ||
} | } | ||
}, | }, | ||
["warn_sizeof_pointer_expr_memaccess"]={ | ["warn_sizeof_pointer_expr_memaccess"]={ | ||
[ | [i]={"sizeof-pointer-memaccess","suspicious-memaccess"}, | ||
[j]="sizeof-pointer-memaccess", | |||
[ | |||
[b]="\'%0\' call operates on objects of type %1 while the size is based on a different type %2", | [b]="\'%0\' call operates on objects of type %1 while the size is based on a different type %2", | ||
[ | [d]=h, | ||
[ | [a]="\'(.*?)\' call operates on objects of type (.*?) while the size is based on a different type (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wsizeof\\-pointer\\-memaccess[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"8b9e5a72cb12",1308215380,"Rework the warning for \'memset(p, 0, sizeof(p))\' where \'p\' is a pointer\nand the programmer intended ...","Rework the warning for \'memset(p, 0, sizeof(p))\' where \'p\' is a pointer\nand the programmer intended to write \'sizeof(*p)\'. There are several\nelements to the new version:\n\n1) The actual expressions are compared in order to more accurately flag\n the case where the pattern that works for an array has been used, or\n a \'*\' has been omitted.\n2) Only do a loose type-based check for record types. This prevents us\n from warning when we happen to be copying around chunks of data the\n size of a pointer and the pointer types for the sizeof and\n source/dest match.\n3) Move all the diagnostics behind the runtime diagnostic filter. Not\n sure this is really important for this particular diagnostic, but\n almost everything else in SemaChecking.cpp does so.\n4) Make the wording of the diagnostic more precise and informative. At\n least to my eyes.\n5) Provide highlighting for the two expressions which had the unexpected\n similarity.\n6) Place this diagnostic under a flag: -Wsizeof-pointer-memaccess\n\nThis uses the Stmt::Profile system for computing #1. Because of the\npotential cost, this is guarded by the warning flag. I\'d be interested\nin feedback on how bad this is in practice; I would expect it to be\nquite cheap in practice. Ideas for a cheaper / better way to do this are\nalso welcome.\n\nThe diagnostic wording could likely use some further wordsmithing.\nSuggestions welcome here. The goals I had were to: clarify that its the\ninteraction of \'memset\' and \'sizeof\' and give more reasonable\nsuggestions for a resolution.\n\nAn open question is whether these diagnostics should have the note\nattached for silencing by casting the dest/source pointer to void*.\n\nllvm-svn: 133155"}, | ||
[ | [g]={{r,12478,"/// Check for dangerous or invalid arguments to memset().\n///\n/// This issues warnings on known problematic, dangerous or unspecified\n/// arguments to the standard \'memset\', \'memcpy\', \'memmove\', and \'memcmp\'\n/// function calls.\n///\n/// \\param Call The call expression to diagnose.\nvoid Sema::CheckMemaccessArguments(const CallExpr *Call, unsigned BId, IdentifierInfo *FnName) {\n // ...\n for (unsigned ArgIdx = 0; ArgIdx != LastArg; ++ArgIdx) {\n // ...\n if (const PointerType *DestPtrTy = DestTy->getAs<PointerType>()) {\n // ...\n if (SizeOfArg && !Diags.isIgnored(diag::warn_sizeof_pointer_expr_memaccess, SizeOfArg->getExprLoc())) {"},{r,12517,"/// Check for dangerous or invalid arguments to memset().\n///\n/// This issues warnings on known problematic, dangerous or unspecified\n/// arguments to the standard \'memset\', \'memcpy\', \'memmove\', and \'memcmp\'\n/// function calls.\n///\n/// \\param Call The call expression to diagnose.\nvoid Sema::CheckMemaccessArguments(const CallExpr *Call, unsigned BId, IdentifierInfo *FnName) {\n // ...\n for (unsigned ArgIdx = 0; ArgIdx != LastArg; ++ArgIdx) {\n // ...\n if (const PointerType *DestPtrTy = DestTy->getAs<PointerType>()) {\n // ...\n // Catch \"memset(p, 0, sizeof(p))\" -- needs to be sizeof(*p). Do this by\n // actually comparing the expressions for equality. Because computing the\n // expression IDs can be expensive, we only do this if the diagnostic is\n // enabled.\n if (SizeOfArg && !Diags.isIgnored(diag::warn_sizeof_pointer_expr_memaccess, SizeOfArg->getExprLoc())) {\n // ...\n if (DestID == SizeOfArgID) {\n // ...\n DiagRuntimeBehavior(SL, SizeOfArg, PDiag(diag::warn_sizeof_pointer_expr_memaccess) << ReadableName << PointeeTy << DestTy << DSR << SSR);"},{r,17965,"/// DiagnoseSelfMove - Emits a warning if a value is moved to itself.\nvoid Sema::DiagnoseSelfMove(const Expr *LHSExpr, const Expr *RHSExpr, SourceLocation OpLoc) {\n if (Diags.isIgnored(diag::warn_sizeof_pointer_expr_memaccess, OpLoc))"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/memset-invalid-1.c"]={"clang/test/Sema/memset-invalid-1.c:12:26: warning: \'memset\' call operates on objects of type \'struct __incomplete\' while the size is based on a different type \'incomplete\' (aka \'struct __incomplete *\') [-Wsizeof-pointer-memaccess]"} | ["clang/test/Sema/memset-invalid-1.c"]={"clang/test/Sema/memset-invalid-1.c:12:26: warning: \'memset\' call operates on objects of type \'struct __incomplete\' while the size is based on a different type \'incomplete\' (aka \'struct __incomplete *\') [-Wsizeof-pointer-memaccess]"} | ||
} | } | ||
}, | }, | ||
["warn_sizeof_pointer_expr_memaccess_note"]={ | ["warn_sizeof_pointer_expr_memaccess_note"]={ | ||
[b]="did you mean to %select{dereference the argument to \'sizeof\' (and multiply it by the number of elements)|remove the addressof in the argument to \'sizeof\' (and multiply it by the number of elements)|provide an explicit length}0?", | [b]="did you mean to %select{dereference the argument to \'sizeof\' (and multiply it by the number of elements)|remove the addressof in the argument to \'sizeof\' (and multiply it by the number of elements)|provide an explicit length}0?", | ||
[ | [d]="note\\: ", | ||
[ | [a]="did you mean to (?:dereference the argument to \'sizeof\' \\(and multiply it by the number of elements\\)|remove the addressof in the argument to \'sizeof\' \\(and multiply it by the number of elements\\)|provide an explicit length)\\?", | ||
[ | [e]=s, | ||
[ | [c]=l, | ||
[ | [f]={"d08d9159c289",1338419692,"Change wording of \'memcpy\' type mismatch warning and remove fixit.\n\nAs per comments following r15765...","Change wording of \'memcpy\' type mismatch warning and remove fixit.\n\nAs per comments following r157659.\n\nllvm-svn: 157722"}, | ||
[ | [g]={{r,12524,"/// Check for dangerous or invalid arguments to memset().\n///\n/// This issues warnings on known problematic, dangerous or unspecified\n/// arguments to the standard \'memset\', \'memcpy\', \'memmove\', and \'memcmp\'\n/// function calls.\n///\n/// \\param Call The call expression to diagnose.\nvoid Sema::CheckMemaccessArguments(const CallExpr *Call, unsigned BId, IdentifierInfo *FnName) {\n // ...\n for (unsigned ArgIdx = 0; ArgIdx != LastArg; ++ArgIdx) {\n // ...\n if (const PointerType *DestPtrTy = DestTy->getAs<PointerType>()) {\n // ...\n // Catch \"memset(p, 0, sizeof(p))\" -- needs to be sizeof(*p). Do this by\n // actually comparing the expressions for equality. Because computing the\n // expression IDs can be expensive, we only do this if the diagnostic is\n // enabled.\n if (SizeOfArg && !Diags.isIgnored(diag::warn_sizeof_pointer_expr_memaccess, SizeOfArg->getExprLoc())) {\n // ...\n if (DestID == SizeOfArgID) {\n // ...\n DiagRuntimeBehavior(SL, SizeOfArg, PDiag(diag::warn_sizeof_pointer_expr_memaccess_note) << ActionIdx << SSR);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/memset-invalid-1.c"]={"clang/test/Sema/memset-invalid-1.c:12:26: note: did you mean to dereference the argument to \'sizeof\' (and multiply it by the number of elements)?"} | ["clang/test/Sema/memset-invalid-1.c"]={"clang/test/Sema/memset-invalid-1.c:12:26: note: did you mean to dereference the argument to \'sizeof\' (and multiply it by the number of elements)?"} | ||
} | } | ||
}, | }, | ||
["warn_sizeof_pointer_type_memaccess"]={ | ["warn_sizeof_pointer_type_memaccess"]={ | ||
[ | [i]={"sizeof-pointer-memaccess","suspicious-memaccess"}, | ||
[j]="sizeof-pointer-memaccess", | |||
[ | |||
[b]="argument to \'sizeof\' in %0 call is the same pointer type %1 as the %select{destination|source}2; expected %3 or an explicit length", | [b]="argument to \'sizeof\' in %0 call is the same pointer type %1 as the %select{destination|source}2; expected %3 or an explicit length", | ||
[ | [d]=h, | ||
[ | [a]="argument to \'sizeof\' in (.*?) call is the same pointer type (.*?) as the (?:destination|source); expected (.*?) or an explicit length", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wsizeof\\-pointer\\-memaccess[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"8b9e5a72cb12",1308215380,"Rework the warning for \'memset(p, 0, sizeof(p))\' where \'p\' is a pointer\nand the programmer intended ...","Rework the warning for \'memset(p, 0, sizeof(p))\' where \'p\' is a pointer\nand the programmer intended to write \'sizeof(*p)\'. There are several\nelements to the new version:\n\n1) The actual expressions are compared in order to more accurately flag\n the case where the pattern that works for an array has been used, or\n a \'*\' has been omitted.\n2) Only do a loose type-based check for record types. This prevents us\n from warning when we happen to be copying around chunks of data the\n size of a pointer and the pointer types for the sizeof and\n source/dest match.\n3) Move all the diagnostics behind the runtime diagnostic filter. Not\n sure this is really important for this particular diagnostic, but\n almost everything else in SemaChecking.cpp does so.\n4) Make the wording of the diagnostic more precise and informative. At\n least to my eyes.\n5) Provide highlighting for the two expressions which had the unexpected\n similarity.\n6) Place this diagnostic under a flag: -Wsizeof-pointer-memaccess\n\nThis uses the Stmt::Profile system for computing #1. Because of the\npotential cost, this is guarded by the warning flag. I\'d be interested\nin feedback on how bad this is in practice; I would expect it to be\nquite cheap in practice. Ideas for a cheaper / better way to do this are\nalso welcome.\n\nThe diagnostic wording could likely use some further wordsmithing.\nSuggestions welcome here. The goals I had were to: clarify that its the\ninteraction of \'memset\' and \'sizeof\' and give more reasonable\nsuggestions for a resolution.\n\nAn open question is whether these diagnostics should have the note\nattached for silencing by casting the dest/source pointer to void*.\n\nllvm-svn: 133155"}, | ||
[ | [g]={{r,12539,"/// Check for dangerous or invalid arguments to memset().\n///\n/// This issues warnings on known problematic, dangerous or unspecified\n/// arguments to the standard \'memset\', \'memcpy\', \'memmove\', and \'memcmp\'\n/// function calls.\n///\n/// \\param Call The call expression to diagnose.\nvoid Sema::CheckMemaccessArguments(const CallExpr *Call, unsigned BId, IdentifierInfo *FnName) {\n // ...\n for (unsigned ArgIdx = 0; ArgIdx != LastArg; ++ArgIdx) {\n // ...\n if (const PointerType *DestPtrTy = DestTy->getAs<PointerType>()) {\n // ...\n // Also check for cases where the sizeof argument is the exact same\n // type as the memory argument, and where it points to a user-defined\n // record type.\n if (SizeOfArgTy != QualType()) {\n if (PointeeTy->isRecordType() && Context.typesAreCompatible(SizeOfArgTy, DestTy)) {\n DiagRuntimeBehavior(LenExpr->getExprLoc(), Dest, PDiag(diag::warn_sizeof_pointer_type_memaccess) << FnName << SizeOfArgTy << ArgIdx << PointeeTy << Dest->getSourceRange() << LenExpr->getSourceRange());"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-memset-bad-sizeof.cpp"]={"clang/test/SemaCXX/warn-memset-bad-sizeof.cpp:44:18: warning: argument to \'sizeof\' in \'memset\' call is the same pointer type \'typeof (ps2)\' (aka \'S *\') as the destination; expected \'S\' or an explicit length [-Wsizeof-pointer-memaccess]","clang/test/SemaCXX/warn-memset-bad-sizeof.cpp:46:18: warning: argument to \'sizeof\' in \'memset\' call is the same pointer type \'PS\' (aka \'S *\') as the destination; expected \'S\' or an explicit length [-Wsizeof-pointer-memaccess]","clang/test/SemaCXX/warn-memset-bad-sizeof.cpp:57:14: warning: argument to \'sizeof\' in \'bzero\' call is the same pointer type \'typeof (ps2)\' (aka \'S *\') as the destination; expected \'S\' or an explicit length [-Wsizeof-pointer-memaccess]","clang/test/SemaCXX/warn-memset-bad-sizeof.cpp:59:14: warning: argument to \'sizeof\' in \'bzero\' call is the same pointer type \'PS\' (aka \'S *\') as the destination; expected \'S\' or an explicit length [-Wsizeof-pointer-memaccess]"} | ["clang/test/SemaCXX/warn-memset-bad-sizeof.cpp"]={"clang/test/SemaCXX/warn-memset-bad-sizeof.cpp:44:18: warning: argument to \'sizeof\' in \'memset\' call is the same pointer type \'typeof (ps2)\' (aka \'S *\') as the destination; expected \'S\' or an explicit length [-Wsizeof-pointer-memaccess]","clang/test/SemaCXX/warn-memset-bad-sizeof.cpp:46:18: warning: argument to \'sizeof\' in \'memset\' call is the same pointer type \'PS\' (aka \'S *\') as the destination; expected \'S\' or an explicit length [-Wsizeof-pointer-memaccess]","clang/test/SemaCXX/warn-memset-bad-sizeof.cpp:57:14: warning: argument to \'sizeof\' in \'bzero\' call is the same pointer type \'typeof (ps2)\' (aka \'S *\') as the destination; expected \'S\' or an explicit length [-Wsizeof-pointer-memaccess]","clang/test/SemaCXX/warn-memset-bad-sizeof.cpp:59:14: warning: argument to \'sizeof\' in \'bzero\' call is the same pointer type \'PS\' (aka \'S *\') as the destination; expected \'S\' or an explicit length [-Wsizeof-pointer-memaccess]"} | ||
} | } | ||
}, | }, | ||
["warn_slash_u_filename"]={ | ["warn_slash_u_filename"]={ | ||
[ | [i]={"slash-u-filename"}, | ||
[j]="slash-u-filename", | |||
[ | |||
[b]="\'/U%0\' treated as the \'/U\' option", | [b]="\'/U%0\' treated as the \'/U\' option", | ||
[ | [d]=h, | ||
[ | [a]="\'\\/U(.*?)\' treated as the \'\\/U\' option", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wslash\\-u\\-filename[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"091f1b6ef314",1485536981,"clang-cl: Warn about /U flags that look like filenames (PR31662)\n\nBoth on Mac and Windows, it\'s comm...","clang-cl: Warn about /U flags that look like filenames (PR31662)\n\nBoth on Mac and Windows, it\'s common to have a \'Users\' directory in the\nroot of the filesystem, so one might specify a filename as\n\'/Users/me/myfile.c\'. clang-cl (as well as MSVC\'s cl.exe) will interpret\nthat as invoking the \'/U\' option, which is probably not what the user\nwanted. Add a warning about this.\n\nDifferential Revision: https://reviews.llvm.org/D29198\n\nllvm-svn: 293305"}, | ||
[ | [g]={{"clang/lib/Driver/Driver.cpp",2793,"// Construct a the list of inputs and their types.\nvoid Driver::BuildInputs(const ToolChain &TC, DerivedArgList &Args, InputList &Inputs) const {\n // ...\n for (Arg *A : Args) {\n if (A->getOption().getKind() == Option::InputClass) {\n // ...\n } else if (A->getOption().matches(options::OPT__SLASH_Tc)) {\n // ...\n } else if (A->getOption().matches(options::OPT__SLASH_Tp)) {\n // ...\n } else if (A->getOption().hasFlag(options::LinkerInput)) {\n // ...\n } else if (A->getOption().matches(options::OPT_x)) {\n // ...\n } else if (A->getOption().getID() == options::OPT_U) {\n // ...\n if (Val.find_first_of(\"/\\\\\") != StringRef::npos) {\n // ...\n Diag(diag::warn_slash_u_filename) << Val;"}} | ||
}, | }, | ||
["warn_slh_does_not_support_asm_goto"]={ | ["warn_slh_does_not_support_asm_goto"]={ | ||
[ | [i]={"slh-asm-goto"}, | ||
[j]="slh-asm-goto", | |||
[ | |||
[b]="speculative load hardening does not protect functions with asm goto", | [b]="speculative load hardening does not protect functions with asm goto", | ||
[ | [d]=h, | ||
[ | [a]="speculative load hardening does not protect functions with asm goto", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wslh\\-asm\\-goto[^\\]]*\\]", | ||
[ | [c]="Inline Assembly Issue", | ||
[ | [f]={"60ee88599098",1589228634,"[clang][asm goto][slh] Warn if asm goto + SLH\n\nSummary:\nAsm goto is not supported by SLH. Warn if an...","[clang][asm goto][slh] Warn if asm goto + SLH\n\nSummary:\nAsm goto is not supported by SLH. Warn if an instance of asm goto is detected\nwhile SLH is enabled.\n\nTest included.\n\nReviewed By: jyu2\n\nDifferential Revision: https://reviews.llvm.org/D79743"}, | ||
[ | [g]={{"clang/lib/Parse/ParseStmtAsm.cpp",737,"/// ParseAsmStatement - Parse a GNU extended asm statement.\n/// asm-statement:\n/// gnu-asm-statement\n/// ms-asm-statement\n///\n/// [GNU] gnu-asm-statement:\n/// \'asm\' asm-qualifier-list[opt] \'(\' asm-argument \')\' \';\'\n///\n/// [GNU] asm-argument:\n/// asm-string-literal\n/// asm-string-literal \':\' asm-operands[opt]\n/// asm-string-literal \':\' asm-operands[opt] \':\' asm-operands[opt]\n/// asm-string-literal \':\' asm-operands[opt] \':\' asm-operands[opt]\n/// \':\' asm-clobbers\n///\n/// [GNU] asm-clobbers:\n/// asm-string-literal\n/// asm-clobbers \',\' asm-string-literal\n///\nStmtResult Parser::ParseAsmStatement(bool &msAsm) {\n // ...\n if (GAQ.isGoto() && getLangOpts().SpeculativeLoadHardening)\n Diag(Loc, diag::warn_slh_does_not_support_asm_goto);"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/slh-asm-goto.cpp"]={"clang/test/Parser/slh-asm-goto.cpp:4:9: warning: speculative load hardening does not protect functions with asm goto [-Wslh-asm-goto]"} | ["clang/test/Parser/slh-asm-goto.cpp"]={"clang/test/Parser/slh-asm-goto.cpp:4:9: warning: speculative load hardening does not protect functions with asm goto [-Wslh-asm-goto]"} | ||
} | } | ||
}, | }, | ||
["warn_some_initializers_out_of_order"]={ | ["warn_some_initializers_out_of_order"]={ | ||
[ | [i]={n,o,p,"reorder","reorder-ctor"}, | ||
[j]="reorder-ctor", | |||
[ | |||
[b]="initializer order does not match the declaration order", | [b]="initializer order does not match the declaration order", | ||
[ | [d]=h, | ||
[ | [a]="initializer order does not match the declaration order", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wreorder\\-ctor[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to ...","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"}, | ||
[ | [g]={{T,5587,"static void DiagnoseBaseOrMemInitializerOrder(Sema &SemaRef, const CXXConstructorDecl *Constructor, ArrayRef<CXXCtorInitializer *> Inits) {\n // ...\n // Introduce a new scope as SemaDiagnosticBuilder needs to be destroyed to\n // emit the diagnostic before we can try adding notes.\n {\n Sema::SemaDiagnosticBuilder D = SemaRef.Diag(Inits[WarnIndexes.front() - 1]->getSourceLocation(), WarnIndexes.size() == 1 ? diag::warn_initializer_out_of_order : diag::warn_some_initializers_out_of_order);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-reorder-ctor-initialization.cpp"]={"clang/test/SemaCXX/warn-reorder-ctor-initialization.cpp:10:9: warning: initializer order does not match the declaration order [-Wreorder-ctor]"} | ["clang/test/SemaCXX/warn-reorder-ctor-initialization.cpp"]={"clang/test/SemaCXX/warn-reorder-ctor-initialization.cpp:10:9: warning: initializer order does not match the declaration order [-Wreorder-ctor]"} | ||
} | } | ||
}, | }, | ||
["warn_sometimes_uninit_var"]={ | ["warn_sometimes_uninit_var"]={ | ||
[ | [i]={n,o,p,"sometimes-uninitialized",tb}, | ||
[j]="sometimes-uninitialized", | |||
[ | |||
[b]="variable %0 is %select{used|captured}1 uninitialized whenever %select{\'%3\' condition is %select{true|false}4|\'%3\' loop %select{is entered|exits because its condition is false}4|\'%3\' loop %select{condition is true|exits because its condition is false}4|switch %3 is taken|its declaration is reached|%3 is called}2", | [b]="variable %0 is %select{used|captured}1 uninitialized whenever %select{\'%3\' condition is %select{true|false}4|\'%3\' loop %select{is entered|exits because its condition is false}4|\'%3\' loop %select{condition is true|exits because its condition is false}4|switch %3 is taken|its declaration is reached|%3 is called}2", | ||
[ | [d]=h, | ||
[ | [a]="variable (.*?) is (?:used|captured) uninitialized whenever (?:\'(.*?)\' condition is (?:true|false)|\'(.*?)\' loop (?:is entered|exits because its condition is false)|\'(.*?)\' loop (?:condition is true|exits because its condition is false)|switch (.*?) is taken|its declaration is reached|(.*?) is called)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wsometimes\\-uninitialized[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"4323bf8e2e51",1337912229,"Split a chunk of -Wconditional-uninitialized warnings out into a separate flag,\n-Wsometimes-uninitia...","Split a chunk of -Wconditional-uninitialized warnings out into a separate flag,\n-Wsometimes-uninitialized. This detects cases where an explicitly-written branch\ninevitably leads to an uninitialized variable use (so either the branch is dead\ncode or there is an uninitialized use bug).\n\nThis chunk of warnings tentatively lives within -Wuninitialized, in order to\ngive it more visibility to existing Clang users.\n\nllvm-svn: 157458"}, | ||
[ | [g]={{y,841,"/// DiagUninitUse -- Helper function to produce a diagnostic for an\n/// uninitialized use of a variable.\nstatic void DiagUninitUse(Sema &S, const VarDecl *VD, const UninitUse &Use, bool IsCapturedByBlock) {\n // ...\n case UninitUse::AfterDecl:\n case UninitUse::AfterCall:\n S.Diag(VD->getLocation(), diag::warn_sometimes_uninit_var) << VD->getDeclName() << IsCapturedByBlock << (Use.getKind() == UninitUse::AfterDecl ? 4 : 5) << const_cast<DeclContext *>(VD->getLexicalDeclContext()) << VD->getSourceRange();"},{y,977,"/// DiagUninitUse -- Helper function to produce a diagnostic for an\n/// uninitialized use of a variable.\nstatic void DiagUninitUse(Sema &S, const VarDecl *VD, const UninitUse &Use, bool IsCapturedByBlock) {\n // ...\n // Diagnose each branch which leads to a sometimes-uninitialized use.\n for (UninitUse::branch_iterator I = Use.branch_begin(), E = Use.branch_end(); I != E; ++I) {\n // ...\n S.Diag(Range.getBegin(), diag::warn_sometimes_uninit_var) << VD->getDeclName() << IsCapturedByBlock << DiagKind << Str << I->Output << Range;"},{y,2630,"void clang::sema::AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P, sema::FunctionScopeInfo *fscope, const Decl *D, QualType BlockType) {\n // ...\n if (!Diags.isIgnored(diag::warn_uninit_var, D->getBeginLoc()) || !Diags.isIgnored(diag::warn_sometimes_uninit_var, D->getBeginLoc()) || !Diags.isIgnored(diag::warn_maybe_uninit_var, D->getBeginLoc()) || !Diags.isIgnored(diag::warn_uninit_const_reference, D->getBeginLoc())) {"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/uninit-variables.c"]={"clang/test/Sema/uninit-variables.c:43:7: warning: variable \'x\' is used uninitialized whenever \'if\' condition is false [-Wsometimes-uninitialized]","clang/test/Sema/uninit-variables.c:156:7: warning: variable \'z\' is used uninitialized whenever \'||\' condition is true [-Wsometimes-uninitialized]","clang/test/Sema/uninit-variables.c:163:7: warning: variable \'z\' is used uninitialized whenever \'||\' condition is true [-Wsometimes-uninitialized]","clang/test/Sema/uninit-variables.c:299:7: warning: variable \'y\' is used uninitialized whenever \'if\' condition is false [-Wsometimes-uninitialized]"} | ["clang/test/Sema/uninit-variables.c"]={"clang/test/Sema/uninit-variables.c:43:7: warning: variable \'x\' is used uninitialized whenever \'if\' condition is false [-Wsometimes-uninitialized]","clang/test/Sema/uninit-variables.c:156:7: warning: variable \'z\' is used uninitialized whenever \'||\' condition is true [-Wsometimes-uninitialized]","clang/test/Sema/uninit-variables.c:163:7: warning: variable \'z\' is used uninitialized whenever \'||\' condition is true [-Wsometimes-uninitialized]","clang/test/Sema/uninit-variables.c:299:7: warning: variable \'y\' is used uninitialized whenever \'if\' condition is false [-Wsometimes-uninitialized]"} | ||
} | } | ||
}, | }, | ||
["warn_splice_in_doxygen_comment"]={ | ["warn_splice_in_doxygen_comment"]={ | ||
[ | [i]={Ac}, | ||
[j]=Ac, | |||
[ | |||
[b]="line splicing in Doxygen comments are not supported", | [b]="line splicing in Doxygen comments are not supported", | ||
[ | [d]=h, | ||
[ | [a]="line splicing in Doxygen comments are not supported", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdocumentation[^\\]]*\\]", | ||
[ | [c]="Documentation Issue", | ||
[ | [f]={lb,1625925174,mb,nb}, | ||
[ | [g]={{S,2415,"void Sema::ActOnComment(SourceRange Comment) {\n // ...\n if (RC.isAlmostTrailingComment() || RC.hasUnsupportedSplice(SourceMgr)) {\n // ...\n case RawComment::RCK_Invalid:\n // ...\n Diag(Comment.getBegin(), diag::warn_splice_in_doxygen_comment);"}}, | ||
[ | [k]={ | ||
["clang/test/Lexer/comment-escape.c"]={"clang/test/Lexer/comment-escape.c:9:1: warning: line splicing in Doxygen comments are not supported [-Wdocumentation]","clang/test/Lexer/comment-escape.c:14:1: warning: line splicing in Doxygen comments are not supported [-Wdocumentation]","clang/test/Lexer/comment-escape.c:21:1: warning: line splicing in Doxygen comments are not supported [-Wdocumentation]","clang/test/Lexer/comment-escape.c:26:1: warning: line splicing in Doxygen comments are not supported [-Wdocumentation]","clang/test/Lexer/comment-escape.c:32:1: warning: line splicing in Doxygen comments are not supported [-Wdocumentation]","clang/test/Lexer/comment-escape.c:36:1: warning: line splicing in Doxygen comments are not supported [-Wdocumentation]"} | ["clang/test/Lexer/comment-escape.c"]={"clang/test/Lexer/comment-escape.c:9:1: warning: line splicing in Doxygen comments are not supported [-Wdocumentation]","clang/test/Lexer/comment-escape.c:14:1: warning: line splicing in Doxygen comments are not supported [-Wdocumentation]","clang/test/Lexer/comment-escape.c:21:1: warning: line splicing in Doxygen comments are not supported [-Wdocumentation]","clang/test/Lexer/comment-escape.c:26:1: warning: line splicing in Doxygen comments are not supported [-Wdocumentation]","clang/test/Lexer/comment-escape.c:32:1: warning: line splicing in Doxygen comments are not supported [-Wdocumentation]","clang/test/Lexer/comment-escape.c:36:1: warning: line splicing in Doxygen comments are not supported [-Wdocumentation]"} | ||
} | } | ||
}, | }, | ||
["warn_stack_clash_protection_inline_asm"]={ | ["warn_stack_clash_protection_inline_asm"]={ | ||
[ | [i]={"stack-protector"}, | ||
[j]="stack-protector", | |||
[ | |||
[b]="unable to protect inline asm that clobbers stack pointer against stack clash", | [b]="unable to protect inline asm that clobbers stack pointer against stack clash", | ||
[ | [d]=h, | ||
[ | [a]="unable to protect inline asm that clobbers stack pointer against stack clash", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wstack\\-protector[^\\]]*\\]", | ||
[ | [c]="Inline Assembly Issue", | ||
[ | [f]={"39f50da2a357",1568041174,"Support -fstack-clash-protection for x86\n\nImplement protection against the stack clash attack [0] th...","Support -fstack-clash-protection for x86\n\nImplement protection against the stack clash attack [0] through inline stack\nprobing.\n\nProbe stack allocation every PAGE_SIZE during frame lowering or dynamic\nallocation to make sure the page guard, if any, is touched when touching the\nstack, in a similar manner to GCC[1].\n\nThis extends the existing `probe-stack\' mechanism with a special value `inline-asm\'.\nTechnically the former uses function call before stack allocation while this\npatch provides inlined stack probes and chunk allocation.\n\nOnly implemented for x86.\n\n[0] https://www.qualys.com/2017/06/19/stack-clash/stack-clash.txt\n[1] https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00556.html\n\nDifferential Revision: https://reviews.llvm.org/D68720"}, | ||
[ | [g]={{"clang/lib/CodeGen/CGStmt.cpp",2751,"void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {\n // ...\n // Clobbers\n for (unsigned i = 0, e = S.getNumClobbers(); i != e; i++) {\n // ...\n if (Clobber == \"memory\")\n // ...\n else if (Clobber == \"unwind\") {\n // ...\n } else if (Clobber != \"cc\") {\n // ...\n if (CGM.getCodeGenOpts().StackClashProtector && getTarget().isSPRegName(Clobber)) {\n CGM.getDiags().Report(S.getAsmLoc(), diag::warn_stack_clash_protection_inline_asm);"}}, | ||
[ | [k]={ | ||
["clang/test/Driver/stack-clash-protection-02.c"]={"clang/test/Driver/stack-clash-protection-02.c:8:3: warning: unable to protect inline asm that clobbers stack pointer against stack clash [-Wstack-protector]"} | ["clang/test/Driver/stack-clash-protection-02.c"]={"clang/test/Driver/stack-clash-protection-02.c:8:3: warning: unable to protect inline asm that clobbers stack pointer against stack clash [-Wstack-protector]"} | ||
} | } | ||
}, | }, | ||
["warn_stack_exhausted"]={ | ["warn_stack_exhausted"]={ | ||
[ | [i]={"stack-exhausted"}, | ||
[j]="stack-exhausted", | |||
[ | |||
[b]="stack nearly exhausted; compilation time may suffer, and crashes due to stack overflow are likely", | [b]="stack nearly exhausted; compilation time may suffer, and crashes due to stack overflow are likely", | ||
[ | [d]=h, | ||
[ | [a]="stack nearly exhausted; compilation time may suffer, and crashes due to stack overflow are likely", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wstack\\-exhausted[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"26a92d5852b2",1566843487,"Improve behavior in the case of stack exhaustion.\n\nSummary:\nClang performs various recursive operati...","Improve behavior in the case of stack exhaustion.\n\nSummary:\nClang performs various recursive operations (such as template instantiation),\nand may use non-trivial amounts of stack space in each recursive step (for\ninstance, due to recursive AST walks). While we try to keep the stack space\nused by such steps to a minimum and we have explicit limits on the number of\nsuch steps we perform, it\'s impractical to guarantee that we won\'t blow out the\nstack on deeply recursive template instantiations on complex ASTs, even with\nonly a moderately high instantiation depth limit.\n\nThe user experience in these cases is generally terrible: we crash with\nno hint of what went wrong. Under this patch, we attempt to do better:\n\n * Detect when the stack is nearly exhausted, and produce a warning with a\n nice template instantiation backtrace, telling the user that we might\n run slowly or crash.\n\n * For cases where we\'re forced to trigger recursive template\n instantiation in arbitrarily-deeply-nested contexts, check whether\n we\'re nearly out of stack space and allocate a new stack (by spawning\n a new thread) after producing the warning.\n\nReviewers: rnk, aaron.ballman\n\nSubscribers: mgorny, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D66361\n\nllvm-svn: 369940"}, | ||
[ | [g]={{S,506,"void Sema::warnStackExhausted(SourceLocation Loc) {\n // Only warn about this once.\n if (!WarnedStackExhausted) {\n Diag(Loc, diag::warn_stack_exhausted);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaTemplate/stack-exhaustion.cpp"]={"clang/test/SemaTemplate/stack-exhaustion.cpp:19:24: warning: stack nearly exhausted; compilation time may suffer, and crashes due to stack overflow are likely [-Wstack-exhausted]"} | ["clang/test/SemaTemplate/stack-exhaustion.cpp"]={"clang/test/SemaTemplate/stack-exhaustion.cpp:19:24: warning: stack nearly exhausted; compilation time may suffer, and crashes due to stack overflow are likely [-Wstack-exhausted]"} | ||
} | } | ||
}, | }, | ||
["warn_standalone_specifier"]={ | ["warn_standalone_specifier"]={ | ||
[ | [i]={"missing-declarations"}, | ||
[j]="missing-declarations", | |||
[ | |||
[b]="\'%0\' ignored on this declaration", | [b]="\'%0\' ignored on this declaration", | ||
[ | [d]=h, | ||
[ | [a]="\'(.*?)\' ignored on this declaration", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wmissing\\-declarations[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"aa017377827f",1300834804,"Warn about unused declaration-specifiers on tag declarations.\n\nllvm-svn: 128118","Warn about unused declaration-specifiers on tag declarations.\n\nllvm-svn: 128118"}, | ||
[ | [g]={{B,5279,"/// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with\n/// no declarator (e.g. \"struct foo;\") is parsed. It also accepts template\n/// parameters to cope with template friend declarations.\nDecl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, DeclSpec &DS, const ParsedAttributesView &DeclAttrs, MultiTemplateParamsArg TemplateParams, bool IsExplicitInstantiation, RecordDecl *&AnonRecord) {\n // ...\n unsigned DiagID = diag::warn_standalone_specifier;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/struct-decl.c"]={"clang/test/Sema/struct-decl.c:51:1: warning: \'static\' ignored on this declaration [-Wmissing-declarations]","clang/test/Sema/struct-decl.c:54:1: warning: \'const\' ignored on this declaration [-Wmissing-declarations]"} | ["clang/test/Sema/struct-decl.c"]={"clang/test/Sema/struct-decl.c:51:1: warning: \'static\' ignored on this declaration [-Wmissing-declarations]","clang/test/Sema/struct-decl.c:54:1: warning: \'const\' ignored on this declaration [-Wmissing-declarations]"} | ||
} | } | ||
}, | }, | ||
["warn_static_array_too_small"]={ | ["warn_static_array_too_small"]={ | ||
[ | [i]={"array-bounds"}, | ||
[j]="array-bounds", | |||
[ | |||
[b]="array argument is too small; %select{contains %0 elements|is of size %0}2, callee requires at least %1", | [b]="array argument is too small; %select{contains %0 elements|is of size %0}2, callee requires at least %1", | ||
[ | [d]=h, | ||
[ | [a]="array argument is too small; (?:contains (.*?) elements|is of size (.*?)), callee requires at least (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Warray\\-bounds[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"5aa6ecb619bc",1318799852,"Add sema checks for calls to functions taking static array parameters\n\nllvm-svn: 142157","Add sema checks for calls to functions taking static array parameters\n\nllvm-svn: 142157"}, | ||
[ | [g]={{u,6714,"/// CheckStaticArrayArgument - If the given argument corresponds to a static\n/// array parameter, check that it is non-null, and that if it is formed by\n/// array-to-pointer decay, the underlying array is sufficiently large.\n///\n/// C99 6.7.5.3p7: If the keyword static also appears within the [ and ] of the\n/// array type derivation, then for each call to the function, the value of the\n/// corresponding actual argument shall provide access to the first element of\n/// an array with at least as many elements as specified by the size expression.\nvoid Sema::CheckStaticArrayArgument(SourceLocation CallLoc, ParmVarDecl *Param, const Expr *ArgExpr) {\n // ...\n if (getASTContext().hasSameUnqualifiedType(CAT->getElementType(), ArgCAT->getElementType())) {\n if (ArgCAT->getSize().ult(CAT->getSize())) {\n Diag(CallLoc, diag::warn_static_array_too_small) << ArgExpr->getSourceRange() << (unsigned)ArgCAT->getSize().getZExtValue() << (unsigned)CAT->getSize().getZExtValue() << 0;"},{u,6906,"/// CheckStaticArrayArgument - If the given argument corresponds to a static\n/// array parameter, check that it is non-null, and that if it is formed by\n/// array-to-pointer decay, the underlying array is sufficiently large.\n///\n/// C99 6.7.5.3p7: If the keyword static also appears within the [ and ] of the\n/// array type derivation, then for each call to the function, the value of the\n/// corresponding actual argument shall provide access to the first element of\n/// an array with at least as many elements as specified by the size expression.\nvoid Sema::CheckStaticArrayArgument(SourceLocation CallLoc, ParmVarDecl *Param, const Expr *ArgExpr) {\n // ...\n if (ArgSize && ParmSize && *ArgSize < *ParmSize) {\n Diag(CallLoc, diag::warn_static_array_too_small) << ArgExpr->getSourceRange() << (unsigned)ArgSize->getQuantity() << (unsigned)ParmSize->getQuantity() << 1;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/static-array.c"]={"clang/test/Sema/static-array.c:16:3: warning: array argument is too small; contains 2 elements, callee requires at least 3 [-Warray-bounds]","clang/test/Sema/static-array.c:25:3: warning: array argument is too small; is of size 4, callee requires at least 12 [-Warray-bounds]","clang/test/Sema/static-array.c:26:3: warning: array argument is too small; is of size 4, callee requires at least 12 [-Warray-bounds]"} | ["clang/test/Sema/static-array.c"]={"clang/test/Sema/static-array.c:16:3: warning: array argument is too small; contains 2 elements, callee requires at least 3 [-Warray-bounds]","clang/test/Sema/static-array.c:25:3: warning: array argument is too small; is of size 4, callee requires at least 12 [-Warray-bounds]","clang/test/Sema/static-array.c:26:3: warning: array argument is too small; is of size 4, callee requires at least 12 [-Warray-bounds]"} | ||
} | } | ||
}, | }, | ||
["warn_static_assert_message_constexpr"]={ | ["warn_static_assert_message_constexpr"]={ | ||
[ | [i]={"invalid-static-assert-message"}, | ||
[j]="invalid-static-assert-message", | |||
[ | |||
[b]="the message in this static assertion is not a constant expression", | [b]="the message in this static assertion is not a constant expression", | ||
[ | [d]=Hb, | ||
[ | [a]="the message in this static assertion is not a constant expression", | ||
[ | [e]=" \\[[^\\]]*\\-Winvalid\\-static\\-assert\\-message[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"47ccfd7a89e2",1667306232,"[Clang] Implement P2741R3 - user-generated static_assert messages\n\nReviewed By: #clang-language-wg, ...","[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]={{T,17049,"bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message, std::string &Result, ASTContext &Ctx, bool ErrorOnInvalidMessage) {\n // ...\n if (!ErrorOnInvalidMessage && Diags.isIgnored(diag::warn_static_assert_message_constexpr, Loc))"},{T,17060,"bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message, std::string &Result, ASTContext &Ctx, bool ErrorOnInvalidMessage) {\n // ...\n if (!Message->EvaluateCharRangeAsString(Result, EvaluatedSize.get(), EvaluatedData.get(), Ctx, Status) || !Notes.empty()) {\n Diag(Message->getBeginLoc(), ErrorOnInvalidMessage ? diag::err_static_assert_message_constexpr : diag::warn_static_assert_message_constexpr);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/static-assert-cxx26.cpp"]={"clang/test/SemaCXX/static-assert-cxx26.cpp:34:21: error: the message in this static assertion is not a constant expression [-Winvalid-static-assert-message]","clang/test/SemaCXX/static-assert-cxx26.cpp:48:21: error: the message in this static assertion is not a constant expression [-Winvalid-static-assert-message]"} | ["clang/test/SemaCXX/static-assert-cxx26.cpp"]={"clang/test/SemaCXX/static-assert-cxx26.cpp:34:21: error: the message in this static assertion is not a constant expression [-Winvalid-static-assert-message]","clang/test/SemaCXX/static-assert-cxx26.cpp:48:21: error: the message in this static assertion is not a constant expression [-Winvalid-static-assert-message]"} | ||
} | } | ||
}, | }, | ||
["warn_static_inline_explicit_inst_ignored"]={ | ["warn_static_inline_explicit_inst_ignored"]={ | ||
[ | [i]={"static-inline-explicit-instantiation"}, | ||
[j]="static-inline-explicit-instantiation", | |||
[ | |||
[b]="ignoring \'%select{static|inline}0\' keyword on explicit template instantiation", | [b]="ignoring \'%select{static|inline}0\' keyword on explicit template instantiation", | ||
[ | [d]=h, | ||
[ | [a]="ignoring \'(?:static|inline)\' keyword on explicit template instantiation", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wstatic\\-inline\\-explicit\\-instantiation[^\\]]*\\]", | ||
[ | [c]=v, | ||
[ | [f]={"aa49ecc4586a",1291235540,"Not content to implement just \"extern\" explicit template\ninstantiations, GCC also supports \"inline\" ...","Not content to implement just \"extern\" explicit template\ninstantiations, GCC also supports \"inline\" and \"static\" explicit\ntemplate instantiations. Parse and warn about such constructs, but\ndon\'t implement the semantics of either \"inline\" or \"static\". They\ndon\'t seem to be widely used.\n\nllvm-svn: 120599"}, | ||
[ | [g]={{"clang/lib/Parse/Parser.cpp",974,"/// ParseExternalDeclaration:\n///\n/// The `Attrs` that are passed in are C++11 attributes and appertain to the\n/// declaration.\n///\n/// external-declaration: [C99 6.9], declaration: [C++ dcl.dcl]\n/// function-definition\n/// declaration\n/// [GNU] asm-definition\n/// [GNU] __extension__ external-declaration\n/// [OBJC] objc-class-definition\n/// [OBJC] objc-class-declaration\n/// [OBJC] objc-alias-declaration\n/// [OBJC] objc-protocol-definition\n/// [OBJC] objc-method-definition\n/// [OBJC] @end\n/// [C++] linkage-specification\n/// [GNU] asm-definition:\n/// simple-asm-expr \';\'\n/// [C++11] empty-declaration\n/// [C++11] attribute-declaration\n///\n/// [C++11] empty-declaration:\n/// \';\'\n///\n/// [C++0x/GNU] \'extern\' \'template\' declaration\n///\n/// [C++20] module-import-declaration\n///\nParser::DeclGroupPtrTy Parser::ParseExternalDeclaration(ParsedAttributes &Attrs, ParsedAttributes &DeclSpecAttrs, ParsingDeclSpec *DS) {\n // ...\n case tok::kw_static:\n // Parse (then ignore) \'static\' prior to a template instantiation. This is\n // a GCC extension that we intentionally do not support.\n if (getLangOpts().CPlusPlus && NextToken().is(tok::kw_template)) {\n Diag(ConsumeToken(), diag::warn_static_inline_explicit_inst_ignored) << 0;"},{"clang/lib/Parse/Parser.cpp",996,"/// ParseExternalDeclaration:\n///\n/// The `Attrs` that are passed in are C++11 attributes and appertain to the\n/// declaration.\n///\n/// external-declaration: [C99 6.9], declaration: [C++ dcl.dcl]\n/// function-definition\n/// declaration\n/// [GNU] asm-definition\n/// [GNU] __extension__ external-declaration\n/// [OBJC] objc-class-definition\n/// [OBJC] objc-class-declaration\n/// [OBJC] objc-alias-declaration\n/// [OBJC] objc-protocol-definition\n/// [OBJC] objc-method-definition\n/// [OBJC] @end\n/// [C++] linkage-specification\n/// [GNU] asm-definition:\n/// simple-asm-expr \';\'\n/// [C++11] empty-declaration\n/// [C++11] attribute-declaration\n///\n/// [C++11] empty-declaration:\n/// \';\'\n///\n/// [C++0x/GNU] \'extern\' \'template\' declaration\n///\n/// [C++20] module-import-declaration\n///\nParser::DeclGroupPtrTy Parser::ParseExternalDeclaration(ParsedAttributes &Attrs, ParsedAttributes &DeclSpecAttrs, ParsingDeclSpec *DS) {\n // ...\n case tok::kw_inline:\n if (getLangOpts().CPlusPlus) {\n // ...\n // Parse (then ignore) \'inline\' prior to a template instantiation. This is\n // a GCC extension that we intentionally do not support.\n if (NextKind == tok::kw_template) {\n Diag(ConsumeToken(), diag::warn_static_inline_explicit_inst_ignored) << 1;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaTemplate/explicit-instantiation.cpp"]={"clang/test/SemaTemplate/explicit-instantiation.cpp:89:1: warning: ignoring \'inline\' keyword on explicit template instantiation [-Wstatic-inline-explicit-instantiation]","clang/test/SemaTemplate/explicit-instantiation.cpp:90:1: warning: ignoring \'static\' keyword on explicit template instantiation [-Wstatic-inline-explicit-instantiation]"} | ["clang/test/SemaTemplate/explicit-instantiation.cpp"]={"clang/test/SemaTemplate/explicit-instantiation.cpp:89:1: warning: ignoring \'inline\' keyword on explicit template instantiation [-Wstatic-inline-explicit-instantiation]","clang/test/SemaTemplate/explicit-instantiation.cpp:90:1: warning: ignoring \'static\' keyword on explicit template instantiation [-Wstatic-inline-explicit-instantiation]"} | ||
} | } | ||
}, | }, | ||
["warn_static_local_in_extern_inline"]={ | ["warn_static_local_in_extern_inline"]={ | ||
[ | [i]={"static-local-in-inline"}, | ||
[j]="static-local-in-inline", | |||
[ | |||
[b]="non-constant static local variable in inline function may be different in different files", | [b]="non-constant static local variable in inline function may be different in different files", | ||
[ | [d]=h, | ||
[ | [a]="non\\-constant static local variable in inline function may be different in different files", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wstatic\\-local\\-in\\-inline[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"c87d97231d12",1364870938,"Add -Wstatic-local-in-inline, which warns about using a static local\nvariable in a C99 inline (but n...","Add -Wstatic-local-in-inline, which warns about using a static local\nvariable in a C99 inline (but not static-inline or extern-inline)\nfunction definition.\n\nThe standard doesn\'t actually say that this doesn\'t apply to\n\"extern inline\" definitions, but that seems like a useful extension,\nand it at least doesn\'t have the obvious flaw that a static\nmutable variable in an externally-available definition does.\n\nrdar://13535367\n\nllvm-svn: 178520"}, | ||
[ | [g]={{B,7830,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n // C99 6.7.4p3\n // An inline definition of a function with external linkage shall\n // not contain a definition of a modifiable object with static or\n // thread storage duration...\n // We only apply this when the function is required to be defined\n // elsewhere, i.e. when the function is not \'extern inline\'. Note\n // that a local variable with thread storage duration still has to\n // be marked \'static\'. Also note that it\'s possible to get these\n // semantics in C++ using __attribute__((gnu_inline)).\n if (SC == SC_Static && S->getFnParent() != nullptr && !NewVD->getType().isConstQualified()) {\n // ...\n if (CurFD && isFunctionDefinitionDiscarded(*this, CurFD)) {\n Diag(D.getDeclSpec().getStorageClassSpecLoc(), diag::warn_static_local_in_extern_inline);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/inline.c"]={"clang/test/Sema/inline.c:78:3: warning: non-constant static local variable in inline function may be different in different files [-Wstatic-local-in-inline]"} | ["clang/test/Sema/inline.c"]={"clang/test/Sema/inline.c:78:3: warning: non-constant static local variable in inline function may be different in different files [-Wstatic-local-in-inline]"} | ||
} | } | ||
}, | }, | ||
["warn_static_main"]={ | ["warn_static_main"]={ | ||
[ | [i]={"main"}, | ||
[j]="main", | |||
[ | |||
[b]="\'main\' should not be declared static", | [b]="\'main\' should not be declared static", | ||
[ | [d]=h, | ||
[ | [a]="\'main\' should not be declared static", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wmain[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"d937bf13d461",1315463584,"Adding FixIts to static/inline main declaration diagnostics.\n\nllvm-svn: 139282","Adding FixIts to static/inline main declaration diagnostics.\n\nllvm-svn: 139282"}, | ||
[ | [g]={{B,12077,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n // C++11 [basic.start.main]p3:\n // A program that [...] declares main to be inline, static or\n // constexpr is ill-formed.\n // C11 6.7.4p4: In a hosted environment, no function specifier(s) shall\n // appear in a declaration of main.\n // static main is not an error under C99, but we should warn about it.\n // We accept _Noreturn main as an extension.\n if (FD->getStorageClass() == SC_Static)\n Diag(DS.getStorageClassSpecLoc(), getLangOpts().CPlusPlus ? diag::err_static_main : diag::warn_static_main) << FixItHint::CreateRemoval(DS.getStorageClassSpecLoc());"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-main.c"]={"clang/test/Sema/warn-main.c:12:1: warning: \'main\' should not be declared static [-Wmain]"} | ["clang/test/Sema/warn-main.c"]={"clang/test/Sema/warn-main.c:12:1: warning: \'main\' should not be declared static [-Wmain]"} | ||
} | } | ||
}, | }, | ||
["warn_static_self_reference_in_init"]={ | ["warn_static_self_reference_in_init"]={ | ||
[ | [i]={n,o,p,"static-self-init",tb}, | ||
[j]="static-self-init", | |||
[ | |||
[b]="static variable %0 is suspiciously used within its own initialization", | [b]="static variable %0 is suspiciously used within its own initialization", | ||
[ | [d]=h, | ||
[ | [a]="static variable (.*?) is suspiciously used within its own initialization", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wstatic\\-self\\-init[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"e07d167a5016",1358556540,"Reword warning about using a *static* variable within its own initialization.\n\nThe warning is still ...","Reword warning about using a *static* variable within its own initialization.\n\nThe warning is still under -Wuninitialized (although technically this\nis defined behavior), but under a subgroup -Wstatic-self-init.\n\nThis addresses PR 10265.\n\nllvm-svn: 172878"}, | ||
[ | [g]={{B,12619,"// Visits an initialization expression to see if OrigDecl is evaluated in\n// its own initialization and throws a warning if it does.\nclass SelfReferenceChecker : public EvaluatedExprVisitor<SelfReferenceChecker> {\n // ...\n void HandleDeclRefExpr(DeclRefExpr *DRE) {\n // ...\n if (isReferenceType) {\n // ...\n } else if (cast<VarDecl>(OrigDecl)->isStaticLocal()) {\n diag = diag::warn_static_self_reference_in_init;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/uninitialized.cpp"]={ | ["clang/test/SemaCXX/uninitialized.cpp"]={ | ||
[1]="clang/test/SemaCXX/uninitialized.cpp:737:20: warning: static variable \'b\' is suspiciously used within its own initialization [-Wstatic-self-init]", | [1]="clang/test/SemaCXX/uninitialized.cpp:737:20: warning: static variable \'b\' is suspiciously used within its own initialization [-Wstatic-self-init]", | ||
Line 6,871: | Line 5,600: | ||
}, | }, | ||
["warn_stdc_fenv_round_not_supported"]={ | ["warn_stdc_fenv_round_not_supported"]={ | ||
[ | [i]={n,o,p,t,G}, | ||
[j]=G, | |||
[ | |||
[b]="pragma STDC FENV_ROUND is not supported", | [b]="pragma STDC FENV_ROUND is not supported", | ||
[ | [d]=h, | ||
[ | [a]="pragma STDC FENV_ROUND is not supported", | ||
[ | [e]=hb, | ||
[ | [c]=v, | ||
[ | [f]={"5c63ae156e96",1597298751,"[OpenMP] Support nested OpenMP context selectors (declare variant)\n\nDue to `omp begin/end declare va...","[OpenMP] Support nested OpenMP context selectors (declare variant)\n\nDue to `omp begin/end declare variant`, OpenMP context selectors can be\nnested. This patch adds initial support for this so we can use it for\ntarget math variants. We should improve the detection of \"equivalent\"\nscores and user conditions, we should also revisit the data structures\nof the OMPTraitInfo object, however, both are not pressing issues right\nnow.\n\nReviewed By: JonChesterfield\n\nDifferential Revision: https://reviews.llvm.org/D85877"}, | ||
[ | [g]={{m,3379,"void PragmaSTDC_FENV_ROUNDHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n PP.Diag(Tok.getLocation(), diag::warn_stdc_fenv_round_not_supported);"}}, | ||
[ | [k]={ | ||
["clang/test/AST/ast-dump-pragma-json.c"]={"clang/test/AST/ast-dump-pragma-json.c:4:40: warning: pragma STDC FENV_ROUND is not supported [-Wunknown-pragmas]","clang/test/AST/ast-dump-pragma-json.c:6:38: warning: pragma STDC FENV_ROUND is not supported [-Wunknown-pragmas]"} | ["clang/test/AST/ast-dump-pragma-json.c"]={"clang/test/AST/ast-dump-pragma-json.c:4:40: warning: pragma STDC FENV_ROUND is not supported [-Wunknown-pragmas]","clang/test/AST/ast-dump-pragma-json.c:6:38: warning: pragma STDC FENV_ROUND is not supported [-Wunknown-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_stdc_unknown_rounding_mode"]={ | ["warn_stdc_unknown_rounding_mode"]={ | ||
[ | [i]={q,t}, | ||
[j]=q, | |||
[ | |||
[b]="invalid or unsupported rounding mode in \'#pragma STDC FENV_ROUND\' - ignored", | [b]="invalid or unsupported rounding mode in \'#pragma STDC FENV_ROUND\' - ignored", | ||
[ | [d]=h, | ||
[ | [a]="invalid or unsupported rounding mode in \'\\#pragma STDC FENV_ROUND\' \\- ignored", | ||
[ | [e]=z, | ||
[ | [c]=v, | ||
[ | [f]={"5c63ae156e96",1597298751,"[OpenMP] Support nested OpenMP context selectors (declare variant)\n\nDue to `omp begin/end declare va...","[OpenMP] Support nested OpenMP context selectors (declare variant)\n\nDue to `omp begin/end declare variant`, OpenMP context selectors can be\nnested. This patch adds initial support for this so we can use it for\ntarget math variants. We should improve the detection of \"equivalent\"\nscores and user conditions, we should also revisit the data structures\nof the OMPTraitInfo object, however, both are not pressing issues right\nnow.\n\nReviewed By: JonChesterfield\n\nDifferential Revision: https://reviews.llvm.org/D85877"}, | ||
[ | [g]={{m,3367,"void PragmaSTDC_FENV_ROUNDHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (RM == llvm::RoundingMode::Invalid) {\n PP.Diag(Tok.getLocation(), diag::warn_stdc_unknown_rounding_mode);"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/pragma-fenv_round.c"]={"clang/test/Parser/pragma-fenv_round.c:3:25: warning: invalid or unsupported rounding mode in \'#pragma STDC FENV_ROUND\' - ignored [-Wignored-pragmas]"} | ["clang/test/Parser/pragma-fenv_round.c"]={"clang/test/Parser/pragma-fenv_round.c:3:25: warning: invalid or unsupported rounding mode in \'#pragma STDC FENV_ROUND\' - ignored [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_strict_multiple_method_decl"]={ | ["warn_strict_multiple_method_decl"]={ | ||
[ | [i]={"strict-selector-match"}, | ||
[j]="strict-selector-match", | |||
[ | |||
[b]="multiple methods named %0 found", | [b]="multiple methods named %0 found", | ||
[ | [d]=h, | ||
[ | [a]="multiple methods named (.*?) found", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wstrict\\-selector\\-match[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"3337b2e8dd0e",1281396478,"Implements gcc\'s -Wstrict-selector-match.\n(radar 8127244).\n\nllvm-svn: 110622","Implements gcc\'s -Wstrict-selector-match.\n(radar 8127244).\n\nllvm-svn: 110622"}, | ||
[ | [g]={{I,3607,"void Sema::DiagnoseMultipleMethodInGlobalPool(SmallVectorImpl<ObjCMethodDecl *> &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass) {\n // ...\n bool strictSelectorMatch = receiverIdOrClass && !Diags.isIgnored(diag::warn_strict_multiple_method_decl, R.getBegin());"},{I,3637,"void Sema::DiagnoseMultipleMethodInGlobalPool(SmallVectorImpl<ObjCMethodDecl *> &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass) {\n // ...\n if (issueDiagnostic) {\n if (issueError)\n // ...\n else if (strictSelectorMatch)\n Diag(R.getBegin(), diag::warn_strict_multiple_method_decl) << Sel << R;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/warn-strict-selector-match.m"]={"clang/test/SemaObjC/warn-strict-selector-match.m:11:18: warning: multiple methods named \'method\' found [-Wstrict-selector-match]","clang/test/SemaObjC/warn-strict-selector-match.m:26:3: warning: multiple methods named \'setWindow:\' found [-Wstrict-selector-match]","clang/test/SemaObjC/warn-strict-selector-match.m:28:3: warning: multiple methods named \'setWindow:\' found [-Wstrict-selector-match]","clang/test/SemaObjC/warn-strict-selector-match.m:57:32: warning: multiple methods named \'initWithData:\' found [-Wstrict-selector-match]","clang/test/SemaObjC/warn-strict-selector-match.m:93:12: warning: multiple methods named \'initWithType:\' found [-Wstrict-selector-match]"} | ["clang/test/SemaObjC/warn-strict-selector-match.m"]={"clang/test/SemaObjC/warn-strict-selector-match.m:11:18: warning: multiple methods named \'method\' found [-Wstrict-selector-match]","clang/test/SemaObjC/warn-strict-selector-match.m:26:3: warning: multiple methods named \'setWindow:\' found [-Wstrict-selector-match]","clang/test/SemaObjC/warn-strict-selector-match.m:28:3: warning: multiple methods named \'setWindow:\' found [-Wstrict-selector-match]","clang/test/SemaObjC/warn-strict-selector-match.m:57:32: warning: multiple methods named \'initWithData:\' found [-Wstrict-selector-match]","clang/test/SemaObjC/warn-strict-selector-match.m:93:12: warning: multiple methods named \'initWithType:\' found [-Wstrict-selector-match]"} | ||
} | } | ||
}, | }, | ||
["warn_strict_potentially_direct_selector_expression"]={ | ["warn_strict_potentially_direct_selector_expression"]={ | ||
[ | [i]={"strict-potentially-direct-selector"}, | ||
[j]="strict-potentially-direct-selector", | |||
[ | |||
[b]="@selector expression formed with potentially direct selector %0", | [b]="@selector expression formed with potentially direct selector %0", | ||
[ | [d]=h, | ||
[ | [a]="@selector expression formed with potentially direct selector (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wstrict\\-potentially\\-direct\\-selector[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={Ob,1582847864,Mb,Nb}, | ||
[ | [g]={{U,1341,"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(AtLoc, diag::warn_strict_potentially_direct_selector_expression) << Sel;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/potentially-direct-selector.m"]={"clang/test/SemaObjC/potentially-direct-selector.m:83:9: warning: @selector expression formed with potentially direct selector \'inBase\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:84:9: warning: @selector expression formed with potentially direct selector \'inBaseImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:85:9: warning: @selector expression formed with potentially direct selector \'inBaseCat\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:86:9: warning: @selector expression formed with potentially direct selector \'inBaseCatImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:87:9: warning: @selector expression formed with potentially direct selector \'inDerived\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:88:9: warning: @selector expression formed with potentially direct selector \'inDerivedImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:89:9: warning: @selector expression formed with potentially direct selector \'inDerivedCat\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:90:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:91:9: warning: @selector expression formed with potentially direct selector \'inDerivedClass\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:92:9: warning: @selector expression formed with potentially direct selector \'inBaseClass\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:93:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatClass\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:103:9: warning: @selector expression formed with potentially direct selector \'inDerived\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:104:9: warning: @selector expression formed with potentially direct selector \'inDerivedImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:105:9: warning: @selector expression formed with potentially direct selector \'inDerivedCat\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:106:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:107:9: warning: @selector expression formed with potentially direct selector \'inDerivedClass\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:109:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatClass\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:117:9: warning: @selector expression formed with potentially direct selector \'inBase\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:118:9: warning: @selector expression formed with potentially direct selector \'inBaseImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:119:9: warning: @selector expression formed with potentially direct selector \'inBaseCat\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:120:9: warning: @selector expression formed with potentially direct selector \'inBaseCatImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:121:9: warning: @selector expression formed with potentially direct selector \'inDerived\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:122:9: warning: @selector expression formed with potentially direct selector \'inDerivedImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:123:9: warning: @selector expression formed with potentially direct selector \'inDerivedCat\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:124:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:125:9: warning: @selector expression formed with potentially direct selector \'inDerivedClass\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:126:9: warning: @selector expression formed with potentially direct selector \'inBaseClass\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:127:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatClass\' [-Wstrict-potentially-direct-selector]"} | ["clang/test/SemaObjC/potentially-direct-selector.m"]={"clang/test/SemaObjC/potentially-direct-selector.m:83:9: warning: @selector expression formed with potentially direct selector \'inBase\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:84:9: warning: @selector expression formed with potentially direct selector \'inBaseImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:85:9: warning: @selector expression formed with potentially direct selector \'inBaseCat\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:86:9: warning: @selector expression formed with potentially direct selector \'inBaseCatImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:87:9: warning: @selector expression formed with potentially direct selector \'inDerived\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:88:9: warning: @selector expression formed with potentially direct selector \'inDerivedImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:89:9: warning: @selector expression formed with potentially direct selector \'inDerivedCat\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:90:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:91:9: warning: @selector expression formed with potentially direct selector \'inDerivedClass\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:92:9: warning: @selector expression formed with potentially direct selector \'inBaseClass\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:93:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatClass\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:103:9: warning: @selector expression formed with potentially direct selector \'inDerived\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:104:9: warning: @selector expression formed with potentially direct selector \'inDerivedImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:105:9: warning: @selector expression formed with potentially direct selector \'inDerivedCat\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:106:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:107:9: warning: @selector expression formed with potentially direct selector \'inDerivedClass\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:109:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatClass\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:117:9: warning: @selector expression formed with potentially direct selector \'inBase\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:118:9: warning: @selector expression formed with potentially direct selector \'inBaseImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:119:9: warning: @selector expression formed with potentially direct selector \'inBaseCat\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:120:9: warning: @selector expression formed with potentially direct selector \'inBaseCatImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:121:9: warning: @selector expression formed with potentially direct selector \'inDerived\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:122:9: warning: @selector expression formed with potentially direct selector \'inDerivedImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:123:9: warning: @selector expression formed with potentially direct selector \'inDerivedCat\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:124:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatImpl\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:125:9: warning: @selector expression formed with potentially direct selector \'inDerivedClass\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:126:9: warning: @selector expression formed with potentially direct selector \'inBaseClass\' [-Wstrict-potentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:127:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatClass\' [-Wstrict-potentially-direct-selector]"} | ||
} | } | ||
}, | }, | ||
["warn_strict_prototypes"]={ | ["warn_strict_prototypes"]={ | ||
[ | [i]={"pedantic","strict-prototypes"}, | ||
[j]="strict-prototypes", | |||
[ | |||
[b]="a %select{function|block}0 declaration without a prototype is deprecated %select{in all versions of C|}0", | [b]="a %select{function|block}0 declaration without a prototype is deprecated %select{in all versions of C|}0", | ||
[ | [d]=h, | ||
[ | [a]="a (?:function|block) declaration without a prototype is deprecated (?:in all versions of C|)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wstrict\\-prototypes[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"840f8df67759",1481107938,"Implement the -Wstrict-prototypes warning\n\nThis commit fixes PR20796. It implements the C only -Wstr...","Implement the -Wstrict-prototypes warning\n\nThis commit fixes PR20796. It implements the C only -Wstrict-prototypes warning.\nClang now emits a warning for function declarations which have no parameters\nspecified and for K&R function definitions with more than 0 parameters that are\nnot preceded by a previous prototype declaration.\n\nThe patch was originally submitted by Paul Titei!\n\nrdar://15060615\n\nDifferential Revision: https://reviews.llvm.org/D16533\n\nllvm-svn: 288896"}, | ||
[ | [g]={{L,5767,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n // GNU warning -Wstrict-prototypes\n // Warn if a function declaration or definition is without a prototype.\n // This warning is issued for all kinds of unprototyped function\n // declarations (i.e. function type typedef, function pointer etc.)\n // C99 6.7.5.3p14:\n // The empty list in a function declarator that is not part of a definition\n // of that function specifies that no information about the number or types\n // of the parameters is supplied.\n // See ActOnFinishFunctionBody() and MergeFunctionDecl() for handling of\n // function declarations whose behavior changes in C2x.\n if (!LangOpts.requiresStrictPrototypes()) {\n // ...\n for (const DeclaratorChunk &DeclType : D.type_objects()) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // We suppress the warning when there\'s no LParen location, as this\n // indicates the declaration was an implicit declaration, which gets\n // warned about separately via -Wimplicit-function-declaration. We also\n // suppress the warning when we know the function has a prototype.\n if (!FTI.hasPrototype && FTI.NumParams == 0 && !FTI.isVariadic && FTI.getLParenLoc().isValid())\n S.Diag(DeclType.Loc, diag::warn_strict_prototypes) << IsBlock << FixItHint::CreateInsertion(FTI.getRParenLoc(), \"void\");"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:5:8: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]","clang/test/Parser/declarators.c:47:10: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]"} | ["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:5:8: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]","clang/test/Parser/declarators.c:47:10: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]"} | ||
} | } | ||
}, | }, | ||
["warn_strict_uses_without_prototype"]={ | ["warn_strict_uses_without_prototype"]={ | ||
[ | [i]={"deprecated-non-prototype","strict-prototypes"}, | ||
[j]="deprecated-non-prototype", | |||
[ | |||
[b]="passing arguments to %select{a function|%1}0 without a prototype is deprecated in all versions of C and is not supported in C2x", | [b]="passing arguments to %select{a function|%1}0 without a prototype is deprecated in all versions of C and is not supported in C2x", | ||
[ | [d]=h, | ||
[ | [a]="passing arguments to (?:a function|(.*?)) without a prototype is deprecated in all versions of C and is not supported in C2x", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-non\\-prototype[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={ad,1620530452,bd,cd}, | ||
[ | [g]={{u,7557,"/// BuildResolvedCallExpr - Build a call to a resolved expression,\n/// i.e. an expression not of \\p OverloadTy. The expression should\n/// unary-convert to an expression of function-pointer or\n/// block-pointer type.\n///\n/// \\param NDecl the declaration being called, if available\nExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef<Expr *> Args, SourceLocation RParenLoc, Expr *Config, bool IsExecConfig, ADLCallKind UsesADL) {\n // ...\n if (Proto) {\n // ...\n } else {\n // ...\n if (!Proto && !Args.empty() && (!FDecl || (!FDecl->isImplicit() && !Diags.isIgnored(diag::warn_strict_uses_without_prototype, FDecl->getLocation()))))"},{u,7584,"/// BuildResolvedCallExpr - Build a call to a resolved expression,\n/// i.e. an expression not of \\p OverloadTy. The expression should\n/// unary-convert to an expression of function-pointer or\n/// block-pointer type.\n///\n/// \\param NDecl the declaration being called, if available\nExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef<Expr *> Args, SourceLocation RParenLoc, Expr *Config, bool IsExecConfig, ADLCallKind UsesADL) {\n // ...\n if (Proto) {\n // ...\n } else {\n // ...\n // If we still haven\'t found a prototype to use but there are arguments to\n // the call, diagnose this as calling a function without a prototype.\n // However, if we found a function declaration, check to see if\n // -Wdeprecated-non-prototype was disabled where the function was declared.\n // If so, we will silence the diagnostic here on the assumption that this\n // interface is intentional and the user knows what they\'re doing. We will\n // also silence the diagnostic if there is a function declaration but it\n // was implicitly defined (the user already gets diagnostics about the\n // creation of the implicit function declaration, so the additional warning\n // is not helpful).\n if (!Proto && !Args.empty() && (!FDecl || (!FDecl->isImplicit() && !Diags.isIgnored(diag::warn_strict_uses_without_prototype, FDecl->getLocation()))))\n Diag(LParenLoc, diag::warn_strict_uses_without_prototype) << (FDecl != nullptr) << FDecl;"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGen/avr/address-space-avr.c"]={"<stdin>:27:6: warning: passing arguments to \'foo\' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]","<stdin>:28:6: warning: passing arguments to \'foo\' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]"} | ["clang/test/CodeGen/avr/address-space-avr.c"]={"<stdin>:27:6: warning: passing arguments to \'foo\' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]","<stdin>:28:6: warning: passing arguments to \'foo\' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]"} | ||
} | } | ||
}, | }, | ||
["warn_string_plus_char"]={ | ["warn_string_plus_char"]={ | ||
[ | [i]={"string-plus-char"}, | ||
[j]="string-plus-char", | |||
[ | |||
[b]="adding %0 to a string pointer does not append to the string", | [b]="adding %0 to a string pointer does not append to the string", | ||
[ | [d]=h, | ||
[ | [a]="adding (.*?) to a string pointer does not append to the string", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wstring\\-plus\\-char[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"5565941effbe",1382719920,"Add -Wstring-plus-char, which warns when adding char literals to C strings.\n\nSpecifically, this warn...","Add -Wstring-plus-char, which warns when adding char literals to C strings.\n\nSpecifically, this warns when a character literal is added (using \'+\') to a\nvariable with type \'char *\' (or any other pointer to character type). Like\n-Wstring-plus-int, there is a fix-it to change \"foo + \'a\'\" to \"&foo[\'a\']\"\niff the character literal is on the right side of the string.\n\nPatch by Anders Rönnholm!\n\nllvm-svn: 193418"}, | ||
[ | [g]={{u,11680,"/// Emit a warning when adding a char literal to a string.\nstatic void diagnoseStringPlusChar(Sema &Self, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n if (!CharType->isAnyCharacterType() && CharType->isIntegerType() && llvm::isUIntN(Ctx.getCharWidth(), CharExpr->getValue())) {\n Self.Diag(OpLoc, diag::warn_string_plus_char) << DiagRange << Ctx.CharTy;"},{u,11687,"/// Emit a warning when adding a char literal to a string.\nstatic void diagnoseStringPlusChar(Sema &Self, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n if (!CharType->isAnyCharacterType() && CharType->isIntegerType() && llvm::isUIntN(Ctx.getCharWidth(), CharExpr->getValue())) {\n // ...\n } else {\n Self.Diag(OpLoc, diag::warn_string_plus_char) << DiagRange << CharExpr->getType();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/string-plus-char.c"]={"clang/test/Sema/string-plus-char.c:6:16: warning: adding \'char\' to a string pointer does not append to the string [-Wstring-plus-char]","clang/test/Sema/string-plus-char.c:11:20: warning: adding \'char\' to a string pointer does not append to the string [-Wstring-plus-char]","clang/test/Sema/string-plus-char.c:13:28: warning: adding \'char\' to a string pointer does not append to the string [-Wstring-plus-char]","clang/test/Sema/string-plus-char.c:15:13: warning: adding \'char\' to a string pointer does not append to the string [-Wstring-plus-char]","clang/test/Sema/string-plus-char.c:18:16: warning: adding \'char\' to a string pointer does not append to the string [-Wstring-plus-char]","clang/test/Sema/string-plus-char.c:20:20: warning: adding \'char\' to a string pointer does not append to the string [-Wstring-plus-char]","clang/test/Sema/string-plus-char.c:24:23: warning: adding \'char\' to a string pointer does not append to the string [-Wstring-plus-char]"} | ["clang/test/Sema/string-plus-char.c"]={"clang/test/Sema/string-plus-char.c:6:16: warning: adding \'char\' to a string pointer does not append to the string [-Wstring-plus-char]","clang/test/Sema/string-plus-char.c:11:20: warning: adding \'char\' to a string pointer does not append to the string [-Wstring-plus-char]","clang/test/Sema/string-plus-char.c:13:28: warning: adding \'char\' to a string pointer does not append to the string [-Wstring-plus-char]","clang/test/Sema/string-plus-char.c:15:13: warning: adding \'char\' to a string pointer does not append to the string [-Wstring-plus-char]","clang/test/Sema/string-plus-char.c:18:16: warning: adding \'char\' to a string pointer does not append to the string [-Wstring-plus-char]","clang/test/Sema/string-plus-char.c:20:20: warning: adding \'char\' to a string pointer does not append to the string [-Wstring-plus-char]","clang/test/Sema/string-plus-char.c:24:23: warning: adding \'char\' to a string pointer does not append to the string [-Wstring-plus-char]"} | ||
} | } | ||
}, | }, | ||
["warn_string_plus_int"]={ | ["warn_string_plus_int"]={ | ||
[ | [i]={n,o,p,"string-plus-int"}, | ||
[j]="string-plus-int", | |||
[ | |||
[b]="adding %0 to a string does not append to the string", | [b]="adding %0 to a string does not append to the string", | ||
[ | [d]=h, | ||
[ | [a]="adding (.*?) to a string does not append to the string", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wstring\\-plus\\-int[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"ccec40d9b756",1330725682,"Add -Wstring-plus-int, which warns on \"str\" + int and int + \"str\".\n\nIt doesn\'t warn if the integer i...","Add -Wstring-plus-int, which warns on \"str\" + int and int + \"str\".\n\nIt doesn\'t warn if the integer is known at compile time and within\nthe bounds of the string.\n\nDiscussion: http://comments.gmane.org/gmane.comp.compilers.clang.scm/47203\nllvm-svn: 151943"}, | ||
[ | [g]={{u,11637,"/// diagnoseStringPlusInt - Emit a warning when adding an integer to a string\n/// literal.\nstatic void diagnoseStringPlusInt(Sema &Self, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n Self.Diag(OpLoc, diag::warn_string_plus_int) << DiagRange << IndexExpr->IgnoreImpCasts()->getType();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/string-plus-int.cpp"]={"clang/test/SemaCXX/string-plus-int.cpp:31:17: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:32:17: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:33:17: warning: adding \'MyEnum\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:34:17: warning: adding \'MyEnum\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:36:13: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:37:17: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:38:19: warning: adding \'MyEnum\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:39:24: warning: adding \'MyEnum\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:42:23: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:43:19: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:45:18: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:46:18: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:48:17: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:49:17: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:50:19: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:54:15: warning: adding \'unsigned long\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:68:20: warning: adding \'unsigned long\' to a string does not append to the string [-Wstring-plus-int]"} | ["clang/test/SemaCXX/string-plus-int.cpp"]={"clang/test/SemaCXX/string-plus-int.cpp:31:17: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:32:17: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:33:17: warning: adding \'MyEnum\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:34:17: warning: adding \'MyEnum\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:36:13: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:37:17: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:38:19: warning: adding \'MyEnum\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:39:24: warning: adding \'MyEnum\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:42:23: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:43:19: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:45:18: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:46:18: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:48:17: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:49:17: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:50:19: warning: adding \'int\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:54:15: warning: adding \'unsigned long\' to a string does not append to the string [-Wstring-plus-int]","clang/test/SemaCXX/string-plus-int.cpp:68:20: warning: adding \'unsigned long\' to a string does not append to the string [-Wstring-plus-int]"} | ||
} | } | ||
}, | }, | ||
["warn_stringcompare"]={ | ["warn_stringcompare"]={ | ||
[ | [i]={"address","string-compare"}, | ||
[j]="string-compare", | |||
[ | |||
[b]="result of comparison against %select{a string literal|@encode}0 is unspecified (use an explicit string comparison function instead)", | [b]="result of comparison against %select{a string literal|@encode}0 is unspecified (use an explicit string comparison function instead)", | ||
[ | [d]=h, | ||
[ | [a]="result of comparison against (?:a string literal|@encode) is unspecified \\(use an explicit string comparison function instead\\)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wstring\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={vc,1237025389,xb,xb}, | ||
[ | [g]={{u,12771,"/// Diagnose some forms of syntactically-obvious tautological comparison.\nstatic void diagnoseTautologicalComparison(Sema &S, SourceLocation Loc, Expr *LHS, Expr *RHS, BinaryOperatorKind Opc) {\n // ...\n if (LiteralString) {\n S.DiagRuntimeBehavior(Loc, nullptr, S.PDiag(diag::warn_stringcompare) << isa<ObjCEncodeExpr>(LiteralStringStripped) << LiteralString->getSourceRange());"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/exprs.m"]={"clang/test/SemaObjC/exprs.m:20:20: warning: result of comparison against @encode is unspecified (use an explicit string comparison function instead) [-Wstring-compare]"} | ["clang/test/SemaObjC/exprs.m"]={"clang/test/SemaObjC/exprs.m:20:20: warning: result of comparison against @encode is unspecified (use an explicit string comparison function instead) [-Wstring-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_strlcpycat_wrong_size"]={ | ["warn_strlcpycat_wrong_size"]={ | ||
[ | [i]={"strlcpy-strlcat-size"}, | ||
[j]="strlcpy-strlcat-size", | |||
[ | |||
[b]="size argument in %0 call appears to be size of the source; expected the size of the destination", | [b]="size argument in %0 call appears to be size of the source; expected the size of the destination", | ||
[ | [d]=h, | ||
[ | [a]="size argument in (.*?) call appears to be size of the source; expected the size of the destination", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wstrlcpy\\-strlcat\\-size[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"d5fe9e4d9741",1313624436,"Add experimental -Wstrlcpy-size warning that looks to see if the size argument for strlcpy/strlcat i...","Add experimental -Wstrlcpy-size warning that looks to see if the size argument for strlcpy/strlcat is the size of the *source*, and not the size of the *destination*. This warning is off by default (for now).\n\nWarning logic provided by Geoff Keating.\n\nllvm-svn: 137903"}, | ||
[ | [g]={{r,12695,"// Warn if the user has made the \'size\' argument to strlcpy or strlcat\n// be the size of the source, instead of the destination.\nvoid Sema::CheckStrlcpycatArguments(const CallExpr *Call, IdentifierInfo *FnName) {\n // ...\n Diag(CompareWithSrcDRE->getBeginLoc(), diag::warn_strlcpycat_wrong_size) << OriginalSizeArg->getSourceRange() << FnName;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-strlcpycat-size.c"]={"clang/test/Sema/warn-strlcpycat-size.c:22:26: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:23:26: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:24:26: warning: size argument in \'strlcat\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:25:29: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:26:36: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:27:28: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:38:29: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:46:26: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:54:26: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]"} | ["clang/test/Sema/warn-strlcpycat-size.c"]={"clang/test/Sema/warn-strlcpycat-size.c:22:26: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:23:26: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:24:26: warning: size argument in \'strlcat\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:25:29: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:26:36: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:27:28: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:38:29: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:46:26: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]","clang/test/Sema/warn-strlcpycat-size.c:54:26: warning: size argument in \'strlcpy\' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]"} | ||
} | } | ||
}, | }, | ||
["warn_strncat_large_size"]={ | ["warn_strncat_large_size"]={ | ||
[ | [i]={Gc}, | ||
[j]=Gc, | |||
[ | |||
[b]="the value of the size argument in \'strncat\' is too large, might lead to a buffer overflow", | [b]="the value of the size argument in \'strncat\' is too large, might lead to a buffer overflow", | ||
[ | [d]=h, | ||
[ | [a]="the value of the size argument in \'strncat\' is too large, might lead to a buffer overflow", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wstrncat\\-size[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"314cd09b5c79",1328123337,"Add a new compiler warning, which flags anti-patterns used as the size\nargument in strncat.\n\nThe war...","Add a new compiler warning, which flags anti-patterns used as the size\nargument in strncat.\n\nThe warning is ignored by default since it needs more qualification. \n\nTODO: The warning message and the note are messy when\nstrncat is a builtin due to the macro expansion.\n\nllvm-svn: 149524"}, | ||
[ | [g]={{r,12803,"// Warn on anti-patterns as the \'size\' argument to strncat.\n// The correct size argument should look like following:\n// strncat(dst, src, sizeof(dst) - strlen(dest) - 1);\nvoid Sema::CheckStrncatArguments(const CallExpr *CE, IdentifierInfo *FnName) {\n // ...\n if (PatternType == 1)\n Diag(SL, diag::warn_strncat_large_size) << SR;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-strncat-size.c"]={"clang/test/Sema/warn-strncat-size.c:37:48: warning: the value of the size argument in \'strncat\' is too large, might lead to a buffer overflow [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:39:52: warning: the value of the size argument in \'strncat\' is too large, might lead to a buffer overflow [-Wstrncat-size]"} | ["clang/test/Sema/warn-strncat-size.c"]={"clang/test/Sema/warn-strncat-size.c:37:48: warning: the value of the size argument in \'strncat\' is too large, might lead to a buffer overflow [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:39:52: warning: the value of the size argument in \'strncat\' is too large, might lead to a buffer overflow [-Wstrncat-size]"} | ||
} | } | ||
}, | }, | ||
["warn_strncat_src_size"]={ | ["warn_strncat_src_size"]={ | ||
[ | [i]={Gc}, | ||
[j]=Gc, | |||
[ | |||
[b]="size argument in \'strncat\' call appears to be size of the source", | [b]="size argument in \'strncat\' call appears to be size of the source", | ||
[ | [d]=h, | ||
[ | [a]="size argument in \'strncat\' call appears to be size of the source", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wstrncat\\-size[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"314cd09b5c79",1328123337,"Add a new compiler warning, which flags anti-patterns used as the size\nargument in strncat.\n\nThe war...","Add a new compiler warning, which flags anti-patterns used as the size\nargument in strncat.\n\nThe warning is ignored by default since it needs more qualification. \n\nTODO: The warning message and the note are messy when\nstrncat is a builtin due to the macro expansion.\n\nllvm-svn: 149524"}, | ||
[ | [g]={{r,12798,"// Warn on anti-patterns as the \'size\' argument to strncat.\n// The correct size argument should look like following:\n// strncat(dst, src, sizeof(dst) - strlen(dest) - 1);\nvoid Sema::CheckStrncatArguments(const CallExpr *CE, IdentifierInfo *FnName) {\n // ...\n if (!isKnownSizeArray) {\n if (PatternType == 1)\n // ...\n else\n Diag(SL, diag::warn_strncat_src_size) << SR;"},{r,12805,"// Warn on anti-patterns as the \'size\' argument to strncat.\n// The correct size argument should look like following:\n// strncat(dst, src, sizeof(dst) - strlen(dest) - 1);\nvoid Sema::CheckStrncatArguments(const CallExpr *CE, IdentifierInfo *FnName) {\n // ...\n if (PatternType == 1)\n // ...\n else\n Diag(SL, diag::warn_strncat_src_size) << SR;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-strncat-size.c"]={"clang/test/Sema/warn-strncat-size.c:33:22: warning: size argument in \'strncat\' call appears to be size of the source [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:35:22: warning: size argument in \'strncat\' call appears to be size of the source [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:41:29: warning: size argument in \'strncat\' call appears to be size of the source [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:42:21: warning: size argument in \'strncat\' call appears to be size of the source [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:43:22: warning: size argument in \'strncat\' call appears to be size of the source [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:54:23: warning: size argument in \'strncat\' call appears to be size of the source [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:70:19: warning: size argument in \'strncat\' call appears to be size of the source [-Wstrncat-size]"} | ["clang/test/Sema/warn-strncat-size.c"]={"clang/test/Sema/warn-strncat-size.c:33:22: warning: size argument in \'strncat\' call appears to be size of the source [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:35:22: warning: size argument in \'strncat\' call appears to be size of the source [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:41:29: warning: size argument in \'strncat\' call appears to be size of the source [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:42:21: warning: size argument in \'strncat\' call appears to be size of the source [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:43:22: warning: size argument in \'strncat\' call appears to be size of the source [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:54:23: warning: size argument in \'strncat\' call appears to be size of the source [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:70:19: warning: size argument in \'strncat\' call appears to be size of the source [-Wstrncat-size]"} | ||
} | } | ||
}, | }, | ||
["warn_strncat_wrong_size"]={ | ["warn_strncat_wrong_size"]={ | ||
[ | [i]={Gc}, | ||
[j]=Gc, | |||
[ | |||
[b]="the value of the size argument to \'strncat\' is wrong", | [b]="the value of the size argument to \'strncat\' is wrong", | ||
[ | [d]=h, | ||
[ | [a]="the value of the size argument to \'strncat\' is wrong", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wstrncat\\-size[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"13b0857ad084",1344462143,"Address code review comments for Wstrncat-size warning (r161440).\n\nllvm-svn: 161527","Address code review comments for Wstrncat-size warning (r161440).\n\nllvm-svn: 161527"}, | ||
[ | [g]={{r,12796,"// Warn on anti-patterns as the \'size\' argument to strncat.\n// The correct size argument should look like following:\n// strncat(dst, src, sizeof(dst) - strlen(dest) - 1);\nvoid Sema::CheckStrncatArguments(const CallExpr *CE, IdentifierInfo *FnName) {\n // ...\n if (!isKnownSizeArray) {\n if (PatternType == 1)\n Diag(SL, diag::warn_strncat_wrong_size) << SR;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-strncat-size.c"]={"clang/test/Sema/warn-strncat-size.c:62:19: warning: the value of the size argument to \'strncat\' is wrong [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:75:17: warning: the value of the size argument to \'strncat\' is wrong [-Wstrncat-size]"} | ["clang/test/Sema/warn-strncat-size.c"]={"clang/test/Sema/warn-strncat-size.c:62:19: warning: the value of the size argument to \'strncat\' is wrong [-Wstrncat-size]","clang/test/Sema/warn-strncat-size.c:75:17: warning: the value of the size argument to \'strncat\' is wrong [-Wstrncat-size]"} | ||
} | } | ||
}, | }, | ||
["warn_struct_class_previous_tag_mismatch"]={ | ["warn_struct_class_previous_tag_mismatch"]={ | ||
[ | [i]={n,o,"mismatched-tags",p}, | ||
[j]="mismatched-tags", | |||
[ | |||
[b]="%2 defined as %select{a struct|an interface|a class}0%select{| template}1 here but previously declared as %select{a struct|an interface|a class}3%select{| template}1; this is valid, but may result in linker errors under the Microsoft C++ ABI", | [b]="%2 defined as %select{a struct|an interface|a class}0%select{| template}1 here but previously declared as %select{a struct|an interface|a class}3%select{| template}1; this is valid, but may result in linker errors under the Microsoft C++ ABI", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) defined as (?:a struct|an interface|a class)(?:| template) here but previously declared as (?:a struct|an interface|a class)(?:| template); this is valid, but may result in linker errors under the Microsoft C\\+\\+ ABI", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wmismatched\\-tags[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"caa33d36fb3f",1307675486,"Made changes to how \'struct\'/\'class\' mismatches are handled in -Wmismatched-tags.\n- Removed fix-it h...","Made changes to how \'struct\'/\'class\' mismatches are handled in -Wmismatched-tags.\n- Removed fix-it hints from template instaniations since changes to the\ntemplates are rarely helpful.\n- Changed the caret in template instaniations from the class/struct name to the\nclass/struct keyword, matching the other warnings.\n- Do not offer fix-it hints when multiple declarations disagree. Warnings are\nstill given.\n- Once a definition is found, offer a fix-it hint to all previous declarations\nwith wrong tag.\n- Declarations that disagree with a previous definition will get a fix-it hint\nto change the declaration.\n\nllvm-svn: 132831"}, | ||
[ | [g]={{B,16652,"/// Determine whether a tag with a given kind is acceptable\n/// as a redeclaration of the given tag declaration.\n///\n/// \\returns true if the new tag kind is acceptable, false otherwise.\nbool Sema::isAcceptableTagRedeclaration(const TagDecl *Previous, TagTypeKind NewTag, bool isDefinition, SourceLocation NewTagLoc, const IdentifierInfo *Name) {\n // ...\n if (isDefinition) {\n // ...\n for (const TagDecl *I : Previous->redecls()) {\n if (I->getTagKind() != NewTag) {\n // ...\n if (!previousMismatch) {\n // ...\n Diag(NewTagLoc, diag::warn_struct_class_previous_tag_mismatch) << getRedeclDiagFromTagKind(NewTag) << isTemplate << Name << getRedeclDiagFromTagKind(I->getTagKind());"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/struct-class-redecl.cpp"]={"clang/test/SemaCXX/struct-class-redecl.cpp:8:19: warning: \'Y\' defined as a class template here but previously declared as a struct template; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:24:1: warning: \'B\' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:34:1: warning: \'C\' defined as a class here but previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:57:19: warning: \'G\' defined as a struct template here but previously declared as a class template; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]"} | ["clang/test/SemaCXX/struct-class-redecl.cpp"]={"clang/test/SemaCXX/struct-class-redecl.cpp:8:19: warning: \'Y\' defined as a class template here but previously declared as a struct template; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:24:1: warning: \'B\' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:34:1: warning: \'C\' defined as a class here but previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:57:19: warning: \'G\' defined as a struct template here but previously declared as a class template; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]"} | ||
} | } | ||
}, | }, | ||
["warn_struct_class_tag_mismatch"]={ | ["warn_struct_class_tag_mismatch"]={ | ||
[ | [i]={n,o,"mismatched-tags",p}, | ||
[j]="mismatched-tags", | |||
[ | |||
[b]="%select{struct|interface|class}0%select{| template}1 %2 was previously declared as a %select{struct|interface|class}3%select{| template}1; this is valid, but may result in linker errors under the Microsoft C++ ABI", | [b]="%select{struct|interface|class}0%select{| template}1 %2 was previously declared as a %select{struct|interface|class}3%select{| template}1; this is valid, but may result in linker errors under the Microsoft C++ ABI", | ||
[ | [d]=h, | ||
[ | [a]="(?:struct|interface|class)(?:| template) (.*?) was previously declared as a (?:struct|interface|class)(?:| template); this is valid, but may result in linker errors under the Microsoft C\\+\\+ ABI", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wmismatched\\-tags[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"d9034f0b8970",1242319291,"In C++, warn when something previously declared as a \"struct\" is later\ndeclared as a \"class\", or vic...","In C++, warn when something previously declared as a \"struct\" is later\ndeclared as a \"class\", or vice-versa. This warning is under the\ncontrol of -Wmismatched-tags, which is off by default.\n\nllvm-svn: 71773"}, | ||
[ | [g]={{B,16603,"/// Determine whether a tag with a given kind is acceptable\n/// as a redeclaration of the given tag declaration.\n///\n/// \\returns true if the new tag kind is acceptable, false otherwise.\nbool Sema::isAcceptableTagRedeclaration(const TagDecl *Previous, TagTypeKind NewTag, bool isDefinition, SourceLocation NewTagLoc, const IdentifierInfo *Name) {\n // ...\n auto IsIgnoredLoc = [&](SourceLocation Loc) { return getDiagnostics().isIgnored(diag::warn_struct_class_tag_mismatch, Loc); };"},{B,16627,"/// Determine whether a tag with a given kind is acceptable\n/// as a redeclaration of the given tag declaration.\n///\n/// \\returns true if the new tag kind is acceptable, false otherwise.\nbool Sema::isAcceptableTagRedeclaration(const TagDecl *Previous, TagTypeKind NewTag, bool isDefinition, SourceLocation NewTagLoc, const IdentifierInfo *Name) {\n // ...\n if (inTemplateInstantiation()) {\n if (OldTag != NewTag) {\n // ...\n Diag(NewTagLoc, diag::warn_struct_class_tag_mismatch) << getRedeclDiagFromTagKind(NewTag) << isTemplate << Name << getRedeclDiagFromTagKind(OldTag);"},{B,16673,"/// Determine whether a tag with a given kind is acceptable\n/// as a redeclaration of the given tag declaration.\n///\n/// \\returns true if the new tag kind is acceptable, false otherwise.\nbool Sema::isAcceptableTagRedeclaration(const TagDecl *Previous, TagTypeKind NewTag, bool isDefinition, SourceLocation NewTagLoc, const IdentifierInfo *Name) {\n // ...\n if (Redecl->getTagKind() != NewTag) {\n Diag(NewTagLoc, diag::warn_struct_class_tag_mismatch) << getRedeclDiagFromTagKind(NewTag) << isTemplate << Name << getRedeclDiagFromTagKind(OldTag);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/struct-class-redecl.cpp"]={"clang/test/SemaCXX/struct-class-redecl.cpp:4:9: warning: struct \'X\' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:18:1: warning: struct \'A\' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:23:1: warning: struct \'B\' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:27:1: warning: struct \'C\' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:30:1: warning: class \'C\' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:32:1: warning: struct \'C\' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:40:1: warning: class \'D\' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:52:1: warning: class \'F\' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:56:19: warning: struct template \'G\' was previously declared as a class template; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:77:1: warning: struct \'H\' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:80:1: warning: class \'I\' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:83:1: warning: class \'K\' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:85:1: warning: class \'M\' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]"} | ["clang/test/SemaCXX/struct-class-redecl.cpp"]={"clang/test/SemaCXX/struct-class-redecl.cpp:4:9: warning: struct \'X\' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:18:1: warning: struct \'A\' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:23:1: warning: struct \'B\' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:27:1: warning: struct \'C\' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:30:1: warning: class \'C\' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:32:1: warning: struct \'C\' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:40:1: warning: class \'D\' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:52:1: warning: class \'F\' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:56:19: warning: struct template \'G\' was previously declared as a class template; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:77:1: warning: struct \'H\' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:80:1: warning: class \'I\' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:83:1: warning: class \'K\' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]","clang/test/SemaCXX/struct-class-redecl.cpp:85:1: warning: class \'M\' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]"} | ||
} | } | ||
}, | }, | ||
["warn_sub_ptr_zero_size_types"]={ | ["warn_sub_ptr_zero_size_types"]={ | ||
[ | [i]={"pointer-arith"}, | ||
[j]="pointer-arith", | |||
[ | |||
[b]="subtraction of pointers to type %0 of zero size has undefined behavior", | [b]="subtraction of pointers to type %0 of zero size has undefined behavior", | ||
[ | [d]=h, | ||
[ | [a]="subtraction of pointers to type (.*?) of zero size has undefined behavior", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpointer\\-arith[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"84c6b3d293d9",1378848854,"PR5683: Issue a warning when subtracting pointers to types of zero size, and\ntreat such subtractions...","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"}, | ||
[ | [g]={{u,11985,"// C99 6.5.6\nQualType Sema::CheckSubtractionOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, QualType *CompLHSTy) {\n // ...\n // Either ptr - int or ptr - ptr.\n if (LHS.get()->getType()->isAnyPointerType()) {\n // ...\n // Handle pointer-pointer subtractions.\n if (const PointerType *RHSPTy = RHS.get()->getType()->getAs<PointerType>()) {\n // ...\n // The pointee type may have zero size. As an extension, a structure or\n // union may have zero size or an array may have zero length. In this\n // case subtraction does not make sense.\n if (!rpointee->isVoidType() && !rpointee->isFunctionType()) {\n // ...\n if (ElementSize.isZero()) {\n Diag(Loc, diag::warn_sub_ptr_zero_size_types) << rpointee.getUnqualifiedType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/empty1.c"]={"clang/test/Sema/empty1.c:47:12: warning: subtraction of pointers to type \'struct emp_1\' of zero size has undefined behavior [-Wpointer-arith]","clang/test/Sema/empty1.c:51:16: warning: subtraction of pointers to type \'struct emp_1\' of zero size has undefined behavior [-Wpointer-arith]","clang/test/Sema/empty1.c:55:12: warning: subtraction of pointers to type \'struct emp_1\' of zero size has undefined behavior [-Wpointer-arith]","clang/test/Sema/empty1.c:59:12: warning: subtraction of pointers to type \'struct emp_1\' of zero size has undefined behavior [-Wpointer-arith]","clang/test/Sema/empty1.c:63:12: warning: subtraction of pointers to type \'struct emp_1\' of zero size has undefined behavior [-Wpointer-arith]","clang/test/Sema/empty1.c:68:12: warning: subtraction of pointers to type \'union emp_2\' of zero size has undefined behavior [-Wpointer-arith]","clang/test/Sema/empty1.c:78:12: warning: subtraction of pointers to type \'struct emp_1[10]\' of zero size has undefined behavior [-Wpointer-arith]","clang/test/Sema/empty1.c:86:12: warning: subtraction of pointers to type \'int[0]\' of zero size has undefined behavior [-Wpointer-arith]"} | ["clang/test/Sema/empty1.c"]={"clang/test/Sema/empty1.c:47:12: warning: subtraction of pointers to type \'struct emp_1\' of zero size has undefined behavior [-Wpointer-arith]","clang/test/Sema/empty1.c:51:16: warning: subtraction of pointers to type \'struct emp_1\' of zero size has undefined behavior [-Wpointer-arith]","clang/test/Sema/empty1.c:55:12: warning: subtraction of pointers to type \'struct emp_1\' of zero size has undefined behavior [-Wpointer-arith]","clang/test/Sema/empty1.c:59:12: warning: subtraction of pointers to type \'struct emp_1\' of zero size has undefined behavior [-Wpointer-arith]","clang/test/Sema/empty1.c:63:12: warning: subtraction of pointers to type \'struct emp_1\' of zero size has undefined behavior [-Wpointer-arith]","clang/test/Sema/empty1.c:68:12: warning: subtraction of pointers to type \'union emp_2\' of zero size has undefined behavior [-Wpointer-arith]","clang/test/Sema/empty1.c:78:12: warning: subtraction of pointers to type \'struct emp_1[10]\' of zero size has undefined behavior [-Wpointer-arith]","clang/test/Sema/empty1.c:86:12: warning: subtraction of pointers to type \'int[0]\' of zero size has undefined behavior [-Wpointer-arith]"} | ||
} | } | ||
}, | }, | ||
["warn_subscript_is_char"]={ | ["warn_subscript_is_char"]={ | ||
[ | [i]={n,o,"char-subscripts",p}, | ||
[j]="char-subscripts", | |||
[ | |||
[b]="array subscript is of type \'char\'", | [b]="array subscript is of type \'char\'", | ||
[ | [d]=h, | ||
[ | [a]="array subscript is of type \'char\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wchar\\-subscripts[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"914244e7b0c6",1252893538,"Add support for -Wchar-subscripts. Fixes PR4801.\n\nllvm-svn: 81747","Add support for -Wchar-subscripts. Fixes PR4801.\n\nllvm-svn: 81747"}, | ||
[ | [g]={{u,5963,"ExprResult Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc) {\n // ...\n if ((IndexExpr->getType()->isSpecificBuiltinType(BuiltinType::Char_S) || IndexExpr->getType()->isSpecificBuiltinType(BuiltinType::Char_U)) && !IndexExpr->isTypeDependent())\n Diag(LLoc, diag::warn_subscript_is_char) << IndexExpr->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-char-subscripts.c"]={"clang/test/Sema/warn-char-subscripts.c:6:18: warning: array subscript is of type \'char\' [-Wchar-subscripts]","clang/test/Sema/warn-char-subscripts.c:12:22: warning: array subscript is of type \'char\' [-Wchar-subscripts]","clang/test/Sema/warn-char-subscripts.c:18:18: warning: array subscript is of type \'char\' [-Wchar-subscripts]","clang/test/Sema/warn-char-subscripts.c:24:22: warning: array subscript is of type \'char\' [-Wchar-subscripts]","clang/test/Sema/warn-char-subscripts.c:30:18: warning: array subscript is of type \'char\' [-Wchar-subscripts]","clang/test/Sema/warn-char-subscripts.c:49:18: warning: array subscript is of type \'char\' [-Wchar-subscripts]"} | ["clang/test/Sema/warn-char-subscripts.c"]={"clang/test/Sema/warn-char-subscripts.c:6:18: warning: array subscript is of type \'char\' [-Wchar-subscripts]","clang/test/Sema/warn-char-subscripts.c:12:22: warning: array subscript is of type \'char\' [-Wchar-subscripts]","clang/test/Sema/warn-char-subscripts.c:18:18: warning: array subscript is of type \'char\' [-Wchar-subscripts]","clang/test/Sema/warn-char-subscripts.c:24:22: warning: array subscript is of type \'char\' [-Wchar-subscripts]","clang/test/Sema/warn-char-subscripts.c:30:18: warning: array subscript is of type \'char\' [-Wchar-subscripts]","clang/test/Sema/warn-char-subscripts.c:49:18: warning: array subscript is of type \'char\' [-Wchar-subscripts]"} | ||
} | } | ||
}, | }, | ||
["warn_suggest_destructor_marked_not_override_overriding"]={ | ["warn_suggest_destructor_marked_not_override_overriding"]={ | ||
[ | [i]={"suggest-destructor-override"}, | ||
[j]="suggest-destructor-override", | |||
[ | |||
[b]="%0 overrides a destructor but is not marked \'override\'", | [b]="%0 overrides a destructor but is not marked \'override\'", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) overrides a destructor but is not marked \'override\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wsuggest\\-destructor\\-override[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={Ob,1582847864,Mb,Nb}, | ||
[ | [g]={{T,3315,"void Sema::DiagnoseAbsenceOfOverrideControl(NamedDecl *D, bool Inconsistent) {\n // ...\n if (MD->size_overridden_methods() > 0) {\n // ...\n if (isa<CXXDestructorDecl>(MD))\n EmitDiag(diag::warn_inconsistent_destructor_marked_not_override_overriding, diag::warn_suggest_destructor_marked_not_override_overriding);"}} | ||
}, | }, | ||
["warn_suggest_function_marked_not_override_overriding"]={ | ["warn_suggest_function_marked_not_override_overriding"]={ | ||
[ | [i]={"suggest-override"}, | ||
[j]="suggest-override", | |||
[ | |||
[b]="%0 overrides a member function but is not marked \'override\'", | [b]="%0 overrides a member function but is not marked \'override\'", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) overrides a member function but is not marked \'override\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wsuggest\\-override[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={Ob,1582847864,Mb,Nb}, | ||
[ | [g]={{T,3318,"void Sema::DiagnoseAbsenceOfOverrideControl(NamedDecl *D, bool Inconsistent) {\n // ...\n if (MD->size_overridden_methods() > 0) {\n // ...\n if (isa<CXXDestructorDecl>(MD))\n // ...\n else\n EmitDiag(diag::warn_inconsistent_function_marked_not_override_overriding, diag::warn_suggest_function_marked_not_override_overriding);"}} | ||
}, | }, | ||
["warn_suggest_noreturn_block"]={ | ["warn_suggest_noreturn_block"]={ | ||
[ | [i]={"missing-noreturn"}, | ||
[j]="missing-noreturn", | |||
[ | |||
[b]="block could be declared with attribute \'noreturn\'", | [b]="block could be declared with attribute \'noreturn\'", | ||
[ | [d]=h, | ||
[ | [a]="block could be declared with attribute \'noreturn\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wmissing\\-noreturn[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"bce7a27d222a",1248822672,"Add support for -Wmissing-noreturn.\n\nllvm-svn: 77391","Add support for -Wmissing-noreturn.\n\nllvm-svn: 77391"}, | ||
[ | [g]={{y,634,"struct CheckFallThroughDiagnostics {\n // ...\n bool checkDiagnostics(DiagnosticsEngine &D, bool ReturnsVoid, bool HasNoReturn) const {\n if (funMode == Function) {\n return (ReturnsVoid || D.isIgnored(diag::warn_maybe_falloff_nonvoid_function, FuncLoc)) && (!HasNoReturn || D.isIgnored(diag::warn_noreturn_function_has_return_expr, FuncLoc)) && (!ReturnsVoid || D.isIgnored(diag::warn_suggest_noreturn_block, FuncLoc));"}} | ||
}, | }, | ||
["warn_suggest_noreturn_function"]={ | ["warn_suggest_noreturn_function"]={ | ||
[ | [i]={"missing-noreturn"}, | ||
[j]="missing-noreturn", | |||
[ | |||
[b]="%select{function|method}0 %1 could be declared with attribute \'noreturn\'", | [b]="%select{function|method}0 %1 could be declared with attribute \'noreturn\'", | ||
[ | [d]=h, | ||
[ | [a]="(?:function|method) (.*?) could be declared with attribute \'noreturn\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wmissing\\-noreturn[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"bce7a27d222a",1248822672,"Add support for -Wmissing-noreturn.\n\nllvm-svn: 77391","Add support for -Wmissing-noreturn.\n\nllvm-svn: 77391"}, | ||
[ | [g]={{y,572,"struct CheckFallThroughDiagnostics {\n // ...\n static CheckFallThroughDiagnostics MakeForFunction(const Decl *Func) {\n // ...\n if (!isVirtualMethod && !isTemplateInstantiation)\n D.diag_NeverFallThroughOrReturn = diag::warn_suggest_noreturn_function;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/return.m"]={"clang/test/SemaObjC/return.m:17:19: warning: function \'test3\' could be declared with attribute \'noreturn\' [-Wmissing-noreturn]","clang/test/SemaObjC/return.m:47:16: warning: method \'method\' could be declared with attribute \'noreturn\' [-Wmissing-noreturn]"} | ["clang/test/SemaObjC/return.m"]={"clang/test/SemaObjC/return.m:17:19: warning: function \'test3\' could be declared with attribute \'noreturn\' [-Wmissing-noreturn]","clang/test/SemaObjC/return.m:47:16: warning: method \'method\' could be declared with attribute \'noreturn\' [-Wmissing-noreturn]"} | ||
} | } | ||
}, | }, | ||
["warn_superclass_variable_sized_type_not_at_end"]={ | ["warn_superclass_variable_sized_type_not_at_end"]={ | ||
[ | [i]={n,o,p,"objc-flexible-array"}, | ||
[j]="objc-flexible-array", | |||
[ | |||
[b]="field %0 can overwrite instance variable %1 with variable sized type %2 in superclass %3", | [b]="field %0 can overwrite instance variable %1 with variable sized type %2 in superclass %3", | ||
[ | [d]=h, | ||
[ | [a]="field (.*?) can overwrite instance variable (.*?) with variable sized type (.*?) in superclass (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-flexible\\-array[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"30680e943735",1508796101,"[Sema] Add support for flexible array members in Obj-C.\n\nAllow Obj-C ivars with incomplete array typ...","[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]={{I,3922,"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 S.Diag(FirstIvar->getLocation(), diag::warn_superclass_variable_sized_type_not_at_end) << FirstIvar->getDeclName() << LastIvar->getDeclName() << LastIvar->getType() << SuperClass->getDeclName();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/flexible-array.m"]={"clang/test/SemaObjC/flexible-array.m:247:7: warning: field \'last\' can overwrite instance variable \'flexible\' with variable sized type \'char[]\' in superclass \'FlexibleArrayMemberBase\' [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:254:7: warning: field \'last\' can overwrite instance variable \'flexible\' with variable sized type \'char[]\' in superclass \'FlexibleArrayMemberBase\' [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:261:7: warning: field \'last\' can overwrite instance variable \'flexible\' with variable sized type \'char[]\' in superclass \'FlexibleArrayMemberBase\' [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:269:13: warning: field \'count\' can overwrite instance variable \'flexible\' with variable sized type \'char[]\' in superclass \'FlexibleArrayMemberBase\' [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:273:7: warning: field \'last\' can overwrite instance variable \'flexible\' with variable sized type \'char[]\' in superclass \'FlexibleArrayMemberBase\' [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:286:7: warning: field \'last\' can overwrite instance variable \'flexible\' with variable sized type \'char[]\' in superclass \'FlexibleArrayMemberBase\' [-Wobjc-flexible-array]"} | ["clang/test/SemaObjC/flexible-array.m"]={"clang/test/SemaObjC/flexible-array.m:247:7: warning: field \'last\' can overwrite instance variable \'flexible\' with variable sized type \'char[]\' in superclass \'FlexibleArrayMemberBase\' [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:254:7: warning: field \'last\' can overwrite instance variable \'flexible\' with variable sized type \'char[]\' in superclass \'FlexibleArrayMemberBase\' [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:261:7: warning: field \'last\' can overwrite instance variable \'flexible\' with variable sized type \'char[]\' in superclass \'FlexibleArrayMemberBase\' [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:269:13: warning: field \'count\' can overwrite instance variable \'flexible\' with variable sized type \'char[]\' in superclass \'FlexibleArrayMemberBase\' [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:273:7: warning: field \'last\' can overwrite instance variable \'flexible\' with variable sized type \'char[]\' in superclass \'FlexibleArrayMemberBase\' [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:286:7: warning: field \'last\' can overwrite instance variable \'flexible\' with variable sized type \'char[]\' in superclass \'FlexibleArrayMemberBase\' [-Wobjc-flexible-array]"} | ||
} | } | ||
}, | }, | ||
["warn_suspicious_bzero_size"]={ | ["warn_suspicious_bzero_size"]={ | ||
[ | [i]={"suspicious-bzero","suspicious-memaccess"}, | ||
[j]="suspicious-bzero", | |||
[ | |||
[b]="\'size\' argument to bzero is \'0\'", | [b]="\'size\' argument to bzero is \'0\'", | ||
[ | [d]=h, | ||
[ | [a]="\'size\' argument to bzero is \'0\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wsuspicious\\-bzero[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"d1cf276621a7",1532018775,"[Sema] Add a new warning, -Wmemset-transposed-args\n\nThis diagnoses calls to memset that have the sec...","[Sema] Add a new warning, -Wmemset-transposed-args\n\nThis diagnoses calls to memset that have the second and third arguments\ntransposed, for example:\n\n memset(buf, sizeof(buf), 0);\n\nThis is done by checking if the third argument is a literal 0, or if the second\nis a sizeof expression (and the third isn\'t). The first check is also done for\ncalls to bzero.\n\nDifferential revision: https://reviews.llvm.org/D49112\n\nllvm-svn: 337470"}, | ||
[ | [g]={{r,12393,"/// Diagnose cases like \'memset(buf, sizeof(buf), 0)\', which should have the\n/// last two arguments transposed.\nstatic void CheckMemaccessSize(Sema &S, unsigned BId, const CallExpr *Call) {\n // ...\n if (isLiteralZero(SizeArg) && !isArgumentExpandedFromMacro(SM, CallLoc, SizeArg->getExprLoc())) {\n // ...\n // Some platforms #define bzero to __builtin_memset. See if this is the\n // case, and if so, emit a better diagnostic.\n if (BId == Builtin::BIbzero || (CallLoc.isMacroID() && Lexer::getImmediateMacroName(CallLoc, SM, S.getLangOpts()) == \"bzero\")) {\n S.Diag(DiagLoc, diag::warn_suspicious_bzero_size);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/transpose-memset.c"]={"clang/test/Sema/transpose-memset.c:29:14: warning: \'size\' argument to bzero is \'0\' [-Wsuspicious-bzero]","clang/test/Sema/transpose-memset.c:30:19: warning: \'size\' argument to bzero is \'0\' [-Wsuspicious-bzero]","clang/test/Sema/transpose-memset.c:51:3: warning: \'size\' argument to bzero is \'0\' [-Wsuspicious-bzero]","clang/test/Sema/transpose-memset.c:62:26: warning: \'size\' argument to bzero is \'0\' [-Wsuspicious-bzero]"} | ["clang/test/Sema/transpose-memset.c"]={"clang/test/Sema/transpose-memset.c:29:14: warning: \'size\' argument to bzero is \'0\' [-Wsuspicious-bzero]","clang/test/Sema/transpose-memset.c:30:19: warning: \'size\' argument to bzero is \'0\' [-Wsuspicious-bzero]","clang/test/Sema/transpose-memset.c:51:3: warning: \'size\' argument to bzero is \'0\' [-Wsuspicious-bzero]","clang/test/Sema/transpose-memset.c:62:26: warning: \'size\' argument to bzero is \'0\' [-Wsuspicious-bzero]"} | ||
} | } | ||
}, | }, | ||
["warn_suspicious_sizeof_memset"]={ | ["warn_suspicious_sizeof_memset"]={ | ||
[ | [i]={"memset-transposed-args","suspicious-memaccess"}, | ||
[j]="memset-transposed-args", | |||
[ | |||
[b]="%select{\'size\' argument to memset is \'0\'|setting buffer to a \'sizeof\' expression}0; did you mean to transpose the last two arguments?", | [b]="%select{\'size\' argument to memset is \'0\'|setting buffer to a \'sizeof\' expression}0; did you mean to transpose the last two arguments?", | ||
[ | [d]=h, | ||
[ | [a]="(?:\'size\' argument to memset is \'0\'|setting buffer to a \'sizeof\' expression); did you mean to transpose the last two arguments\\?", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wmemset\\-transposed\\-args[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"d1cf276621a7",1532018775,"[Sema] Add a new warning, -Wmemset-transposed-args\n\nThis diagnoses calls to memset that have the sec...","[Sema] Add a new warning, -Wmemset-transposed-args\n\nThis diagnoses calls to memset that have the second and third arguments\ntransposed, for example:\n\n memset(buf, sizeof(buf), 0);\n\nThis is done by checking if the third argument is a literal 0, or if the second\nis a sizeof expression (and the third isn\'t). The first check is also done for\ncalls to bzero.\n\nDifferential revision: https://reviews.llvm.org/D49112\n\nllvm-svn: 337470"}, | ||
[ | [g]={{r,12396,"/// Diagnose cases like \'memset(buf, sizeof(buf), 0)\', which should have the\n/// last two arguments transposed.\nstatic void CheckMemaccessSize(Sema &S, unsigned BId, const CallExpr *Call) {\n // ...\n if (isLiteralZero(SizeArg) && !isArgumentExpandedFromMacro(SM, CallLoc, SizeArg->getExprLoc())) {\n // ...\n // Some platforms #define bzero to __builtin_memset. See if this is the\n // case, and if so, emit a better diagnostic.\n if (BId == Builtin::BIbzero || (CallLoc.isMacroID() && Lexer::getImmediateMacroName(CallLoc, SM, S.getLangOpts()) == \"bzero\")) {\n // ...\n } else if (!isLiteralZero(Call->getArg(1)->IgnoreImpCasts())) {\n S.Diag(DiagLoc, diag::warn_suspicious_sizeof_memset) << 0;"},{r,12409,"/// Diagnose cases like \'memset(buf, sizeof(buf), 0)\', which should have the\n/// last two arguments transposed.\nstatic void CheckMemaccessSize(Sema &S, unsigned BId, const CallExpr *Call) {\n // ...\n // If the second argument to a memset is a sizeof expression and the third\n // isn\'t, this is also likely an error. This should catch\n // \'memset(buf, sizeof(buf), 0xff)\'.\n if (BId == Builtin::BImemset && doesExprLikelyComputeSize(Call->getArg(1)) && !doesExprLikelyComputeSize(Call->getArg(2))) {\n // ...\n S.Diag(DiagLoc, diag::warn_suspicious_sizeof_memset) << 1;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/transpose-memset.c"]={"clang/test/Sema/transpose-memset.c:12:32: warning: \'size\' argument to memset is \'0\'; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:13:17: warning: setting buffer to a \'sizeof\' expression; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:14:32: warning: \'size\' argument to memset is \'0\'; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:15:28: warning: \'size\' argument to memset is \'0\'; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:16:15: warning: setting buffer to a \'sizeof\' expression; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:17:28: warning: \'size\' argument to memset is \'0\'; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:18:15: warning: setting buffer to a \'sizeof\' expression; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:19:15: warning: setting buffer to a \'sizeof\' expression; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:20:15: warning: setting buffer to a \'sizeof\' expression; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:38:17: warning: setting buffer to a \'sizeof\' expression; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:51:3: warning: \'size\' argument to memset is \'0\'; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:61:30: warning: \'size\' argument to memset is \'0\'; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]"} | ["clang/test/Sema/transpose-memset.c"]={"clang/test/Sema/transpose-memset.c:12:32: warning: \'size\' argument to memset is \'0\'; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:13:17: warning: setting buffer to a \'sizeof\' expression; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:14:32: warning: \'size\' argument to memset is \'0\'; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:15:28: warning: \'size\' argument to memset is \'0\'; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:16:15: warning: setting buffer to a \'sizeof\' expression; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:17:28: warning: \'size\' argument to memset is \'0\'; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:18:15: warning: setting buffer to a \'sizeof\' expression; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:19:15: warning: setting buffer to a \'sizeof\' expression; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:20:15: warning: setting buffer to a \'sizeof\' expression; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:38:17: warning: setting buffer to a \'sizeof\' expression; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:51:3: warning: \'size\' argument to memset is \'0\'; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]","clang/test/Sema/transpose-memset.c:61:30: warning: \'size\' argument to memset is \'0\'; did you mean to transpose the last two arguments? [-Wmemset-transposed-args]"} | ||
} | } | ||
}, | }, | ||
["warn_sycl_kernel_invalid_template_param_type"]={ | ["warn_sycl_kernel_invalid_template_param_type"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="template parameter of a function template with the \'sycl_kernel\' attribute cannot be a non-type template parameter", | [b]="template parameter of a function template with the \'sycl_kernel\' attribute cannot be a non-type template parameter", | ||
[ | [d]=h, | ||
[ | [a]="template parameter of a function template with the \'sycl_kernel\' attribute cannot be a non\\-type template parameter", | ||
[ | [e]=R, | ||
[ | [c]=s, | ||
[ | [f]={Jc,1573050950,Dc,Ec}, | ||
[ | [g]={{w,8407,"static void handleSYCLKernelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n // Template parameters must be typenames.\n for (unsigned I = 0; I < 2; ++I) {\n // ...\n if (isa<NonTypeTemplateParmDecl>(TParam)) {\n S.Diag(FT->getLocation(), diag::warn_sycl_kernel_invalid_template_param_type);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaSYCL/kernel-attribute.cpp"]={"clang/test/SemaSYCL/kernel-attribute.cpp:24:35: warning: template parameter of a function template with the \'sycl_kernel\' attribute cannot be a non-type template parameter [-Wignored-attributes]","clang/test/SemaSYCL/kernel-attribute.cpp:26:29: warning: template parameter of a function template with the \'sycl_kernel\' attribute cannot be a non-type template parameter [-Wignored-attributes]"} | ["clang/test/SemaSYCL/kernel-attribute.cpp"]={"clang/test/SemaSYCL/kernel-attribute.cpp:24:35: warning: template parameter of a function template with the \'sycl_kernel\' attribute cannot be a non-type template parameter [-Wignored-attributes]","clang/test/SemaSYCL/kernel-attribute.cpp:26:29: warning: template parameter of a function template with the \'sycl_kernel\' attribute cannot be a non-type template parameter [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_sycl_kernel_num_of_function_params"]={ | ["warn_sycl_kernel_num_of_function_params"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="function template with \'sycl_kernel\' attribute must have a single parameter", | [b]="function template with \'sycl_kernel\' attribute must have a single parameter", | ||
[ | [d]=h, | ||
[ | [a]="function template with \'sycl_kernel\' attribute must have a single parameter", | ||
[ | [e]=R, | ||
[ | [c]=s, | ||
[ | [f]={Jc,1573050950,Dc,Ec}, | ||
[ | [g]={{w,8414,"static void handleSYCLKernelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n // Function must have at least one argument.\n if (getFunctionOrMethodNumParams(D) != 1) {\n S.Diag(FT->getLocation(), diag::warn_sycl_kernel_num_of_function_params);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaSYCL/kernel-attribute.cpp"]={"clang/test/SemaSYCL/kernel-attribute.cpp:36:35: warning: function template with \'sycl_kernel\' attribute must have a single parameter [-Wignored-attributes]","clang/test/SemaSYCL/kernel-attribute.cpp:38:29: warning: function template with \'sycl_kernel\' attribute must have a single parameter [-Wignored-attributes]"} | ["clang/test/SemaSYCL/kernel-attribute.cpp"]={"clang/test/SemaSYCL/kernel-attribute.cpp:36:35: warning: function template with \'sycl_kernel\' attribute must have a single parameter [-Wignored-attributes]","clang/test/SemaSYCL/kernel-attribute.cpp:38:29: warning: function template with \'sycl_kernel\' attribute must have a single parameter [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_sycl_kernel_num_of_template_params"]={ | ["warn_sycl_kernel_num_of_template_params"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="\'sycl_kernel\' attribute only applies to a function template with at least two template parameters", | [b]="\'sycl_kernel\' attribute only applies to a function template with at least two template parameters", | ||
[ | [d]=h, | ||
[ | [a]="\'sycl_kernel\' attribute only applies to a function template with at least two template parameters", | ||
[ | [e]=R, | ||
[ | [c]=s, | ||
[ | [f]={Jc,1573050950,Dc,Ec}, | ||
[ | [g]={{w,8398,"static void handleSYCLKernelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (TL->size() < 2) {\n S.Diag(FT->getLocation(), diag::warn_sycl_kernel_num_of_template_params);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaSYCL/kernel-attribute.cpp"]={"clang/test/SemaSYCL/kernel-attribute.cpp:18:35: warning: \'sycl_kernel\' attribute only applies to a function template with at least two template parameters [-Wignored-attributes]","clang/test/SemaSYCL/kernel-attribute.cpp:20:29: warning: \'sycl_kernel\' attribute only applies to a function template with at least two template parameters [-Wignored-attributes]"} | ["clang/test/SemaSYCL/kernel-attribute.cpp"]={"clang/test/SemaSYCL/kernel-attribute.cpp:18:35: warning: \'sycl_kernel\' attribute only applies to a function template with at least two template parameters [-Wignored-attributes]","clang/test/SemaSYCL/kernel-attribute.cpp:20:29: warning: \'sycl_kernel\' attribute only applies to a function template with at least two template parameters [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_sycl_kernel_return_type"]={ | ["warn_sycl_kernel_return_type"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="function template with \'sycl_kernel\' attribute must have a \'void\' return type", | [b]="function template with \'sycl_kernel\' attribute must have a \'void\' return type", | ||
[ | [d]=h, | ||
[ | [a]="function template with \'sycl_kernel\' attribute must have a \'void\' return type", | ||
[ | [e]=R, | ||
[ | [c]=s, | ||
[ | [f]={Jc,1573050950,Dc,Ec}, | ||
[ | [g]={{w,8421,"static void handleSYCLKernelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!RetTy->isVoidType()) {\n S.Diag(FT->getLocation(), diag::warn_sycl_kernel_return_type);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaSYCL/kernel-attribute.cpp"]={"clang/test/SemaSYCL/kernel-attribute.cpp:30:34: warning: function template with \'sycl_kernel\' attribute must have a \'void\' return type [-Wignored-attributes]","clang/test/SemaSYCL/kernel-attribute.cpp:32:28: warning: function template with \'sycl_kernel\' attribute must have a \'void\' return type [-Wignored-attributes]"} | ["clang/test/SemaSYCL/kernel-attribute.cpp"]={"clang/test/SemaSYCL/kernel-attribute.cpp:30:34: warning: function template with \'sycl_kernel\' attribute must have a \'void\' return type [-Wignored-attributes]","clang/test/SemaSYCL/kernel-attribute.cpp:32:28: warning: function template with \'sycl_kernel\' attribute must have a \'void\' return type [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_sync_fetch_and_nand_semantics_change"]={ | ["warn_sync_fetch_and_nand_semantics_change"]={ | ||
[ | [i]={"sync-fetch-and-nand-semantics-changed"}, | ||
[j]="sync-fetch-and-nand-semantics-changed", | |||
[ | |||
[b]="the semantics of this intrinsic changed with GCC version 4.4 - the newer semantics are provided here", | [b]="the semantics of this intrinsic changed with GCC version 4.4 - the newer semantics are provided here", | ||
[ | [d]=h, | ||
[ | [a]="the semantics of this intrinsic changed with GCC version 4\\.4 \\- the newer semantics are provided here", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wsync\\-fetch\\-and\\-nand\\-semantics\\-changed[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"d2208b59cfaa",1412283230,"Add __sync_fetch_and_nand (again)\n\nPrior to GCC 4.4, __sync_fetch_and_nand was implemented as:\n\n { ...","Add __sync_fetch_and_nand (again)\n\nPrior to GCC 4.4, __sync_fetch_and_nand was implemented as:\n\n { tmp = *ptr; *ptr = ~tmp & value; return tmp; }\n\nbut this was changed in GCC 4.4 to be:\n\n { tmp = *ptr; *ptr = ~(tmp & value); return tmp; }\n\nin response to this change, support for sync_fetch_and_nand (and\nsync_nand_and_fetch) was removed in r99522 in order to avoid miscompiling code\ndepending on the old semantics. However, at this point:\n\n 1. Many years have passed, and the amount of code relying on the old\n semantics is likely smaller.\n\n 2. Through the work of many contributors, all LLVM backends have been updated\n such that \"atomicrmw nand\" provides the newer GCC 4.4+ semantics (this process\n was complete July of 2014 (added to the release notes in r212635).\n\n 3. The lack of this intrinsic is now a needless impediment to porting codes\n from GCC to Clang (I\'ve now seen several examples of this).\n\nIt is true, however, that we still set GNUC_MINOR to 2 (corresponding to GCC\n4.2). To compensate for this, and to address the original concern regarding\ncode relying on the old semantics, I\'ve added a warning that specifically\ndetails the fact that the semantics have changed and that we provide the newer\nsemantics.\n\nFixes PR8842.\n\nllvm-svn: 218905"}, | ||
[ | [g]={{r,7821,"/// We have a call to a function like __sync_fetch_and_add, which is an\n/// overloaded function based on the pointer type of its first argument.\n/// The main BuildCallExpr routines have already promoted the types of\n/// arguments because all of these calls are prototyped as void(...).\n///\n/// This function goes through and does final semantic checking for these\n/// builtins, as well as generating any warnings.\nExprResult Sema::SemaBuiltinAtomicOverloaded(ExprResult TheCallResult) {\n // ...\n if (WarnAboutSemanticsChange) {\n Diag(TheCall->getEndLoc(), diag::warn_sync_fetch_and_nand_semantics_change) << Callee->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGen/atomic.c"]={"clang/test/CodeGen/atomic.c:60:40: warning: the semantics of this intrinsic changed with GCC version 4.4 - the newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]","clang/test/CodeGen/atomic.c:78:39: warning: the semantics of this intrinsic changed with GCC version 4.4 - the newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]"} | ["clang/test/CodeGen/atomic.c"]={"clang/test/CodeGen/atomic.c:60:40: warning: the semantics of this intrinsic changed with GCC version 4.4 - the newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]","clang/test/CodeGen/atomic.c:78:39: warning: the semantics of this intrinsic changed with GCC version 4.4 - the newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]"} | ||
} | } | ||
}, | }, | ||
["warn_sync_op_misaligned"]={ | ["warn_sync_op_misaligned"]={ | ||
[ | [i]={"sync-alignment"}, | ||
[j]="sync-alignment", | |||
[ | |||
[b]="__sync builtin operation MUST have natural alignment (consider using __atomic).", | [b]="__sync builtin operation MUST have natural alignment (consider using __atomic).", | ||
[ | [d]=h, | ||
[ | [a]="__sync builtin operation MUST have natural alignment \\(consider using __atomic\\)\\.", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wsync\\-alignment[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"ba6e747f9b05",1670524276,"[clang] Set ShowInSystemHeader for module-build and module-import remarks\n\nWithout this change, the ...","[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]={{"clang/lib/CodeGen/CGBuiltin.cpp",201,"static llvm::Value *CheckAtomicAlignment(CodeGenFunction &CGF, const CallExpr *E) {\n // ...\n if (Align % Bytes != 0) {\n // ...\n Diags.Report(E->getBeginLoc(), diag::warn_sync_op_misaligned);"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGen/SystemZ/sync-builtins-i128-8Al.c"]={"clang/test/CodeGen/SystemZ/sync-builtins-i128-8Al.c:11:10: warning: __sync builtin operation MUST have natural alignment (consider using __atomic). [-Wsync-alignment]","clang/test/CodeGen/SystemZ/sync-builtins-i128-8Al.c:16:10: warning: __sync builtin operation MUST have natural alignment (consider using __atomic). [-Wsync-alignment]","clang/test/CodeGen/SystemZ/sync-builtins-i128-8Al.c:21:10: warning: __sync builtin operation MUST have natural alignment (consider using __atomic). [-Wsync-alignment]","clang/test/CodeGen/SystemZ/sync-builtins-i128-8Al.c:26:3: warning: __sync builtin operation MUST have natural alignment (consider using __atomic). [-Wsync-alignment]"} | ["clang/test/CodeGen/SystemZ/sync-builtins-i128-8Al.c"]={"clang/test/CodeGen/SystemZ/sync-builtins-i128-8Al.c:11:10: warning: __sync builtin operation MUST have natural alignment (consider using __atomic). [-Wsync-alignment]","clang/test/CodeGen/SystemZ/sync-builtins-i128-8Al.c:16:10: warning: __sync builtin operation MUST have natural alignment (consider using __atomic). [-Wsync-alignment]","clang/test/CodeGen/SystemZ/sync-builtins-i128-8Al.c:21:10: warning: __sync builtin operation MUST have natural alignment (consider using __atomic). [-Wsync-alignment]","clang/test/CodeGen/SystemZ/sync-builtins-i128-8Al.c:26:3: warning: __sync builtin operation MUST have natural alignment (consider using __atomic). [-Wsync-alignment]"} | ||
} | } | ||
}, | }, | ||
["warn_taking_address_of_packed_member"]={ | ["warn_taking_address_of_packed_member"]={ | ||
[ | [i]={"address-of-packed-member"}, | ||
[j]="address-of-packed-member", | |||
[ | |||
[b]="taking address of packed member %0 of class or structure %q1 may result in an unaligned pointer value", | [b]="taking address of packed member %0 of class or structure %q1 may result in an unaligned pointer value", | ||
[ | [d]=h, | ||
[ | [a]="taking address of packed member (.*?) of class or structure (.*?) may result in an unaligned pointer value", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Waddress\\-of\\-packed\\-member[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"ac6617b288ed",1465832500,"Warn when taking address of a packed member\n\nThis patch implements PR#22821.\n\nTaking the address of ...","Warn when taking address of a packed member\n\nThis patch implements PR#22821.\n\nTaking the address of a packed member is dangerous since the reduced\nalignment of the pointee is lost. This can lead to memory alignment\nfaults in some architectures if the pointer value is dereferenced.\n\nThis change adds a new warning to clang emitted when taking the address\nof a packed member. A packed member is either a field/data member\ndeclared as attribute((packed)) or belonging to a struct/class\ndeclared as such. The associated flag is -Waddress-of-packed-member\n\nDifferential Revision: http://reviews.llvm.org/D20561\n\nllvm-svn: 272552"}, | ||
[ | [g]={{r,18481,"void Sema::DiagnoseMisalignedMembers() {\n for (MisalignedMember &m : MisalignedMembers) {\n // ...\n Diag(m.E->getBeginLoc(), diag::warn_taking_address_of_packed_member) << m.MD << ND << m.E->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/address-packed.c"]={"clang/test/Sema/address-packed.c:40:9: warning: taking address of packed member \'x\' of class or structure \'Arguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:52:9: warning: taking address of packed member \'x\' of class or structure \'UnionArguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:61:9: warning: taking address of packed member \'x\' of class or structure \'Arguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:71:9: warning: taking address of packed member \'x\' of class or structure \'Arguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:81:10: warning: taking address of packed member \'x\' of class or structure \'Arguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:96:11: warning: taking address of packed member \'i\' of class or structure \'S1\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:108:11: warning: taking address of packed member \'inner\' of class or structure \'S2\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:117:11: warning: taking address of packed member \'inner\' of class or structure \'S2_a\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:128:11: warning: taking address of packed member \'inner\' of class or structure \'S3\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:139:11: warning: taking address of packed member \'i\' of class or structure \'S4::struct (unnamed at clang/test/Sema/address-packed.c:133:3)\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:151:11: warning: taking address of packed member \'i\' of class or structure \'S5::struct (unnamed at clang/test/Sema/address-packed.c:144:3)\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:184:13: warning: taking address of packed member \'x\' of class or structure \'TypedefStructArguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:188:13: warning: taking address of packed member \'x\' of class or structure \'TypedefStructArguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:192:13: warning: taking address of packed member \'x\' of class or structure \'TypedefUnionArguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:203:11: warning: taking address of packed member \'x\' of class or structure \'S6::union (anonymous at clang/test/Sema/address-packed.c:196:3)\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:218:9: warning: taking address of packed member \'d\' of class or structure \'S6a\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:282:10: warning: taking address of packed member \'x\' of class or structure \'S9\' may result in an unaligned pointer value [-Waddress-of-packed-member]"} | ["clang/test/Sema/address-packed.c"]={"clang/test/Sema/address-packed.c:40:9: warning: taking address of packed member \'x\' of class or structure \'Arguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:52:9: warning: taking address of packed member \'x\' of class or structure \'UnionArguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:61:9: warning: taking address of packed member \'x\' of class or structure \'Arguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:71:9: warning: taking address of packed member \'x\' of class or structure \'Arguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:81:10: warning: taking address of packed member \'x\' of class or structure \'Arguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:96:11: warning: taking address of packed member \'i\' of class or structure \'S1\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:108:11: warning: taking address of packed member \'inner\' of class or structure \'S2\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:117:11: warning: taking address of packed member \'inner\' of class or structure \'S2_a\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:128:11: warning: taking address of packed member \'inner\' of class or structure \'S3\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:139:11: warning: taking address of packed member \'i\' of class or structure \'S4::struct (unnamed at clang/test/Sema/address-packed.c:133:3)\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:151:11: warning: taking address of packed member \'i\' of class or structure \'S5::struct (unnamed at clang/test/Sema/address-packed.c:144:3)\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:184:13: warning: taking address of packed member \'x\' of class or structure \'TypedefStructArguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:188:13: warning: taking address of packed member \'x\' of class or structure \'TypedefStructArguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:192:13: warning: taking address of packed member \'x\' of class or structure \'TypedefUnionArguable\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:203:11: warning: taking address of packed member \'x\' of class or structure \'S6::union (anonymous at clang/test/Sema/address-packed.c:196:3)\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:218:9: warning: taking address of packed member \'d\' of class or structure \'S6a\' may result in an unaligned pointer value [-Waddress-of-packed-member]","clang/test/Sema/address-packed.c:282:10: warning: taking address of packed member \'x\' of class or structure \'S9\' may result in an unaligned pointer value [-Waddress-of-packed-member]"} | ||
} | } | ||
}, | }, | ||
["warn_target_clone_duplicate_options"]={ | ["warn_target_clone_duplicate_options"]={ | ||
[ | [i]={Yb}, | ||
[j]=Yb, | |||
[ | |||
[b]="version list contains duplicate entries", | [b]="version list contains duplicate entries", | ||
[ | [d]=h, | ||
[ | [a]="version list contains duplicate entries", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wfunction\\-multiversion[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables i...","[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables into a record in task untied\nregions but clang does not support record with VLA data members.\n\nDifferential Revision: https://reviews.llvm.org/D99436"}, | ||
[ | [g]={{w,3549,"bool Sema::checkTargetClonesAttrString(SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, bool &HasDefault, bool &HasCommas, bool &HasNotDefault, SmallVectorImpl<SmallString<64>> &StringsBuffer) {\n // ...\n while (!Parts.second.empty()) {\n // ...\n if (TInfo.getTriple().isAArch64()) {\n // AArch64 target clones specific\n if (Cur == \"default\") {\n // ...\n if (llvm::is_contained(StringsBuffer, Cur) || DefaultIsDupe)\n Diag(CurLoc, diag::warn_target_clone_duplicate_options);"},{w,3576,"bool Sema::checkTargetClonesAttrString(SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, bool &HasDefault, bool &HasCommas, bool &HasNotDefault, SmallVectorImpl<SmallString<64>> &StringsBuffer) {\n // ...\n while (!Parts.second.empty()) {\n // ...\n if (TInfo.getTriple().isAArch64()) {\n // AArch64 target clones specific\n if (Cur == \"default\") {\n // ...\n } else {\n // ...\n if (llvm::is_contained(StringsBuffer, Res) || DefaultIsDupe)\n Diag(CurLoc, diag::warn_target_clone_duplicate_options);"},{w,3601,"bool Sema::checkTargetClonesAttrString(SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, bool &HasDefault, bool &HasCommas, bool &HasNotDefault, SmallVectorImpl<SmallString<64>> &StringsBuffer) {\n // ...\n while (!Parts.second.empty()) {\n // ...\n if (TInfo.getTriple().isAArch64()) {\n // ...\n } else {\n // ...\n if (llvm::is_contained(StringsBuffer, Cur) || DefaultIsDupe)\n Diag(CurLoc, diag::warn_target_clone_duplicate_options);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-target-clones-aarch64.c"]={"clang/test/Sema/attr-target-clones-aarch64.c:41:50: warning: version list contains duplicate entries [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:43:58: warning: version list contains duplicate entries [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:45:55: warning: version list contains duplicate entries [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:48:41: warning: version list contains duplicate entries [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:48:62: warning: version list contains duplicate entries [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:51:50: warning: version list contains duplicate entries [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:72:52: warning: version list contains duplicate entries [-Wfunction-multiversion]"} | ["clang/test/Sema/attr-target-clones-aarch64.c"]={"clang/test/Sema/attr-target-clones-aarch64.c:41:50: warning: version list contains duplicate entries [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:43:58: warning: version list contains duplicate entries [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:45:55: warning: version list contains duplicate entries [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:48:41: warning: version list contains duplicate entries [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:48:62: warning: version list contains duplicate entries [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:51:50: warning: version list contains duplicate entries [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:72:52: warning: version list contains duplicate entries [-Wfunction-multiversion]"} | ||
} | } | ||
}, | }, | ||
["warn_target_clone_mixed_values"]={ | ["warn_target_clone_mixed_values"]={ | ||
[ | [i]={Yb,"target-clones-mixed-specifiers"}, | ||
[j]="target-clones-mixed-specifiers", | |||
[ | |||
[b]="mixing \'target_clones\' specifier mechanisms is permitted for GCC compatibility; use a comma separated sequence of string literals, or a string literal containing a comma-separated list of versions", | [b]="mixing \'target_clones\' specifier mechanisms is permitted for GCC compatibility; use a comma separated sequence of string literals, or a string literal containing a comma-separated list of versions", | ||
[ | [d]=h, | ||
[ | [a]="mixing \'target_clones\' specifier mechanisms is permitted for GCC compatibility; use a comma separated sequence of string literals, or a string literal containing a comma\\-separated list of versions", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtarget\\-clones\\-mixed\\-specifiers[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables i...","[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables into a record in task untied\nregions but clang does not support record with VLA data members.\n\nDifferential Revision: https://reviews.llvm.org/D99436"}, | ||
[ | [g]={{w,3645,"static void handleTargetClonesAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (HasCommas && AL.getNumArgs() > 1)\n S.Diag(AL.getLoc(), diag::warn_target_clone_mixed_values);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-target-clones.c"]={"clang/test/Sema/attr-target-clones.c:49:20: warning: mixing \'target_clones\' specifier mechanisms is permitted for GCC compatibility; use a comma separated sequence of string literals, or a string literal containing a comma-separated list of versions [-Wtarget-clones-mixed-specifiers]"} | ["clang/test/Sema/attr-target-clones.c"]={"clang/test/Sema/attr-target-clones.c:49:20: warning: mixing \'target_clones\' specifier mechanisms is permitted for GCC compatibility; use a comma separated sequence of string literals, or a string literal containing a comma-separated list of versions [-Wtarget-clones-mixed-specifiers]"} | ||
} | } | ||
}, | }, | ||
["warn_target_clone_no_impact_options"]={ | ["warn_target_clone_no_impact_options"]={ | ||
[ | [i]={Yb}, | ||
[j]=Yb, | |||
[ | |||
[b]="version list contains entries that don\'t impact code generation", | [b]="version list contains entries that don\'t impact code generation", | ||
[ | [d]=h, | ||
[ | [a]="version list contains entries that don\'t impact code generation", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wfunction\\-multiversion[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={lb,1625925174,mb,nb}, | ||
[ | [g]={{w,3580,"bool Sema::checkTargetClonesAttrString(SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, bool &HasDefault, bool &HasCommas, bool &HasNotDefault, SmallVectorImpl<SmallString<64>> &StringsBuffer) {\n // ...\n while (!Parts.second.empty()) {\n // ...\n if (TInfo.getTriple().isAArch64()) {\n // AArch64 target clones specific\n if (Cur == \"default\") {\n // ...\n } else {\n // ...\n if (llvm::is_contained(StringsBuffer, Res) || DefaultIsDupe)\n // ...\n else if (!HasCodeGenImpact)\n // ...\n Diag(CurLoc, diag::warn_target_clone_no_impact_options);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-target-clones-aarch64.c"]={"clang/test/Sema/attr-target-clones-aarch64.c:8:36: warning: version list contains entries that don\'t impact code generation [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:27:35: warning: version list contains entries that don\'t impact code generation [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:59:36: warning: version list contains entries that don\'t impact code generation [-Wfunction-multiversion]"} | ["clang/test/Sema/attr-target-clones-aarch64.c"]={"clang/test/Sema/attr-target-clones-aarch64.c:8:36: warning: version list contains entries that don\'t impact code generation [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:27:35: warning: version list contains entries that don\'t impact code generation [-Wfunction-multiversion]","clang/test/Sema/attr-target-clones-aarch64.c:59:36: warning: version list contains entries that don\'t impact code generation [-Wfunction-multiversion]"} | ||
} | } | ||
}, | }, | ||
["warn_target_override_arm64ec"]={ | ["warn_target_override_arm64ec"]={ | ||
[ | [i]={"option-ignored"}, | ||
[j]="option-ignored", | |||
[ | |||
[b]="/arm64EC has been overridden by specified target: %0; option ignored", | [b]="/arm64EC has been overridden by specified target: %0; option ignored", | ||
[ | [d]=h, | ||
[ | [a]="\\/arm64EC has been overridden by specified target\\: (.*?); option ignored", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Woption\\-ignored[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"b0fff3db6ada",1664803233,"[ARM64EC][clang-cl] Add /arm64EC flag\n\nReviewed By: DavidSpickett\n\nDifferential Revision: https://re...","[ARM64EC][clang-cl] Add /arm64EC flag\n\nReviewed By: DavidSpickett\n\nDifferential Revision: https://reviews.llvm.org/D134788"}, | ||
[ | [g]={{"clang/lib/Driver/Driver.cpp",1447,"Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {\n // ...\n // Report warning when arm64EC option is overridden by specified target\n if ((TC.getTriple().getArch() != llvm::Triple::aarch64 || TC.getTriple().getSubArch() != llvm::Triple::AArch64SubArch_arm64ec) && UArgs->hasArg(options::OPT__SLASH_arm64EC)) {\n getDiags().Report(clang::diag::warn_target_override_arm64ec) << TC.getTriple().str();"}} | ||
}, | }, | ||
["warn_target_unrecognized_env"]={ | ["warn_target_unrecognized_env"]={ | ||
[ | [i]={"invalid-command-line-argument"}, | ||
[j]="invalid-command-line-argument", | |||
[ | |||
[b]="mismatch between architecture and environment in target triple \'%0\'; did you mean \'%1\'?", | [b]="mismatch between architecture and environment in target triple \'%0\'; did you mean \'%1\'?", | ||
[ | [d]=h, | ||
[ | [a]="mismatch between architecture and environment in target triple \'(.*?)\'; did you mean \'(.*?)\'\\?", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Winvalid\\-command\\-line\\-argument[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"041ffc155fd7",1687355349,"[Clang][Driver] Warn on invalid Arm or AArch64 baremetal target triple\n\nA common user mistake is spe...","[Clang][Driver] Warn on invalid Arm or AArch64 baremetal target triple\n\nA common user mistake is specifying a target of aarch64-none-eabi or\narm-none-elf whereas the correct names are aarch64-none-elf &\narm-none-eabi. Currently if a target of aarch64-none-eabi is specified\nthen the Generic_ELF toolchain is used, unlike aarch64-none-elf which\nwill use the BareMetal toolchain. This is unlikely to be intended by the\nuser so issue a warning that the target is invalid.\n\nThe target parser is liberal in what input it accepts so invalid triples\nmay yield behaviour that\'s sufficiently close to what the user intended.\nTherefore invalid triples were used in many tests. This change updates\nthose tests to use valid triples.\nOne test (gnu-mcount.c) relies on the Generic_ELF toolchain behaviour so\nchange it to explicitly specify aarch64-unknown-none-gnu as the target.\n\nReviewed By: peter.smith, DavidSpickett\n\nDifferential Revision: https://reviews.llvm.org/D153430"}, | ||
[ | [g]={{"clang/lib/Driver/Driver.cpp",1462,"Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {\n // ...\n // A common user mistake is specifying a target of aarch64-none-eabi or\n // arm-none-elf whereas the correct names are aarch64-none-elf &\n // arm-none-eabi. Detect these cases and issue a warning.\n if (TC.getTriple().getOS() == llvm::Triple::UnknownOS && TC.getTriple().getVendor() == llvm::Triple::UnknownVendor) {\n // ...\n case llvm::Triple::arm:\n case llvm::Triple::armeb:\n case llvm::Triple::thumb:\n case llvm::Triple::thumbeb:\n if (TC.getTriple().getEnvironmentName() == \"elf\") {\n Diag(diag::warn_target_unrecognized_env) << TargetTriple << (TC.getTriple().getArchName().str() + \"-none-eabi\");"},{"clang/lib/Driver/Driver.cpp",1471,"Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {\n // ...\n // A common user mistake is specifying a target of aarch64-none-eabi or\n // arm-none-elf whereas the correct names are aarch64-none-elf &\n // arm-none-eabi. Detect these cases and issue a warning.\n if (TC.getTriple().getOS() == llvm::Triple::UnknownOS && TC.getTriple().getVendor() == llvm::Triple::UnknownVendor) {\n // ...\n case llvm::Triple::aarch64:\n case llvm::Triple::aarch64_be:\n case llvm::Triple::aarch64_32:\n if (TC.getTriple().getEnvironmentName().startswith(\"eabi\")) {\n Diag(diag::warn_target_unrecognized_env) << TargetTriple << (TC.getTriple().getArchName().str() + \"-none-elf\");"}} | ||
}, | }, | ||
["warn_target_unsupported_abs2008"]={ | ["warn_target_unsupported_abs2008"]={ | ||
[ | [i]={"unsupported-abs"}, | ||
[j]="unsupported-abs", | |||
[ | |||
[b]="ignoring \'-mabs=2008\' option because the \'%0\' architecture does not support it", | [b]="ignoring \'-mabs=2008\' option because the \'%0\' architecture does not support it", | ||
[ | [d]=h, | ||
[ | [a]="ignoring \'\\-mabs\\=2008\' option because the \'(.*?)\' architecture does not support it", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunsupported\\-abs[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"5076511ed6bd",1503590790,"[mips] Introducing option -mabs=[legacy/2008]\n\nIn patch r205628 using abs.[ds] instruction is forced...","[mips] Introducing option -mabs=[legacy/2008]\n\nIn patch r205628 using abs.[ds] instruction is forced, as they should behave\nin accordance with flags Has2008 and ABS2008. Unfortunately for revisions\nprior mips32r6 and mips64r6, abs.[ds] is not generating correct result when\nworking with NaNs. To generate a sequence which always produce a correct\nresult but also to allow user more control on how his code is compiled,\noption -mabs is added where user can choose legacy or 2008.\nBy default legacy mode is used on revisions prior R6. Mips32r6 and mips64r6\nuse abs2008 mode by default.\n\nPatch by Aleksandar Beserminji\n\nDifferential Revision: https://reviews.llvm.org/D35982\n\nllvm-svn: 311669"}, | ||
[ | [g]={{"clang/lib/Driver/ToolChains/Arch/Mips.cpp",314,"void mips::getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mabs_EQ)) {\n // ...\n if (Val == \"2008\") {\n if (mips::getIEEE754Standard(CPUName) & mips::Std2008) {\n // ...\n } else {\n // ...\n D.Diag(diag::warn_target_unsupported_abs2008) << CPUName;"}}, | ||
[ | [k]={ | ||
["clang/test/Driver/mips-mabs-warning.c"]={"clang: warning: ignoring \'-mabs=2008\' option because the \'mips32\' architecture does not support it [-Wunsupported-abs]"} | ["clang/test/Driver/mips-mabs-warning.c"]={"clang: warning: ignoring \'-mabs=2008\' option because the \'mips32\' architecture does not support it [-Wunsupported-abs]"} | ||
} | } | ||
}, | }, | ||
["warn_target_unsupported_abslegacy"]={ | ["warn_target_unsupported_abslegacy"]={ | ||
[ | [i]={"unsupported-abs"}, | ||
[j]="unsupported-abs", | |||
[ | |||
[b]="ignoring \'-mabs=legacy\' option because the \'%0\' architecture does not support it", | [b]="ignoring \'-mabs=legacy\' option because the \'%0\' architecture does not support it", | ||
[ | [d]=h, | ||
[ | [a]="ignoring \'\\-mabs\\=legacy\' option because the \'(.*?)\' architecture does not support it", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunsupported\\-abs[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"5076511ed6bd",1503590790,"[mips] Introducing option -mabs=[legacy/2008]\n\nIn patch r205628 using abs.[ds] instruction is forced...","[mips] Introducing option -mabs=[legacy/2008]\n\nIn patch r205628 using abs.[ds] instruction is forced, as they should behave\nin accordance with flags Has2008 and ABS2008. Unfortunately for revisions\nprior mips32r6 and mips64r6, abs.[ds] is not generating correct result when\nworking with NaNs. To generate a sequence which always produce a correct\nresult but also to allow user more control on how his code is compiled,\noption -mabs is added where user can choose legacy or 2008.\nBy default legacy mode is used on revisions prior R6. Mips32r6 and mips64r6\nuse abs2008 mode by default.\n\nPatch by Aleksandar Beserminji\n\nDifferential Revision: https://reviews.llvm.org/D35982\n\nllvm-svn: 311669"}, | ||
[ | [g]={{"clang/lib/Driver/ToolChains/Arch/Mips.cpp",321,"void mips::getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mabs_EQ)) {\n // ...\n if (Val == \"2008\") {\n // ...\n } else if (Val == \"legacy\") {\n if (mips::getIEEE754Standard(CPUName) & mips::Legacy) {\n // ...\n } else {\n // ...\n D.Diag(diag::warn_target_unsupported_abslegacy) << CPUName;"}}, | ||
[ | [k]={ | ||
["clang/test/Driver/mips-mabs-warning.c"]={"clang: warning: ignoring \'-mabs=legacy\' option because the \'mips32r6\' architecture does not support it [-Wunsupported-abs]"} | ["clang/test/Driver/mips-mabs-warning.c"]={"clang: warning: ignoring \'-mabs=legacy\' option because the \'mips32r6\' architecture does not support it [-Wunsupported-abs]"} | ||
} | } | ||
}, | }, | ||
["warn_target_unsupported_branch_protection_attribute"]={ | ["warn_target_unsupported_branch_protection_attribute"]={ | ||
[ | [i]={mc}, | ||
[j]=mc, | |||
[ | |||
[b]="ignoring the \'branch-protection\' attribute because the \'%0\' architecture does not support it", | [b]="ignoring the \'branch-protection\' attribute because the \'%0\' architecture does not support it", | ||
[ | [d]=h, | ||
[ | [a]="ignoring the \'branch\\-protection\' attribute because the \'(.*?)\' architecture does not support it", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wbranch\\-protection[^\\]]*\\]", | ||
[ | [c]=Jb, | ||
[ | [f]={"4bafe65c2b2f",1634659977,"Add support for floating-point option `ffp-eval-method` and for\n`pragma clang fp eval_method`.","Add support for floating-point option `ffp-eval-method` and for\n`pragma clang fp eval_method`."}, | ||
[ | [g]={{"clang/lib/CodeGen/Targets/ARM.cpp",153,"class ARMTargetCodeGenInfo : public TargetCodeGenInfo {\n // ...\n void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const override {\n // ...\n if (const auto *TA = FD->getAttr<TargetAttr>()) {\n // ...\n if (!Attr.BranchProtection.empty()) {\n // ...\n if (!CGM.getTarget().validateBranchProtection(Attr.BranchProtection, Arch, BPI, DiagMsg)) {\n CGM.getDiags().Report(D->getLocation(), diag::warn_target_unsupported_branch_protection_attribute) << Arch;"},{"clang/lib/CodeGen/Targets/ARM.cpp",174,"class ARMTargetCodeGenInfo : public TargetCodeGenInfo {\n // ...\n void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const override {\n // ...\n if (const auto *TA = FD->getAttr<TargetAttr>()) {\n // ...\n if (!Attr.BranchProtection.empty()) {\n // ...\n } else if (CGM.getLangOpts().BranchTargetEnforcement || CGM.getLangOpts().hasSignReturnAddress()) {\n // If the Branch Protection attribute is missing, validate the target\n // Architecture attribute against Branch Protection command line\n // settings.\n if (!CGM.getTarget().isBranchProtectionSupportedArch(Attr.CPU))\n CGM.getDiags().Report(D->getLocation(), diag::warn_target_unsupported_branch_protection_attribute) << Attr.CPU;"}}, | ||
[ | [k]={ | ||
["clang/test/Frontend/arm-ignore-branch-protection-option.c"]={"clang/test/Frontend/arm-ignore-branch-protection-option.c:6:48: warning: ignoring the \'branch-protection\' attribute because the \'cortex-m0\' architecture does not support it [-Wbranch-protection]"} | ["clang/test/Frontend/arm-ignore-branch-protection-option.c"]={"clang/test/Frontend/arm-ignore-branch-protection-option.c:6:48: warning: ignoring the \'branch-protection\' attribute because the \'cortex-m0\' architecture does not support it [-Wbranch-protection]"} | ||
} | } | ||
}, | }, | ||
["warn_target_unsupported_compact_branches"]={ | ["warn_target_unsupported_compact_branches"]={ | ||
[ | [i]={"unsupported-cb"}, | ||
[j]="unsupported-cb", | |||
[ | |||
[b]="ignoring \'-mcompact-branches=\' option because the \'%0\' architecture does not support it", | [b]="ignoring \'-mcompact-branches=\' option because the \'%0\' architecture does not support it", | ||
[ | [d]=h, | ||
[ | [a]="ignoring \'\\-mcompact\\-branches\\=\' option because the \'(.*?)\' architecture does not support it", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunsupported\\-cb[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"d0e83bad13b1",1464362011,"[mips] Compact branch policy setting.\n\nThis patch adds the commandline option -mcompact-branches={ne...","[mips] Compact branch policy setting.\n\nThis patch adds the commandline option -mcompact-branches={never,optimal,always),\nwhich controls how LLVM generates compact branches for MIPSR6 targets. By default,\nthe compact branch policy is \'optimal\' where LLVM will generate the most\nappropriate branch for any situation. The \'never\' and \'always\' policy will disable\nor always generate compact branches wherever possible respectfully.\n\nReviewers: dsanders, vkalintiris, atanasyan\n\nDifferential Revision: http://reviews.llvm.org/D20729\n\nllvm-svn: 271000"}, | ||
[ | [g]={{"clang/lib/Driver/ToolChains/Clang.cpp",2007,"void Clang::AddMIPSTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mcompact_branches_EQ)) {\n // ...\n if (mips::hasCompactBranches(CPUName)) {\n // ...\n } else\n D.Diag(diag::warn_target_unsupported_compact_branches) << CPUName;"}} | ||
}, | }, | ||
["warn_target_unsupported_extension"]={ | ["warn_target_unsupported_extension"]={ | ||
[ | [i]={"invalid-command-line-argument"}, | ||
[j]="invalid-command-line-argument", | |||
[ | |||
[b]="ignoring extension \'%0\' because the \'%1\' architecture does not support it", | [b]="ignoring extension \'%0\' because the \'%1\' architecture does not support it", | ||
[ | [d]=h, | ||
[ | [a]="ignoring extension \'(.*?)\' because the \'(.*?)\' architecture does not support it", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Winvalid\\-command\\-line\\-argument[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"4593e4131aff",1534346725,"AMDGPU: Teach toolchain to link rocm device libs\n\nCurrently the library is separately linked, but th...","AMDGPU: Teach toolchain to link rocm device libs\n\nCurrently the library is separately linked, but this isn\'t correct to\nimplement fast math flags correctly. Each module should get the\nversion of the library appropriate for its combination of fast math\nand related flags, with the attributes propagated into its functions\nand internalized.\n\nHIP already maintains the list of libraries, but this is not used for\nOpenCL. Unfortunately, HIP uses a separate --hip-device-lib argument,\ndespite both languages using the same bitcode library. Eventually\nthese two searches need to be merged.\n\nAn additional problem is there are 3 different locations the libraries\nare installed, depending on which build is used. This also needs to be\nconsolidated (or at least the search logic needs to deal with this\nunnecessary complexity)."}, | ||
[ | [g]={{"clang/lib/Driver/ToolChains/Arch/ARM.cpp",772,"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 (HasSHA2 || HasAES) {\n // ...\n if (!((llvm::ARM::parseArchVersion(ArchSuffix) >= 8) && (ArchProfile == llvm::ARM::ProfileKind::A || ArchProfile == llvm::ARM::ProfileKind::R))) {\n if (HasSHA2)\n D.Diag(clang::diag::warn_target_unsupported_extension) << \"sha2\" << llvm::ARM::getArchName(llvm::ARM::parseArch(ArchSuffix));"},{"clang/lib/Driver/ToolChains/Arch/ARM.cpp",776,"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 (HasSHA2 || HasAES) {\n // ...\n if (!((llvm::ARM::parseArchVersion(ArchSuffix) >= 8) && (ArchProfile == llvm::ARM::ProfileKind::A || ArchProfile == llvm::ARM::ProfileKind::R))) {\n // ...\n if (HasAES)\n D.Diag(clang::diag::warn_target_unsupported_extension) << \"aes\" << llvm::ARM::getArchName(llvm::ARM::parseArch(ArchSuffix));"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/arm-acle-6.5.c"]={"clang: warning: ignoring extension \'sha2\' because the \'armv7-a\' architecture does not support it [-Winvalid-command-line-argument]","clang: warning: ignoring extension \'aes\' because the \'armv7-a\' architecture does not support it [-Winvalid-command-line-argument]"} | ["clang/test/Preprocessor/arm-acle-6.5.c"]={"clang: warning: ignoring extension \'sha2\' because the \'armv7-a\' architecture does not support it [-Winvalid-command-line-argument]","clang: warning: ignoring extension \'aes\' because the \'armv7-a\' architecture does not support it [-Winvalid-command-line-argument]"} | ||
} | } | ||
}, | }, | ||
["warn_target_unsupported_nan2008"]={ | ["warn_target_unsupported_nan2008"]={ | ||
[ | [i]={"unsupported-nan"}, | ||
[j]="unsupported-nan", | |||
[ | |||
[b]="ignoring \'-mnan=2008\' option because the \'%0\' architecture does not support it", | [b]="ignoring \'-mnan=2008\' option because the \'%0\' architecture does not support it", | ||
[ | [d]=h, | ||
[ | [a]="ignoring \'\\-mnan\\=2008\' option because the \'(.*?)\' architecture does not support it", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunsupported\\-nan[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"1dbc317736ce",1429015748,"[Mips] Generate warning for invalid \'-mnan\' and \'-march\' combinations\n\nThis patch generates a warnin...","[Mips] Generate warning for invalid \'-mnan\' and \'-march\' combinations\n\nThis patch generates a warning for invalid combination of \'-mnan\' and\n\'-march\' options, it properly sets NaN encoding for a given \'-march\',\nand it passes a proper NaN encoding to the assembler.\n\nPatch by Vladimir Radosavljevic.\n\nDifferential Revision: http://reviews.llvm.org/D8170\n\nllvm-svn: 234882"}, | ||
[ | [g]={{"clang/lib/Driver/ToolChains/Arch/Mips.cpp",293,"void mips::getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mnan_EQ)) {\n // ...\n if (Val == \"2008\") {\n if (mips::getIEEE754Standard(CPUName) & mips::Std2008)\n // ...\n else {\n // ...\n D.Diag(diag::warn_target_unsupported_nan2008) << CPUName;"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGen/mips-unsupported-nan.c"]={"clang: warning: ignoring \'-mnan=2008\' option because the \'mips64\' architecture does not support it [-Wunsupported-nan]"} | ["clang/test/CodeGen/mips-unsupported-nan.c"]={"clang: warning: ignoring \'-mnan=2008\' option because the \'mips64\' architecture does not support it [-Wunsupported-nan]"} | ||
} | } | ||
}, | }, | ||
["warn_target_unsupported_nanlegacy"]={ | ["warn_target_unsupported_nanlegacy"]={ | ||
[ | [i]={"unsupported-nan"}, | ||
[j]="unsupported-nan", | |||
[ | |||
[b]="ignoring \'-mnan=legacy\' option because the \'%0\' architecture does not support it", | [b]="ignoring \'-mnan=legacy\' option because the \'%0\' architecture does not support it", | ||
[ | [d]=h, | ||
[ | [a]="ignoring \'\\-mnan\\=legacy\' option because the \'(.*?)\' architecture does not support it", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunsupported\\-nan[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"1dbc317736ce",1429015748,"[Mips] Generate warning for invalid \'-mnan\' and \'-march\' combinations\n\nThis patch generates a warnin...","[Mips] Generate warning for invalid \'-mnan\' and \'-march\' combinations\n\nThis patch generates a warning for invalid combination of \'-mnan\' and\n\'-march\' options, it properly sets NaN encoding for a given \'-march\',\nand it passes a proper NaN encoding to the assembler.\n\nPatch by Vladimir Radosavljevic.\n\nDifferential Revision: http://reviews.llvm.org/D8170\n\nllvm-svn: 234882"}, | ||
[ | [g]={{"clang/lib/Driver/ToolChains/Arch/Mips.cpp",300,"void mips::getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mnan_EQ)) {\n // ...\n if (Val == \"2008\") {\n // ...\n } else if (Val == \"legacy\") {\n if (mips::getIEEE754Standard(CPUName) & mips::Legacy)\n // ...\n else {\n // ...\n D.Diag(diag::warn_target_unsupported_nanlegacy) << CPUName;"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGen/mips-unsupported-nan.c"]={"clang: warning: ignoring \'-mnan=legacy\' option because the \'mips64r6\' architecture does not support it [-Wunsupported-nan]"} | ["clang/test/CodeGen/mips-unsupported-nan.c"]={"clang: warning: ignoring \'-mnan=legacy\' option because the \'mips64r6\' architecture does not support it [-Wunsupported-nan]"} | ||
} | } | ||
}, | }, | ||
["warn_tautological_bool_compare"]={ | ["warn_tautological_bool_compare"]={ | ||
[ | [i]={n,o,p,ec,"tautological-constant-compare"}, | ||
[j]="tautological-constant-compare", | |||
[ | |||
[b]="result of comparison of %select{constant %0|true|false}1 with %select{expression of type %2|boolean expression}3 is always %4", | [b]="result of comparison of %select{constant %0|true|false}1 with %select{expression of type %2|boolean expression}3 is always %4", | ||
[ | [d]=h, | ||
[ | [a]="result of comparison of (?:constant (.*?)|true|false) with (?:expression of type (.*?)|boolean expression) is always (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtautological\\-constant\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"692f66ab626b",1512588199,"Delete special-case \"out-of-range\" handling for bools, and just use the normal\ncodepath plus the new...","Delete special-case \"out-of-range\" handling for bools, and just use the normal\ncodepath plus the new \"minimum / maximum value of type\" diagnostic to get the\nsame effect.\n\nMove the warning for an in-range but tautological comparison of a constant (0\nor 1) against a bool out of -Wtautological-constant-out-of-range-compare into\nthe more-appropriate -Wtautological-constant-compare.\n\nllvm-svn: 319942"}, | ||
[ | [g]={{r,13737,"static int classifyConstantValue(Expr *Constant) {\n // ...\n // diag::warn_out_of_range_compare and diag::warn_tautological_bool_compare."},{r,13879,"static bool CheckTautologicalComparison(Sema &S, BinaryOperator *E, Expr *Constant, Expr *Other, const llvm::APSInt &Value, bool RhsConstant) {\n // ...\n // FIXME: We use a somewhat different formatting for the in-range cases and\n // cases involving boolean values for historical reasons. We should pick a\n // consistent way of presenting these diagnostics.\n if (!InRange || Other->isKnownToHaveBooleanValue()) {\n S.DiagRuntimeBehavior(E->getOperatorLoc(), E, S.PDiag(!InRange ? diag::warn_out_of_range_compare : diag::warn_tautological_bool_compare) << OS.str() << classifyConstantValue(Constant) << OtherT << OtherIsBooleanDespiteType << *Result << E->getLHS()->getSourceRange() << E->getRHS()->getSourceRange());"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/atomic-compare.c"]={"clang/test/Sema/atomic-compare.c:17:10: warning: result of comparison of constant 1 with boolean expression is always false [-Wtautological-constant-compare]"} | ["clang/test/Sema/atomic-compare.c"]={"clang/test/Sema/atomic-compare.c:17:10: warning: result of comparison of constant 1 with boolean expression is always false [-Wtautological-constant-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_tautological_compare_objc_bool"]={ | ["warn_tautological_compare_objc_bool"]={ | ||
[ | [i]={n,o,p,"objc-signed-char-bool",ec,"tautological-objc-bool-compare"}, | ||
[j]="tautological-objc-bool-compare", | |||
[ | |||
[b]="result of comparison of constant %0 with expression of type \'BOOL\' is always %1, as the only well defined values for \'BOOL\' are YES and NO", | [b]="result of comparison of constant %0 with expression of type \'BOOL\' is always %1, as the only well defined values for \'BOOL\' are YES and NO", | ||
[ | [d]=h, | ||
[ | [a]="result of comparison of constant (.*?) with expression of type \'BOOL\' is always (.*?), as the only well defined values for \'BOOL\' are YES and NO", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtautological\\-objc\\-bool\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"fa591c370d24",1562629372,"[ObjC] Add a -Wtautological-compare warning for BOOL\n\nOn macOS, BOOL is a typedef for signed char, b...","[ObjC] Add a -Wtautological-compare warning for BOOL\n\nOn macOS, BOOL is a typedef for signed char, but it should never hold a value\nthat isn\'t 1 or 0. Any code that expects a different value in their BOOL should\nbe fixed.\n\nrdar://51954400\n\nDifferential revision: https://reviews.llvm.org/D63856\n\nllvm-svn: 365408"}, | ||
[ | [g]={{r,13866,"static bool CheckTautologicalComparison(Sema &S, BinaryOperator *E, Expr *Constant, Expr *Other, const llvm::APSInt &Value, bool RhsConstant) {\n // ...\n if (IsObjCSignedCharBool) {\n S.DiagRuntimeBehavior(E->getOperatorLoc(), E, S.PDiag(diag::warn_tautological_compare_objc_bool) << OS.str() << *Result);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/tautological-objc-bool-compare.m"]={"clang/test/Sema/tautological-objc-bool-compare.m:12:9: warning: result of comparison of constant 1 with expression of type \'BOOL\' is always false, as the only well defined values for \'BOOL\' are YES and NO [-Wtautological-objc-bool-compare]","clang/test/Sema/tautological-objc-bool-compare.m:14:9: warning: result of comparison of constant 0 with expression of type \'BOOL\' is always false, as the only well defined values for \'BOOL\' are YES and NO [-Wtautological-objc-bool-compare]","clang/test/Sema/tautological-objc-bool-compare.m:15:9: warning: result of comparison of constant 0 with expression of type \'BOOL\' is always true, as the only well defined values for \'BOOL\' are YES and NO [-Wtautological-objc-bool-compare]","clang/test/Sema/tautological-objc-bool-compare.m:18:9: warning: result of comparison of constant YES with expression of type \'BOOL\' is always false, as the only well defined values for \'BOOL\' are YES and NO [-Wtautological-objc-bool-compare]","clang/test/Sema/tautological-objc-bool-compare.m:20:9: warning: result of comparison of constant NO with expression of type \'BOOL\' is always false, as the only well defined values for \'BOOL\' are YES and NO [-Wtautological-objc-bool-compare]","clang/test/Sema/tautological-objc-bool-compare.m:22:9: warning: result of comparison of constant NO with expression of type \'BOOL\' is always true, as the only well defined values for \'BOOL\' are YES and NO [-Wtautological-objc-bool-compare]"} | ["clang/test/Sema/tautological-objc-bool-compare.m"]={"clang/test/Sema/tautological-objc-bool-compare.m:12:9: warning: result of comparison of constant 1 with expression of type \'BOOL\' is always false, as the only well defined values for \'BOOL\' are YES and NO [-Wtautological-objc-bool-compare]","clang/test/Sema/tautological-objc-bool-compare.m:14:9: warning: result of comparison of constant 0 with expression of type \'BOOL\' is always false, as the only well defined values for \'BOOL\' are YES and NO [-Wtautological-objc-bool-compare]","clang/test/Sema/tautological-objc-bool-compare.m:15:9: warning: result of comparison of constant 0 with expression of type \'BOOL\' is always true, as the only well defined values for \'BOOL\' are YES and NO [-Wtautological-objc-bool-compare]","clang/test/Sema/tautological-objc-bool-compare.m:18:9: warning: result of comparison of constant YES with expression of type \'BOOL\' is always false, as the only well defined values for \'BOOL\' are YES and NO [-Wtautological-objc-bool-compare]","clang/test/Sema/tautological-objc-bool-compare.m:20:9: warning: result of comparison of constant NO with expression of type \'BOOL\' is always false, as the only well defined values for \'BOOL\' are YES and NO [-Wtautological-objc-bool-compare]","clang/test/Sema/tautological-objc-bool-compare.m:22:9: warning: result of comparison of constant NO with expression of type \'BOOL\' is always true, as the only well defined values for \'BOOL\' are YES and NO [-Wtautological-objc-bool-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_tautological_compare_value_range"]={ | ["warn_tautological_compare_value_range"]={ | ||
[ | [i]={Zc,"tautological-value-range-compare"}, | ||
[j]="tautological-value-range-compare", | |||
[ | |||
[b]="result of comparison of %select{%4|%1-bit %select{signed|unsigned}2 value}0 %3 %select{%1-bit %select{signed|unsigned}2 value|%4}0 is always %5", | [b]="result of comparison of %select{%4|%1-bit %select{signed|unsigned}2 value}0 %3 %select{%1-bit %select{signed|unsigned}2 value|%4}0 is always %5", | ||
[ | [d]=h, | ||
[ | [a]="result of comparison of (?:(.*?)|(.*?)\\-bit (?:signed|unsigned) value) (.*?) (?:(.*?)\\-bit (?:signed|unsigned) value|(.*?)) is always (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtautological\\-value\\-range\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={Ob,1582847864,Mb,Nb}, | ||
[ | [g]={{r,13857,"static bool CheckTautologicalComparison(Sema &S, BinaryOperator *E, Expr *Constant, Expr *Other, const llvm::APSInt &Value, bool RhsConstant) {\n // ...\n if (!TautologicalTypeCompare) {\n S.Diag(E->getOperatorLoc(), diag::warn_tautological_compare_value_range) << RhsConstant << OtherValueRange.Width << OtherValueRange.NonNegative << E->getOpcodeStr() << OS.str() << *Result << E->getLHS()->getSourceRange() << E->getRHS()->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/tautological-constant-compare.c"]={"clang/test/Sema/tautological-constant-compare.c:560:11: warning: result of comparison of 3-bit signed value < 4 is always true [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:562:11: warning: result of comparison of 3-bit unsigned value < 8 is always true [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:564:11: warning: result of comparison of 3-bit signed value < 4 is always true [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:566:11: warning: result of comparison of 3-bit unsigned value < 8 is always true [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:574:18: warning: result of comparison of 8-bit unsigned value < 0 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:593:34: warning: result of comparison of 2-bit unsigned value > 3 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:608:32: warning: result of comparison of 15-bit unsigned value > 32767 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:614:17: warning: result of comparison of 6-bit signed value > 31 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:621:21: warning: result of comparison of 4-bit signed value < -8 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:623:21: warning: result of comparison of 4-bit signed value > 7 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:628:21: warning: result of comparison of 5-bit signed value < -16 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:629:21: warning: result of comparison of 5-bit signed value > 15 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:632:21: warning: result of comparison of 4-bit signed value > 7 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:633:21: warning: result of comparison of 4-bit signed value < -8 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:635:22: warning: result of comparison of 5-bit signed value < -16 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:648:15: warning: result of comparison of 3-bit signed value > 3 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:652:15: warning: result of comparison of 3-bit signed value < -4 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:656:15: warning: result of comparison of 2-bit unsigned value > 3 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:657:15: warning: result of comparison of 2-bit unsigned value < 0 is always false [-Wtautological-value-range-compare]"} | ["clang/test/Sema/tautological-constant-compare.c"]={"clang/test/Sema/tautological-constant-compare.c:560:11: warning: result of comparison of 3-bit signed value < 4 is always true [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:562:11: warning: result of comparison of 3-bit unsigned value < 8 is always true [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:564:11: warning: result of comparison of 3-bit signed value < 4 is always true [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:566:11: warning: result of comparison of 3-bit unsigned value < 8 is always true [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:574:18: warning: result of comparison of 8-bit unsigned value < 0 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:593:34: warning: result of comparison of 2-bit unsigned value > 3 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:608:32: warning: result of comparison of 15-bit unsigned value > 32767 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:614:17: warning: result of comparison of 6-bit signed value > 31 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:621:21: warning: result of comparison of 4-bit signed value < -8 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:623:21: warning: result of comparison of 4-bit signed value > 7 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:628:21: warning: result of comparison of 5-bit signed value < -16 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:629:21: warning: result of comparison of 5-bit signed value > 15 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:632:21: warning: result of comparison of 4-bit signed value > 7 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:633:21: warning: result of comparison of 4-bit signed value < -8 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:635:22: warning: result of comparison of 5-bit signed value < -16 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:648:15: warning: result of comparison of 3-bit signed value > 3 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:652:15: warning: result of comparison of 3-bit signed value < -4 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:656:15: warning: result of comparison of 2-bit unsigned value > 3 is always false [-Wtautological-value-range-compare]","clang/test/Sema/tautological-constant-compare.c:657:15: warning: result of comparison of 2-bit unsigned value < 0 is always false [-Wtautological-value-range-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_tautological_constant_compare"]={ | ["warn_tautological_constant_compare"]={ | ||
[ | [i]={Zc,"tautological-type-limit-compare","type-limits"}, | ||
[j]="tautological-type-limit-compare", | |||
[ | |||
[b]="result of comparison %select{%3|%1}0 %2 %select{%1|%3}0 is always %4", | [b]="result of comparison %select{%3|%1}0 %2 %select{%1|%3}0 is always %4", | ||
[ | [d]=h, | ||
[ | [a]="result of comparison (?:(.*?)|(.*?)) (.*?) (?:(.*?)|(.*?)) is always (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtautological\\-type\\-limit\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"bd1fc22043b7",1507839411,"[Sema] Diagnose tautological comparison with type\'s min/max values\n\nSummary:\nCurrently, clang only d...","[Sema] Diagnose tautological comparison with type\'s min/max values\n\nSummary:\nCurrently, clang only diagnoses completely out-of-range comparisons (e.g. `char` and constant `300`),\nand comparisons of unsigned and `0`. But gcc also does diagnose the comparisons with the\n`std::numeric_limits<>::max()` / `std::numeric_limits<>::min()` so to speak\n\nFinally Fixes https://bugs.llvm.org/show_bug.cgi?id=34147\nContinuation of https://reviews.llvm.org/D37565\n\nReviewers: rjmccall, rsmith, aaron.ballman\n\nReviewed By: rsmith\n\nSubscribers: rtrieu, jroelofs, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D38101\n\nllvm-svn: 315614"}, | ||
[ | [g]={{r,13891,"static bool CheckTautologicalComparison(Sema &S, BinaryOperator *E, Expr *Constant, Expr *Other, const llvm::APSInt &Value, bool RhsConstant) {\n // ...\n // FIXME: We use a somewhat different formatting for the in-range cases and\n // cases involving boolean values for historical reasons. We should pick a\n // consistent way of presenting these diagnostics.\n if (!InRange || Other->isKnownToHaveBooleanValue()) {\n // ...\n } else {\n // ...\n unsigned Diag = (isKnownToHaveUnsignedValue(OriginalOther) && Value == 0) ? (HasEnumType(OriginalOther) ? diag::warn_unsigned_enum_always_true_comparison : IsCharTy ? diag::warn_unsigned_char_always_true_comparison : diag::warn_unsigned_always_true_comparison) : diag::warn_tautological_constant_compare;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/compare.cpp"]={"clang/test/SemaCXX/compare.cpp:249:11: warning: result of comparison \'short\' > 4294967295 is always false [-Wtautological-type-limit-compare]","clang/test/SemaCXX/compare.cpp:250:11: warning: result of comparison \'short\' <= 4294967295 is always true [-Wtautological-type-limit-compare]"} | ["clang/test/SemaCXX/compare.cpp"]={"clang/test/SemaCXX/compare.cpp:249:11: warning: result of comparison \'short\' > 4294967295 is always false [-Wtautological-type-limit-compare]","clang/test/SemaCXX/compare.cpp:250:11: warning: result of comparison \'short\' <= 4294967295 is always true [-Wtautological-type-limit-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_tautological_overlap_comparison"]={ | ["warn_tautological_overlap_comparison"]={ | ||
[ | [i]={n,o,p,ec,"tautological-overlap-compare"}, | ||
[j]="tautological-overlap-compare", | |||
[ | |||
[b]="overlapping comparisons always evaluate to %select{false|true}0", | [b]="overlapping comparisons always evaluate to %select{false|true}0", | ||
[ | [d]=h, | ||
[ | [a]="overlapping comparisons always evaluate to (?:false|true)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtautological\\-overlap\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"f935b562b9a7",1396675021,"Add a new subgroup to -Wtautological-compare, -Wtautological-overlap-compare,\nwhich warns on compoun...","Add a new subgroup to -Wtautological-compare, -Wtautological-overlap-compare,\nwhich warns on compound conditionals that always evaluate to the same value.\nFor instance, (x > 5 && x < 3) will always be false since no value for x can\nsatisfy both conditions.\n\nThis patch also changes the CFG to use these tautological values for better\nbranch analysis. The test for -Wunreachable-code shows how this change catches\nadditional dead code.\n\nPatch by Anders Rönnholm.\n\nllvm-svn: 205665"}, | ||
[ | [g]={{y,167,"/// Warn on logical operator errors in CFGBuilder\nclass LogicalErrorHandler : public CFGCallback {\n // ...\n void compareAlwaysTrue(const BinaryOperator *B, bool isAlwaysTrue) override {\n // ...\n S.Diag(B->getExprLoc(), diag::warn_tautological_overlap_comparison) << DiagRange << isAlwaysTrue;"},{y,191,"/// Warn on logical operator errors in CFGBuilder\nclass LogicalErrorHandler : public CFGCallback {\n // ...\n static bool hasActiveDiagnostics(DiagnosticsEngine &Diags, SourceLocation Loc) { return !Diags.isIgnored(diag::warn_tautological_overlap_comparison, Loc) || !Diags.isIgnored(diag::warn_comparison_bitwise_or, Loc); }"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-overlap.c"]={ | ["clang/test/Sema/warn-overlap.c"]={ | ||
[1]="clang/test/Sema/warn-overlap.c:70:21: warning: overlapping comparisons always evaluate to false [-Wtautological-overlap-compare]", | [1]="clang/test/Sema/warn-overlap.c:70:21: warning: overlapping comparisons always evaluate to false [-Wtautological-overlap-compare]", | ||
Line 7,734: | Line 6,306: | ||
}, | }, | ||
["warn_tcb_enforcement_violation"]={ | ["warn_tcb_enforcement_violation"]={ | ||
[ | [i]={"tcb-enforcement"}, | ||
[j]="tcb-enforcement", | |||
[ | |||
[b]="calling %0 is a violation of trusted computing base \'%1\'", | [b]="calling %0 is a violation of trusted computing base \'%1\'", | ||
[ | [d]=h, | ||
[ | [a]="calling (.*?) is a violation of trusted computing base \'(.*?)\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtcb\\-enforcement[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to ...","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"}, | ||
[ | [g]={{r,19186,"/// \\brief Enforce the bounds of a TCB\n/// CheckTCBEnforcement - Enforces that every function in a named TCB only\n/// directly calls other functions in the same TCB as marked by the enforce_tcb\n/// and enforce_tcb_leaf attributes.\nvoid Sema::CheckTCBEnforcement(const SourceLocation CallExprLoc, const NamedDecl *Callee) {\n // ...\n // Go through the TCBs the caller is a part of and emit warnings if Caller\n // is in a TCB that the Callee is not.\n for (const auto *A : Caller->specific_attrs<EnforceTCBAttr>()) {\n // ...\n if (CalleeTCBs.count(CallerTCB) == 0) {\n this->Diag(CallExprLoc, diag::warn_tcb_enforcement_violation) << Callee << CallerTCB;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-enforce-tcb.c"]={"clang/test/Sema/attr-enforce-tcb.c:18:5: warning: calling \'foo3\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:19:5: warning: calling \'foo4\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:22:5: warning: calling \'foo7\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:39:5: warning: calling \'foo1\' is a violation of trusted computing base \'bar2\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:40:5: warning: calling \'foo4\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:42:5: warning: calling \'foo7\' is a violation of trusted computing base \'bar2\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:42:5: warning: calling \'foo7\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:52:3: warning: calling \'foo1\' is a violation of trusted computing base \'bar2\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:52:3: warning: calling \'foo1\' is a violation of trusted computing base \'bar3\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:55:3: warning: calling \'foo3\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:55:3: warning: calling \'foo3\' is a violation of trusted computing base \'bar2\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:55:3: warning: calling \'foo3\' is a violation of trusted computing base \'bar3\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:59:3: warning: calling \'foo4\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:59:3: warning: calling \'foo4\' is a violation of trusted computing base \'bar3\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:62:3: warning: calling \'foo7\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:62:3: warning: calling \'foo7\' is a violation of trusted computing base \'bar2\' [-Wtcb-enforcement]"} | ["clang/test/Sema/attr-enforce-tcb.c"]={"clang/test/Sema/attr-enforce-tcb.c:18:5: warning: calling \'foo3\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:19:5: warning: calling \'foo4\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:22:5: warning: calling \'foo7\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:39:5: warning: calling \'foo1\' is a violation of trusted computing base \'bar2\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:40:5: warning: calling \'foo4\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:42:5: warning: calling \'foo7\' is a violation of trusted computing base \'bar2\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:42:5: warning: calling \'foo7\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:52:3: warning: calling \'foo1\' is a violation of trusted computing base \'bar2\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:52:3: warning: calling \'foo1\' is a violation of trusted computing base \'bar3\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:55:3: warning: calling \'foo3\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:55:3: warning: calling \'foo3\' is a violation of trusted computing base \'bar2\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:55:3: warning: calling \'foo3\' is a violation of trusted computing base \'bar3\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:59:3: warning: calling \'foo4\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:59:3: warning: calling \'foo4\' is a violation of trusted computing base \'bar3\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:62:3: warning: calling \'foo7\' is a violation of trusted computing base \'bar\' [-Wtcb-enforcement]","clang/test/Sema/attr-enforce-tcb.c:62:3: warning: calling \'foo7\' is a violation of trusted computing base \'bar2\' [-Wtcb-enforcement]"} | ||
} | } | ||
}, | }, | ||
["warn_template_arg_negative"]={ | ["warn_template_arg_negative"]={ | ||
[ | [i]={Ab,Pb}, | ||
[j]=Ab, | |||
[ | |||
[b]="non-type template argument with value \'%0\' converted to \'%1\' for unsigned template parameter of type %2", | [b]="non-type template argument with value \'%0\' converted to \'%1\' for unsigned template parameter of type %2", | ||
[ | [d]=h, | ||
[ | [a]="non\\-type template argument with value \'(.*?)\' converted to \'(.*?)\' for unsigned template parameter of type (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wconversion[^\\]]*\\]", | ||
[ | [c]=Wb, | ||
[ | [f]={"63eed63312c1",1269555664,"Warn when the conversion of an integral non-type template argument to\nthe type of its corresponding ...","Warn when the conversion of an integral non-type template argument to\nthe type of its corresponding non-type template parameter changes the\nvalue. Previously, we were diagnosing this as an error, which was\nwrong. We give reasonably nice warnings like:\n\ntest/SemaTemplate/temp_arg_nontype.cpp:100:10: warning: non-type template\n argument value \'256\' truncated to \'0\' for template parameter of type\n \'unsigned char\'\nOverflow<256> *overflow3; // expected-warning{{non-type template ...\n ^~~\ntest/SemaTemplate/temp_arg_nontype.cpp:96:24: note: template parameter is\n declared here\ntemplate<unsigned char C> struct Overflow;\n ^\n\nllvm-svn: 99561"}, | ||
[ | [g]={{Rc,7566,"/// Check a template argument against its corresponding\n/// non-type template parameter.\n///\n/// This routine implements the semantics of C++ [temp.arg.nontype].\n/// If an error occurred, it returns ExprError(); otherwise, it\n/// returns the converted template argument. \\p ParamType is the\n/// type of the non-type template parameter after it has been instantiated.\nExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *Arg, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted, CheckTemplateArgumentKind CTAK) {\n // ...\n // C++ [temp.arg.nontype]p5:\n // The following conversions are performed on each expression used\n // as a non-type template-argument. If a non-type\n // template-argument cannot be converted to the type of the\n // corresponding template-parameter then the program is\n // ill-formed.\n if (ParamType->isIntegralOrEnumerationType()) {\n // ...\n if (ParamType->isBooleanType()) {\n // ...\n } else {\n // ...\n // Complain if an unsigned parameter received a negative value.\n if (IntegerType->isUnsignedIntegerOrEnumerationType() && (OldValue.isSigned() && OldValue.isNegative())) {\n Diag(Arg->getBeginLoc(), diag::warn_template_arg_negative) << toString(OldValue, 10) << toString(Value, 10) << Param->getType() << Arg->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaTemplate/temp_arg_nontype.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype.cpp:105:12: warning: non-type template argument with value \'-10\' converted to \'4294967286\' for unsigned template parameter of type \'unsigned int\' [-Wconversion]"} | ["clang/test/SemaTemplate/temp_arg_nontype.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype.cpp:105:12: warning: non-type template argument with value \'-10\' converted to \'4294967286\' for unsigned template parameter of type \'unsigned int\' [-Wconversion]"} | ||
} | } | ||
}, | }, | ||
["warn_template_arg_too_large"]={ | ["warn_template_arg_too_large"]={ | ||
[ | [i]={Ab,Pb}, | ||
[j]=Ab, | |||
[ | |||
[b]="non-type template argument value \'%0\' truncated to \'%1\' for template parameter of type %2", | [b]="non-type template argument value \'%0\' truncated to \'%1\' for template parameter of type %2", | ||
[ | [d]=h, | ||
[ | [a]="non\\-type template argument value \'(.*?)\' truncated to \'(.*?)\' for template parameter of type (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wconversion[^\\]]*\\]", | ||
[ | [c]=Wb, | ||
[ | [f]={"63eed63312c1",1269555664,"Warn when the conversion of an integral non-type template argument to\nthe type of its corresponding ...","Warn when the conversion of an integral non-type template argument to\nthe type of its corresponding non-type template parameter changes the\nvalue. Previously, we were diagnosing this as an error, which was\nwrong. We give reasonably nice warnings like:\n\ntest/SemaTemplate/temp_arg_nontype.cpp:100:10: warning: non-type template\n argument value \'256\' truncated to \'0\' for template parameter of type\n \'unsigned char\'\nOverflow<256> *overflow3; // expected-warning{{non-type template ...\n ^~~\ntest/SemaTemplate/temp_arg_nontype.cpp:96:24: note: template parameter is\n declared here\ntemplate<unsigned char C> struct Overflow;\n ^\n\nllvm-svn: 99561"}, | ||
[ | [g]={{Rc,7581,"/// Check a template argument against its corresponding\n/// non-type template parameter.\n///\n/// This routine implements the semantics of C++ [temp.arg.nontype].\n/// If an error occurred, it returns ExprError(); otherwise, it\n/// returns the converted template argument. \\p ParamType is the\n/// type of the non-type template parameter after it has been instantiated.\nExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *Arg, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted, CheckTemplateArgumentKind CTAK) {\n // ...\n // C++ [temp.arg.nontype]p5:\n // The following conversions are performed on each expression used\n // as a non-type template-argument. If a non-type\n // template-argument cannot be converted to the type of the\n // corresponding template-parameter then the program is\n // ill-formed.\n if (ParamType->isIntegralOrEnumerationType()) {\n // ...\n if (ParamType->isBooleanType()) {\n // ...\n } else {\n // ...\n if (RequiredBits > AllowedBits) {\n Diag(Arg->getBeginLoc(), diag::warn_template_arg_too_large) << toString(OldValue, 10) << toString(Value, 10) << Param->getType() << Arg->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaTemplate/temp_arg_nontype.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype.cpp:100:10: warning: non-type template argument value \'256\' truncated to \'0\' for template parameter of type \'unsigned char\' [-Wconversion]","clang/test/SemaTemplate/temp_arg_nontype.cpp:111:16: warning: non-type template argument value \'-129\' truncated to \'127\' for template parameter of type \'signed char\' [-Wconversion]","clang/test/SemaTemplate/temp_arg_nontype.cpp:113:16: warning: non-type template argument value \'128\' truncated to \'-128\' for template parameter of type \'signed char\' [-Wconversion]","clang/test/SemaTemplate/temp_arg_nontype.cpp:114:16: warning: non-type template argument value \'128\' truncated to \'-128\' for template parameter of type \'signed char\' [-Wconversion]","clang/test/SemaTemplate/temp_arg_nontype.cpp:207:34: warning: non-type template argument value \'9223372036854775807\' truncated to \'-1\' for template parameter of type \'int\' [-Wconversion]","clang/test/SemaTemplate/temp_arg_nontype.cpp:258:21: warning: non-type template argument value \'2147483648\' truncated to \'-2147483648\' for template parameter of type \'int\' [-Wconversion]"} | ["clang/test/SemaTemplate/temp_arg_nontype.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype.cpp:100:10: warning: non-type template argument value \'256\' truncated to \'0\' for template parameter of type \'unsigned char\' [-Wconversion]","clang/test/SemaTemplate/temp_arg_nontype.cpp:111:16: warning: non-type template argument value \'-129\' truncated to \'127\' for template parameter of type \'signed char\' [-Wconversion]","clang/test/SemaTemplate/temp_arg_nontype.cpp:113:16: warning: non-type template argument value \'128\' truncated to \'-128\' for template parameter of type \'signed char\' [-Wconversion]","clang/test/SemaTemplate/temp_arg_nontype.cpp:114:16: warning: non-type template argument value \'128\' truncated to \'-128\' for template parameter of type \'signed char\' [-Wconversion]","clang/test/SemaTemplate/temp_arg_nontype.cpp:207:34: warning: non-type template argument value \'9223372036854775807\' truncated to \'-1\' for template parameter of type \'int\' [-Wconversion]","clang/test/SemaTemplate/temp_arg_nontype.cpp:258:21: warning: non-type template argument value \'2147483648\' truncated to \'-2147483648\' for template parameter of type \'int\' [-Wconversion]"} | ||
} | } | ||
}, | }, | ||
["warn_template_export_unsupported"]={ | ["warn_template_export_unsupported"]={ | ||
[b]="exported templates are unsupported", | |||
[d]=h, | |||
[a]="exported templates are unsupported", | [a]="exported templates are unsupported", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[f]={"5c80a27ba264",1259175314,"Implement support for default template arguments of function templates.\n\nllvm-svn: 89874","Implement support for default template arguments of function templates.\n\nllvm-svn: 89874"}, | |||
[g]={{Rc,1805,"/// ActOnTemplateParameterList - Builds a TemplateParameterList, optionally\n/// constrained by RequiresClause, that contains the template parameters in\n/// Params.\nTemplateParameterList *Sema::ActOnTemplateParameterList(unsigned Depth, SourceLocation ExportLoc, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ArrayRef<NamedDecl *> Params, SourceLocation RAngleLoc, Expr *RequiresClause) {\n if (ExportLoc.isValid())\n Diag(ExportLoc, diag::warn_template_export_unsupported);"}}, | |||
[f | [k]={ | ||
[ | |||
[ | |||
["clang/test/Parser/cxx-template-decl.cpp"]={"clang/test/Parser/cxx-template-decl.cpp:12:1: warning: exported templates are unsupported"} | ["clang/test/Parser/cxx-template-decl.cpp"]={"clang/test/Parser/cxx-template-decl.cpp:12:1: warning: exported templates are unsupported"} | ||
} | } | ||
}, | }, | ||
["warn_template_qualified_friend_ignored"]={ | ["warn_template_qualified_friend_ignored"]={ | ||
[ | [i]={"unsupported-friend"}, | ||
[j]="unsupported-friend", | |||
[ | |||
[b]="dependent nested name specifier \'%0\' for friend template declaration is not supported; ignoring this friend declaration", | [b]="dependent nested name specifier \'%0\' for friend template declaration is not supported; ignoring this friend declaration", | ||
[ | [d]=h, | ||
[ | [a]="dependent nested name specifier \'(.*?)\' for friend template declaration is not supported; ignoring this friend declaration", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunsupported\\-friend[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"cd556eb26580",1383937196,"Issue a diagnostic if we see a templated friend declaration that we do not\nsupport.\n\nllvm-svn: 19427...","Issue a diagnostic if we see a templated friend declaration that we do not\nsupport.\n\nllvm-svn: 194273"}, | ||
[ | [g]={{Rc,1861,"DeclResult Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody) {\n // ...\n if (SS.isNotEmpty() && !SS.isInvalid()) {\n // ...\n if (!SemanticContext) {\n // ...\n Diag(NameLoc, TUK == TUK_Friend ? diag::warn_template_qualified_friend_ignored : diag::err_template_qualified_declarator_no_match) << SS.getScopeRep() << SS.getRange();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaTemplate/friend-template.cpp"]={"clang/test/SemaTemplate/friend-template.cpp:238:62: warning: dependent nested name specifier \'A<S>::\' for friend template declaration is not supported; ignoring this friend declaration [-Wunsupported-friend]"} | ["clang/test/SemaTemplate/friend-template.cpp"]={"clang/test/SemaTemplate/friend-template.cpp:238:62: warning: dependent nested name specifier \'A<S>::\' for friend template declaration is not supported; ignoring this friend declaration [-Wunsupported-friend]"} | ||
} | } | ||
}, | }, | ||
["warn_template_qualified_friend_unsupported"]={ | ["warn_template_qualified_friend_unsupported"]={ | ||
[ | [i]={"unsupported-friend"}, | ||
[j]="unsupported-friend", | |||
[ | |||
[b]="dependent nested name specifier \'%0\' for friend class declaration is not supported; turning off access control for %1", | [b]="dependent nested name specifier \'%0\' for friend class declaration is not supported; turning off access control for %1", | ||
[ | [d]=h, | ||
[ | [a]="dependent nested name specifier \'(.*?)\' for friend class declaration is not supported; turning off access control for (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunsupported\\-friend[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"cd556eb26580",1383937196,"Issue a diagnostic if we see a templated friend declaration that we do not\nsupport.\n\nllvm-svn: 19427...","Issue a diagnostic if we see a templated friend declaration that we do not\nsupport.\n\nllvm-svn: 194273"}, | ||
[ | [g]={{T,17351,"/// Handle a friend tag declaration where the scope specifier was\n/// templated.\nDeclResult Sema::ActOnTemplatedFriendTag(Scope *S, SourceLocation FriendLoc, unsigned TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, MultiTemplateParamsArg TempParamLists) {\n // ...\n Diag(NameLoc, diag::warn_template_qualified_friend_unsupported) << SS.getScopeRep() << SS.getRange() << cast<CXXRecordDecl>(CurContext);"},{T,17782,"NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams) {\n // ...\n if (ND->isInvalidDecl()) {\n // ...\n } else {\n // ...\n // Mark templated-scope function declarations as unsupported.\n if (FD->getNumTemplateParameterLists() && SS.isValid()) {\n Diag(FD->getLocation(), diag::warn_template_qualified_friend_unsupported) << SS.getScopeRep() << SS.getRange() << cast<CXXRecordDecl>(CurContext);"}}, | ||
[ | [k]={ | ||
["clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp"]={"clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:39:44: warning: dependent nested name specifier \'B<S>::\' for friend class declaration is not supported; turning off access control for \'A\' [-Wunsupported-friend]","clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:77:43: warning: dependent nested name specifier \'A<T>::\' for friend class declaration is not supported; turning off access control for \'(unnamed struct at clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:51:1)\' [-Wunsupported-friend]"} | ["clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp"]={"clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:39:44: warning: dependent nested name specifier \'B<S>::\' for friend class declaration is not supported; turning off access control for \'A\' [-Wunsupported-friend]","clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:77:43: warning: dependent nested name specifier \'A<T>::\' for friend class declaration is not supported; turning off access control for \'(unnamed struct at clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:51:1)\' [-Wunsupported-friend]"} | ||
} | } | ||
}, | }, | ||
["warn_template_spec_extra_headers"]={ | ["warn_template_spec_extra_headers"]={ | ||
[b]="extraneous template parameter list in template specialization", | |||
[d]=h, | |||
[a]="extraneous template parameter list in template specialization", | [a]="extraneous template parameter list in template specialization", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[f]={"65911498eff3",1258978305,"Tolerate extraneous \"template<>\" headers better, downgrading the\ncomplaint to a warning and providin...","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"}, | |||
[g]={{Rc,3580,"/// Match the given template parameter lists to the given scope\n/// specifier, returning the template parameter list that applies to the\n/// name.\n///\n/// \\param DeclStartLoc the start of the declaration that has a scope\n/// specifier or a template parameter list.\n///\n/// \\param DeclLoc The location of the declaration itself.\n///\n/// \\param SS the scope specifier that will be matched to the given template\n/// parameter lists. This scope specifier precedes a qualified name that is\n/// being declared.\n///\n/// \\param TemplateId The template-id following the scope specifier, if there\n/// is one. Used to check for a missing \'template<>\'.\n///\n/// \\param ParamLists the template parameter lists, from the outermost to the\n/// innermost template parameter lists.\n///\n/// \\param IsFriend Whether to apply the slightly different rules for\n/// matching template parameters to scope specifiers in friend\n/// declarations.\n///\n/// \\param IsMemberSpecialization will be set true if the scope specifier\n/// denotes a fully-specialized type, and therefore this is a declaration of\n/// a member specialization.\n///\n/// \\returns the template parameter list, if any, that corresponds to the\n/// name that is preceded by the scope specifier @p SS. This template\n/// parameter list may have template parameters (if we\'re declaring a\n/// template) or may have no template parameters (if we\'re declaring a\n/// template specialization), or may be NULL (if what we\'re declaring isn\'t\n/// itself a template).\nTemplateParameterList *Sema::MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId, ArrayRef<TemplateParameterList *> ParamLists, bool IsFriend, bool &IsMemberSpecialization, bool &Invalid, bool SuppressDiagnostic) {\n // ...\n // If there were too many template parameter lists, complain about that now.\n if (ParamIdx < ParamLists.size() - 1) {\n // ...\n if (!SuppressDiagnostic)\n Diag(ParamLists[ParamIdx]->getTemplateLoc(), AllExplicitSpecHeaders ? diag::warn_template_spec_extra_headers : diag::err_template_spec_extra_headers) << SourceRange(ParamLists[ParamIdx]->getTemplateLoc(), ParamLists[ParamLists.size() - 2]->getRAngleLoc());"}}, | |||
[f | [k]={ | ||
[ | |||
[ | |||
["clang/test/SemaTemplate/temp_explicit.cpp"]={"clang/test/SemaTemplate/temp_explicit.cpp:131:1: warning: extraneous template parameter list in template specialization"} | ["clang/test/SemaTemplate/temp_explicit.cpp"]={"clang/test/SemaTemplate/temp_explicit.cpp:131:1: warning: extraneous template parameter list in template specialization"} | ||
} | } | ||
}, | }, | ||
["warn_tentative_incomplete_array"]={ | ["warn_tentative_incomplete_array"]={ | ||
[b]="tentative array definition assumed to have one element", | |||
[d]=h, | |||
[a]="tentative array definition assumed to have one element", | [a]="tentative array definition assumed to have one element", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[f]={"c7ba5333782f",1239831327,"Add warning when a tentative array definition is assumed to have one element.\n - Also, fixed one to ...","Add warning when a tentative array definition is assumed to have one element.\n - Also, fixed one to actually be one (instead of zero). :)\n\nllvm-svn: 69226"}, | |||
[g]={{S,1308,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n for (TentativeDefinitionsType::iterator T = TentativeDefinitions.begin(ExternalSource.get()), TEnd = TentativeDefinitions.end(); T != TEnd; ++T) {\n // ...\n if (const IncompleteArrayType *ArrayT = Context.getAsIncompleteArrayType(VD->getType())) {\n // ...\n Diag(VD->getLocation(), diag::warn_tentative_incomplete_array);"}}, | |||
[f | [k]={ | ||
[ | |||
[ | |||
["clang/test/Sema/extern-redecl.c"]={"clang/test/Sema/extern-redecl.c:4:12: warning: tentative array definition assumed to have one element","clang/test/Sema/extern-redecl.c:23:12: warning: tentative array definition assumed to have one element"} | ["clang/test/Sema/extern-redecl.c"]={"clang/test/Sema/extern-redecl.c:4:12: warning: tentative array definition assumed to have one element","clang/test/Sema/extern-redecl.c:23:12: warning: tentative array definition assumed to have one element"} | ||
} | } | ||
}, | }, | ||
["warn_this_bool_conversion"]={ | ["warn_this_bool_conversion"]={ | ||
[ | [i]={"bool-conversion","bool-conversions",Ab,Pb,"undefined-bool-conversion"}, | ||
[j]="undefined-bool-conversion", | |||
[ | |||
[b]="\'this\' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true", | [b]="\'this\' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true", | ||
[ | [d]=h, | ||
[ | [a]="\'this\' pointer cannot be null in well\\-defined C\\+\\+ code; pointer may be assumed to always convert to true", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wundefined\\-bool\\-conversion[^\\]]*\\]", | ||
[ | [c]=Wb, | ||
[ | [f]={"f7432755d0c0",1402090766,"Add -Wtautological-undefined-compare and -Wundefined-bool-conversion warnings\nto detect underfined b...","Add -Wtautological-undefined-compare and -Wundefined-bool-conversion warnings\nto detect underfined behavior involving pointers.\n\nllvm-svn: 210372"}, | ||
[ | [g]={{r,15459,"/// Diagnose pointers that are always non-null.\n/// \\param E the expression containing the pointer\n/// \\param NullKind NPCK_NotNull if E is a cast to bool, otherwise, E is\n/// compared to a null pointer\n/// \\param IsEqual True when the comparison is equal to a null pointer\n/// \\param Range Extra SourceRange to highlight in the diagnostic\nvoid Sema::DiagnoseAlwaysNonNullPointer(Expr *E, Expr::NullPointerConstantKind NullKind, bool IsEqual, SourceRange Range) {\n // ...\n if (isa<CXXThisExpr>(E)) {\n unsigned DiagID = IsCompare ? diag::warn_this_null_compare : diag::warn_this_bool_conversion;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-undefined-bool-conversion.cpp"]={"clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:19:9: warning: \'this\' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]","clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:22:10: warning: \'this\' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]","clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:117:14: warning: \'this\' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]"} | ["clang/test/SemaCXX/warn-undefined-bool-conversion.cpp"]={"clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:19:9: warning: \'this\' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]","clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:22:10: warning: \'this\' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]","clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:117:14: warning: \'this\' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]"} | ||
} | } | ||
}, | }, | ||
["warn_this_null_compare"]={ | ["warn_this_null_compare"]={ | ||
[ | [i]={n,o,p,ec,"tautological-undefined-compare"}, | ||
[j]="tautological-undefined-compare", | |||
[ | |||
[b]="\'this\' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to %select{true|false}0", | [b]="\'this\' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to %select{true|false}0", | ||
[ | [d]=h, | ||
[ | [a]="\'this\' pointer cannot be null in well\\-defined C\\+\\+ code; comparison may be assumed to always evaluate to (?:true|false)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtautological\\-undefined\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"f7432755d0c0",1402090766,"Add -Wtautological-undefined-compare and -Wundefined-bool-conversion warnings\nto detect underfined b...","Add -Wtautological-undefined-compare and -Wundefined-bool-conversion warnings\nto detect underfined behavior involving pointers.\n\nllvm-svn: 210372"}, | ||
[ | [g]={{r,15458,"/// Diagnose pointers that are always non-null.\n/// \\param E the expression containing the pointer\n/// \\param NullKind NPCK_NotNull if E is a cast to bool, otherwise, E is\n/// compared to a null pointer\n/// \\param IsEqual True when the comparison is equal to a null pointer\n/// \\param Range Extra SourceRange to highlight in the diagnostic\nvoid Sema::DiagnoseAlwaysNonNullPointer(Expr *E, Expr::NullPointerConstantKind NullKind, bool IsEqual, SourceRange Range) {\n // ...\n if (isa<CXXThisExpr>(E)) {\n unsigned DiagID = IsCompare ? diag::warn_this_null_compare : diag::warn_this_bool_conversion;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-tautological-undefined-compare.cpp"]={"clang/test/SemaCXX/warn-tautological-undefined-compare.cpp:18:9: warning: \'this\' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to false [-Wtautological-undefined-compare]","clang/test/SemaCXX/warn-tautological-undefined-compare.cpp:20:9: warning: \'this\' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]","clang/test/SemaCXX/warn-tautological-undefined-compare.cpp:130:14: warning: \'this\' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]","clang/test/SemaCXX/warn-tautological-undefined-compare.cpp:132:14: warning: \'this\' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to false [-Wtautological-undefined-compare]","clang/test/SemaCXX/warn-tautological-undefined-compare.cpp:134:14: warning: \'this\' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]","clang/test/SemaCXX/warn-tautological-undefined-compare.cpp:136:14: warning: \'this\' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to false [-Wtautological-undefined-compare]"} | ["clang/test/SemaCXX/warn-tautological-undefined-compare.cpp"]={"clang/test/SemaCXX/warn-tautological-undefined-compare.cpp:18:9: warning: \'this\' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to false [-Wtautological-undefined-compare]","clang/test/SemaCXX/warn-tautological-undefined-compare.cpp:20:9: warning: \'this\' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]","clang/test/SemaCXX/warn-tautological-undefined-compare.cpp:130:14: warning: \'this\' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]","clang/test/SemaCXX/warn-tautological-undefined-compare.cpp:132:14: warning: \'this\' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to false [-Wtautological-undefined-compare]","clang/test/SemaCXX/warn-tautological-undefined-compare.cpp:134:14: warning: \'this\' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]","clang/test/SemaCXX/warn-tautological-undefined-compare.cpp:136:14: warning: \'this\' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to false [-Wtautological-undefined-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_thread_attribute_argument_not_lockable"]={ | ["warn_thread_attribute_argument_not_lockable"]={ | ||
[ | [i]={kb,vb}, | ||
[j]=vb, | |||
[ | |||
[b]="%0 attribute requires arguments whose type is annotated with \'capability\' attribute; type here is %1", | [b]="%0 attribute requires arguments whose type is annotated with \'capability\' attribute; type here is %1", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) attribute requires arguments whose type is annotated with \'capability\' attribute; type here is (.*?)", | ||
[ | [e]=wc, | ||
[ | [c]=l, | ||
[ | [f]={"8d11c797b2b6",1334851844,"Thread safety analysis: split warnings into two groups: attribute warnings\nwhich are checked in the ...","Thread safety analysis: split warnings into two groups: attribute warnings\nwhich are checked in the parser, and analysis warnings that require the\nfull analysis. This allows attribute syntax to be checked independently\nof the full thread safety analysis. Also introduces a new warning for the\ncase where a string is used as a lock expression; this allows the analysis\nto gracefully handle expressions that would otherwise cause a parse error.\n\nllvm-svn: 155129"}, | ||
[ | [g]={{w,679,"/// Checks that all attribute arguments, starting from Sidx, resolve to\n/// a capability object.\n/// \\param Sidx The attribute argument index to start checking with.\n/// \\param ParamIdxOk Whether an argument can be indexing into a function\n/// parameter list.\nstatic void checkAttrArgsAreCapabilityObjs(Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl<Expr *> &Args, unsigned Sidx = 0, bool ParamIdxOk = false) {\n // ...\n for (unsigned Idx = Sidx; Idx < AL.getNumArgs(); ++Idx) {\n // ...\n // If the type does not have a capability, see if the components of the\n // expression have capabilities. This allows for writing C code where the\n // capability may be on the type, and the expression is a capability\n // boolean logic expression. Eg) requires_capability(A || B && !C)\n if (!typeHasCapability(S, ArgTy) && !isCapabilityExpr(S, ArgExp))\n S.Diag(AL.getLoc(), diag::warn_thread_attribute_argument_not_lockable) << AL << ArgTy;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-capabilities.cpp"]={"clang/test/Sema/attr-capabilities.cpp:13:31: warning: \'assert_capability\' attribute requires arguments whose type is annotated with \'capability\' attribute; type here is \'NotACapability *\' [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.cpp:14:31: warning: \'assert_capability\' attribute requires arguments whose type is annotated with \'capability\' attribute; type here is \'bool\' [-Wthread-safety-attributes]"} | ["clang/test/Sema/attr-capabilities.cpp"]={"clang/test/Sema/attr-capabilities.cpp:13:31: warning: \'assert_capability\' attribute requires arguments whose type is annotated with \'capability\' attribute; type here is \'NotACapability *\' [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.cpp:14:31: warning: \'assert_capability\' attribute requires arguments whose type is annotated with \'capability\' attribute; type here is \'bool\' [-Wthread-safety-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_thread_attribute_decl_not_lockable"]={ | ["warn_thread_attribute_decl_not_lockable"]={ | ||
[ | [i]={kb,vb}, | ||
[j]=vb, | |||
[ | |||
[b]="%0 attribute can only be applied in a context annotated with \'capability\' attribute", | [b]="%0 attribute can only be applied in a context annotated with \'capability\' attribute", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) attribute can only be applied in a context annotated with \'capability\' attribute", | ||
[ | [e]=wc, | ||
[ | [c]=l, | ||
[ | [f]={"8d11c797b2b6",1334851844,"Thread safety analysis: split warnings into two groups: attribute warnings\nwhich are checked in the ...","Thread safety analysis: split warnings into two groups: attribute warnings\nwhich are checked in the parser, and analysis warnings that require the\nfull analysis. This allows attribute syntax to be checked independently\nof the full thread safety analysis. Also introduces a new warning for the\ncase where a string is used as a lock expression; this allows the analysis\nto gracefully handle expressions that would otherwise cause a parse error.\n\nllvm-svn: 155129"}, | ||
[ | [g]={{w,738,"static bool checkAcquireOrderAttrCommon(Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl<Expr *> &Args) {\n // ...\n if (!QT->isDependentType() && !typeHasCapability(S, QT)) {\n S.Diag(AL.getLoc(), diag::warn_thread_attribute_decl_not_lockable) << AL;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-thread-safety-parsing.cpp"]={"clang/test/SemaCXX/warn-thread-safety-parsing.cpp:498:31: warning: \'acquired_after\' attribute can only be applied in a context annotated with \'capability\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:561:31: warning: \'acquired_before\' attribute can only be applied in a context annotated with \'capability\' attribute [-Wthread-safety-attributes]"} | ["clang/test/SemaCXX/warn-thread-safety-parsing.cpp"]={"clang/test/SemaCXX/warn-thread-safety-parsing.cpp:498:31: warning: \'acquired_after\' attribute can only be applied in a context annotated with \'capability\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:561:31: warning: \'acquired_before\' attribute can only be applied in a context annotated with \'capability\' attribute [-Wthread-safety-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_thread_attribute_decl_not_pointer"]={ | ["warn_thread_attribute_decl_not_pointer"]={ | ||
[ | [i]={kb,vb}, | ||
[j]=vb, | |||
[ | |||
[b]="%0 only applies to pointer types; type here is %1", | [b]="%0 only applies to pointer types; type here is %1", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) only applies to pointer types; type here is (.*?)", | ||
[ | [e]=wc, | ||
[ | [c]=l, | ||
[ | [f]={"8d11c797b2b6",1334851844,"Thread safety analysis: split warnings into two groups: attribute warnings\nwhich are checked in the ...","Thread safety analysis: split warnings into two groups: attribute warnings\nwhich are checked in the parser, and analysis warnings that require the\nfull analysis. This allows attribute syntax to be checked independently\nof the full thread safety analysis. Also introduces a new warning for the\ncase where a string is used as a lock expression; this allows the analysis\nto gracefully handle expressions that would otherwise cause a parse error.\n\nllvm-svn: 155129"}, | ||
[ | [g]={{w,490,"/// Check if passed in Decl is a pointer type.\n/// Note that this function may produce an error message.\n/// \\return true if the Decl is a pointer type; false otherwise\nstatic bool threadSafetyCheckIsPointer(Sema &S, const Decl *D, const ParsedAttr &AL) {\n // ...\n S.Diag(AL.getLoc(), diag::warn_thread_attribute_decl_not_pointer) << AL << QT;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-thread-safety-parsing.cpp"]={"clang/test/SemaCXX/warn-thread-safety-parsing.cpp:184:20: warning: \'pt_guarded_var\' only applies to pointer types; type here is \'int\' [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:190:20: warning: \'pt_guarded_var\' only applies to pointer types; type here is \'int\' [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:389:18: warning: \'pt_guarded_by\' only applies to pointer types; type here is \'int\' [-Wthread-safety-attributes]"} | ["clang/test/SemaCXX/warn-thread-safety-parsing.cpp"]={"clang/test/SemaCXX/warn-thread-safety-parsing.cpp:184:20: warning: \'pt_guarded_var\' only applies to pointer types; type here is \'int\' [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:190:20: warning: \'pt_guarded_var\' only applies to pointer types; type here is \'int\' [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:389:18: warning: \'pt_guarded_by\' only applies to pointer types; type here is \'int\' [-Wthread-safety-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_thread_attribute_ignored"]={ | ["warn_thread_attribute_ignored"]={ | ||
[ | [i]={kb,vb}, | ||
[j]=vb, | |||
[ | |||
[b]="ignoring %0 attribute because its argument is invalid", | [b]="ignoring %0 attribute because its argument is invalid", | ||
[ | [d]=h, | ||
[ | [a]="ignoring (.*?) attribute because its argument is invalid", | ||
[ | [e]=wc, | ||
[ | [c]=l, | ||
[ | [f]={"8d11c797b2b6",1334851844,"Thread safety analysis: split warnings into two groups: attribute warnings\nwhich are checked in the ...","Thread safety analysis: split warnings into two groups: attribute warnings\nwhich are checked in the parser, and analysis warnings that require the\nfull analysis. This allows attribute syntax to be checked independently\nof the full thread safety analysis. Also introduces a new warning for the\ncase where a string is used as a lock expression; this allows the analysis\nto gracefully handle expressions that would otherwise cause a parse error.\n\nllvm-svn: 155129"}, | ||
[ | [g]={{w,637,"/// Checks that all attribute arguments, starting from Sidx, resolve to\n/// a capability object.\n/// \\param Sidx The attribute argument index to start checking with.\n/// \\param ParamIdxOk Whether an argument can be indexing into a function\n/// parameter list.\nstatic void checkAttrArgsAreCapabilityObjs(Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl<Expr *> &Args, unsigned Sidx = 0, bool ParamIdxOk = false) {\n // ...\n for (unsigned Idx = Sidx; Idx < AL.getNumArgs(); ++Idx) {\n // ...\n if (const auto *StrLit = dyn_cast<StringLiteral>(ArgExp)) {\n // ...\n S.Diag(AL.getLoc(), diag::warn_thread_attribute_ignored) << AL;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-thread-safety-parsing.cpp"]={"clang/test/SemaCXX/warn-thread-safety-parsing.cpp:312:18: warning: ignoring \'guarded_by\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:360:22: warning: ignoring \'guarded_by\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:431:25: warning: ignoring \'pt_guarded_by\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:492:24: warning: ignoring \'acquired_after\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:555:24: warning: ignoring \'acquired_before\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:621:26: warning: ignoring \'exclusive_lock_function\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:694:26: warning: ignoring \'shared_lock_function\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:780:26: warning: ignoring \'exclusive_trylock_function\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:858:26: warning: ignoring \'shared_trylock_function\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:925:25: warning: ignoring \'unlock_function\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:1001:25: warning: ignoring \'lock_returned\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:1068:25: warning: ignoring \'locks_excluded\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:1135:26: warning: ignoring \'exclusive_locks_required\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:1203:26: warning: ignoring \'shared_locks_required\' attribute because its argument is invalid [-Wthread-safety-attributes]"} | ["clang/test/SemaCXX/warn-thread-safety-parsing.cpp"]={"clang/test/SemaCXX/warn-thread-safety-parsing.cpp:312:18: warning: ignoring \'guarded_by\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:360:22: warning: ignoring \'guarded_by\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:431:25: warning: ignoring \'pt_guarded_by\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:492:24: warning: ignoring \'acquired_after\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:555:24: warning: ignoring \'acquired_before\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:621:26: warning: ignoring \'exclusive_lock_function\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:694:26: warning: ignoring \'shared_lock_function\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:780:26: warning: ignoring \'exclusive_trylock_function\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:858:26: warning: ignoring \'shared_trylock_function\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:925:25: warning: ignoring \'unlock_function\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:1001:25: warning: ignoring \'lock_returned\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:1068:25: warning: ignoring \'locks_excluded\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:1135:26: warning: ignoring \'exclusive_locks_required\' attribute because its argument is invalid [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:1203:26: warning: ignoring \'shared_locks_required\' attribute because its argument is invalid [-Wthread-safety-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_thread_attribute_not_on_capability_member"]={ | ["warn_thread_attribute_not_on_capability_member"]={ | ||
[ | [i]={kb,vb}, | ||
[j]=vb, | |||
[ | |||
[b]="%0 attribute without capability arguments refers to \'this\', but %1 isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute", | [b]="%0 attribute without capability arguments refers to \'this\', but %1 isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) attribute without capability arguments refers to \'this\', but (.*?) isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute", | ||
[ | [e]=wc, | ||
[ | [c]=l, | ||
[ | [f]={"7ba1ab71ecf4",1537403967,"Thread Safety Analysis: warnings for attributes without arguments\n\nSummary:\nWhen thread safety annot...","Thread Safety Analysis: warnings for attributes without arguments\n\nSummary:\nWhen thread safety annotations are used without capability arguments,\nthey are assumed to apply to `this` instead. So we warn when either\n`this` doesn\'t exist, or the class is not a capability type.\n\nThis is based on earlier work by Josh Gao that was committed in r310403,\nbut reverted in r310698 because it didn\'t properly work in template\nclasses. See also D36237.\n\nThe solution is not to go via the QualType of `this`, which is then a\ntemplate type, hence the attributes are not known because it could be\nspecialized. Instead we look directly at the class in which we are\ncontained.\n\nAdditionally I grouped two of the warnings together. There are two\nissues here: the existence of `this`, which requires us to be a\nnon-static member function, and the appropriate annotation on the class\nwe are contained in. So we don\'t distinguish between not being in a\nclass and being static, because in both cases we don\'t have `this`.\n\nFixes PR38399.\n\nReviewers: aaron.ballman, delesley, jmgao, rtrieu\n\nReviewed By: delesley\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D51901\n\nllvm-svn: 342605"}, | ||
[ | [g]={{w,609,"/// Checks that all attribute arguments, starting from Sidx, resolve to\n/// a capability object.\n/// \\param Sidx The attribute argument index to start checking with.\n/// \\param ParamIdxOk Whether an argument can be indexing into a function\n/// parameter list.\nstatic void checkAttrArgsAreCapabilityObjs(Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl<Expr *> &Args, unsigned Sidx = 0, bool ParamIdxOk = false) {\n if (Sidx == AL.getNumArgs()) {\n // ...\n if (MD && !MD->isStatic()) {\n // ...\n // FIXME -- need to check this again on template instantiation\n if (!checkRecordDeclForAttr<CapabilityAttr>(RD) && !checkRecordDeclForAttr<ScopedLockableAttr>(RD))\n S.Diag(AL.getLoc(), diag::warn_thread_attribute_not_on_capability_member) << AL << MD->getParent();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-thread-safety-parsing.cpp"]={"clang/test/SemaCXX/warn-thread-safety-parsing.cpp:594:22: warning: \'exclusive_lock_function\' attribute without capability arguments refers to \'this\', but \'ElfFoo\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:670:22: warning: \'shared_lock_function\' attribute without capability arguments refers to \'this\', but \'SlfFoo\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:746:22: warning: \'exclusive_trylock_function\' attribute without capability arguments refers to \'this\', but \'EtfFoo\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:827:22: warning: \'shared_trylock_function\' attribute without capability arguments refers to \'this\', but \'StfFoo\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:898:22: warning: \'unlock_function\' attribute without capability arguments refers to \'this\', but \'UfFoo\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:1274:25: warning: \'unlock_function\' attribute without capability arguments refers to \'this\', but \'NonSLTemplateClass\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:1294:17: warning: \'unlock_function\' attribute without capability arguments refers to \'this\', but \'SLDerived2\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:1299:17: warning: \'unlock_function\' attribute without capability arguments refers to \'this\', but \'SLDerived3\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]"} | ["clang/test/SemaCXX/warn-thread-safety-parsing.cpp"]={"clang/test/SemaCXX/warn-thread-safety-parsing.cpp:594:22: warning: \'exclusive_lock_function\' attribute without capability arguments refers to \'this\', but \'ElfFoo\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:670:22: warning: \'shared_lock_function\' attribute without capability arguments refers to \'this\', but \'SlfFoo\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:746:22: warning: \'exclusive_trylock_function\' attribute without capability arguments refers to \'this\', but \'EtfFoo\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:827:22: warning: \'shared_trylock_function\' attribute without capability arguments refers to \'this\', but \'StfFoo\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:898:22: warning: \'unlock_function\' attribute without capability arguments refers to \'this\', but \'UfFoo\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:1274:25: warning: \'unlock_function\' attribute without capability arguments refers to \'this\', but \'NonSLTemplateClass\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:1294:17: warning: \'unlock_function\' attribute without capability arguments refers to \'this\', but \'SLDerived2\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]","clang/test/SemaCXX/warn-thread-safety-parsing.cpp:1299:17: warning: \'unlock_function\' attribute without capability arguments refers to \'this\', but \'SLDerived3\' isn\'t annotated with \'capability\' or \'scoped_lockable\' attribute [-Wthread-safety-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_thread_attribute_not_on_non_static_member"]={ | ["warn_thread_attribute_not_on_non_static_member"]={ | ||
[ | [i]={kb,vb}, | ||
[j]=vb, | |||
[ | |||
[b]="%0 attribute without capability arguments can only be applied to non-static methods of a class", | [b]="%0 attribute without capability arguments can only be applied to non-static methods of a class", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) attribute without capability arguments can only be applied to non\\-static methods of a class", | ||
[ | [e]=wc, | ||
[ | [c]=l, | ||
[ | [f]={"7ba1ab71ecf4",1537403967,"Thread Safety Analysis: warnings for attributes without arguments\n\nSummary:\nWhen thread safety annot...","Thread Safety Analysis: warnings for attributes without arguments\n\nSummary:\nWhen thread safety annotations are used without capability arguments,\nthey are assumed to apply to `this` instead. So we warn when either\n`this` doesn\'t exist, or the class is not a capability type.\n\nThis is based on earlier work by Josh Gao that was committed in r310403,\nbut reverted in r310698 because it didn\'t properly work in template\nclasses. See also D36237.\n\nThe solution is not to go via the QualType of `this`, which is then a\ntemplate type, hence the attributes are not known because it could be\nspecialized. Instead we look directly at the class in which we are\ncontained.\n\nAdditionally I grouped two of the warnings together. There are two\nissues here: the existence of `this`, which requires us to be a\nnon-static member function, and the appropriate annotation on the class\nwe are contained in. So we don\'t distinguish between not being in a\nclass and being static, because in both cases we don\'t have `this`.\n\nFixes PR38399.\n\nReviewers: aaron.ballman, delesley, jmgao, rtrieu\n\nReviewed By: delesley\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D51901\n\nllvm-svn: 342605"}, | ||
[ | [g]={{w,612,"/// Checks that all attribute arguments, starting from Sidx, resolve to\n/// a capability object.\n/// \\param Sidx The attribute argument index to start checking with.\n/// \\param ParamIdxOk Whether an argument can be indexing into a function\n/// parameter list.\nstatic void checkAttrArgsAreCapabilityObjs(Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl<Expr *> &Args, unsigned Sidx = 0, bool ParamIdxOk = false) {\n if (Sidx == AL.getNumArgs()) {\n // ...\n if (MD && !MD->isStatic()) {\n // ...\n } else {\n S.Diag(AL.getLoc(), diag::warn_thread_attribute_not_on_non_static_member) << AL;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-capabilities.c"]={"clang/test/Sema/attr-capabilities.c:40:33: warning: \'assert_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:41:34: warning: \'assert_shared_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:46:34: warning: \'acquire_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:47:34: warning: \'acquire_shared_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:53:34: warning: \'release_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:54:34: warning: \'release_shared_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:55:34: warning: \'release_generic_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:57:34: warning: \'try_acquire_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:58:34: warning: \'try_acquire_shared_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]"} | ["clang/test/Sema/attr-capabilities.c"]={"clang/test/Sema/attr-capabilities.c:40:33: warning: \'assert_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:41:34: warning: \'assert_shared_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:46:34: warning: \'acquire_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:47:34: warning: \'acquire_shared_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:53:34: warning: \'release_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:54:34: warning: \'release_shared_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:55:34: warning: \'release_generic_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:57:34: warning: \'try_acquire_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]","clang/test/Sema/attr-capabilities.c:58:34: warning: \'try_acquire_shared_capability\' attribute without capability arguments can only be applied to non-static methods of a class [-Wthread-safety-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_thread_safety_beta"]={ | ["warn_thread_safety_beta"]={ | ||
[ | [i]={"thread-safety-beta"}, | ||
[j]="thread-safety-beta", | |||
[ | |||
[b]="thread safety beta warning", | [b]="thread safety beta warning", | ||
[ | [d]=h, | ||
[ | [a]="thread safety beta warning", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wthread\\-safety\\-beta[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"8edae13dd069",1354665975,"Thread safety analysis: Add a new \"beta\" warning flag: -Wthread-safety-beta.\nAs the analysis improve...","Thread safety analysis: Add a new \"beta\" warning flag: -Wthread-safety-beta.\nAs the analysis improves, it will continue to add new warnings that are\npotentially disruptive to existing users. From now on, such warnings will\nfirst be introduced under the \"beta\" flag. Such warnings are not turned on by\ndefault; their purpose is to allow users to test their code against future\nplanned changes, before those changes are actually made. After a suitable\nmigration period, beta warnings will be folded into the standard\n-Wthread-safety.\n\nllvm-svn: 169338"}, | ||
[ | [g]={{y,2612,"void clang::sema::AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P, sema::FunctionScopeInfo *fscope, const Decl *D, QualType BlockType) {\n // ...\n // Check for thread safety violations\n if (P.enableThreadSafetyAnalysis) {\n // ...\n if (!Diags.isIgnored(diag::warn_thread_safety_beta, D->getBeginLoc()))"}} | ||
}, | }, | ||
["warn_thread_safety_verbose"]={ | ["warn_thread_safety_verbose"]={ | ||
[ | [i]={"thread-safety-verbose"}, | ||
[j]="thread-safety-verbose", | |||
[ | |||
[b]="thread safety verbose warning", | [b]="thread safety verbose warning", | ||
[ | [d]=h, | ||
[ | [a]="thread safety verbose warning", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wthread\\-safety\\-verbose[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"eb0ea5f40a48",1408052415,"Thread safety analysis: add -Wthread-safety-verbose flag, which adds additional notes that are helpf...","Thread safety analysis: add -Wthread-safety-verbose flag, which adds additional notes that are helpful when compiling statistics on thread safety warnings.\n\nllvm-svn: 215677"}, | ||
[ | [g]={{y,2614,"void clang::sema::AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P, sema::FunctionScopeInfo *fscope, const Decl *D, QualType BlockType) {\n // ...\n // Check for thread safety violations\n if (P.enableThreadSafetyAnalysis) {\n // ...\n if (!Diags.isIgnored(diag::warn_thread_safety_verbose, D->getBeginLoc()))"}} | ||
}, | }, | ||
["warn_throw_in_noexcept_func"]={ | ["warn_throw_in_noexcept_func"]={ | ||
[ | [i]={"exceptions"}, | ||
[j]="exceptions", | |||
[ | |||
[b]="%0 has a non-throwing exception specification but can still throw", | [b]="%0 has a non-throwing exception specification but can still throw", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) has a non\\-throwing exception specification but can still throw", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wexceptions[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"89fe9c269a22",1498249339,"Emit warning when throw exception in destruct or dealloc functions which has a \n(possible implicit) ...","Emit warning when throw exception in destruct or dealloc functions which has a \n(possible implicit) noexcept specifier\n\nThrowing in the destructor is not good (C++11 change try to not allow see below).\n But in reality, those codes are exist.\nC++11 [class.dtor]p3:\n\nA declaration of a destructor that does not have an exception-specification is \nimplicitly considered to have the same exception specification as an implicit \ndeclaration.\n\nWith this change, the application worked before may now run into runtime \ntermination. My goal here is to emit a warning to provide only possible info to \nwhere the code may need to be changed.\n\nFirst there is no way, in compile time to identify the “throw” really throw out \nof the function. Things like the call which throw out… To keep this simple, \nwhen “throw” is seen, checking its enclosing function(only destructor and \ndealloc functions) with noexcept(true) specifier emit warning.\n\nHere is implementation detail:\nA new member function CheckCXXThrowInNonThrowingFunc is added for class Sema \nin Sema.h. It is used in the call to both BuildCXXThrow and \nTransformCXXThrowExpr.\n\nThe function basic check if the enclosing function with non-throwing noexcept \nspecifer, if so emit warning for it.\n\nThe example of warning message like:\nk1.cpp:18:3: warning: \'\'~dependent_warn\'\' has a (possible implicit) non-throwing\n\n noexcept specifier. Throwing exception may cause termination.\n [-Wthrow-in-dtor]\n throw 1;\n ^\n\n k1.cpp:43:30: note: in instantiation of member function\n\n \'dependent_warn<noexcept_fun>::~dependent_warn\' requested here\n\n dependent_warn<noexcept_fun> f; // cause warning\n\nDifferential Revision: https://reviews.llvm.org/D33333\n\nllvm-svn: 306149"}, | ||
[ | [g]={{y,358,"static void EmitDiagForCXXThrowInNonThrowingFunc(Sema &S, SourceLocation OpLoc, const FunctionDecl *FD) {\n if (!S.getSourceManager().isInSystemHeader(OpLoc) && FD->getTypeSourceInfo()) {\n S.Diag(OpLoc, diag::warn_throw_in_noexcept_func) << FD;"},{y,2688,"void clang::sema::AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P, sema::FunctionScopeInfo *fscope, const Decl *D, QualType BlockType) {\n // ...\n if (!Diags.isIgnored(diag::warn_throw_in_noexcept_func, D->getBeginLoc()))"}}, | ||
[ | [k]={ | ||
["clang/test/CXX/except/except.spec/p11.cpp"]={"clang/test/CXX/except/except.spec/p11.cpp:5:3: warning: \'f\' has a non-throwing exception specification but can still throw [-Wexceptions]","clang/test/CXX/except/except.spec/p11.cpp:8:3: warning: \'g\' has a non-throwing exception specification but can still throw [-Wexceptions]"} | ["clang/test/CXX/except/except.spec/p11.cpp"]={"clang/test/CXX/except/except.spec/p11.cpp:5:3: warning: \'f\' has a non-throwing exception specification but can still throw [-Wexceptions]","clang/test/CXX/except/except.spec/p11.cpp:8:3: warning: \'g\' has a non-throwing exception specification but can still throw [-Wexceptions]"} | ||
} | } | ||
}, | }, | ||
["warn_throw_underaligned_obj"]={ | ["warn_throw_underaligned_obj"]={ | ||
[ | [i]={"underaligned-exception-object"}, | ||
[j]="underaligned-exception-object", | |||
[ | |||
[b]="underaligned exception object thrown", | [b]="underaligned exception object thrown", | ||
[ | [d]=h, | ||
[ | [a]="underaligned exception object thrown", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunderaligned\\-exception\\-object[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"c39a243da651",1557454597,"Assume `__cxa_allocate_exception` returns an under-aligned memory on\nDarwin if the version of libc++...","Assume `__cxa_allocate_exception` returns an under-aligned memory on\nDarwin if the version of libc++abi isn\'t new enough to include the fix\nin r319123\n\nThis patch resurrects r264998, which was committed to work around a bug\nin libc++abi that was causing _cxa_allocate_exception to return a memory\nthat wasn\'t double-word aligned.\n\nhttp://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160328/154332.html\n\nIn addition, this patch makes clang issue a warning if the type of the\nthrown object requires an alignment that is larger than the minimum\nguaranteed by the target C++ runtime.\n\nrdar://problem/49864414\n\nDifferential Revision: https://reviews.llvm.org/D61667\n\nllvm-svn: 360404"}, | ||
[ | [g]={{Sb,1091,"/// CheckCXXThrowOperand - Validate the operand of a throw.\nbool Sema::CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ExceptionObjectTy, Expr *E) {\n // ...\n // Under the Itanium C++ ABI, memory for the exception object is allocated by\n // the runtime with no ability for the compiler to request additional\n // alignment. Warn if the exception type requires alignment beyond the minimum\n // guaranteed by the target C++ runtime.\n if (Context.getTargetInfo().getCXXABI().isItaniumFamily()) {\n // ...\n if (ExnObjAlign < TypeAlign) {\n Diag(ThrowLoc, diag::warn_throw_underaligned_obj);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-overaligned-type-thrown.cpp"]={"clang/test/SemaCXX/warn-overaligned-type-thrown.cpp:53:3: warning: underaligned exception object thrown [-Wunderaligned-exception-object]"} | ["clang/test/SemaCXX/warn-overaligned-type-thrown.cpp"]={"clang/test/SemaCXX/warn-overaligned-type-thrown.cpp:53:3: warning: underaligned exception object thrown [-Wunderaligned-exception-object]"} | ||
} | } | ||
}, | }, | ||
["warn_transparent_union_attribute_field_size_align"]={ | ["warn_transparent_union_attribute_field_size_align"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="%select{alignment|size}0 of field %1 (%2 bits) does not match the %select{alignment|size}0 of the first field in transparent union; transparent_union attribute ignored", | [b]="%select{alignment|size}0 of field %1 (%2 bits) does not match the %select{alignment|size}0 of the first field in transparent union; transparent_union attribute ignored", | ||
[ | [d]=h, | ||
[ | [a]="(?:alignment|size) of field (.*?) \\((.*?) bits\\) does not match the (?:alignment|size) of the first field in transparent union; transparent_union attribute ignored", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={"0cfbdab0cf8a",1241043376,"Implement semantic analysis for transparent unions. This is largely\nbased on a patch from Anders Joh...","Implement semantic analysis for transparent unions. This is largely\nbased on a patch from Anders Johnsen. CodeGen support is incomplete,\nin that we do not properly coerce to the first field\'s type.\n\nllvm-svn: 70419"}, | ||
[ | [g]={{w,4266,"static void handleTransparentUnionAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n for (; Field != FieldEnd; ++Field) {\n // ...\n // FIXME: this isn\'t fully correct; we also need to test whether the\n // members of the union would all have the same calling convention as the\n // first member of the union. Checking just the size and alignment isn\'t\n // sufficient (consider structs passed on the stack instead of in registers\n // as an example).\n if (S.Context.getTypeSize(FieldType) != FirstSize || S.Context.getTypeAlign(FieldType) > FirstAlign) {\n // ...\n S.Diag(Field->getLocation(), diag::warn_transparent_union_attribute_field_size_align) << isSize << *Field << FieldBits;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/transparent-union.c"]={"clang/test/Sema/transparent-union.c:83:19: warning: alignment of field \'s8\' (64 bits) does not match the alignment of the first field in transparent union; transparent_union attribute ignored [-Wignored-attributes]","clang/test/Sema/transparent-union.c:88:19: warning: alignment of field \'s8\' (64 bits) does not match the alignment of the first field in transparent union; transparent_union attribute ignored [-Wignored-attributes]","clang/test/Sema/transparent-union.c:93:7: warning: size of field \'i\' (32 bits) does not match the size of the first field in transparent union; transparent_union attribute ignored [-Wignored-attributes]","clang/test/Sema/transparent-union.c:98:7: warning: size of field \'i\' (32 bits) does not match the size of the first field in transparent union; transparent_union attribute ignored [-Wignored-attributes]","clang/test/Sema/transparent-union.c:127:3: warning: alignment of field \'\' (64 bits) does not match the alignment of the first field in transparent union; transparent_union attribute ignored [-Wignored-attributes]"} | ["clang/test/Sema/transparent-union.c"]={"clang/test/Sema/transparent-union.c:83:19: warning: alignment of field \'s8\' (64 bits) does not match the alignment of the first field in transparent union; transparent_union attribute ignored [-Wignored-attributes]","clang/test/Sema/transparent-union.c:88:19: warning: alignment of field \'s8\' (64 bits) does not match the alignment of the first field in transparent union; transparent_union attribute ignored [-Wignored-attributes]","clang/test/Sema/transparent-union.c:93:7: warning: size of field \'i\' (32 bits) does not match the size of the first field in transparent union; transparent_union attribute ignored [-Wignored-attributes]","clang/test/Sema/transparent-union.c:98:7: warning: size of field \'i\' (32 bits) does not match the size of the first field in transparent union; transparent_union attribute ignored [-Wignored-attributes]","clang/test/Sema/transparent-union.c:127:3: warning: alignment of field \'\' (64 bits) does not match the alignment of the first field in transparent union; transparent_union attribute ignored [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_transparent_union_attribute_floating"]={ | ["warn_transparent_union_attribute_floating"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="first field of a transparent union cannot have %select{floating point|vector}0 type %1; transparent_union attribute ignored", | [b]="first field of a transparent union cannot have %select{floating point|vector}0 type %1; transparent_union attribute ignored", | ||
[ | [d]=h, | ||
[ | [a]="first field of a transparent union cannot have (?:floating point|vector) type (.*?); transparent_union attribute ignored", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{w,4241,"static void handleTransparentUnionAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (FirstType->hasFloatingRepresentation() || FirstType->isVectorType()) {\n S.Diag(FirstField->getLocation(), diag::warn_transparent_union_attribute_floating) << FirstType->isVectorType() << FirstType;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/transparent-union.c"]={"clang/test/Sema/transparent-union.c:102:9: warning: first field of a transparent union cannot have floating point type \'float\'; transparent_union attribute ignored [-Wignored-attributes]","clang/test/Sema/transparent-union.c:109:8: warning: first field of a transparent union cannot have vector type \'int4\' (vector of 4 \'int\' values); transparent_union attribute ignored [-Wignored-attributes]"} | ["clang/test/Sema/transparent-union.c"]={"clang/test/Sema/transparent-union.c:102:9: warning: first field of a transparent union cannot have floating point type \'float\'; transparent_union attribute ignored [-Wignored-attributes]","clang/test/Sema/transparent-union.c:109:8: warning: first field of a transparent union cannot have vector type \'int4\' (vector of 4 \'int\' values); transparent_union attribute ignored [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_transparent_union_attribute_not_definition"]={ | ["warn_transparent_union_attribute_not_definition"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="transparent_union attribute can only be applied to a union definition; attribute ignored", | [b]="transparent_union attribute can only be applied to a union definition; attribute ignored", | ||
[ | [d]=h, | ||
[ | [a]="transparent_union attribute can only be applied to a union definition; attribute ignored", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={"0cfbdab0cf8a",1241043376,"Implement semantic analysis for transparent unions. This is largely\nbased on a patch from Anders Joh...","Implement semantic analysis for transparent unions. This is largely\nbased on a patch from Anders Johnsen. CodeGen support is incomplete,\nin that we do not properly coerce to the first field\'s type.\n\nllvm-svn: 70419"}, | ||
[ | [g]={{w,4226,"static void handleTransparentUnionAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!RD->isCompleteDefinition()) {\n if (!RD->isBeingDefined())\n S.Diag(AL.getLoc(), diag::warn_transparent_union_attribute_not_definition);"}} | ||
}, | }, | ||
["warn_transparent_union_attribute_zero_fields"]={ | ["warn_transparent_union_attribute_zero_fields"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="transparent union definition must contain at least one field; transparent_union attribute ignored", | [b]="transparent union definition must contain at least one field; transparent_union attribute ignored", | ||
[ | [d]=h, | ||
[ | [a]="transparent union definition must contain at least one field; transparent_union attribute ignored", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{w,4233,"static void handleTransparentUnionAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (Field == FieldEnd) {\n S.Diag(AL.getLoc(), diag::warn_transparent_union_attribute_zero_fields);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/transparent-union.c"]={"clang/test/Sema/transparent-union.c:105:38: warning: transparent union definition must contain at least one field; transparent_union attribute ignored [-Wignored-attributes]"} | ["clang/test/Sema/transparent-union.c"]={"clang/test/Sema/transparent-union.c:105:38: warning: transparent union definition must contain at least one field; transparent_union attribute ignored [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_type_attribute_deprecated_on_decl"]={ | ["warn_type_attribute_deprecated_on_decl"]={ | ||
[ | [i]={wb,"deprecated-attributes"}, | ||
[j]="deprecated-attributes", | |||
[ | |||
[b]="applying attribute %0 to a declaration is deprecated; apply it to the type instead", | [b]="applying attribute %0 to a declaration is deprecated; apply it to the type instead", | ||
[ | [d]=h, | ||
[ | [a]="applying attribute (.*?) to a declaration is deprecated; apply it to the type instead", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-attributes[^\\]]*\\]", | ||
[ | [c]=Tb, | ||
[ | [f]={lb,1625925174,mb,nb}, | ||
[ | [g]={{w,8783,"/// ProcessDeclAttribute - Apply the specific attribute to the specified decl if\n/// the attribute applies to decls. If the attribute is a type attribute, just\n/// silently ignore it if a GNU attribute.\nstatic void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, const Sema::ProcessDeclAttributeOptions &Options) {\n // ...\n default:\n // ...\n if (AL.isTypeAttr()) {\n // ...\n // According to the C and C++ standards, we should never see a\n // [[]] type attribute on a declaration. However, we have in the past\n // allowed some type attributes to \"slide\" to the `DeclSpec`, so we need\n // to continue to support this legacy behavior. We only do this, however,\n // if\n // - we actually have a `DeclSpec`, i.e. if we\'re looking at a\n // `DeclaratorDecl`, or\n // - we are looking at an alias-declaration, where historically we have\n // allowed type attributes after the identifier to slide to the type.\n if (AL.slidesFromDeclToDeclSpecLegacyBehavior() && isa<DeclaratorDecl, TypeAliasDecl>(D)) {\n // Suggest moving the attribute to the type instead, but only for our\n // own vendor attributes; moving other vendors\' attributes might hurt\n // portability.\n if (AL.isClangScope()) {\n S.Diag(AL.getLoc(), diag::warn_type_attribute_deprecated_on_decl) << AL << D->getLocation();"},{L,1837,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // ...\n // Apply any type attributes from the decl spec. This may cause the\n // list of type attributes to be temporarily saved while the type\n // attributes are pushed around.\n // pipe attributes will be handled later ( at GetFullTypeForDeclarator )\n if (!DS.isTypeSpecPipe()) {\n // ...\n for (ParsedAttr &AL : declarator.getDeclarationAttributes()) {\n if (AL.slidesFromDeclToDeclSpecLegacyBehavior()) {\n // ...\n // For standard syntax attributes, which would normally appertain to the\n // declaration here, suggest moving them to the type instead. But only\n // do this for our own vendor attributes; moving other vendors\'\n // attributes might hurt portability.\n // There\'s one special case that we need to deal with here: The\n // `MatrixType` attribute may only be used in a typedef declaration. If\n // it\'s being used anywhere else, don\'t output the warning as\n // ProcessDeclAttributes() will output an error anyway.\n if (AL.isStandardAttributeSyntax() && AL.isClangScope() && !(AL.getKind() == ParsedAttr::AT_MatrixType && DS.getStorageClassSpec() != DeclSpec::SCS_typedef)) {\n S.Diag(AL.getLoc(), diag::warn_type_attribute_deprecated_on_decl) << AL;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/attr-objc-gc.m"]={"clang/test/SemaObjC/attr-objc-gc.m:22:3: warning: applying attribute \'objc_gc\' to a declaration is deprecated; apply it to the type instead [-Wdeprecated-attributes]","clang/test/SemaObjC/attr-objc-gc.m:23:15: warning: applying attribute \'objc_gc\' to a declaration is deprecated; apply it to the type instead [-Wdeprecated-attributes]"} | ["clang/test/SemaObjC/attr-objc-gc.m"]={"clang/test/SemaObjC/attr-objc-gc.m:22:3: warning: applying attribute \'objc_gc\' to a declaration is deprecated; apply it to the type instead [-Wdeprecated-attributes]","clang/test/SemaObjC/attr-objc-gc.m:23:15: warning: applying attribute \'objc_gc\' to a declaration is deprecated; apply it to the type instead [-Wdeprecated-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_type_attribute_wrong_type"]={ | ["warn_type_attribute_wrong_type"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="\'%0\' only applies to %select{function|pointer|Objective-C object or block pointer}1 types; type here is %2", | [b]="\'%0\' only applies to %select{function|pointer|Objective-C object or block pointer}1 types; type here is %2", | ||
[ | [d]=h, | ||
[ | [a]="\'(.*?)\' only applies to (?:function|pointer|Objective\\-C object or block pointer) types; type here is (.*?)", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={"db6d85ef9272",1374260024,"Replace some existing type attribute diagnostics with a\nsingle diagnostic that selects. No function...","Replace some existing type attribute diagnostics with a\nsingle diagnostic that selects. No functional changes intended.\n\nllvm-svn: 186708"}, | ||
[ | [g]={{L,109,"/// diagnoseBadTypeAttribute - Diagnoses a type attribute which\n/// doesn\'t apply to the given type.\nstatic void diagnoseBadTypeAttribute(Sema &S, const ParsedAttr &attr, QualType type) {\n // ...\n S.Diag(loc, attr.isRegularKeywordAttribute() ? diag::err_type_attribute_wrong_type : diag::warn_type_attribute_wrong_type) << name << WhichType << type;"},{L,7004,"/// handleObjCOwnershipTypeAttr - Process an objc_ownership\n/// attribute on the specified type.\n///\n/// Returns \'true\' if the attribute was handled.\nstatic bool handleObjCOwnershipTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // ...\n if (NonObjCPointer) {\n // ...\n S.Diag(AttrLoc, diag::warn_type_attribute_wrong_type) << name << TDS_ObjCObjOrBlock << type;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/stdcall-fastcall-x64.c"]={"clang/test/Sema/stdcall-fastcall-x64.c:4:20: warning: \'stdcall\' only applies to function types; type here is \'int\' [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:5:20: warning: \'fastcall\' only applies to function types; type here is \'int\' [-Wignored-attributes]"} | ["clang/test/Sema/stdcall-fastcall-x64.c"]={"clang/test/Sema/stdcall-fastcall-x64.c:4:20: warning: \'stdcall\' only applies to function types; type here is \'int\' [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:5:20: warning: \'fastcall\' only applies to function types; type here is \'int\' [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_type_safety_null_pointer_required"]={ | ["warn_type_safety_null_pointer_required"]={ | ||
[ | [i]={Bc}, | ||
[j]=Bc, | |||
[ | |||
[b]="specified %0 type tag requires a null pointer", | [b]="specified %0 type tag requires a null pointer", | ||
[ | [d]=h, | ||
[ | [a]="specified (.*?) type tag requires a null pointer", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtype\\-safety[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"e4a5a90e8d6b",1345162118,"Add support for \"type safety\" attributes that allow checking that \'void *\'\nfunction arguments and ar...","Add support for \"type safety\" attributes that allow checking that \'void *\'\nfunction arguments and arguments for variadic functions are of a particular\ntype which is determined by some other argument to the same function call.\n\nUsecases include:\n* MPI library implementations, where these attributes enable checking that\n buffer type matches the passed MPI_Datatype;\n* for HDF5 library there is a similar usecase as MPI;\n* checking types of variadic functions\' arguments for functions like\n fcntl() and ioctl().\n\nllvm-svn: 162067"}, | ||
[ | [g]={{r,18427,"void Sema::CheckArgumentWithTypeTag(const ArgumentWithTypeTagAttr *Attr, const ArrayRef<const Expr *> ExprArgs, SourceLocation CallSiteLoc) {\n // ...\n if (TypeInfo.MustBeNull) {\n // Type tag with matching void type requires a null pointer.\n if (!ArgumentExpr->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNotNull)) {\n Diag(ArgumentExpr->getExprLoc(), diag::warn_type_safety_null_pointer_required) << ArgumentKind->getName() << ArgumentExpr->getSourceRange() << TypeTagExpr->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-type-safety-mpi-hdf5.c"]={"clang/test/Sema/warn-type-safety-mpi-hdf5.c:191:14: warning: specified mpi type tag requires a null pointer [-Wtype-safety]"} | ["clang/test/Sema/warn-type-safety-mpi-hdf5.c"]={"clang/test/Sema/warn-type-safety-mpi-hdf5.c:191:14: warning: specified mpi type tag requires a null pointer [-Wtype-safety]"} | ||
} | } | ||
}, | }, | ||
["warn_type_safety_type_mismatch"]={ | ["warn_type_safety_type_mismatch"]={ | ||
[ | [i]={Bc}, | ||
[j]=Bc, | |||
[ | |||
[b]="argument type %0 doesn\'t match specified %1 type tag %select{that requires %3|}2", | [b]="argument type %0 doesn\'t match specified %1 type tag %select{that requires %3|}2", | ||
[ | [d]=h, | ||
[ | [a]="argument type (.*?) doesn\'t match specified (.*?) type tag (?:that requires (.*?)|)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtype\\-safety[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"e4a5a90e8d6b",1345162118,"Add support for \"type safety\" attributes that allow checking that \'void *\'\nfunction arguments and ar...","Add support for \"type safety\" attributes that allow checking that \'void *\'\nfunction arguments and arguments for variadic functions are of a particular\ntype which is determined by some other argument to the same function call.\n\nUsecases include:\n* MPI library implementations, where these attributes enable checking that\n buffer type matches the passed MPI_Datatype;\n* for HDF5 library there is a similar usecase as MPI;\n* checking types of variadic functions\' arguments for functions like\n fcntl() and ioctl().\n\nllvm-svn: 162067"}, | ||
[ | [g]={{r,18462,"void Sema::CheckArgumentWithTypeTag(const ArgumentWithTypeTagAttr *Attr, const ArrayRef<const Expr *> ExprArgs, SourceLocation CallSiteLoc) {\n // ...\n if (mismatch)\n Diag(ArgumentExpr->getExprLoc(), diag::warn_type_safety_type_mismatch) << ArgumentType << ArgumentKind << TypeInfo.LayoutCompatible << RequiredType << ArgumentExpr->getSourceRange() << TypeTagExpr->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-type-safety.cpp"]={"clang/test/Sema/warn-type-safety.cpp:54:15: warning: argument type \'int *\' doesn\'t match specified \'mpi\' type tag that requires \'float *\' [-Wtype-safety]","clang/test/Sema/warn-type-safety.cpp:60:15: warning: argument type \'int *\' doesn\'t match specified \'mpi\' type tag that requires \'float *\' [-Wtype-safety]"} | ["clang/test/Sema/warn-type-safety.cpp"]={"clang/test/Sema/warn-type-safety.cpp:54:15: warning: argument type \'int *\' doesn\'t match specified \'mpi\' type tag that requires \'float *\' [-Wtype-safety]","clang/test/Sema/warn-type-safety.cpp:60:15: warning: argument type \'int *\' doesn\'t match specified \'mpi\' type tag that requires \'float *\' [-Wtype-safety]"} | ||
} | } | ||
}, | }, | ||
["warn_type_tag_for_datatype_wrong_kind"]={ | ["warn_type_tag_for_datatype_wrong_kind"]={ | ||
[ | [i]={Bc}, | ||
[j]=Bc, | |||
[ | |||
[b]="this type tag was not designed to be used with this function", | [b]="this type tag was not designed to be used with this function", | ||
[ | [d]=h, | ||
[ | [a]="this type tag was not designed to be used with this function", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtype\\-safety[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"e4a5a90e8d6b",1345162118,"Add support for \"type safety\" attributes that allow checking that \'void *\'\nfunction arguments and ar...","Add support for \"type safety\" attributes that allow checking that \'void *\'\nfunction arguments and arguments for variadic functions are of a particular\ntype which is determined by some other argument to the same function call.\n\nUsecases include:\n* MPI library implementations, where these attributes enable checking that\n buffer type matches the passed MPI_Datatype;\n* for HDF5 library there is a similar usecase as MPI;\n* checking types of variadic functions\' arguments for functions like\n fcntl() and ioctl().\n\nllvm-svn: 162067"}, | ||
[ | [g]={{r,18396,"void Sema::CheckArgumentWithTypeTag(const ArgumentWithTypeTagAttr *Attr, const ArrayRef<const Expr *> ExprArgs, SourceLocation CallSiteLoc) {\n // ...\n if (!GetMatchingCType(ArgumentKind, TypeTagExpr, Context, TypeTagForDatatypeMagicValues.get(), FoundWrongKind, TypeInfo, isConstantEvaluated())) {\n if (FoundWrongKind)\n Diag(TypeTagExpr->getExprLoc(), diag::warn_type_tag_for_datatype_wrong_kind) << TypeTagExpr->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-type-safety.c"]={"clang/test/Sema/warn-type-safety.c:82:15: warning: this type tag was not designed to be used with this function [-Wtype-safety]","clang/test/Sema/warn-type-safety.c:84:15: warning: this type tag was not designed to be used with this function [-Wtype-safety]"} | ["clang/test/Sema/warn-type-safety.c"]={"clang/test/Sema/warn-type-safety.c:82:15: warning: this type tag was not designed to be used with this function [-Wtype-safety]","clang/test/Sema/warn-type-safety.c:84:15: warning: this type tag was not designed to be used with this function [-Wtype-safety]"} | ||
} | } | ||
}, | }, | ||
["warn_typecheck_convert_incompatible_function_pointer_strict"]={ | ["warn_typecheck_convert_incompatible_function_pointer_strict"]={ | ||
[ | [i]={"incompatible-function-pointer-types-strict"}, | ||
[j]="incompatible-function-pointer-types-strict", | |||
[ | |||
[b]="incompatible function pointer types %select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2%select{|; dereference with *|; take the address with &|; remove *|; remove &}3", | [b]="incompatible function pointer types %select{%diff{assigning to $ from $|assigning to different types}0,1|%diff{passing $ to parameter of type $|passing to parameter of different type}0,1|%diff{returning $ from a function with result type $|returning from function with different return type}0,1|%diff{converting $ to type $|converting between types}0,1|%diff{initializing $ with an expression of type $|initializing with expression of different type}0,1|%diff{sending $ to parameter of type $|sending to parameter of different type}0,1|%diff{casting $ to type $|casting between types}0,1}2%select{|; dereference with *|; take the address with &|; remove *|; remove &}3", | ||
[ | [d]=h, | ||
[ | [a]="incompatible function pointer types (?:(?:assigning to (.*?) from (.*?)|assigning to different types)|(?:passing (.*?) to parameter of type (.*?)|passing to parameter of different type)|(?:returning (.*?) from a function with result type (.*?)|returning from function with different return type)|(?:converting (.*?) to type (.*?)|converting between types)|(?:initializing (.*?) with an expression of type (.*?)|initializing with expression of different type)|(?:sending (.*?) to parameter of type (.*?)|sending to parameter of different type)|(?:casting (.*?) to type (.*?)|casting between types))(?:|; dereference with \\*|; take the address with &|; remove \\*|; remove &)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wincompatible\\-function\\-pointer\\-types\\-strict[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={lb,1625925174,mb,nb}, | ||
[ | [g]={{u,10068,"// checkPointerTypesForAssignment - This is a very tricky routine (despite\n// being closely modeled after the C99 spec:-). The odd characteristic of this\n// routine is it effectively iqnores the qualifiers on the top level pointee.\n// This circumvents the usual type rules specified in 6.2.7p1 & 6.7.5.[1-3].\n// FIXME: add a couple examples in this comment.\nstatic Sema::AssignConvertType checkPointerTypesForAssignment(Sema &S, QualType LHSType, QualType RHSType, SourceLocation Loc) {\n // ...\n if (!S.Diags.isIgnored(diag::warn_typecheck_convert_incompatible_function_pointer_strict, Loc) && RHSType->isFunctionPointerType() && LHSType->isFunctionPointerType() && !S.IsFunctionConversion(RHSType, LHSType, RHSType))"},{u,17551,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n case IncompatibleFunctionPointerStrict:\n DiagKind = diag::warn_typecheck_convert_incompatible_function_pointer_strict;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/incompatible-function-pointer-types-strict.c"]={"clang/test/Sema/incompatible-function-pointer-types-strict.c:17:6: error: incompatible function pointer types passing \'int (*)(void)\' to parameter of type \'fn_a_t\' (aka \'enum E (*)(void)\') [-Werror,-Wincompatible-function-pointer-types-strict]"} | ["clang/test/Sema/incompatible-function-pointer-types-strict.c"]={"clang/test/Sema/incompatible-function-pointer-types-strict.c:17:6: error: incompatible function pointer types passing \'int (*)(void)\' to parameter of type \'fn_a_t\' (aka \'enum E (*)(void)\') [-Werror,-Wincompatible-function-pointer-types-strict]"} | ||
} | } | ||
}, | }, | ||
["warn_typecheck_function_qualifiers_ignored"]={ | ["warn_typecheck_function_qualifiers_ignored"]={ | ||
[ | [i]={s,n,Vb,Qc}, | ||
[j]=Qc, | |||
[ | |||
[b]="\'%0\' qualifier on function type %1 has no effect", | [b]="\'%0\' qualifier on function type %1 has no effect", | ||
[ | [d]=h, | ||
[ | [a]="\'(.*?)\' qualifier on function type (.*?) has no effect", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wignored\\-qualifiers[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"a462b4c9acd1",1431630642,"DR295: cv-qualifiers on function types are ignored in C++.\n\nllvm-svn: 237383","DR295: cv-qualifiers on function types are ignored in C++.\n\nllvm-svn: 237383"}, | ||
[ | [g]={{L,1867,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // ...\n // Apply const/volatile/restrict qualifiers to T.\n if (unsigned TypeQuals = DS.getTypeQualifiers()) {\n // Warn about CV qualifiers on function types.\n // C99 6.7.3p8:\n // If the specification of a function type includes any type qualifiers,\n // the behavior is undefined.\n // C++11 [dcl.fct]p7:\n // The effect of a cv-qualifier-seq in a function declarator is not the\n // same as adding cv-qualification on top of the function type. In the\n // latter case, the cv-qualifiers are ignored.\n if (Result->isFunctionType()) {\n diagnoseAndRemoveTypeQualifiers(S, DS, TypeQuals, Result, DeclSpec::TQ_const | DeclSpec::TQ_volatile, S.getLangOpts().CPlusPlus ? diag::warn_typecheck_function_qualifiers_ignored : diag::warn_typecheck_function_qualifiers_unspecified);"}}, | ||
[ | [k]={ | ||
["clang/test/CXX/drs/dr2xx.cpp"]={"clang/test/CXX/drs/dr2xx.cpp:1094:3: warning: \'const\' qualifier on function type \'f\' (aka \'int ()\') has no effect [-Wignored-qualifiers]","clang/test/CXX/drs/dr2xx.cpp:1102:11: warning: \'const\' qualifier on function type \'U\' (aka \'int ()\') has no effect [-Wignored-qualifiers]","clang/test/CXX/drs/dr2xx.cpp:1105:11: warning: \'volatile\' qualifier on function type \'U\' (aka \'int ()\') has no effect [-Wignored-qualifiers]"} | ["clang/test/CXX/drs/dr2xx.cpp"]={"clang/test/CXX/drs/dr2xx.cpp:1094:3: warning: \'const\' qualifier on function type \'f\' (aka \'int ()\') has no effect [-Wignored-qualifiers]","clang/test/CXX/drs/dr2xx.cpp:1102:11: warning: \'const\' qualifier on function type \'U\' (aka \'int ()\') has no effect [-Wignored-qualifiers]","clang/test/CXX/drs/dr2xx.cpp:1105:11: warning: \'volatile\' qualifier on function type \'U\' (aka \'int ()\') has no effect [-Wignored-qualifiers]"} | ||
} | } | ||
}, | }, | ||
["warn_typecheck_function_qualifiers_unspecified"]={ | ["warn_typecheck_function_qualifiers_unspecified"]={ | ||
[b]="\'%0\' qualifier on function type %1 has unspecified behavior", | [b]="\'%0\' qualifier on function type %1 has unspecified behavior", | ||
[ | [d]=h, | ||
[ | [a]="\'(.*?)\' qualifier on function type (.*?) has unspecified behavior", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[ | [f]={"a462b4c9acd1",1431630642,"DR295: cv-qualifiers on function types are ignored in C++.\n\nllvm-svn: 237383","DR295: cv-qualifiers on function types are ignored in C++.\n\nllvm-svn: 237383"}, | ||
[ | [g]={{L,1868,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // ...\n // Apply const/volatile/restrict qualifiers to T.\n if (unsigned TypeQuals = DS.getTypeQualifiers()) {\n // Warn about CV qualifiers on function types.\n // C99 6.7.3p8:\n // If the specification of a function type includes any type qualifiers,\n // the behavior is undefined.\n // C++11 [dcl.fct]p7:\n // The effect of a cv-qualifier-seq in a function declarator is not the\n // same as adding cv-qualification on top of the function type. In the\n // latter case, the cv-qualifiers are ignored.\n if (Result->isFunctionType()) {\n diagnoseAndRemoveTypeQualifiers(S, DS, TypeQuals, Result, DeclSpec::TQ_const | DeclSpec::TQ_volatile, S.getLangOpts().CPlusPlus ? diag::warn_typecheck_function_qualifiers_ignored : diag::warn_typecheck_function_qualifiers_unspecified);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/declspec.c"]={"clang/test/Sema/declspec.c:21:1: warning: \'const\' qualifier on function type \'f\' (aka \'int (void)\') has unspecified behavior"} | ["clang/test/Sema/declspec.c"]={"clang/test/Sema/declspec.c:21:1: warning: \'const\' qualifier on function type \'f\' (aka \'int (void)\') has unspecified behavior"} | ||
} | } | ||
}, | }, | ||
["warn_typecheck_ordered_comparison_of_function_pointers"]={ | ["warn_typecheck_ordered_comparison_of_function_pointers"]={ | ||
[ | [i]={"ordered-compare-function-pointers"}, | ||
[j]="ordered-compare-function-pointers", | |||
[ | |||
[b]="ordered comparison of function pointers (%0 and %1)", | [b]="ordered comparison of function pointers (%0 and %1)", | ||
[ | [d]=h, | ||
[ | [a]="ordered comparison of function pointers \\((.*?) and (.*?)\\)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wordered\\-compare\\-function\\-pointers[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={Xb,1615397021,Ub,Rb}, | ||
[ | [g]={{u,13040,"// C99 6.5.8, C++ [expr.rel]\nQualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n if (IsOrdered && LHSType->isFunctionPointerType() && RHSType->isFunctionPointerType()) {\n // ...\n auto DiagID = IsError ? diag::err_typecheck_ordered_comparison_of_function_pointers : getLangOpts().CPlusPlus ? diag::warn_typecheck_ordered_comparison_of_function_pointers : diag::ext_typecheck_ordered_comparison_of_function_pointers;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/compare-function-pointer.cpp"]={"clang/test/SemaCXX/compare-function-pointer.cpp:11:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp0_t\') [-Wordered-compare-function-pointers]","clang/test/SemaCXX/compare-function-pointer.cpp:12:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp0_t\') [-Wordered-compare-function-pointers]","clang/test/SemaCXX/compare-function-pointer.cpp:13:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp0_t\') [-Wordered-compare-function-pointers]","clang/test/SemaCXX/compare-function-pointer.cpp:14:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp0_t\') [-Wordered-compare-function-pointers]","clang/test/SemaCXX/compare-function-pointer.cpp:19:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp1_t\' (aka \'int (*)()\')) [-Wordered-compare-function-pointers]","clang/test/SemaCXX/compare-function-pointer.cpp:21:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp1_t\' (aka \'int (*)()\')) [-Wordered-compare-function-pointers]","clang/test/SemaCXX/compare-function-pointer.cpp:23:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp1_t\' (aka \'int (*)()\')) [-Wordered-compare-function-pointers]","clang/test/SemaCXX/compare-function-pointer.cpp:25:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp1_t\' (aka \'int (*)()\')) [-Wordered-compare-function-pointers]"} | ["clang/test/SemaCXX/compare-function-pointer.cpp"]={"clang/test/SemaCXX/compare-function-pointer.cpp:11:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp0_t\') [-Wordered-compare-function-pointers]","clang/test/SemaCXX/compare-function-pointer.cpp:12:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp0_t\') [-Wordered-compare-function-pointers]","clang/test/SemaCXX/compare-function-pointer.cpp:13:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp0_t\') [-Wordered-compare-function-pointers]","clang/test/SemaCXX/compare-function-pointer.cpp:14:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp0_t\') [-Wordered-compare-function-pointers]","clang/test/SemaCXX/compare-function-pointer.cpp:19:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp1_t\' (aka \'int (*)()\')) [-Wordered-compare-function-pointers]","clang/test/SemaCXX/compare-function-pointer.cpp:21:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp1_t\' (aka \'int (*)()\')) [-Wordered-compare-function-pointers]","clang/test/SemaCXX/compare-function-pointer.cpp:23:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp1_t\' (aka \'int (*)()\')) [-Wordered-compare-function-pointers]","clang/test/SemaCXX/compare-function-pointer.cpp:25:14: warning: ordered comparison of function pointers (\'fp0_t\' (aka \'void (*)()\') and \'fp1_t\' (aka \'int (*)()\')) [-Wordered-compare-function-pointers]"} | ||
} | } | ||
}, | }, | ||
["warn_typecheck_reference_qualifiers"]={ | ["warn_typecheck_reference_qualifiers"]={ | ||
[ | [i]={s,n,Vb,Qc,"ignored-reference-qualifiers"}, | ||
[j]="ignored-reference-qualifiers", | |||
[ | |||
[b]="\'%0\' qualifier on reference type %1 has no effect", | [b]="\'%0\' qualifier on reference type %1 has no effect", | ||
[ | [d]=h, | ||
[ | [a]="\'(.*?)\' qualifier on reference type (.*?) has no effect", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wignored\\-reference\\-qualifiers[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"40259443073b",1392768807,"PR13110: Add a -Wignored-qualifiers warning when ignoring a const, volatile, or\n_Atomic qualifier ap...","PR13110: Add a -Wignored-qualifiers warning when ignoring a const, volatile, or\n_Atomic qualifier applied to a reference type.\n\nllvm-svn: 201620"}, | ||
[ | [g]={{L,1885,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // ...\n // Apply const/volatile/restrict qualifiers to T.\n if (unsigned TypeQuals = DS.getTypeQualifiers()) {\n // ...\n // C++11 [dcl.ref]p1:\n // Cv-qualified references are ill-formed except when the\n // cv-qualifiers are introduced through the use of a typedef-name\n // or decltype-specifier, in which case the cv-qualifiers are ignored.\n //\n // There don\'t appear to be any other contexts in which a cv-qualified\n // reference type could be formed, so the \'ill-formed\' clause here appears\n // to never happen.\n if (TypeQuals && Result->isReferenceType()) {\n diagnoseAndRemoveTypeQualifiers(S, DS, TypeQuals, Result, DeclSpec::TQ_const | DeclSpec::TQ_volatile | DeclSpec::TQ_atomic, diag::warn_typecheck_reference_qualifiers);"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/cxx0x-rvalue-reference.cpp"]={"clang/test/Parser/cxx0x-rvalue-reference.cpp:6:9: warning: \'const\' qualifier on reference type \'R\' (aka \'int &&\') has no effect [-Wignored-reference-qualifiers]"} | ["clang/test/Parser/cxx0x-rvalue-reference.cpp"]={"clang/test/Parser/cxx0x-rvalue-reference.cpp:6:9: warning: \'const\' qualifier on reference type \'R\' (aka \'int &&\') has no effect [-Wignored-reference-qualifiers]"} | ||
} | } | ||
}, | }, | ||
["warn_typecheck_vector_element_sizes_not_equal"]={ | ["warn_typecheck_vector_element_sizes_not_equal"]={ | ||
[ | [i]={"vec-elem-size"}, | ||
[j]="vec-elem-size", | |||
[ | |||
[b]="vector operands do not have the same elements sizes (%0 and %1)", | [b]="vector operands do not have the same elements sizes (%0 and %1)", | ||
[ | [d]=Hb, | ||
[ | [a]="vector operands do not have the same elements sizes \\((.*?) and (.*?)\\)", | ||
[ | [e]=" \\[[^\\]]*\\-Wvec\\-elem\\-size[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"9941ca8af6b4",1476878770,"[Sema] Gcc compatibility of vector shift\n\nGcc prints error if elements of left and right parts of a ...","[Sema] Gcc compatibility of vector shift\n\nGcc prints error if elements of left and right parts of a shift have different\nsizes. This patch is provided the GCC compatibility.\n\nPatch by Vladimir Yakovlev.\n\nDifferential Revision: https://reviews.llvm.org/D24669\n\nllvm-svn: 284579"}, | ||
[ | [g]={{u,12192,"/// Return the resulting type when a vector is shifted\n/// by a scalar or vector shift amount.\nstatic QualType checkVectorShift(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) {\n // ...\n if (!LHSVecTy) {\n // ...\n } else if (RHSVecTy) {\n // ...\n if (!S.LangOpts.OpenCL && !S.LangOpts.ZVector) {\n // ...\n if (LHSBT != RHSBT && S.Context.getTypeSize(LHSBT) != S.Context.getTypeSize(RHSBT)) {\n S.Diag(Loc, diag::warn_typecheck_vector_element_sizes_not_equal) << LHS.get()->getType() << RHS.get()->getType() << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGen/vecshift.c"]={"clang/test/CodeGen/vecshift.c:113:13: warning: vector operands do not have the same elements sizes (\'vector_int8\' (vector of 8 \'int\' values) and \'vector_uchar8\' (vector of 8 \'unsigned char\' values)) [-Wvec-elem-size]","clang/test/CodeGen/vecshift.c:118:15: warning: vector operands do not have the same elements sizes (\'vector_uchar8\' (vector of 8 \'unsigned char\' values) and \'vector_int8\' (vector of 8 \'int\' values)) [-Wvec-elem-size]","clang/test/CodeGen/vecshift.c:123:15: warning: vector operands do not have the same elements sizes (\'vector_ushort8\' (vector of 8 \'unsigned short\' values) and \'vector_uint8\' (vector of 8 \'unsigned int\' values)) [-Wvec-elem-size]","clang/test/CodeGen/vecshift.c:128:15: warning: vector operands do not have the same elements sizes (\'vector_uint8\' (vector of 8 \'unsigned int\' values) and \'vector_short8\' (vector of 8 \'short\' values)) [-Wvec-elem-size]"} | ["clang/test/CodeGen/vecshift.c"]={"clang/test/CodeGen/vecshift.c:113:13: warning: vector operands do not have the same elements sizes (\'vector_int8\' (vector of 8 \'int\' values) and \'vector_uchar8\' (vector of 8 \'unsigned char\' values)) [-Wvec-elem-size]","clang/test/CodeGen/vecshift.c:118:15: warning: vector operands do not have the same elements sizes (\'vector_uchar8\' (vector of 8 \'unsigned char\' values) and \'vector_int8\' (vector of 8 \'int\' values)) [-Wvec-elem-size]","clang/test/CodeGen/vecshift.c:123:15: warning: vector operands do not have the same elements sizes (\'vector_ushort8\' (vector of 8 \'unsigned short\' values) and \'vector_uint8\' (vector of 8 \'unsigned int\' values)) [-Wvec-elem-size]","clang/test/CodeGen/vecshift.c:128:15: warning: vector operands do not have the same elements sizes (\'vector_uint8\' (vector of 8 \'unsigned int\' values) and \'vector_short8\' (vector of 8 \'short\' values)) [-Wvec-elem-size]"} | ||
} | } | ||
}, | }, | ||
["warn_ucn_escape_incomplete"]={ | ["warn_ucn_escape_incomplete"]={ | ||
[ | [i]={Gb}, | ||
[j]=Gb, | |||
[ | |||
[b]="incomplete universal character name; treating as \'\\\' followed by identifier", | [b]="incomplete universal character name; treating as \'\\\' followed by identifier", | ||
[ | [d]=h, | ||
[ | [a]="incomplete universal character name; treating as \'\\\\\' followed by identifier", | ||
[ | [e]=fd, | ||
[ | [c]=x, | ||
[ | [f]={"7f43dddae066",1359060646,"Handle universal character names and Unicode characters outside of literals.\n\nThis is a missing piec...","Handle universal character names and Unicode characters outside of literals.\n\nThis is a missing piece for C99 conformance.\n\nThis patch handles UCNs by adding a \'\\\\\' case to LexTokenInternal and\nLexIdentifier -- if we see a backslash, we tentatively try to read in a UCN.\nIf the UCN is not syntactically well-formed, we fall back to the old\ntreatment: a backslash followed by an identifier beginning with \'u\' (or \'U\').\n\nBecause the spelling of an identifier with UCNs still has the UCN in it, we\nneed to convert that to UTF-8 in Preprocessor::LookUpIdentifierInfo.\n\nOf course, valid code that does *not* use UCNs will see only a very minimal\nperformance hit (checks after each identifier for non-ASCII characters,\nchecks when converting raw_identifiers to identifiers that they do not\ncontain UCNs, and checks when getting the spelling of an identifier that it\ndoes not contain a UCN).\n\nThis patch also adds basic support for actual UTF-8 in the source. This is\ntreated almost exactly the same as UCNs except that we consider stray\nUnicode characters to be mistakes and offer a fixit to remove them.\n\nllvm-svn: 173369"}, | ||
[ | [g]={{Ib,3340,"std::optional<uint32_t> Lexer::tryReadNumericUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // ...\n if (!Delimited && Count != NumHexDigits) {\n if (Diagnose) {\n Diag(SlashLoc, diag::warn_ucn_escape_incomplete);"},{Ib,3389,"std::optional<uint32_t> Lexer::tryReadNamedUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // ...\n if (C != \'{\') {\n if (Diagnose)\n Diag(SlashLoc, diag::warn_ucn_escape_incomplete);"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/ucn-pp-identifier.c"]={"clang/test/Preprocessor/ucn-pp-identifier.c:26:5: warning: incomplete universal character name; treating as \'\\\' followed by identifier [-Wunicode]","clang/test/Preprocessor/ucn-pp-identifier.c:30:5: warning: incomplete universal character name; treating as \'\\\' followed by identifier [-Wunicode]","clang/test/Preprocessor/ucn-pp-identifier.c:76:18: warning: incomplete universal character name; treating as \'\\\' followed by identifier [-Wunicode]","clang/test/Preprocessor/ucn-pp-identifier.c:114:19: warning: incomplete universal character name; treating as \'\\\' followed by identifier [-Wunicode]","clang/test/Preprocessor/ucn-pp-identifier.c:122:9: warning: incomplete universal character name; treating as \'\\\' followed by identifier [-Wunicode]","clang/test/Preprocessor/ucn-pp-identifier.c:132:9: warning: incomplete universal character name; treating as \'\\\' followed by identifier [-Wunicode]"} | ["clang/test/Preprocessor/ucn-pp-identifier.c"]={"clang/test/Preprocessor/ucn-pp-identifier.c:26:5: warning: incomplete universal character name; treating as \'\\\' followed by identifier [-Wunicode]","clang/test/Preprocessor/ucn-pp-identifier.c:30:5: warning: incomplete universal character name; treating as \'\\\' followed by identifier [-Wunicode]","clang/test/Preprocessor/ucn-pp-identifier.c:76:18: warning: incomplete universal character name; treating as \'\\\' followed by identifier [-Wunicode]","clang/test/Preprocessor/ucn-pp-identifier.c:114:19: warning: incomplete universal character name; treating as \'\\\' followed by identifier [-Wunicode]","clang/test/Preprocessor/ucn-pp-identifier.c:122:9: warning: incomplete universal character name; treating as \'\\\' followed by identifier [-Wunicode]","clang/test/Preprocessor/ucn-pp-identifier.c:132:9: warning: incomplete universal character name; treating as \'\\\' followed by identifier [-Wunicode]"} | ||
} | } | ||
}, | }, | ||
["warn_ucn_escape_no_digits"]={ | ["warn_ucn_escape_no_digits"]={ | ||
[ | [i]={Gb}, | ||
[j]=Gb, | |||
[ | |||
[b]="\\%0 used with no following hex digits; treating as \'\\\' followed by identifier", | [b]="\\%0 used with no following hex digits; treating as \'\\\' followed by identifier", | ||
[ | [d]=h, | ||
[ | [a]="\\\\(.*?) used with no following hex digits; treating as \'\\\\\' followed by identifier", | ||
[ | [e]=fd, | ||
[ | [c]=x, | ||
[ | [f]={"7f43dddae066",1359060646,"Handle universal character names and Unicode characters outside of literals.\n\nThis is a missing piec...","Handle universal character names and Unicode characters outside of literals.\n\nThis is a missing piece for C99 conformance.\n\nThis patch handles UCNs by adding a \'\\\\\' case to LexTokenInternal and\nLexIdentifier -- if we see a backslash, we tentatively try to read in a UCN.\nIf the UCN is not syntactically well-formed, we fall back to the old\ntreatment: a backslash followed by an identifier beginning with \'u\' (or \'U\').\n\nBecause the spelling of an identifier with UCNs still has the UCN in it, we\nneed to convert that to UTF-8 in Preprocessor::LookUpIdentifierInfo.\n\nOf course, valid code that does *not* use UCNs will see only a very minimal\nperformance hit (checks after each identifier for non-ASCII characters,\nchecks when converting raw_identifiers to identifiers that they do not\ncontain UCNs, and checks when getting the spelling of an identifier that it\ndoes not contain a UCN).\n\nThis patch also adds basic support for actual UTF-8 in the source. This is\ntreated almost exactly the same as UCNs except that we consider stray\nUnicode characters to be mistakes and offer a fixit to remove them.\n\nllvm-svn: 173369"}, | ||
[ | [g]={{Ib,3327,"std::optional<uint32_t> Lexer::tryReadNumericUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // ...\n if (Count == 0) {\n if (Diagnose)\n Diag(SlashLoc, FoundEndDelimiter ? diag::warn_delimited_ucn_empty : diag::warn_ucn_escape_no_digits) << StringRef(KindLoc, 1);"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/ucn-pp-identifier.c"]={"clang/test/Preprocessor/ucn-pp-identifier.c:28:5: warning: \\u used with no following hex digits; treating as \'\\\' followed by identifier [-Wunicode]","clang/test/Preprocessor/ucn-pp-identifier.c:75:18: warning: \\u used with no following hex digits; treating as \'\\\' followed by identifier [-Wunicode]"} | ["clang/test/Preprocessor/ucn-pp-identifier.c"]={"clang/test/Preprocessor/ucn-pp-identifier.c:28:5: warning: \\u used with no following hex digits; treating as \'\\\' followed by identifier [-Wunicode]","clang/test/Preprocessor/ucn-pp-identifier.c:75:18: warning: \\u used with no following hex digits; treating as \'\\\' followed by identifier [-Wunicode]"} | ||
} | } | ||
}, | }, | ||
["warn_ucn_escape_surrogate"]={ | ["warn_ucn_escape_surrogate"]={ | ||
[ | [i]={Gb}, | ||
[j]=Gb, | |||
[ | |||
[b]="universal character name refers to a surrogate character", | [b]="universal character name refers to a surrogate character", | ||
[ | [d]=h, | ||
[ | [a]="universal character name refers to a surrogate character", | ||
[ | [e]=fd, | ||
[ | [c]=x, | ||
[ | [f]={"58c61e006f4d",1360372225,"Properly validate UCNs for C99 and C++03 (both more restrictive than C(++)11).\n\nAdd warnings under -...","Properly validate UCNs for C99 and C++03 (both more restrictive than C(++)11).\n\nAdd warnings under -Wc++11-compat, -Wc++98-compat, and -Wc99-compat when a\nparticular UCN is incompatible with a different standard, and -Wunicode when\na UCN refers to a surrogate character in C++03.\n\nllvm-svn: 174788"}, | ||
[ | [g]={{Ib,3523,"uint32_t Lexer::tryReadUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // ...\n // C++11 [lex.charset]p2: If the hexadecimal value for a\n // universal-character-name corresponds to a surrogate code point (in the\n // range 0xD800-0xDFFF, inclusive), the program is ill-formed. Additionally,\n // if the hexadecimal value for a universal-character-name outside the\n // c-char-sequence, s-char-sequence, or r-char-sequence of a character or\n // string literal corresponds to a control character (in either of the\n // ranges 0x00-0x1F or 0x7F-0x9F, both inclusive) or to a character in the\n // basic source character set, the program is ill-formed.\n if (CodePoint < 0xA0) {\n // ...\n } else if (CodePoint >= 0xD800 && CodePoint <= 0xDFFF) {\n // C++03 allows UCNs representing surrogate characters. C99 and C++11 don\'t.\n // We don\'t use isLexingRawMode() here because we need to diagnose bad\n // UCNs even when skipping preprocessing tokens in a #if block.\n if (Result && PP) {\n if (LangOpts.CPlusPlus && !LangOpts.CPlusPlus11)\n Diag(BufferPtr, diag::warn_ucn_escape_surrogate);"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/ucn-allowed-chars.c"]={"clang/test/Preprocessor/ucn-allowed-chars.c:33:11: warning: universal character name refers to a surrogate character [-Wunicode]"} | ["clang/test/Preprocessor/ucn-allowed-chars.c"]={"clang/test/Preprocessor/ucn-allowed-chars.c:33:11: warning: universal character name refers to a surrogate character [-Wunicode]"} | ||
} | } | ||
}, | }, | ||
["warn_ucn_not_valid_in_c89"]={ | ["warn_ucn_not_valid_in_c89"]={ | ||
[ | [i]={Gb}, | ||
[j]=Gb, | |||
[ | |||
[b]="universal character names are only valid in C99 or C++; treating as \'\\\' followed by identifier", | [b]="universal character names are only valid in C99 or C++; treating as \'\\\' followed by identifier", | ||
[ | [d]=h, | ||
[ | [a]="universal character names are only valid in C99 or C\\+\\+; treating as \'\\\\\' followed by identifier", | ||
[ | [e]=fd, | ||
[ | [c]=x, | ||
[ | [f]={"9762e0a2348b",1286341046,"Add support for 4-byte UCNs like \\U12345678. Warn about UCNs in c90 mode.\n\nllvm-svn: 115743","Add support for 4-byte UCNs like \\U12345678. Warn about UCNs in c90 mode.\n\nllvm-svn: 115743"}, | ||
[ | [g]={{Ib,3280,"std::optional<uint32_t> Lexer::tryReadNumericUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // ...\n if (!LangOpts.CPlusPlus && !LangOpts.C99) {\n if (Diagnose)\n Diag(SlashLoc, diag::warn_ucn_not_valid_in_c89);"}}, | ||
[ | [k]={ | ||
["clang/test/Lexer/c90.c"]={"clang/test/Lexer/c90.c:43:16: warning: universal character names are only valid in C99 or C++; treating as \'\\\' followed by identifier [-Wunicode]","clang/test/Lexer/c90.c:46:21: warning: universal character names are only valid in C99 or C++; treating as \'\\\' followed by identifier [-Wunicode]"} | ["clang/test/Lexer/c90.c"]={"clang/test/Lexer/c90.c:43:16: warning: universal character names are only valid in C99 or C++; treating as \'\\\' followed by identifier [-Wunicode]","clang/test/Lexer/c90.c:46:21: warning: universal character names are only valid in C99 or C++; treating as \'\\\' followed by identifier [-Wunicode]"} | ||
} | } | ||
}, | }, | ||
["warn_ucn_not_valid_in_c89_literal"]={ | ["warn_ucn_not_valid_in_c89_literal"]={ | ||
[ | [i]={Gb}, | ||
[j]=Gb, | |||
[ | |||
[b]="universal character names are only valid in C99 or C++", | [b]="universal character names are only valid in C99 or C++", | ||
[ | [d]=h, | ||
[ | [a]="universal character names are only valid in C99 or C\\+\\+", | ||
[ | [e]=fd, | ||
[ | [c]=x, | ||
[ | [f]={"c0cba2723060",1359317524,"PR15067: Don\'t assert when a UCN appears in a C90 file.\n\nUnfortunately, we can\'t accept the UCN as a...","PR15067: Don\'t assert when a UCN appears in a C90 file.\n\nUnfortunately, we can\'t accept the UCN as an extension because we\'re\nrequired to treat it as two tokens for preprocessing purposes.\n\nllvm-svn: 173622"}, | ||
[ | [g]={{"clang/lib/Lex/LiteralSupport.cpp",695,"/// ProcessUCNEscape - Read the Universal Character Name, check constraints and\n/// return the UTF32.\nstatic bool ProcessUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features, bool in_char_string_literal = false) {\n // ...\n if (!Features.CPlusPlus && !Features.C99 && Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, diag::warn_ucn_not_valid_in_c89_literal);"}}, | ||
[ | [k]={ | ||
["clang/test/Lexer/c90.c"]={"clang/test/Lexer/c90.c:32:11: error: universal character names are only valid in C99 or C++ [-Werror,-Wunicode]","clang/test/Lexer/c90.c:33:11: error: universal character names are only valid in C99 or C++ [-Werror,-Wunicode]"} | ["clang/test/Lexer/c90.c"]={"clang/test/Lexer/c90.c:32:11: error: universal character names are only valid in C99 or C++ [-Werror,-Wunicode]","clang/test/Lexer/c90.c:33:11: error: universal character names are only valid in C99 or C++ [-Werror,-Wunicode]"} | ||
} | } | ||
}, | }, | ||
["warn_unaligned_access"]={ | ["warn_unaligned_access"]={ | ||
[ | [i]={"unaligned-access"}, | ||
[j]="unaligned-access", | |||
[ | |||
[b]="field %1 within %0 is less aligned than %2 and is usually due to %0 being packed, which can lead to unaligned accesses", | [b]="field %1 within %0 is less aligned than %2 and is usually due to %0 being packed, which can lead to unaligned accesses", | ||
[ | [d]=h, | ||
[ | [a]="field (.*?) within (.*?) is less aligned than (.*?) and is usually due to (.*?) being packed, which can lead to unaligned accesses", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunaligned\\-access[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"683e83c56f98",1633469611,"[Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr\n\nAllow goto, labelled statements as...","[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"}, | ||
[ | [g]={{Zb,2131,"void ItaniumRecordLayoutBuilder::LayoutField(const FieldDecl *D, bool InsertExtraPadding) {\n // ...\n // For checking the alignment of inner fields against\n // the alignment of its parent record.\n if (const RecordDecl *RD = D->getParent()) {\n // Check if packed attribute or pragma pack is present.\n if (RD->hasAttr<PackedAttr>() || !MaxFieldAlignment.isZero())\n if (FieldAlign < OriginalFieldAlign)\n if (D->getType()->isRecordType()) {\n // If the offset is a multiple of the alignment of\n // the type, raise the warning.\n // TODO: Takes no account the alignment of the outer struct\n if (FieldOffset % OriginalFieldAlign != 0)\n Diag(D->getLocation(), diag::warn_unaligned_access) << Context.getTypeDeclType(RD) << D->getName() << D->getType();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/test-wunaligned-access.cpp"]={"clang/test/Sema/test-wunaligned-access.cpp:24:6: warning: field b within \'U1\' is less aligned than \'T1\' and is usually due to \'U1\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:48:6: warning: field b within \'U5\' is less aligned than \'T1\' and is usually due to \'U5\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:65:6: warning: field b within \'U7\' is less aligned than \'T1\' and is usually due to \'U7\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:71:6: warning: field b within \'U8\' is less aligned than \'T1\' and is usually due to \'U8\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:77:6: warning: field b within \'U9\' is less aligned than \'T1\' and is usually due to \'U9\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:83:6: warning: field b within \'U10\' is less aligned than \'T1\' and is usually due to \'U10\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:141:6: warning: field b within \'A1\' is less aligned than \'T1\' and is usually due to \'A1\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:157:6: warning: field b within \'U17\' is less aligned than \'A2\' and is usually due to \'U17\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:183:6: warning: field b within \'U19\' is less aligned than \'A4\' and is usually due to \'U19\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:197:6: warning: field b within \'U20\' is less aligned than \'A5\' and is usually due to \'U20\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:209:6: warning: field b within \'U21\' is less aligned than \'A6\' and is usually due to \'U21\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:231:6: warning: field b within \'A8\' is less aligned than \'T1\' and is usually due to \'A8\' being packed, which can lead to unaligned accesses [-Wunaligned-access]"} | ["clang/test/Sema/test-wunaligned-access.cpp"]={"clang/test/Sema/test-wunaligned-access.cpp:24:6: warning: field b within \'U1\' is less aligned than \'T1\' and is usually due to \'U1\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:48:6: warning: field b within \'U5\' is less aligned than \'T1\' and is usually due to \'U5\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:65:6: warning: field b within \'U7\' is less aligned than \'T1\' and is usually due to \'U7\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:71:6: warning: field b within \'U8\' is less aligned than \'T1\' and is usually due to \'U8\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:77:6: warning: field b within \'U9\' is less aligned than \'T1\' and is usually due to \'U9\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:83:6: warning: field b within \'U10\' is less aligned than \'T1\' and is usually due to \'U10\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:141:6: warning: field b within \'A1\' is less aligned than \'T1\' and is usually due to \'A1\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:157:6: warning: field b within \'U17\' is less aligned than \'A2\' and is usually due to \'U17\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:183:6: warning: field b within \'U19\' is less aligned than \'A4\' and is usually due to \'U19\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:197:6: warning: field b within \'U20\' is less aligned than \'A5\' and is usually due to \'U20\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:209:6: warning: field b within \'U21\' is less aligned than \'A6\' and is usually due to \'U21\' being packed, which can lead to unaligned accesses [-Wunaligned-access]","clang/test/Sema/test-wunaligned-access.cpp:231:6: warning: field b within \'A8\' is less aligned than \'T1\' and is usually due to \'A8\' being packed, which can lead to unaligned accesses [-Wunaligned-access]"} | ||
} | } | ||
}, | }, | ||
["warn_unannotated_fallthrough"]={ | ["warn_unannotated_fallthrough"]={ | ||
[ | [i]={"implicit-fallthrough"}, | ||
[j]="implicit-fallthrough", | |||
[ | |||
[b]="unannotated fall-through between switch labels", | [b]="unannotated fall-through between switch labels", | ||
[ | [d]=h, | ||
[ | [a]="unannotated fall\\-through between switch labels", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wimplicit\\-fallthrough[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"84837d5b5aa0",1336069659,"Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between\ncases in switch statemen...","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]={{y,1306,"static void DiagnoseSwitchLabelsFallthrough(Sema &S, AnalysisDeclContext &AC, bool PerFunction) {\n // ...\n for (const CFGBlock *B : llvm::reverse(*Cfg)) {\n // ...\n S.Diag(Label->getBeginLoc(), PerFunction ? diag::warn_unannotated_fallthrough_per_function : diag::warn_unannotated_fallthrough);"},{y,2666,"void clang::sema::AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P, sema::FunctionScopeInfo *fscope, const Decl *D, QualType BlockType) {\n // ...\n bool FallThroughDiagFull = !Diags.isIgnored(diag::warn_unannotated_fallthrough, D->getBeginLoc());"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/switch-implicit-fallthrough-blocks.cpp"]={"clang/test/SemaCXX/switch-implicit-fallthrough-blocks.cpp:12:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]"} | ["clang/test/SemaCXX/switch-implicit-fallthrough-blocks.cpp"]={"clang/test/SemaCXX/switch-implicit-fallthrough-blocks.cpp:12:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]"} | ||
} | } | ||
}, | }, | ||
["warn_unannotated_fallthrough_per_function"]={ | ["warn_unannotated_fallthrough_per_function"]={ | ||
[ | [i]={"implicit-fallthrough","implicit-fallthrough-per-function"}, | ||
[j]="implicit-fallthrough-per-function", | |||
[ | |||
[b]="unannotated fall-through between switch labels in partly-annotated function", | [b]="unannotated fall-through between switch labels in partly-annotated function", | ||
[ | [d]=h, | ||
[ | [a]="unannotated fall\\-through between switch labels in partly\\-annotated function", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wimplicit\\-fallthrough\\-per\\-function[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"2178f14c10af",1339795325,"Stop referring to functions as methods in per-function fallthrough-checking.\n\nllvm-svn: 158545","Stop referring to functions as methods in per-function fallthrough-checking.\n\nllvm-svn: 158545"}, | ||
[ | [g]={{y,1305,"static void DiagnoseSwitchLabelsFallthrough(Sema &S, AnalysisDeclContext &AC, bool PerFunction) {\n // ...\n for (const CFGBlock *B : llvm::reverse(*Cfg)) {\n // ...\n S.Diag(Label->getBeginLoc(), PerFunction ? diag::warn_unannotated_fallthrough_per_function : diag::warn_unannotated_fallthrough);"},{y,2668,"void clang::sema::AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P, sema::FunctionScopeInfo *fscope, const Decl *D, QualType BlockType) {\n // ...\n bool FallThroughDiagPerFunction = !Diags.isIgnored(diag::warn_unannotated_fallthrough_per_function, D->getBeginLoc());"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp"]={"clang/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp:15:7: warning: unannotated fall-through between switch labels in partly-annotated function [-Wimplicit-fallthrough-per-function]","clang/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp:8:5: warning: unannotated fall-through between switch labels in partly-annotated function [-Wimplicit-fallthrough-per-function]"} | ["clang/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp"]={"clang/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp:15:7: warning: unannotated fall-through between switch labels in partly-annotated function [-Wimplicit-fallthrough-per-function]","clang/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp:8:5: warning: unannotated fall-through between switch labels in partly-annotated function [-Wimplicit-fallthrough-per-function]"} | ||
} | } | ||
}, | }, | ||
["warn_unavailable_def"]={ | ["warn_unavailable_def"]={ | ||
[ | [i]={"deprecated-implementations"}, | ||
[j]="deprecated-implementations", | |||
[ | |||
[b]="implementing unavailable method", | [b]="implementing unavailable method", | ||
[ | [d]=h, | ||
[ | [a]="implementing unavailable method", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-implementations[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"e1088dc42b3e",1499963831,"Extend -Wdeprecated-implementations to warn about unavailable methods\n\nrdar://22867595\n\nllvm-svn: 30...","Extend -Wdeprecated-implementations to warn about unavailable methods\n\nrdar://22867595\n\nllvm-svn: 307924"}, | ||
[ | [g]={{I,302,"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(ImplLoc, diag::warn_unavailable_def);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/warn-deprecated-implementations.m"]={"clang/test/SemaObjC/warn-deprecated-implementations.m:24:1: warning: implementing unavailable method [-Wdeprecated-implementations]","clang/test/SemaObjC/warn-deprecated-implementations.m:59:1: warning: implementing unavailable method [-Wdeprecated-implementations]"} | ["clang/test/SemaObjC/warn-deprecated-implementations.m"]={"clang/test/SemaObjC/warn-deprecated-implementations.m:24:1: warning: implementing unavailable method [-Wdeprecated-implementations]","clang/test/SemaObjC/warn-deprecated-implementations.m:59:1: warning: implementing unavailable method [-Wdeprecated-implementations]"} | ||
} | } | ||
}, | }, | ||
["warn_unavailable_fwdclass_message"]={ | ["warn_unavailable_fwdclass_message"]={ | ||
[ | [i]={"unavailable-declarations"}, | ||
[j]="unavailable-declarations", | |||
[ | |||
[b]="%0 may be unavailable because the receiver type is unknown", | [b]="%0 may be unavailable because the receiver type is unknown", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) may be unavailable because the receiver type is unknown", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunavailable\\-declarations[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"7d6e11a1923a",1292892241,"Warn when message is sent to receiver of\nunknown type and there is a possibility that\nat runtime met...","Warn when message is sent to receiver of\nunknown type and there is a possibility that\nat runtime method is resolved to a deprecated or \nunavailable method. Addreses // rdar://8769853\n\nllvm-svn: 122294"}, | ||
[ | [g]={{Mc,450,"/// 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 diag_fwdclass_message = diag::warn_unavailable_fwdclass_message;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/special-dep-unavail-warning.m"]={"clang/test/SemaObjC/special-dep-unavail-warning.m:34:6: warning: \'unavailMeth\' may be unavailable because the receiver type is unknown [-Wunavailable-declarations]","clang/test/SemaObjC/special-dep-unavail-warning.m:36:6: warning: \'unavailMeth1\' may be unavailable because the receiver type is unknown [-Wunavailable-declarations]","clang/test/SemaObjC/special-dep-unavail-warning.m:38:6: warning: \'unavailMeth2\' may be unavailable because the receiver type is unknown [-Wunavailable-declarations]","clang/test/SemaObjC/special-dep-unavail-warning.m:39:6: warning: \'depunavailInA\' may be unavailable because the receiver type is unknown [-Wunavailable-declarations]","clang/test/SemaObjC/special-dep-unavail-warning.m:40:6: warning: \'depunavailInA1\' may be unavailable because the receiver type is unknown [-Wunavailable-declarations]"} | ["clang/test/SemaObjC/special-dep-unavail-warning.m"]={"clang/test/SemaObjC/special-dep-unavail-warning.m:34:6: warning: \'unavailMeth\' may be unavailable because the receiver type is unknown [-Wunavailable-declarations]","clang/test/SemaObjC/special-dep-unavail-warning.m:36:6: warning: \'unavailMeth1\' may be unavailable because the receiver type is unknown [-Wunavailable-declarations]","clang/test/SemaObjC/special-dep-unavail-warning.m:38:6: warning: \'unavailMeth2\' may be unavailable because the receiver type is unknown [-Wunavailable-declarations]","clang/test/SemaObjC/special-dep-unavail-warning.m:39:6: warning: \'depunavailInA\' may be unavailable because the receiver type is unknown [-Wunavailable-declarations]","clang/test/SemaObjC/special-dep-unavail-warning.m:40:6: warning: \'depunavailInA1\' may be unavailable because the receiver type is unknown [-Wunavailable-declarations]"} | ||
} | } | ||
}, | }, | ||
["warn_uncovered_module_header"]={ | ["warn_uncovered_module_header"]={ | ||
[ | [i]={"incomplete-module","incomplete-umbrella"}, | ||
[j]="incomplete-umbrella", | |||
[ | |||
[b]="umbrella header for module \'%0\' does not include header \'%1\'", | [b]="umbrella header for module \'%0\' does not include header \'%1\'", | ||
[ | [d]=h, | ||
[ | [a]="umbrella header for module \'(.*?)\' does not include header \'(.*?)\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wincomplete\\-umbrella[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"fe76cfd89c37",1324599839,"When building a module with an umbrella header, warn about any headers\nfound within that umbrella di...","When building a module with an umbrella header, warn about any headers\nfound within that umbrella directory that were not actually included\nby the umbrella header. They should either be referenced in the module\nmap or included by the umbrella header.\n\nllvm-svn: 147207"}, | ||
[ | [g]={{"clang/lib/Lex/PPLexerChange.cpp",297,"void Preprocessor::diagnoseMissingHeaderInUmbrellaDir(const Module &Mod) {\n // ...\n if (getDiagnostics().isIgnored(diag::warn_uncovered_module_header, ExpectedHeadersLoc))"},{"clang/lib/Lex/PPLexerChange.cpp",323,"void Preprocessor::diagnoseMissingHeaderInUmbrellaDir(const Module &Mod) {\n // ...\n for (llvm::vfs::recursive_directory_iterator Entry(FS, Dir->getName(), EC), End; Entry != End && !EC; Entry.increment(EC)) {\n // ...\n if (auto Header = getFileManager().getOptionalFileRef(Entry->path()))\n if (!getSourceManager().hasFileInfo(*Header)) {\n if (!ModMap.isHeaderInUnavailableModule(*Header)) {\n // ...\n Diag(ExpectedHeadersLoc, diag::warn_uncovered_module_header) << Mod.getFullModuleName() << RelativePath;"}}, | ||
[ | [k]={ | ||
["clang/test/Modules/dependency-gen-inferred-map.m"]={"clang/test/Modules/Inputs/Module.framework/Headers/Module.h:38:1: warning: umbrella header for module \'Module\' does not include header \'NotInModule.h\' [-Wincomplete-umbrella]"} | ["clang/test/Modules/dependency-gen-inferred-map.m"]={"clang/test/Modules/Inputs/Module.framework/Headers/Module.h:38:1: warning: umbrella header for module \'Module\' does not include header \'NotInModule.h\' [-Wincomplete-umbrella]"} | ||
} | } | ||
}, | }, | ||
["warn_undeclared_selector"]={ | ["warn_undeclared_selector"]={ | ||
[ | [i]={"undeclared-selector"}, | ||
[j]="undeclared-selector", | |||
[ | |||
[b]="undeclared selector %0", | [b]="undeclared selector %0", | ||
[ | [d]=h, | ||
[ | [a]="undeclared selector (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wundeclared\\-selector[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"0571d9bbbaed",1245169500,"Implements -Wundeclared-selector for ObjC.\n\nllvm-svn: 73495","Implements -Wundeclared-selector for ObjC.\n\nllvm-svn: 73495"}, | ||
[ | [g]={{U,1313,"ExprResult Sema::ParseObjCSelectorExpression(Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors) {\n // ...\n if (!Method) {\n if (const ObjCMethodDecl *OM = SelectorsForTypoCorrection(Sel)) {\n // ...\n } else\n Diag(SelLoc, diag::warn_undeclared_selector) << Sel;"}} | ||
}, | }, | ||
["warn_undeclared_selector_with_typo"]={ | ["warn_undeclared_selector_with_typo"]={ | ||
[ | [i]={"undeclared-selector"}, | ||
[j]="undeclared-selector", | |||
[ | |||
[b]="undeclared selector %0; did you mean %1?", | [b]="undeclared selector %0; did you mean %1?", | ||
[ | [d]=h, | ||
[ | [a]="undeclared selector (.*?); did you mean (.*?)\\?", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wundeclared\\-selector[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"0c0fc9e14b9c",1370457974,"Objective-C: Provide fixit with suggested spelling correction\nfor -Wundeclared-selector warnings. //...","Objective-C: Provide fixit with suggested spelling correction\nfor -Wundeclared-selector warnings. // rdar://14039037\n\nllvm-svn: 183331"}, | ||
[ | [g]={{U,1308,"ExprResult Sema::ParseObjCSelectorExpression(Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors) {\n // ...\n if (!Method) {\n if (const ObjCMethodDecl *OM = SelectorsForTypoCorrection(Sel)) {\n // ...\n Diag(SelLoc, diag::warn_undeclared_selector_with_typo) << Sel << MatchedSel << FixItHint::CreateReplacement(SelectorRange, MatchedSel.getAsString());"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/undeclared-selector.m"]={"clang/test/SemaObjC/undeclared-selector.m:40:12: warning: undeclared selector \'methodC\'; did you mean \'methodB\'? [-Wundeclared-selector]"} | ["clang/test/SemaObjC/undeclared-selector.m"]={"clang/test/SemaObjC/undeclared-selector.m:40:12: warning: undeclared selector \'methodC\'; did you mean \'methodB\'? [-Wundeclared-selector]"} | ||
} | } | ||
}, | }, | ||
["warn_undef_interface"]={ | ["warn_undef_interface"]={ | ||
[b]="cannot find interface declaration for %0", | [b]="cannot find interface declaration for %0", | ||
[ | [d]=h, | ||
[ | [a]="cannot find interface declaration for (.*?)", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{I,1178,"/// ActOnCompatibilityAlias - this action is called after complete parsing of\n/// a \\@compatibility_alias declaration. It sets up the alias relationships.\nDecl *Sema::ActOnCompatibilityAlias(SourceLocation AtLoc, IdentifierInfo *AliasName, SourceLocation AliasLocation, IdentifierInfo *ClassName, SourceLocation ClassLocation) {\n // ...\n if (!CDecl) {\n Diag(ClassLocation, diag::warn_undef_interface) << ClassName;"},{I,1999,"ObjCImplementationDecl *Sema::ActOnStartClassImplementation(SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc, const ParsedAttributesView &Attrs) {\n // ...\n if (PrevDecl && !isa<ObjCInterfaceDecl>(PrevDecl)) {\n // ...\n } else if ((IDecl = dyn_cast_or_null<ObjCInterfaceDecl>(PrevDecl))) {\n // ...\n RequireCompleteType(ClassLoc, Context.getObjCInterfaceType(IDecl), diag::warn_undef_interface);"},{I,2015,"ObjCImplementationDecl *Sema::ActOnStartClassImplementation(SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc, const ParsedAttributesView &Attrs) {\n // ...\n if (PrevDecl && !isa<ObjCInterfaceDecl>(PrevDecl)) {\n // ...\n } else if ((IDecl = dyn_cast_or_null<ObjCInterfaceDecl>(PrevDecl))) {\n // ...\n } else {\n // ...\n if (Corrected.getCorrectionDeclAs<ObjCInterfaceDecl>()) {\n // ...\n } else {\n Diag(ClassLoc, diag::warn_undef_interface) << ClassName;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:30:17: warning: cannot find interface declaration for \'E\'"} | ["clang/test/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:30:17: warning: cannot find interface declaration for \'E\'"} | ||
} | } | ||
}, | }, | ||
["warn_undef_interface_suggest"]={ | ["warn_undef_interface_suggest"]={ | ||
[b]="cannot find interface declaration for %0; did you mean %1?", | [b]="cannot find interface declaration for %0; did you mean %1?", | ||
[ | [d]=h, | ||
[ | [a]="cannot find interface declaration for (.*?); did you mean (.*?)\\?", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[ | [f]={"40f7a007e9d0",1262626032,"When declaring an Objective-C implementation without a corresponding\ninterface, suggest correction o...","When declaring an Objective-C implementation without a corresponding\ninterface, suggest correction of typos. For example, given:\n\n @interface NSString\n @end\n\n @implementation NSstring\n @end\n\nwe\'ll warn with:\n\nt.m:4:19: warning: cannot find interface declaration for \'NSstring\';\n did you mean \'NSString\'?\n @implementation NSstring\n ^\n\nHowever, since this is just a warning, we don\'t provide a fix-it\nhint. Good idea, Ted!\n\nllvm-svn: 92488"}, | ||
[ | [g]={{I,2012,"ObjCImplementationDecl *Sema::ActOnStartClassImplementation(SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc, const ParsedAttributesView &Attrs) {\n // ...\n if (PrevDecl && !isa<ObjCInterfaceDecl>(PrevDecl)) {\n // ...\n } else if ((IDecl = dyn_cast_or_null<ObjCInterfaceDecl>(PrevDecl))) {\n // ...\n } else {\n // ...\n if (Corrected.getCorrectionDeclAs<ObjCInterfaceDecl>()) {\n // ...\n diagnoseTypo(Corrected, PDiag(diag::warn_undef_interface_suggest) << ClassName,"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/undef-superclass-1.m"]={"clang/test/SemaObjC/undef-superclass-1.m:35:17: warning: cannot find interface declaration for \'iNTF3\'; did you mean \'INTF3\'?"} | ["clang/test/SemaObjC/undef-superclass-1.m"]={"clang/test/SemaObjC/undef-superclass-1.m:35:17: warning: cannot find interface declaration for \'iNTF3\'; did you mean \'INTF3\'?"} | ||
} | } | ||
}, | }, | ||
["warn_undef_method_impl"]={ | ["warn_undef_method_impl"]={ | ||
[ | [i]={"incomplete-implementation"}, | ||
[j]="incomplete-implementation", | |||
[ | |||
[b]="method definition for %0 not found", | [b]="method definition for %0 not found", | ||
[ | [d]=h, | ||
[ | [a]="method definition for (.*?) not found", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wincomplete\\-implementation[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{I,2848,"/// MatchAllMethodDeclarations - Check methods declared in interface\n/// or protocol against those declared in their implementations.\n///\nvoid Sema::MatchAllMethodDeclarations(const SelectorSet &InsMap, const SelectorSet &ClsMap, SelectorSet &InsMapSeen, SelectorSet &ClsMapSeen, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, bool &IncompleteImpl, bool ImmediateClass, bool WarnCategoryMethodImpl) {\n // Check and see if instance methods in class interface have been\n // implemented in the implementation class. If so, their types match.\n for (auto *I : CDecl->instance_methods()) {\n // ...\n if (!I->isPropertyAccessor() && !InsMap.count(I->getSelector())) {\n if (ImmediateClass)\n WarnUndefinedMethod(*this, IMPDecl, I, IncompleteImpl, diag::warn_undef_method_impl);"},{I,2878,"/// MatchAllMethodDeclarations - Check methods declared in interface\n/// or protocol against those declared in their implementations.\n///\nvoid Sema::MatchAllMethodDeclarations(const SelectorSet &InsMap, const SelectorSet &ClsMap, SelectorSet &InsMapSeen, SelectorSet &ClsMapSeen, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, bool &IncompleteImpl, bool ImmediateClass, bool WarnCategoryMethodImpl) {\n // ...\n // Check and see if class methods in class interface have been\n // implemented in the implementation class. If so, their types match.\n for (auto *I : CDecl->class_methods()) {\n // ...\n if (!I->isPropertyAccessor() && !ClsMap.count(I->getSelector())) {\n if (ImmediateClass)\n WarnUndefinedMethod(*this, IMPDecl, I, IncompleteImpl, diag::warn_undef_method_impl);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/method-bad-param.m"]={"clang/test/SemaObjC/method-bad-param.m:61:17: warning: method definition for \'my_method:\' not found [-Wincomplete-implementation]"} | ["clang/test/SemaObjC/method-bad-param.m"]={"clang/test/SemaObjC/method-bad-param.m:61:17: warning: method definition for \'my_method:\' not found [-Wincomplete-implementation]"} | ||
} | } | ||
}, | }, | ||
["warn_undef_protocolref"]={ | ["warn_undef_protocolref"]={ | ||
[b]="cannot find protocol definition for %0", | [b]="cannot find protocol definition for %0", | ||
[ | [d]=h, | ||
[ | [a]="cannot find protocol definition for (.*?)", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[ | [f]={W,1236199783,V,X}, | ||
[ | [g]={{I,1351,"/// FindProtocolDeclaration - This routine looks up protocols and\n/// issues an error if they are not declared. It returns list of\n/// protocol declarations in its \'Protocols\' argument.\nvoid Sema::FindProtocolDeclaration(bool WarnOnDeclarations, bool ForObjCContainer, ArrayRef<IdentifierLocPair> ProtocolId, SmallVectorImpl<Decl *> &Protocols) {\n for (const IdentifierLocPair &Pair : ProtocolId) {\n // ...\n if (WarnOnDeclarations && NestedProtocolHasNoDefinition(PDecl, UndefinedProtocol)) {\n Diag(Pair.second, diag::warn_undef_protocolref) << Pair.first;"},{I,1487,"void Sema::actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef<IdentifierInfo *> identifiers, ArrayRef<SourceLocation> identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl<ParsedType> &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl<Decl *> &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) {\n // ...\n auto resolvedAsProtocols = [&] {\n // ...\n for (unsigned i = 0, n = protocols.size(); i != n; ++i) {\n // ...\n if (warnOnIncompleteProtocols && NestedProtocolHasNoDefinition(proto, forwardDecl)) {\n Diag(identifierLocs[i], diag::warn_undef_protocolref) << proto->getDeclName();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/class-def-test-1.m"]={"clang/test/SemaObjC/class-def-test-1.m:5:19: warning: cannot find protocol definition for \'SUPER\'"} | ["clang/test/SemaObjC/class-def-test-1.m"]={"clang/test/SemaObjC/class-def-test-1.m:5:19: warning: cannot find protocol definition for \'SUPER\'"} | ||
} | } | ||
}, | }, | ||
["warn_undefined_inline"]={ | ["warn_undefined_inline"]={ | ||
[ | [i]={"undefined-inline"}, | ||
[j]="undefined-inline", | |||
[ | |||
[b]="inline function %q0 is not defined", | [b]="inline function %q0 is not defined", | ||
[ | [d]=h, | ||
[ | [a]="inline function (.*?) is not defined", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wundefined\\-inline[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"9c7eb1d887c1",1359706400,"Add a new -Wundefined-inline warning for inline functions which are used but not\ndefined. Fixes PR14...","Add a new -Wundefined-inline warning for inline functions which are used but not\ndefined. Fixes PR14993!\n\nllvm-svn: 174158"}, | ||
[ | [g]={{S,911,"/// checkUndefinedButUsed - Check for undefined objects with internal linkage\n/// or that are inline.\nstatic void checkUndefinedButUsed(Sema &S) {\n // ...\n for (const auto &Undef : Undefined) {\n // ...\n if (S.isExternalWithNoLinkageType(VD)) {\n // ...\n } else if (!VD->isExternallyVisible()) {\n // ...\n } else if (auto *FD = dyn_cast<FunctionDecl>(VD)) {\n // ...\n S.Diag(VD->getLocation(), diag::warn_undefined_inline) << VD;"}}, | ||
[ | [k]={ | ||
["clang/test/CXX/basic/basic.def/p4.cpp"]={"clang/test/CXX/basic/basic.def/p4.cpp:3:12: warning: inline function \'f\' is not defined [-Wundefined-inline]"} | ["clang/test/CXX/basic/basic.def/p4.cpp"]={"clang/test/CXX/basic/basic.def/p4.cpp:3:12: warning: inline function \'f\' is not defined [-Wundefined-inline]"} | ||
} | } | ||
}, | }, | ||
["warn_undefined_internal"]={ | ["warn_undefined_internal"]={ | ||
[ | [i]={"undefined-internal"}, | ||
[j]="undefined-internal", | |||
[ | |||
[b]="%select{function|variable}0 %q1 has internal linkage but is not defined", | [b]="%select{function|variable}0 %q1 has internal linkage but is not defined", | ||
[ | [d]=h, | ||
[ | [a]="(?:function|variable) (.*?) has internal linkage but is not defined", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wundefined\\-internal[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"837796754391",1298084021,"Warn about code that uses variables and functions with internal linkage\nwithout defining them. This...","Warn about code that uses variables and functions with internal linkage\nwithout defining them. This should be an error, but I\'m paranoid about\n\"uses\" that end up not actually requiring a definition. I\'ll revisit later.\n\nAlso, teach IR generation to not set internal linkage on variable\ndeclarations, just for safety\'s sake. Doing so produces an invalid module\nif the variable is not ultimately defined.\n\nAlso, fix several places in the test suite where we were using internal\nfunctions without definitions.\n\nllvm-svn: 126016"}, | ||
[ | [g]={{S,904,"/// checkUndefinedButUsed - Check for undefined objects with internal linkage\n/// or that are inline.\nstatic void checkUndefinedButUsed(Sema &S) {\n // ...\n for (const auto &Undef : Undefined) {\n // ...\n if (S.isExternalWithNoLinkageType(VD)) {\n // ...\n } else if (!VD->isExternallyVisible()) {\n // ...\n if (!S.getLangOpts().OpenMP || !IsImplicitBase)\n S.Diag(VD->getLocation(), diag::warn_undefined_internal) << isa<VarDecl>(VD) << VD;"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/declare_variant.cpp"]={"clang/test/OpenMP/declare_variant.cpp:15:13: warning: function \'baz\' has internal linkage but is not defined [-Wundefined-internal]","clang/test/OpenMP/declare_variant.cpp:6:6: warning: function \'(anonymous namespace)::bar\' has internal linkage but is not defined [-Wundefined-internal]"} | ["clang/test/OpenMP/declare_variant.cpp"]={"clang/test/OpenMP/declare_variant.cpp:15:13: warning: function \'baz\' has internal linkage but is not defined [-Wundefined-internal]","clang/test/OpenMP/declare_variant.cpp:6:6: warning: function \'(anonymous namespace)::bar\' has internal linkage but is not defined [-Wundefined-internal]"} | ||
} | } | ||
}, | }, | ||
["warn_undefined_reinterpret_cast"]={ | ["warn_undefined_reinterpret_cast"]={ | ||
[ | [i]={"undefined-reinterpret-cast"}, | ||
[j]="undefined-reinterpret-cast", | |||
[ | |||
[b]="reinterpret_cast from %0 to %1 has undefined behavior", | [b]="reinterpret_cast from %0 to %1 has undefined behavior", | ||
[ | [d]=h, | ||
[ | [a]="reinterpret_cast from (.*?) to (.*?) has undefined behavior", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wundefined\\-reinterpret\\-cast[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"69a2c924b9e8",1304360479,"Add a warning for when reinterpret_cast leads to undefined behavior, patch by Richard Trieu!\n\nllvm-s...","Add a warning for when reinterpret_cast leads to undefined behavior, patch by Richard Trieu!\n\nllvm-svn: 130703"}, | ||
[ | [g]={{Eb,2040,"// Checks for undefined behavior in reinterpret_cast.\n// The cases that is checked for is:\n// *reinterpret_cast<T*>(&a)\n// reinterpret_cast<T&>(a)\n// where accessing \'a\' as type \'T\' will result in undefined behavior.\nvoid Sema::CheckCompatibleReinterpretCast(QualType SrcType, QualType DestType, bool IsDereference, SourceRange Range) {\n unsigned DiagID = IsDereference ? diag::warn_pointer_indirection_from_incompatible_type : diag::warn_undefined_reinterpret_cast;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/reinterpret-cast.cpp"]={"clang/test/SemaCXX/reinterpret-cast.cpp:162:9: warning: reinterpret_cast from \'long\' to \'double &\' has undefined behavior [-Wundefined-reinterpret-cast]","clang/test/SemaCXX/reinterpret-cast.cpp:164:9: warning: reinterpret_cast from \'float\' to \'double &\' has undefined behavior [-Wundefined-reinterpret-cast]","clang/test/SemaCXX/reinterpret-cast.cpp:166:9: warning: reinterpret_cast from \'long\' to \'float &\' has undefined behavior [-Wundefined-reinterpret-cast]","clang/test/SemaCXX/reinterpret-cast.cpp:168:9: warning: reinterpret_cast from \'double\' to \'float &\' has undefined behavior [-Wundefined-reinterpret-cast]"} | ["clang/test/SemaCXX/reinterpret-cast.cpp"]={"clang/test/SemaCXX/reinterpret-cast.cpp:162:9: warning: reinterpret_cast from \'long\' to \'double &\' has undefined behavior [-Wundefined-reinterpret-cast]","clang/test/SemaCXX/reinterpret-cast.cpp:164:9: warning: reinterpret_cast from \'float\' to \'double &\' has undefined behavior [-Wundefined-reinterpret-cast]","clang/test/SemaCXX/reinterpret-cast.cpp:166:9: warning: reinterpret_cast from \'long\' to \'float &\' has undefined behavior [-Wundefined-reinterpret-cast]","clang/test/SemaCXX/reinterpret-cast.cpp:168:9: warning: reinterpret_cast from \'double\' to \'float &\' has undefined behavior [-Wundefined-reinterpret-cast]"} | ||
} | } | ||
}, | }, | ||
["warn_unevaluated_string_prefix"]={ | ["warn_unevaluated_string_prefix"]={ | ||
[ | [i]={"invalid-unevaluated-string"}, | ||
[j]="invalid-unevaluated-string", | |||
[ | |||
[b]="encoding prefix \'%0\' on an unevaluated string literal has no effect%select{| and is incompatible with c++2c}1", | [b]="encoding prefix \'%0\' on an unevaluated string literal has no effect%select{| and is incompatible with c++2c}1", | ||
[ | [d]=h, | ||
[ | [a]="encoding prefix \'(.*?)\' on an unevaluated string literal has no effect(?:| and is incompatible with c\\+\\+2c)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Winvalid\\-unevaluated\\-string[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"82343aa9cf9c",1690639424,"[Clang] Backport static_assert messages fixes\n\n* 4d494e7: Handle static_assert messages with an expr...","[Clang] Backport static_assert messages fixes\n\n* 4d494e7: Handle static_assert messages with an expression started by a literal\n* 49e0495 Produce a warning instead of an error in unevaluated strings before C++26\n\nEmiting an error on unexpected encoding prefix - which was allowed before C++26 -\ncaused build errors for a few users.\nThis downgrade the error to a warning on older language modes and C"}, | ||
[ | [g]={{"clang/lib/Lex/LiteralSupport.cpp",1954,"void StringLiteralParser::init(ArrayRef<Token> StringToks) {\n // ...\n /// (C99 5.1.1.2p1). The common case is only one string fragment.\n for (const Token &Tok : StringToks) {\n // ...\n // Remember if we see any wide or utf-8/16/32 strings.\n // Also check for illegal concatenations.\n if (isUnevaluated() && Tok.getKind() != tok::string_literal) {\n if (Diags) {\n // ...\n Diags->Report(Tok.getLocation(), Features.CPlusPlus26 ? diag::err_unevaluated_string_prefix : diag::warn_unevaluated_string_prefix) << Prefix << Features.CPlusPlus << FixItHint::CreateRemoval(Range);"}}, | ||
[ | [k]={ | ||
["clang/test/CXX/dcl.dcl/dcl.link/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.link/p2.cpp:11:8: warning: encoding prefix \'u8\' on an unevaluated string literal has no effect and is incompatible with c++2c [-Winvalid-unevaluated-string]","clang/test/CXX/dcl.dcl/dcl.link/p2.cpp:12:8: warning: encoding prefix \'L\' on an unevaluated string literal has no effect and is incompatible with c++2c [-Winvalid-unevaluated-string]","clang/test/CXX/dcl.dcl/dcl.link/p2.cpp:13:8: warning: encoding prefix \'u\' on an unevaluated string literal has no effect and is incompatible with c++2c [-Winvalid-unevaluated-string]","clang/test/CXX/dcl.dcl/dcl.link/p2.cpp:14:8: warning: encoding prefix \'U\' on an unevaluated string literal has no effect and is incompatible with c++2c [-Winvalid-unevaluated-string]"} | ["clang/test/CXX/dcl.dcl/dcl.link/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.link/p2.cpp:11:8: warning: encoding prefix \'u8\' on an unevaluated string literal has no effect and is incompatible with c++2c [-Winvalid-unevaluated-string]","clang/test/CXX/dcl.dcl/dcl.link/p2.cpp:12:8: warning: encoding prefix \'L\' on an unevaluated string literal has no effect and is incompatible with c++2c [-Winvalid-unevaluated-string]","clang/test/CXX/dcl.dcl/dcl.link/p2.cpp:13:8: warning: encoding prefix \'u\' on an unevaluated string literal has no effect and is incompatible with c++2c [-Winvalid-unevaluated-string]","clang/test/CXX/dcl.dcl/dcl.link/p2.cpp:14:8: warning: encoding prefix \'U\' on an unevaluated string literal has no effect and is incompatible with c++2c [-Winvalid-unevaluated-string]"} | ||
} | } | ||
}, | }, | ||
["warn_unguarded_availability"]={ | ["warn_unguarded_availability"]={ | ||
[ | [i]={"partial-availability","unguarded-availability"}, | ||
[j]="unguarded-availability", | |||
[ | |||
[b]="%0 is only available on %1 %2 or newer", | [b]="%0 is only available on %1 %2 or newer", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) is only available on (.*?) (.*?) or newer", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunguarded\\-availability[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"5cd57177a51a",1471369451,"[ObjC] Warn on unguarded use of partial declaration\n\nThis commit adds a traversal of the AST after S...","[ObjC] Warn on unguarded use of partial declaration\n\nThis commit adds a traversal of the AST after Sema of a function that diagnoses\nunguarded references to declarations that are partially available (based on\navailability attributes). This traversal is only done when we would otherwise\nemit -Wpartial-availability.\n\nThis commit is part of a feature I proposed here:\nhttp://lists.llvm.org/pipermail/cfe-dev/2016-July/049851.html\n\nDifferential revision: https://reviews.llvm.org/D23003\n\nllvm-svn: 278826"}, | ||
[ | [g]={{Mc,387,"/// 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 unsigned Warning = UseNewWarning ? diag::warn_unguarded_availability_new : diag::warn_unguarded_availability;"},{Mc,772,"void DiagnoseUnguardedAvailability::DiagnoseDeclAvailability(NamedDecl *D, SourceRange Range, ObjCInterfaceDecl *ReceiverClass) {\n // ...\n if (Result != AR_Available) {\n // ...\n unsigned DiagKind = shouldDiagnoseAvailabilityByDefault(SemaRef.Context, SemaRef.Context.getTargetInfo().getPlatformMinVersion(), Introduced) ? diag::warn_unguarded_availability_new : diag::warn_unguarded_availability;"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/objc-implementation-attrs.m"]={"clang/test/Parser/objc-implementation-attrs.m:29:3: warning: \'unavail_int\' is only available on macOS 1000 or newer [-Wunguarded-availability-new]"} | ["clang/test/Parser/objc-implementation-attrs.m"]={"clang/test/Parser/objc-implementation-attrs.m:29:3: warning: \'unavail_int\' is only available on macOS 1000 or newer [-Wunguarded-availability-new]"} | ||
} | } | ||
}, | }, | ||
["warn_unguarded_availability_new"]={ | ["warn_unguarded_availability_new"]={ | ||
[ | [i]={"partial-availability","unguarded-availability","unguarded-availability-new"}, | ||
[j]="unguarded-availability-new", | |||
[ | |||
[b]="%0 is only available on %1 %2 or newer", | [b]="%0 is only available on %1 %2 or newer", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) is only available on (.*?) (.*?) or newer", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunguarded\\-availability\\-new[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"c9a369fbecd5",1498150944,"[Sema] Add -Wunguarded-availability-new\n\nThe new compiler warning -Wunguarded-availability-new is a ...","[Sema] Add -Wunguarded-availability-new\n\nThe new compiler warning -Wunguarded-availability-new is a subset of\n-Wunguarded-availability. It is on by default. It only warns about uses of APIs\nthat have been introduced in macOS >= 10.13, iOS >= 11, watchOS >= 4 and\ntvOS >= 11. We decided to use this kind of solution as we didn\'t want to turn\non -Wunguarded-availability by default, because we didn\'t want our users to get\nwarnings about uses of old APIs in their existing projects.\n\nrdar://31054725\n\nDifferential Revision: https://reviews.llvm.org/D34264\n\nllvm-svn: 306033"}, | ||
[ | [g]={{Mc,386,"/// 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 unsigned Warning = UseNewWarning ? diag::warn_unguarded_availability_new : diag::warn_unguarded_availability;"},{Mc,771,"void DiagnoseUnguardedAvailability::DiagnoseDeclAvailability(NamedDecl *D, SourceRange Range, ObjCInterfaceDecl *ReceiverClass) {\n // ...\n if (Result != AR_Available) {\n // ...\n unsigned DiagKind = shouldDiagnoseAvailabilityByDefault(SemaRef.Context, SemaRef.Context.getTargetInfo().getPlatformMinVersion(), Introduced) ? diag::warn_unguarded_availability_new : diag::warn_unguarded_availability;"}} | ||
}, | }, | ||
["warn_unhandled_ms_attribute_ignored"]={ | ["warn_unhandled_ms_attribute_ignored"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="__declspec attribute %0 is not supported", | [b]="__declspec attribute %0 is not supported", | ||
[ | [d]=h, | ||
[ | [a]="__declspec attribute (.*?) is not supported", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={"38c9ad9e725c",1340113766,"Improves parsing and semantic analysis for MS __declspec attributes. This includes support for the ...","Improves parsing and semantic analysis for MS __declspec attributes. This includes support for the align (which fixes PR12631).\n\nllvm-svn: 158717"}, | ||
[ | [g]={{w,8734,"/// ProcessDeclAttribute - Apply the specific attribute to the specified decl if\n/// the attribute applies to decls. If the attribute is a type attribute, just\n/// silently ignore it if a GNU attribute.\nstatic void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, const Sema::ProcessDeclAttributeOptions &Options) {\n // ...\n // Unknown attributes are automatically warned on. Target-specific attributes\n // which do not apply to the current target architecture are treated as\n // though they were unknown attributes.\n if (AL.getKind() == ParsedAttr::UnknownAttribute || !AL.existsInTarget(S.Context.getTargetInfo())) {\n S.Diag(AL.getLoc(), AL.isRegularKeywordAttribute() ? (unsigned)diag::err_keyword_not_supported_on_target : AL.isDeclspecAttribute() ? (unsigned)diag::warn_unhandled_ms_attribute_ignored : (unsigned)diag::warn_unknown_attribute_ignored) << AL << AL.getRange();"},{"clang/lib/Sema/SemaStmtAttr.cpp",497,"static Attr *ProcessStmtAttribute(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange Range) {\n // ...\n if (A.getKind() == ParsedAttr::UnknownAttribute || !(A.existsInTarget(S.Context.getTargetInfo()) || (S.Context.getLangOpts().SYCLIsDevice && Aux && A.existsInTarget(*Aux)))) {\n S.Diag(A.getLoc(), A.isRegularKeywordAttribute() ? (unsigned)diag::err_keyword_not_supported_on_target : A.isDeclspecAttribute() ? (unsigned)diag::warn_unhandled_ms_attribute_ignored : (unsigned)diag::warn_unknown_attribute_ignored) << A << A.getRange();"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/MicrosoftExtensions.c"]={"clang/test/Parser/MicrosoftExtensions.c:67:19: warning: __declspec attribute \'frobble\' is not supported [-Wignored-attributes]","clang/test/Parser/MicrosoftExtensions.c:69:19: warning: __declspec attribute \'\"testing\"\' is not supported [-Wignored-attributes]","clang/test/Parser/MicrosoftExtensions.c:81:30: warning: __declspec attribute \'frobble\' is not supported [-Wignored-attributes]","clang/test/Parser/MicrosoftExtensions.c:81:38: warning: __declspec attribute \'\"testing\"\' is not supported [-Wignored-attributes]","clang/test/Parser/MicrosoftExtensions.c:82:19: warning: __declspec attribute \'unknown\' is not supported [-Wignored-attributes]"} | ["clang/test/Parser/MicrosoftExtensions.c"]={"clang/test/Parser/MicrosoftExtensions.c:67:19: warning: __declspec attribute \'frobble\' is not supported [-Wignored-attributes]","clang/test/Parser/MicrosoftExtensions.c:69:19: warning: __declspec attribute \'\"testing\"\' is not supported [-Wignored-attributes]","clang/test/Parser/MicrosoftExtensions.c:81:30: warning: __declspec attribute \'frobble\' is not supported [-Wignored-attributes]","clang/test/Parser/MicrosoftExtensions.c:81:38: warning: __declspec attribute \'\"testing\"\' is not supported [-Wignored-attributes]","clang/test/Parser/MicrosoftExtensions.c:82:19: warning: __declspec attribute \'unknown\' is not supported [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_unimplemented_protocol_method"]={ | ["warn_unimplemented_protocol_method"]={ | ||
[ | [i]={"protocol"}, | ||
[j]="protocol", | |||
[ | |||
[b]="method %0 in protocol %1 not implemented", | [b]="method %0 in protocol %1 not implemented", | ||
[ | [d]=h, | ||
[ | [a]="method (.*?) in protocol (.*?) not implemented", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wprotocol[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"c1fb862fda60",1270059813,"Patch implements gcc\'s -Wno-protocol option to suppress warning\non unimplemented methods in protocol...","Patch implements gcc\'s -Wno-protocol option to suppress warning\non unimplemented methods in protocols adopted by a class.\n(radar 7056600).\n\nllvm-svn: 100028"}, | ||
[ | [g]={{I,2793,"/// CheckProtocolMethodDefs - This routine checks unimplemented methods\n/// Declared in protocol, and those referenced by it.\nstatic void CheckProtocolMethodDefs(Sema &S, ObjCImplDecl *Impl, ObjCProtocolDecl *PDecl, bool &IncompleteImpl, const Sema::SelectorSet &InsMap, const Sema::SelectorSet &ClsMap, ObjCContainerDecl *CDecl, LazyProtocolNameSet &ProtocolsExplictImpl) {\n // ...\n // check unimplemented instance methods.\n if (!NSIDecl)\n for (auto *method : PDecl->instance_methods()) {\n if (method->getImplementationControl() != ObjCMethodDecl::Optional && !method->isPropertyAccessor() && !InsMap.count(method->getSelector()) && (!Super || !Super->lookupMethod(method->getSelector(), true /* instance */, false /* shallowCategory */, true /* followsSuper */, nullptr /* category */))) {\n // ...\n unsigned DIAG = diag::warn_unimplemented_protocol_method;"},{I,2815,"/// CheckProtocolMethodDefs - This routine checks unimplemented methods\n/// Declared in protocol, and those referenced by it.\nstatic void CheckProtocolMethodDefs(Sema &S, ObjCImplDecl *Impl, ObjCProtocolDecl *PDecl, bool &IncompleteImpl, const Sema::SelectorSet &InsMap, const Sema::SelectorSet &ClsMap, ObjCContainerDecl *CDecl, LazyProtocolNameSet &ProtocolsExplictImpl) {\n // ...\n // check unimplemented class methods\n for (auto *method : PDecl->class_methods()) {\n if (method->getImplementationControl() != ObjCMethodDecl::Optional && !ClsMap.count(method->getSelector()) && (!Super || !Super->lookupMethod(method->getSelector(), false /* class method */, false /* shallowCategoryLookup */, true /* followSuper */, nullptr /* category */))) {\n // ...\n unsigned DIAG = diag::warn_unimplemented_protocol_method;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/undef-protocol-methods-1.m"]={"clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'meth\' in protocol \'PROTO\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'meth:\' in protocol \'PROTO\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'cls_meth:\' in protocol \'PROTO\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'P1proto\' in protocol \'P1\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'ClsP1Proto\' in protocol \'P1\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'P3proto\' in protocol \'P3\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'ClsP3Proto\' in protocol \'P3\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'P2proto\' in protocol \'P2\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'ClsP2Proto\' in protocol \'P2\' not implemented [-Wprotocol]"} | ["clang/test/SemaObjC/undef-protocol-methods-1.m"]={"clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'meth\' in protocol \'PROTO\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'meth:\' in protocol \'PROTO\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'cls_meth:\' in protocol \'PROTO\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'P1proto\' in protocol \'P1\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'ClsP1Proto\' in protocol \'P1\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'P3proto\' in protocol \'P3\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'ClsP3Proto\' in protocol \'P3\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'P2proto\' in protocol \'P2\' not implemented [-Wprotocol]","clang/test/SemaObjC/undef-protocol-methods-1.m:28:17: warning: method \'ClsP2Proto\' in protocol \'P2\' not implemented [-Wprotocol]"} | ||
} | } | ||
}, | }, | ||
["warn_unimplemented_selector"]={ | ["warn_unimplemented_selector"]={ | ||
[ | [i]={"selector"}, | ||
[j]="selector", | |||
[ | |||
[b]="no method with selector %0 is implemented in this translation unit", | [b]="no method with selector %0 is implemented in this translation unit", | ||
[ | [d]=h, | ||
[ | [a]="no method with selector (.*?) is implemented in this translation unit", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wselector[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"6e7e8cc19d05",1279823060,"atch for implementation of objective-c\'s -Wselector\nwarning flag in clang. Little more to do\nfor a P...","atch for implementation of objective-c\'s -Wselector\nwarning flag in clang. Little more to do\nfor a PCH issue. Radar 6507158.\n\nllvm-svn: 109129"}, | ||
[ | [g]={{I,5274,"void Sema::DiagnoseUseOfUnimplementedSelectors() {\n // ...\n for (auto &SelectorAndLocation : ReferencedSelectors) {\n // ...\n if (!LookupImplementedMethodInGlobalPool(Sel))\n Diag(Loc, diag::warn_unimplemented_selector) << Sel;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/selector-3.m"]={"clang/test/SemaObjC/selector-3.m:28:13: warning: no method with selector \'length\' is implemented in this translation unit [-Wselector]"} | ["clang/test/SemaObjC/selector-3.m"]={"clang/test/SemaObjC/selector-3.m:28:13: warning: no method with selector \'length\' is implemented in this translation unit [-Wselector]"} | ||
} | } | ||
}, | }, | ||
["warn_uninit_byref_blockvar_captured_by_block"]={ | ["warn_uninit_byref_blockvar_captured_by_block"]={ | ||
[ | [i]={n,o,p,tb}, | ||
[j]=tb, | |||
[ | |||
[b]="block pointer variable %0 is %select{uninitialized|null}1 when captured by block", | [b]="block pointer variable %0 is %select{uninitialized|null}1 when captured by block", | ||
[ | [d]=h, | ||
[ | [a]="block pointer variable (.*?) is (?:uninitialized|null) when captured by block", | ||
[ | [e]=Yc, | ||
[ | [c]=l, | ||
[ | [f]={"429fadb8e262",1331166170,"improve on diagnostic and provide a fixit hint when\nan uninitialized block variable is being called ...","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]={{y,1041,"/// DiagnoseUninitializedUse -- Helper function for diagnosing uses of an\n/// uninitialized variable. This manages the different forms of diagnostic\n/// emitted for particular types of uses. Returns true if the use was diagnosed\n/// as a warning. If a particular use is one we omit warnings for, returns\n/// false.\nstatic bool DiagnoseUninitializedUse(Sema &S, const VarDecl *VD, const UninitUse &Use, bool alwaysReportSelfInit = false) {\n if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Use.getUser())) {\n // ...\n } else {\n // ...\n if (VD->getType()->isBlockPointerType() && !VD->hasAttr<BlocksAttr>())\n S.Diag(BE->getBeginLoc(), diag::warn_uninit_byref_blockvar_captured_by_block) << VD->getDeclName() << VD->getType().getQualifiers().hasObjCLifetime();"}}, | ||
[ | [k]={ | ||
["clang/test/FixIt/fixit-recursive-block.c"]={"clang/test/FixIt/fixit-recursive-block.c:8:30: warning: block pointer variable \'arc_fail\' is null when captured by block [-Wuninitialized]"} | ["clang/test/FixIt/fixit-recursive-block.c"]={"clang/test/FixIt/fixit-recursive-block.c:8:30: warning: block pointer variable \'arc_fail\' is null when captured by block [-Wuninitialized]"} | ||
} | } | ||
}, | }, | ||
["warn_uninit_const_reference"]={ | ["warn_uninit_const_reference"]={ | ||
[ | [i]={n,o,p,tb,"uninitialized-const-reference"}, | ||
[j]="uninitialized-const-reference", | |||
[ | |||
[b]="variable %0 is uninitialized when passed as a const reference argument here", | [b]="variable %0 is uninitialized when passed as a const reference argument here", | ||
[ | [d]=h, | ||
[ | [a]="variable (.*?) is uninitialized when passed as a const reference argument here", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wuninitialized\\-const\\-reference[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={gc,1576908663,fc,hc}, | ||
[ | [g]={{y,998,"/// Diagnose uninitialized const reference usages.\nstatic bool DiagnoseUninitializedConstRefUse(Sema &S, const VarDecl *VD, const UninitUse &Use) {\n S.Diag(Use.getUser()->getBeginLoc(), diag::warn_uninit_const_reference) << VD->getDeclName() << Use.getUser()->getSourceRange();"},{y,2632,"void clang::sema::AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P, sema::FunctionScopeInfo *fscope, const Decl *D, QualType BlockType) {\n // ...\n if (!Diags.isIgnored(diag::warn_uninit_var, D->getBeginLoc()) || !Diags.isIgnored(diag::warn_sometimes_uninit_var, D->getBeginLoc()) || !Diags.isIgnored(diag::warn_maybe_uninit_var, D->getBeginLoc()) || !Diags.isIgnored(diag::warn_uninit_const_reference, D->getBeginLoc())) {"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-uninitialized-const-reference.cpp"]={"clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:50:25: warning: variable \'l\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:52:21: warning: variable \'l1\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:54:45: warning: variable \'l2\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:29:17: warning: variable \'i\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:30:29: warning: variable \'j\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:31:26: warning: variable \'a1\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:34:24: warning: variable \'a3\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:35:16: warning: variable \'a4\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]"} | ["clang/test/SemaCXX/warn-uninitialized-const-reference.cpp"]={"clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:50:25: warning: variable \'l\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:52:21: warning: variable \'l1\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:54:45: warning: variable \'l2\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:29:17: warning: variable \'i\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:30:29: warning: variable \'j\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:31:26: warning: variable \'a1\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:34:24: warning: variable \'a3\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:35:16: warning: variable \'a4\' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]"} | ||
} | } | ||
}, | }, | ||
["warn_uninit_self_reference_in_init"]={ | ["warn_uninit_self_reference_in_init"]={ | ||
[ | [i]={n,o,p,tb}, | ||
[j]=tb, | |||
[ | |||
[b]="variable %0 is uninitialized when used within its own initialization", | [b]="variable %0 is uninitialized when used within its own initialization", | ||
[ | [d]=h, | ||
[ | [a]="variable (.*?) is uninitialized when used within its own initialization", | ||
[ | [e]=Yc, | ||
[ | [c]=l, | ||
[ | [f]={"33bf3e758d1d",1301219216,"Diagnose uninitialized uses of a variable within its own initializer.\nThis is basically the same ide...","Diagnose uninitialized uses of a variable within its own initializer.\nThis is basically the same idea as the warning on uninitialized uses of\nfields within an initializer list. As such, it is on by default and\nunder -Wuninitialized.\n\nOriginal patch by Richard Trieu, with some massaging from me on the\nwording and grouping of the diagnostics.\n\nllvm-svn: 128376"}, | ||
[ | [g]={{y,1030,"/// DiagnoseUninitializedUse -- Helper function for diagnosing uses of an\n/// uninitialized variable. This manages the different forms of diagnostic\n/// emitted for particular types of uses. Returns true if the use was diagnosed\n/// as a warning. If a particular use is one we omit warnings for, returns\n/// false.\nstatic bool DiagnoseUninitializedUse(Sema &S, const VarDecl *VD, const UninitUse &Use, bool alwaysReportSelfInit = false) {\n if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Use.getUser())) {\n // Inspect the initializer of the variable declaration which is\n // being referenced prior to its initialization. We emit\n // specialized diagnostics for self-initialization, and we\n // specifically avoid warning about self references which take the\n // form of:\n //\n // int x = x;\n //\n // This is used to indicate to GCC that \'x\' is intentionally left\n // uninitialized. Proven code paths which access \'x\' in\n // an uninitialized state after this will still warn.\n if (const Expr *Initializer = VD->getInit()) {\n // ...\n if (CR.doesContainReference()) {\n S.Diag(DRE->getBeginLoc(), diag::warn_uninit_self_reference_in_init) << VD->getDeclName() << VD->getLocation() << DRE->getSourceRange();"},{B,12623,"// Visits an initialization expression to see if OrigDecl is evaluated in\n// its own initialization and throws a warning if it does.\nclass SelfReferenceChecker : public EvaluatedExprVisitor<SelfReferenceChecker> {\n // ...\n void HandleDeclRefExpr(DeclRefExpr *DRE) {\n // ...\n if (isReferenceType) {\n // ...\n } else if (cast<VarDecl>(OrigDecl)->isStaticLocal()) {\n // ...\n } else if (isa<TranslationUnitDecl>(OrigDecl->getDeclContext()) || isa<NamespaceDecl>(OrigDecl->getDeclContext()) || DRE->getDecl()->getType()->isRecordType()) {\n diag = diag::warn_uninit_self_reference_in_init;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-uninitialized-const-reference.cpp"]={"clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:33:22: warning: variable \'a2\' is uninitialized when used within its own initialization [-Wuninitialized]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:35:16: warning: variable \'a4\' is uninitialized when used within its own initialization [-Wuninitialized]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:30:11: warning: variable \'j\' is uninitialized when used within its own initialization [-Wuninitialized]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:32:21: warning: variable \'k\' is uninitialized when used within its own initialization [-Wuninitialized]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:36:11: warning: variable \'n\' is uninitialized when used within its own initialization [-Wuninitialized]"} | ["clang/test/SemaCXX/warn-uninitialized-const-reference.cpp"]={"clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:33:22: warning: variable \'a2\' is uninitialized when used within its own initialization [-Wuninitialized]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:35:16: warning: variable \'a4\' is uninitialized when used within its own initialization [-Wuninitialized]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:30:11: warning: variable \'j\' is uninitialized when used within its own initialization [-Wuninitialized]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:32:21: warning: variable \'k\' is uninitialized when used within its own initialization [-Wuninitialized]","clang/test/SemaCXX/warn-uninitialized-const-reference.cpp:36:11: warning: variable \'n\' is uninitialized when used within its own initialization [-Wuninitialized]"} | ||
} | } | ||
}, | }, | ||
["warn_uninit_self_reference_in_reference_init"]={ | ["warn_uninit_self_reference_in_reference_init"]={ | ||
[ | [i]={n,o,p,tb}, | ||
[j]=tb, | |||
[ | |||
[b]="reference %0 is not yet bound to a value when used within its own initialization", | [b]="reference %0 is not yet bound to a value when used within its own initialization", | ||
[ | [d]=h, | ||
[ | [a]="reference (.*?) is not yet bound to a value when used within its own initialization", | ||
[ | [e]=Yc, | ||
[ | [c]=l, | ||
[ | [f]={"d799a2b3b91f",1345452742,"Better wording for reference self-initialization warning.\n\nllvm-svn: 162198","Better wording for reference self-initialization warning.\n\nllvm-svn: 162198"}, | ||
[ | [g]={{B,12617,"// Visits an initialization expression to see if OrigDecl is evaluated in\n// its own initialization and throws a warning if it does.\nclass SelfReferenceChecker : public EvaluatedExprVisitor<SelfReferenceChecker> {\n // ...\n void HandleDeclRefExpr(DeclRefExpr *DRE) {\n // ...\n if (isReferenceType) {\n diag = diag::warn_uninit_self_reference_in_reference_init;"}}, | ||
[ | [k]={ | ||
["clang/test/Analysis/stack-addr-ps.cpp"]={"clang/test/Analysis/stack-addr-ps.cpp:94:12: warning: reference \'i\' is not yet bound to a value when used within its own initialization [-Wuninitialized]"} | ["clang/test/Analysis/stack-addr-ps.cpp"]={"clang/test/Analysis/stack-addr-ps.cpp:94:12: warning: reference \'i\' is not yet bound to a value when used within its own initialization [-Wuninitialized]"} | ||
} | } | ||
}, | }, | ||
["warn_uninit_var"]={ | ["warn_uninit_var"]={ | ||
[ | [i]={n,o,p,tb}, | ||
[j]=tb, | |||
[ | |||
[b]="variable %0 is uninitialized when %select{used here|captured by block}1", | [b]="variable %0 is uninitialized when %select{used here|captured by block}1", | ||
[ | [d]=h, | ||
[ | [a]="variable (.*?) is uninitialized when (?:used here|captured by block)", | ||
[ | [e]=Yc, | ||
[ | [c]=l, | ||
[ | [f]={"bcf848f70a42",1295982828,"Teach -Wuninitialized-experimental to also warn\nabout uninitialized variables captured by blocks.\n\nl...","Teach -Wuninitialized-experimental to also warn\nabout uninitialized variables captured by blocks.\n\nllvm-svn: 124213"}, | ||
[ | [g]={{y,834,"/// DiagUninitUse -- Helper function to produce a diagnostic for an\n/// uninitialized use of a variable.\nstatic void DiagUninitUse(Sema &S, const VarDecl *VD, const UninitUse &Use, bool IsCapturedByBlock) {\n // ...\n case UninitUse::Always:\n S.Diag(Use.getUser()->getBeginLoc(), diag::warn_uninit_var) << VD->getDeclName() << IsCapturedByBlock << Use.getUser()->getSourceRange();"},{y,2629,"void clang::sema::AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P, sema::FunctionScopeInfo *fscope, const Decl *D, QualType BlockType) {\n // ...\n if (!Diags.isIgnored(diag::warn_uninit_var, D->getBeginLoc()) || !Diags.isIgnored(diag::warn_sometimes_uninit_var, D->getBeginLoc()) || !Diags.isIgnored(diag::warn_maybe_uninit_var, D->getBeginLoc()) || !Diags.isIgnored(diag::warn_uninit_const_reference, D->getBeginLoc())) {"}}, | ||
[ | [k]={ | ||
["clang/test/Analysis/uninit-asm-goto.cpp"]={"clang/test/Analysis/uninit-asm-goto.cpp:108:10: warning: variable \'y\' is uninitialized when used here [-Wuninitialized]"} | ["clang/test/Analysis/uninit-asm-goto.cpp"]={"clang/test/Analysis/uninit-asm-goto.cpp:108:10: warning: variable \'y\' is uninitialized when used here [-Wuninitialized]"} | ||
} | } | ||
}, | }, | ||
["warn_unknown_attribute_ignored"]={ | ["warn_unknown_attribute_ignored"]={ | ||
[ | [i]={O,"unknown-attributes"}, | ||
[j]="unknown-attributes", | |||
[ | |||
[b]="unknown attribute %0 ignored", | [b]="unknown attribute %0 ignored", | ||
[ | [d]=h, | ||
[ | [a]="unknown attribute (.*?) ignored", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunknown\\-attributes[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"dd1bc0f1b5a6",1278582146,"Add support for differentiating between attributes ignored when handled and\nunknown attributes that ...","Add support for differentiating between attributes ignored when handled and\nunknown attributes that we discard. Add a diagnostic group for unknown\nattribute warnings to allow turning these off when we don\'t care. Also\nconsolidates the tests for this case.\n\nllvm-svn: 107864"}, | ||
[ | [g]={{"clang/lib/Parse/ParseDecl.cpp",1769,"void Parser::ProhibitCXX11Attributes(ParsedAttributes &Attrs, unsigned AttrDiagID, unsigned KeywordDiagID, bool DiagnoseEmptyAttrs, bool WarnOnUnknownAttrs) {\n // ...\n for (const ParsedAttr &AL : Attrs) {\n // ...\n if (AL.getKind() == ParsedAttr::UnknownAttribute) {\n if (WarnOnUnknownAttrs)\n Diag(AL.getLoc(), diag::warn_unknown_attribute_ignored) << AL << AL.getRange();"},{w,2231,"bool Sema::CheckAttrTarget(const ParsedAttr &AL) {\n // Check whether the attribute is valid on the current target.\n if (!AL.existsInTarget(Context.getTargetInfo())) {\n Diag(AL.getLoc(), AL.isRegularKeywordAttribute() ? diag::err_keyword_not_supported_on_target : diag::warn_unknown_attribute_ignored) << AL << AL.getRange();"},{w,8735,"/// ProcessDeclAttribute - Apply the specific attribute to the specified decl if\n/// the attribute applies to decls. If the attribute is a type attribute, just\n/// silently ignore it if a GNU attribute.\nstatic void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, const Sema::ProcessDeclAttributeOptions &Options) {\n // ...\n // Unknown attributes are automatically warned on. Target-specific attributes\n // which do not apply to the current target architecture are treated as\n // though they were unknown attributes.\n if (AL.getKind() == ParsedAttr::UnknownAttribute || !AL.existsInTarget(S.Context.getTargetInfo())) {\n S.Diag(AL.getLoc(), AL.isRegularKeywordAttribute() ? (unsigned)diag::err_keyword_not_supported_on_target : AL.isDeclspecAttribute() ? (unsigned)diag::warn_unhandled_ms_attribute_ignored : (unsigned)diag::warn_unknown_attribute_ignored) << AL << AL.getRange();"},{w,9618,"/// checkUnusedDeclAttributes - Check a list of attributes to see if it\n/// contains any decl attributes that we should warn about.\nstatic void checkUnusedDeclAttributes(Sema &S, const ParsedAttributesView &A) {\n for (const ParsedAttr &AL : A) {\n // ...\n if (AL.getKind() == ParsedAttr::UnknownAttribute) {\n S.Diag(AL.getLoc(), diag::warn_unknown_attribute_ignored) << AL << AL.getRange();"},{T,2824,"/// ActOnBaseSpecifier - Parsed a base specifier. A base specifier is\n/// one entry in the base class list of a class specifier, for\n/// example:\n/// class foo : public bar, virtual private baz {\n/// \'public bar\' and \'virtual private baz\' are each base-specifiers.\nBaseResult Sema::ActOnBaseSpecifier(Decl *classdecl, SourceRange SpecifierRange, const ParsedAttributesView &Attributes, bool Virtual, AccessSpecifier Access, ParsedType basetype, SourceLocation BaseLoc, SourceLocation EllipsisLoc) {\n // ...\n // We do not support any C++11 attributes on base-specifiers yet.\n // Diagnose any attributes we see.\n for (const ParsedAttr &AL : Attributes) {\n // ...\n if (AL.getKind() == ParsedAttr::UnknownAttribute)\n Diag(AL.getLoc(), diag::warn_unknown_attribute_ignored) << AL << AL.getRange();"},{"clang/lib/Sema/SemaStmtAttr.cpp",498,"static Attr *ProcessStmtAttribute(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange Range) {\n // ...\n if (A.getKind() == ParsedAttr::UnknownAttribute || !(A.existsInTarget(S.Context.getTargetInfo()) || (S.Context.getLangOpts().SYCLIsDevice && Aux && A.existsInTarget(*Aux)))) {\n S.Diag(A.getLoc(), A.isRegularKeywordAttribute() ? (unsigned)diag::err_keyword_not_supported_on_target : A.isDeclspecAttribute() ? (unsigned)diag::warn_unhandled_ms_attribute_ignored : (unsigned)diag::warn_unknown_attribute_ignored) << A << A.getRange();"},{L,8580,"static void processTypeAttrs(TypeProcessingState &state, QualType &type, TypeAttrLocation TAL, const ParsedAttributesView &attrs) {\n // ...\n for (ParsedAttr &attr : AttrsCopy) {\n // ...\n case ParsedAttr::UnknownAttribute:\n if (attr.isStandardAttributeSyntax()) {\n state.getSema().Diag(attr.getLoc(), diag::warn_unknown_attribute_ignored) << attr << attr.getRange();"}}, | ||
[ | [k]={ | ||
["clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp:3:3: warning: unknown attribute \'disable_tail_calls\' ignored [-Wunknown-attributes]","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp:3:23: warning: unknown attribute \'noduplicate\' ignored [-Wunknown-attributes]","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp:15:9: warning: unknown attribute \'unknown_attr\' ignored [-Wunknown-attributes]","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp:16:9: warning: unknown attribute \'something\' ignored [-Wunknown-attributes]"} | ["clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp:3:3: warning: unknown attribute \'disable_tail_calls\' ignored [-Wunknown-attributes]","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp:3:23: warning: unknown attribute \'noduplicate\' ignored [-Wunknown-attributes]","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp:15:9: warning: unknown attribute \'unknown_attr\' ignored [-Wunknown-attributes]","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp:16:9: warning: unknown attribute \'something\' ignored [-Wunknown-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_unknown_comment_command_name"]={ | ["warn_unknown_comment_command_name"]={ | ||
[ | [i]={"documentation-pedantic","documentation-unknown-command"}, | ||
[j]="documentation-unknown-command", | |||
[ | |||
[b]="unknown command tag name", | [b]="unknown command tag name", | ||
[ | [d]=h, | ||
[ | [a]="unknown command tag name", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdocumentation\\-unknown\\-command[^\\]]*\\]", | ||
[ | [c]="Documentation Issue", | ||
[ | [f]={"5b637078e1ab",1367622920,"[Doc parsing] Provide diagnostics for unknown documentation \ncommands. // rdar://12381408\n\nllvm-svn:...","[Doc parsing] Provide diagnostics for unknown documentation \ncommands. // rdar://12381408\n\nllvm-svn: 181071"}, | ||
[ | [g]={{"clang/lib/AST/CommentLexer.cpp",417,"void Lexer::lexCommentText(Token &T) {\n // ...\n case \'\\\\\':\n case \'@\': {\n // ...\n if (!Info) {\n if ((Info = Traits.getTypoCorrectCommandInfo(CommandName))) {\n // ...\n } else {\n // ...\n Diag(T.getLocation(), diag::warn_unknown_comment_command_name) << SourceRange(T.getLocation(), T.getEndLocation());"},{B,14660,"void Sema::ActOnDocumentableDecls(ArrayRef<Decl *> Group) {\n // ...\n if (Diags.isIgnored(diag::warn_doc_param_not_found, Group[0]->getLocation()) && Diags.isIgnored(diag::warn_unknown_comment_command_name, Group[0]->getLocation()))"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-documentation.m"]={"clang/test/Sema/warn-documentation.m:156:1: warning: unknown command tag name [-Wdocumentation-unknown-command]","clang/test/Sema/warn-documentation.m:178:5: warning: unknown command tag name [-Wdocumentation-unknown-command]"} | ["clang/test/Sema/warn-documentation.m"]={"clang/test/Sema/warn-documentation.m:156:1: warning: unknown command tag name [-Wdocumentation-unknown-command]","clang/test/Sema/warn-documentation.m:178:5: warning: unknown command tag name [-Wdocumentation-unknown-command]"} | ||
} | } | ||
}, | }, | ||
["warn_unknown_declare_variant_isa_trait"]={ | ["warn_unknown_declare_variant_isa_trait"]={ | ||
[ | [i]={J,jb}, | ||
[j]=jb, | |||
[ | |||
[b]="isa trait \'%0\' is not known to the current target; verify the spelling or consider restricting the context selector with the \'arch\' selector further", | [b]="isa trait \'%0\' is not known to the current target; verify the spelling or consider restricting the context selector with the \'arch\' selector further", | ||
[ | [d]=h, | ||
[ | [a]="isa trait \'(.*?)\' is not known to the current target; verify the spelling or consider restricting the context selector with the \'arch\' selector further", | ||
[ | [e]=Qb, | ||
[ | [c]=v, | ||
[ | [f]={Ob,1582847864,Mb,Nb}, | ||
[ | [g]={{F,2244,"/// Parsing of declarative OpenMP directives.\n///\n/// threadprivate-directive:\n/// annot_pragma_openmp \'threadprivate\' simple-variable-list\n/// annot_pragma_openmp_end\n///\n/// allocate-directive:\n/// annot_pragma_openmp \'allocate\' simple-variable-list [<clause>]\n/// annot_pragma_openmp_end\n///\n/// declare-reduction-directive:\n/// annot_pragma_openmp \'declare\' \'reduction\' [...]\n/// annot_pragma_openmp_end\n///\n/// declare-mapper-directive:\n/// annot_pragma_openmp \'declare\' \'mapper\' \'(\' [<mapper-identifer> \':\']\n/// <type> <var> \')\' [<clause>[[,] <clause>] ... ]\n/// annot_pragma_openmp_end\n///\n/// declare-simd-directive:\n/// annot_pragma_openmp \'declare simd\' {<clause> [,]}\n/// annot_pragma_openmp_end\n/// <function declaration/definition>\n///\n/// requires directive:\n/// annot_pragma_openmp \'requires\' <clause> [[[,] <clause>] ... ]\n/// annot_pragma_openmp_end\n///\n/// assumes directive:\n/// annot_pragma_openmp \'assumes\' <clause> [[[,] <clause>] ... ]\n/// annot_pragma_openmp_end\n/// or\n/// annot_pragma_openmp \'begin assumes\' <clause> [[[,] <clause>] ... ]\n/// annot_pragma_openmp \'end assumes\'\n/// annot_pragma_openmp_end\n///\nParser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirectiveWithExtDecl(AccessSpecifier &AS, ParsedAttributes &Attrs, bool Delayed, DeclSpec::TST TagType, Decl *Tag) {\n // ...\n case OMPD_begin_declare_variant: {\n // ...\n std::function<void(StringRef)> DiagUnknownTrait = [this, Loc](StringRef ISATrait) {\n // ...\n Diag(Loc, diag::warn_unknown_declare_variant_isa_trait) << ISATrait;"},{F,2604,"/// Parsing of declarative or executable OpenMP directives.\n///\n/// threadprivate-directive:\n/// annot_pragma_openmp \'threadprivate\' simple-variable-list\n/// annot_pragma_openmp_end\n///\n/// allocate-directive:\n/// annot_pragma_openmp \'allocate\' simple-variable-list\n/// annot_pragma_openmp_end\n///\n/// declare-reduction-directive:\n/// annot_pragma_openmp \'declare\' \'reduction\' \'(\' <reduction_id> \':\'\n/// <type> {\',\' <type>} \':\' <expression> \')\' [\'initializer\' \'(\'\n/// (\'omp_priv\' \'=\' <expression>|<function_call>) \')\']\n/// annot_pragma_openmp_end\n///\n/// declare-mapper-directive:\n/// annot_pragma_openmp \'declare\' \'mapper\' \'(\' [<mapper-identifer> \':\']\n/// <type> <var> \')\' [<clause>[[,] <clause>] ... ]\n/// annot_pragma_openmp_end\n///\n/// executable-directive:\n/// annot_pragma_openmp \'parallel\' | \'simd\' | \'for\' | \'sections\' |\n/// \'section\' | \'single\' | \'master\' | \'critical\' [ \'(\' <name> \')\' ] |\n/// \'parallel for\' | \'parallel sections\' | \'parallel master\' | \'task\' |\n/// \'taskyield\' | \'barrier\' | \'taskwait\' | \'flush\' | \'ordered\' | \'error\'\n/// | \'atomic\' | \'for simd\' | \'parallel for simd\' | \'target\' | \'target\n/// data\' | \'taskgroup\' | \'teams\' | \'taskloop\' | \'taskloop simd\' |\n/// \'master taskloop\' | \'master taskloop simd\' | \'parallel master\n/// taskloop\' | \'parallel master taskloop simd\' | \'distribute\' | \'target\n/// enter data\' | \'target exit data\' | \'target parallel\' | \'target\n/// parallel for\' | \'target update\' | \'distribute parallel for\' |\n/// \'distribute paralle for simd\' | \'distribute simd\' | \'target parallel\n/// for simd\' | \'target simd\' | \'teams distribute\' | \'teams distribute\n/// simd\' | \'teams distribute parallel for simd\' | \'teams distribute\n/// parallel for\' | \'target teams\' | \'target teams distribute\' | \'target\n/// teams distribute parallel for\' | \'target teams distribute parallel\n/// for simd\' | \'target teams distribute simd\' | \'masked\' |\n/// \'parallel masked\' {clause} annot_pragma_openmp_end\n///\nStmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective(ParsedStmtContext StmtCtx, bool ReadDirectiveWithinMetadirective) {\n // ...\n case OMPD_metadirective: {\n // ...\n std::function<void(StringRef)> DiagUnknownTrait = [this, Loc](StringRef ISATrait) {\n // ...\n Diag(Loc, diag::warn_unknown_declare_variant_isa_trait) << ISATrait;"},{ib,7264,"ExprResult Sema::ActOnOpenMPCall(ExprResult Call, Scope *Scope, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig) {\n // ...\n std::function<void(StringRef)> DiagUnknownTrait = [this, CE](StringRef ISATrait) {\n // ...\n Diag(CE->getBeginLoc(), diag::warn_unknown_declare_variant_isa_trait) << ISATrait;"}}, | ||
[ | [k]={ | ||
["clang/test/OpenMP/metadirective_messages.cpp"]={"clang/test/OpenMP/metadirective_messages.cpp:20:1: warning: isa trait \'some-unsupported-feature\' is not known to the current target; verify the spelling or consider restricting the context selector with the \'arch\' selector further [-Wsource-uses-openmp]"} | ["clang/test/OpenMP/metadirective_messages.cpp"]={"clang/test/OpenMP/metadirective_messages.cpp:20:1: warning: isa trait \'some-unsupported-feature\' is not known to the current target; verify the spelling or consider restricting the context selector with the \'arch\' selector further [-Wsource-uses-openmp]"} | ||
} | } | ||
}, | }, | ||
["warn_unknown_diag_option"]={ | ["warn_unknown_diag_option"]={ | ||
[ | [i]={qc}, | ||
[j]=qc, | |||
[ | |||
[b]="unknown %select{warning|remark}0 option \'%1\'%select{|; did you mean \'%3\'?}2", | [b]="unknown %select{warning|remark}0 option \'%1\'%select{|; did you mean \'%3\'?}2", | ||
[ | [d]=h, | ||
[ | [a]="unknown (?:warning|remark) option \'(.*?)\'(?:|; did you mean \'(.*?)\'\\?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunknown\\-warning\\-option[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"3be1cb294f32",1407371061,"Use -Rblah, not -Wblah, to control remark diagnostics. This was always the\nintent when we added rema...","Use -Rblah, not -Wblah, to control remark diagnostics. This was always the\nintent when we added remark support, but was never implemented in the general\ncase, because the first -R flags didn\'t need it. (-Rpass= had special handling\nto accomodate its argument.)\n\n-Rno-foo, -Reverything, and -Rno-everything can be used to turn off a remark,\nor to turn on or off all remarks. Per discussion on cfe-commits, -Weverything\ndoes not affect remarks, and -Reverything does not affect warnings or errors.\n\nThe only \"real\" -R flag we have right now is -Rmodule-build; that flag is\neffectively renamed from -Wmodule-build to -Rmodule-build by this change.\n\n-Wpass and -Wno-pass (and their friends) are also renamed to -Rpass and\n-Rno-pass by this change; it\'s not completely clear whether we intended to have\na -Rpass (with no =pattern), but that is unchanged by this commit, other than\nthe flag name. The default pattern is effectively one which matches no passes.\nIn future, we may want to make the default pattern be .*, so that -Reverything\nworks for -Rpass properly.\n\nllvm-svn: 215046"}, | ||
[ | [g]={{"clang/lib/Basic/Warnings.cpp",39,"// EmitUnknownDiagWarning - Emit a warning and typo hint for unknown warning\n// opts\nstatic void EmitUnknownDiagWarning(DiagnosticsEngine &Diags, diag::Flavor Flavor, StringRef Prefix, StringRef Opt) {\n // ...\n Diags.Report(diag::warn_unknown_diag_option) << (Flavor == diag::Flavor::WarningOrError ? 0 : 1) << (Prefix.str() += std::string(Opt)) << !Suggestion.empty() << (Prefix.str() += std::string(Suggestion));"}}, | ||
[ | [k]={ | ||
["clang/test/Frontend/warning-options.cpp"]={"warning: unknown warning option \'-Wmonkey\'; did you mean \'-Wmove\'? [-Wunknown-warning-option]","warning: unknown warning option \'-Wno-monkey\'; did you mean \'-Wno-move\'? [-Wunknown-warning-option]","warning: unknown warning option \'-Wno-unused-command-line-arguments\'; did you mean \'-Wno-unused-command-line-argument\'? [-Wunknown-warning-option]","warning: unknown warning option \'-Wmodule-build\'; did you mean \'-Wmodule-conflict\'? [-Wunknown-warning-option]","warning: unknown remark option \'-Rmodule-built\'; did you mean \'-Rmodule-build\'? [-Wunknown-warning-option]"} | ["clang/test/Frontend/warning-options.cpp"]={"warning: unknown warning option \'-Wmonkey\'; did you mean \'-Wmove\'? [-Wunknown-warning-option]","warning: unknown warning option \'-Wno-monkey\'; did you mean \'-Wno-move\'? [-Wunknown-warning-option]","warning: unknown warning option \'-Wno-unused-command-line-arguments\'; did you mean \'-Wno-unused-command-line-argument\'? [-Wunknown-warning-option]","warning: unknown warning option \'-Wmodule-build\'; did you mean \'-Wmodule-conflict\'? [-Wunknown-warning-option]","warning: unknown remark option \'-Rmodule-built\'; did you mean \'-Rmodule-build\'? [-Wunknown-warning-option]"} | ||
} | } | ||
}, | }, | ||
["warn_unknown_sanitizer_ignored"]={ | ["warn_unknown_sanitizer_ignored"]={ | ||
[ | [i]={"unknown-sanitizers"}, | ||
[j]="unknown-sanitizers", | |||
[ | |||
[b]="unknown sanitizer \'%0\' ignored", | [b]="unknown sanitizer \'%0\' ignored", | ||
[ | [d]=h, | ||
[ | [a]="unknown sanitizer \'(.*?)\' ignored", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunknown\\-sanitizers[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"915df9968b65",1431714812,"Implement no_sanitize attribute.\n\nDifferential Revision: http://reviews.llvm.org/D9631\n\nllvm-svn: 23...","Implement no_sanitize attribute.\n\nDifferential Revision: http://reviews.llvm.org/D9631\n\nllvm-svn: 237463"}, | ||
[ | [g]={{w,8232,"static void handleNoSanitizeAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n for (unsigned I = 0, E = AL.getNumArgs(); I != E; ++I) {\n // ...\n if (parseSanitizerValue(SanitizerName, /*AllowGroups=*/true) == SanitizerMask() && SanitizerName != \"coverage\")\n S.Diag(LiteralLoc, diag::warn_unknown_sanitizer_ignored) << SanitizerName;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/attr-no-sanitize.cpp"]={"clang/test/SemaCXX/attr-no-sanitize.cpp:10:28: warning: unknown sanitizer \'unknown\' ignored [-Wunknown-sanitizers]","clang/test/SemaCXX/attr-no-sanitize.cpp:35:37: warning: unknown sanitizer \'unknown\' ignored [-Wunknown-sanitizers]"} | ["clang/test/SemaCXX/attr-no-sanitize.cpp"]={"clang/test/SemaCXX/attr-no-sanitize.cpp:10:28: warning: unknown sanitizer \'unknown\' ignored [-Wunknown-sanitizers]","clang/test/SemaCXX/attr-no-sanitize.cpp:35:37: warning: unknown sanitizer \'unknown\' ignored [-Wunknown-sanitizers]"} | ||
} | } | ||
}, | }, | ||
["warn_unknown_warning_specifier"]={ | ["warn_unknown_warning_specifier"]={ | ||
[ | [i]={qc}, | ||
[j]=qc, | |||
[ | |||
[b]="unknown %0 warning specifier: \'%1\'", | [b]="unknown %0 warning specifier: \'%1\'", | ||
[ | [d]=h, | ||
[ | [a]="unknown (.*?) warning specifier\\: \'(.*?)\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunknown\\-warning\\-option[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"b089c1de5521",1261594417,"switch -Werror/-Wfatal-errors error conditions to use diagnostics instead\nof printf, patch by Christ...","switch -Werror/-Wfatal-errors error conditions to use diagnostics instead\nof printf, patch by Christian Adaker!\n\nllvm-svn: 92019"}, | ||
[ | [g]={{"clang/lib/Basic/Warnings.cpp",143,"void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, const DiagnosticOptions &Opts, bool ReportDiags) {\n // ...\n // We parse the warning options twice. The first pass sets diagnostic state,\n // while the second pass reports warnings/errors. This has the effect that\n // we follow the more canonical \"last option wins\" paradigm when there are\n // conflicting options.\n for (unsigned Report = 0, ReportEnd = 2; Report != ReportEnd; ++Report) {\n // ...\n for (unsigned i = 0, e = Opts.Warnings.size(); i != e; ++i) {\n // ...\n // -Werror/-Wno-error is a special case, not controlled by the option\n // table. It also has the \"specifier\" form of -Werror=foo. GCC supports\n // the deprecated -Werror-implicit-function-declaration which is used by\n // a few projects.\n if (Opt.startswith(\"error\")) {\n // ...\n if (Opt.size() > 5) { // Specifier must be present.\n if (Opt[5] != \'=\' && Opt.substr(5) != \"-implicit-function-declaration\") {\n if (Report)\n Diags.Report(diag::warn_unknown_warning_specifier) << \"-Werror\" << (\"-W\" + OrigOpt.str());"},{"clang/lib/Basic/Warnings.cpp",171,"void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, const DiagnosticOptions &Opts, bool ReportDiags) {\n // ...\n // We parse the warning options twice. The first pass sets diagnostic state,\n // while the second pass reports warnings/errors. This has the effect that\n // we follow the more canonical \"last option wins\" paradigm when there are\n // conflicting options.\n for (unsigned Report = 0, ReportEnd = 2; Report != ReportEnd; ++Report) {\n // ...\n for (unsigned i = 0, e = Opts.Warnings.size(); i != e; ++i) {\n // ...\n // -Wfatal-errors is yet another special case.\n if (Opt.startswith(\"fatal-errors\")) {\n // ...\n if (Opt.size() != 12) {\n if ((Opt[12] != \'=\' && Opt[12] != \'-\') || Opt.size() == 13) {\n if (Report)\n Diags.Report(diag::warn_unknown_warning_specifier) << \"-Wfatal-errors\" << (\"-W\" + OrigOpt.str());"}}, | ||
[ | [k]={ | ||
["clang/test/Frontend/warning-options.cpp"]={"warning: unknown -Werror warning specifier: \'-Werror-vla\' [-Wunknown-warning-option]"} | ["clang/test/Frontend/warning-options.cpp"]={"warning: unknown -Werror warning specifier: \'-Werror-vla\' [-Wunknown-warning-option]"} | ||
} | } | ||
}, | }, | ||
["warn_unlock_but_no_lock"]={ | ["warn_unlock_but_no_lock"]={ | ||
[ | [i]={kb,rb}, | ||
[j]=rb, | |||
[ | |||
[b]="releasing %0 \'%1\' that was not held", | [b]="releasing %0 \'%1\' that was not held", | ||
[ | [d]=h, | ||
[ | [a]="releasing (.*?) \'(.*?)\' that was not held", | ||
[ | [e]=dc, | ||
[ | [c]=l, | ||
[ | [f]={"ee5db8b5c4ab",1315518770,"Thread Safety: In C++0x Mutexes are the objects that control access to shared variables, while Lock...","Thread Safety: In C++0x Mutexes are the objects that control access to shared variables, while Locks are the objects that acquire and release Mutexes. We switch to this new terminology.\n\nllvm-svn: 139321"}, | ||
[ | [g]={{y,1873,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleUnmatchedUnlock(StringRef Kind, Name LockName, SourceLocation Loc, SourceLocation LocPreviousUnlock) override {\n // ...\n PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_unlock_but_no_lock) << Kind << LockName);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-thread-safety-analysis.c"]={"clang/test/Sema/warn-thread-safety-analysis.c:123:3: warning: releasing mutex \'mu1\' that was not held [-Wthread-safety-analysis]","clang/test/Sema/warn-thread-safety-analysis.c:128:3: warning: releasing mutex \'mu1\' that was not held [-Wthread-safety-analysis]"} | ["clang/test/Sema/warn-thread-safety-analysis.c"]={"clang/test/Sema/warn-thread-safety-analysis.c:123:3: warning: releasing mutex \'mu1\' that was not held [-Wthread-safety-analysis]","clang/test/Sema/warn-thread-safety-analysis.c:128:3: warning: releasing mutex \'mu1\' that was not held [-Wthread-safety-analysis]"} | ||
} | } | ||
}, | }, | ||
["warn_unlock_kind_mismatch"]={ | ["warn_unlock_kind_mismatch"]={ | ||
[ | [i]={kb,rb}, | ||
[j]=rb, | |||
[ | |||
[b]="releasing %0 \'%1\' using %select{shared|exclusive}2 access, expected %select{shared|exclusive}3 access", | [b]="releasing %0 \'%1\' using %select{shared|exclusive}2 access, expected %select{shared|exclusive}3 access", | ||
[ | [d]=h, | ||
[ | [a]="releasing (.*?) \'(.*?)\' using (?:shared|exclusive) access, expected (?:shared|exclusive) access", | ||
[ | [e]=dc, | ||
[ | [c]=l, | ||
[ | [f]={"df115d9bf354",1395413328,"The release_capability, release_shared_capability and release_generic_capability functions are now f...","The release_capability, release_shared_capability and release_generic_capability functions are now functionally distinct for capability analysis. The unlock_function attribute maps directly to release_generic_capability.\n\nllvm-svn: 204469"}, | ||
[ | [g]={{y,1886,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleIncorrectUnlockKind(StringRef Kind, Name LockName, LockKind Expected, LockKind Received, SourceLocation LocLocked, SourceLocation LocUnlock) override {\n // ...\n PartialDiagnosticAt Warning(LocUnlock, S.PDiag(diag::warn_unlock_kind_mismatch) << Kind << LockName << Received << Expected);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-thread-safety-analysis.c"]={"clang/test/Sema/warn-thread-safety-analysis.c:121:3: warning: releasing mutex \'mu1\' using shared access, expected exclusive access [-Wthread-safety-analysis]","clang/test/Sema/warn-thread-safety-analysis.c:126:3: warning: releasing mutex \'mu1\' using exclusive access, expected shared access [-Wthread-safety-analysis]"} | ["clang/test/Sema/warn-thread-safety-analysis.c"]={"clang/test/Sema/warn-thread-safety-analysis.c:121:3: warning: releasing mutex \'mu1\' using shared access, expected exclusive access [-Wthread-safety-analysis]","clang/test/Sema/warn-thread-safety-analysis.c:126:3: warning: releasing mutex \'mu1\' using exclusive access, expected shared access [-Wthread-safety-analysis]"} | ||
} | } | ||
}, | }, | ||
["warn_unnecessary_packed"]={ | ["warn_unnecessary_packed"]={ | ||
[ | [i]={"packed"}, | ||
[j]="packed", | |||
[ | |||
[b]="packed attribute is unnecessary for %0", | [b]="packed attribute is unnecessary for %0", | ||
[ | [d]=h, | ||
[ | [a]="packed attribute is unnecessary for (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpacked[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"ca0d0cd3b993",1285165944,"Implement -Wpadded and -Wpacked.\n\n-Wpadded warns when undesired padding is introduced in a struct. (...","Implement -Wpadded and -Wpacked.\n\n-Wpadded warns when undesired padding is introduced in a struct. (rdar://7469556)\n-Wpacked warns if a struct is given the packed attribute, but the packed attribute has no effect\n on the layout or the size of the struct. Such structs may be mis-aligned for little benefit.\n\nThe warnings are emitted at the point where layout is calculated, that is at RecordLayoutBuilder.\nTo avoid calculating the layouts of all structs regardless of whether they are needed or not,\nI let the layouts be lazily constructed when needed. This has the disadvantage that the above warnings\nwill be emitted only when they are used for IR gen, and not e.g with -fsyntax-only:\n\n$ cat t.c\nstruct S {\n char c;\n int i;\n};\nvoid f(struct S* s) {}\n\n$ clang -fsyntax-only -Wpadded t.c\n$ clang -c -Wpadded t.c -o t.o\nt.c:3:7: warning: padding struct \'struct S\' with 3 bytes to align \'i\' [-Wpadded]\n int i;\n ^\n1 warning generated.\n\nThis is a good tradeoff between providing the warnings and not calculating layouts for all\nstructs in case the user has enabled a couple of rarely used warnings.\n\nllvm-svn: 114544"}, | ||
[ | [g]={{Zb,2215,"void ItaniumRecordLayoutBuilder::FinishLayout(const NamedDecl *D) {\n // ...\n if (const RecordDecl *RD = dyn_cast<RecordDecl>(D)) {\n // ...\n // Warn if we packed it unnecessarily, when the unpacked alignment is not\n // greater than the one after packing, the size in bits doesn\'t change and\n // the offset of each field is identical.\n // Unless the type is non-POD (for Clang ABI > 15), where the packed\n // attribute on such a type does allow the type to be packed into other\n // structures that use the packed attribute.\n if (Packed && UnpackedAlignment <= Alignment && UnpackedSizeInBits == getSizeInBits() && !HasPackedField && (!CXXRD || CXXRD->isPOD() || Context.getLangOpts().getClangABICompat() <= LangOptions::ClangABI::Ver15))\n Diag(D->getLocation(), diag::warn_unnecessary_packed) << Context.getTypeDeclType(RD);"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp"]={"clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:180:8: warning: packed attribute is unnecessary for \'S30_use\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:66:8: warning: packed attribute is unnecessary for \'S11\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:81:8: warning: packed attribute is unnecessary for \'S14\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:85:8: warning: packed attribute is unnecessary for \'S15\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:90:8: warning: packed attribute is unnecessary for \'S16\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:99:8: warning: packed attribute is unnecessary for \'S18\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:104:8: warning: packed attribute is unnecessary for \'S19\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:119:8: warning: packed attribute is unnecessary for \'S22\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:124:8: warning: packed attribute is unnecessary for \'S23\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:140:8: warning: packed attribute is unnecessary for \'S25\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:145:8: warning: packed attribute is unnecessary for \'S26\' [-Wpacked]"} | ["clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp"]={"clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:180:8: warning: packed attribute is unnecessary for \'S30_use\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:66:8: warning: packed attribute is unnecessary for \'S11\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:81:8: warning: packed attribute is unnecessary for \'S14\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:85:8: warning: packed attribute is unnecessary for \'S15\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:90:8: warning: packed attribute is unnecessary for \'S16\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:99:8: warning: packed attribute is unnecessary for \'S18\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:104:8: warning: packed attribute is unnecessary for \'S19\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:119:8: warning: packed attribute is unnecessary for \'S22\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:124:8: warning: packed attribute is unnecessary for \'S23\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:140:8: warning: packed attribute is unnecessary for \'S25\' [-Wpacked]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:145:8: warning: packed attribute is unnecessary for \'S26\' [-Wpacked]"} | ||
} | } | ||
}, | }, | ||
["warn_unneeded_internal_decl"]={ | ["warn_unneeded_internal_decl"]={ | ||
[ | [i]={n,o,p,"unneeded-internal-declaration",Q,"unused-function","unused-template"}, | ||
[j]="unneeded-internal-declaration", | |||
[ | |||
[b]="%select{function|variable}0 %1 is not needed and will not be emitted", | [b]="%select{function|variable}0 %1 is not needed and will not be emitted", | ||
[ | [d]=h, | ||
[ | [a]="(?:function|variable) (.*?) is not needed and will not be emitted", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunneeded\\-internal\\-declaration[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={"1618023018cd",1303242670,"We regard a function as \'unused\' from the codegen perspective, so our warnings diverge from\ngcc\'s un...","We regard a function as \'unused\' from the codegen perspective, so our warnings diverge from\ngcc\'s unused warnings which don\'t get emitted if the function is referenced even in an unevaluated context\n(e.g. in templates, sizeof, etc.). Also, saying that a function is \'unused\' because it won\'t get codegen\'ed\nis somewhat misleading.\n\n- Don\'t emit \'unused\' warnings for functions that are referenced in any part of the user\'s code.\n- A warning that an internal function/variable won\'t get emitted is useful though, so introduce\n -Wunneeded-internal-declaration which will warn if a function/variable with internal linkage is not\n \"needed\" (\'used\' from the codegen perspective), e.g:\n\n static void foo() { }\n\n template <int>\n void bar() {\n foo();\n }\n\ntest.cpp:1:13: warning: function \'foo\' is not needed and will not be emitted\nstatic void foo() { }\n ^\n\nAddresses rdar://8733476.\n\nllvm-svn: 129794"}, | ||
[ | [g]={{S,1368,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n // If there were errors, disable \'unused\' warnings since they will mostly be\n // noise. Don\'t warn for a use from a module: either we should warn on all\n // file-scope declarations in modules or not at all, but whether the\n // declaration is used is immaterial.\n if (!Diags.hasErrorOccurred() && TUKind != TU_Module) {\n // Output warning for unused file scoped decls.\n for (UnusedFileScopedDeclsType::iterator I = UnusedFileScopedDecls.begin(ExternalSource.get()), E = UnusedFileScopedDecls.end(); I != E; ++I) {\n // ...\n if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {\n // ...\n if (DiagD->isReferenced()) {\n if (isa<CXXMethodDecl>(DiagD))\n // ...\n else {\n if (FD->getStorageClass() == SC_Static && !FD->isInlineSpecified() && !SourceMgr.isInMainFile(SourceMgr.getExpansionLoc(FD->getLocation())))\n // ...\n else\n Diag(DiagD->getLocation(), diag::warn_unneeded_internal_decl) << /*function=*/0 << DiagD << DiagRange;"},{S,1392,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n // If there were errors, disable \'unused\' warnings since they will mostly be\n // noise. Don\'t warn for a use from a module: either we should warn on all\n // file-scope declarations in modules or not at all, but whether the\n // declaration is used is immaterial.\n if (!Diags.hasErrorOccurred() && TUKind != TU_Module) {\n // Output warning for unused file scoped decls.\n for (UnusedFileScopedDeclsType::iterator I = UnusedFileScopedDecls.begin(ExternalSource.get()), E = UnusedFileScopedDecls.end(); I != E; ++I) {\n // ...\n if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {\n // ...\n } else {\n // ...\n if (DiagD->isReferenced()) {\n Diag(DiagD->getLocation(), diag::warn_unneeded_internal_decl) << /*variable=*/1 << DiagD << DiagRange;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-func-not-needed.cpp"]={"clang/test/SemaCXX/warn-func-not-needed.cpp:4:13: warning: function \'f\' is not needed and will not be emitted [-Wunneeded-internal-declaration]","clang/test/SemaCXX/warn-func-not-needed.cpp:14:18: warning: function \'f<int>\' is not needed and will not be emitted [-Wunneeded-internal-declaration]"} | ["clang/test/SemaCXX/warn-func-not-needed.cpp"]={"clang/test/SemaCXX/warn-func-not-needed.cpp:4:13: warning: function \'f\' is not needed and will not be emitted [-Wunneeded-internal-declaration]","clang/test/SemaCXX/warn-func-not-needed.cpp:14:18: warning: function \'f<int>\' is not needed and will not be emitted [-Wunneeded-internal-declaration]"} | ||
} | } | ||
}, | }, | ||
["warn_unneeded_member_function"]={ | ["warn_unneeded_member_function"]={ | ||
[ | [i]={"unneeded-member-function","unused-member-function"}, | ||
[j]="unneeded-member-function", | |||
[ | |||
[b]="member function %0 is not needed and will not be emitted", | [b]="member function %0 is not needed and will not be emitted", | ||
[ | [d]=h, | ||
[ | [a]="member function (.*?) is not needed and will not be emitted", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunneeded\\-member\\-function[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"1618023018cd",1303242670,"We regard a function as \'unused\' from the codegen perspective, so our warnings diverge from\ngcc\'s un...","We regard a function as \'unused\' from the codegen perspective, so our warnings diverge from\ngcc\'s unused warnings which don\'t get emitted if the function is referenced even in an unevaluated context\n(e.g. in templates, sizeof, etc.). Also, saying that a function is \'unused\' because it won\'t get codegen\'ed\nis somewhat misleading.\n\n- Don\'t emit \'unused\' warnings for functions that are referenced in any part of the user\'s code.\n- A warning that an internal function/variable won\'t get emitted is useful though, so introduce\n -Wunneeded-internal-declaration which will warn if a function/variable with internal linkage is not\n \"needed\" (\'used\' from the codegen perspective), e.g:\n\n static void foo() { }\n\n template <int>\n void bar() {\n foo();\n }\n\ntest.cpp:1:13: warning: function \'foo\' is not needed and will not be emitted\nstatic void foo() { }\n ^\n\nAddresses rdar://8733476.\n\nllvm-svn: 129794"}, | ||
[ | [g]={{S,1357,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n // If there were errors, disable \'unused\' warnings since they will mostly be\n // noise. Don\'t warn for a use from a module: either we should warn on all\n // file-scope declarations in modules or not at all, but whether the\n // declaration is used is immaterial.\n if (!Diags.hasErrorOccurred() && TUKind != TU_Module) {\n // Output warning for unused file scoped decls.\n for (UnusedFileScopedDeclsType::iterator I = UnusedFileScopedDecls.begin(ExternalSource.get()), E = UnusedFileScopedDecls.end(); I != E; ++I) {\n // ...\n if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {\n // ...\n if (DiagD->isReferenced()) {\n if (isa<CXXMethodDecl>(DiagD))\n Diag(DiagD->getLocation(), diag::warn_unneeded_member_function) << DiagD << DiagRange;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-member-not-needed.cpp"]={"clang/test/SemaCXX/warn-member-not-needed.cpp:5:10: warning: member function \'g\' is not needed and will not be emitted [-Wunneeded-member-function]","clang/test/SemaCXX/warn-member-not-needed.cpp:7:22: warning: member function \'gt<int>\' is not needed and will not be emitted [-Wunneeded-member-function]","clang/test/SemaCXX/warn-member-not-needed.cpp:8:22: warning: member function \'gt<float>\' is not needed and will not be emitted [-Wunneeded-member-function]"} | ["clang/test/SemaCXX/warn-member-not-needed.cpp"]={"clang/test/SemaCXX/warn-member-not-needed.cpp:5:10: warning: member function \'g\' is not needed and will not be emitted [-Wunneeded-member-function]","clang/test/SemaCXX/warn-member-not-needed.cpp:7:22: warning: member function \'gt<int>\' is not needed and will not be emitted [-Wunneeded-member-function]","clang/test/SemaCXX/warn-member-not-needed.cpp:8:22: warning: member function \'gt<float>\' is not needed and will not be emitted [-Wunneeded-member-function]"} | ||
} | } | ||
}, | }, | ||
["warn_unneeded_static_internal_decl"]={ | ["warn_unneeded_static_internal_decl"]={ | ||
[ | [i]={n,o,p,"unneeded-internal-declaration",Q,"unused-function","unused-template"}, | ||
[j]="unneeded-internal-declaration", | |||
[ | |||
[b]="\'static\' function %0 declared in header file should be declared \'static inline\'", | [b]="\'static\' function %0 declared in header file should be declared \'static inline\'", | ||
[ | [d]=h, | ||
[ | [a]="\'static\' function (.*?) declared in header file should be declared \'static inline\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunneeded\\-internal\\-declaration[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={"91fc39e31324",1340826209,"patch to suggest \'static\' function should be \'static inline\' \nwhen it appears to be unused and occur...","patch to suggest \'static\' function should be \'static inline\' \nwhen it appears to be unused and occurs in a header.\n// rdar://11202617\n\nllvm-svn: 159282"}, | ||
[ | [g]={{S,1365,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n // If there were errors, disable \'unused\' warnings since they will mostly be\n // noise. Don\'t warn for a use from a module: either we should warn on all\n // file-scope declarations in modules or not at all, but whether the\n // declaration is used is immaterial.\n if (!Diags.hasErrorOccurred() && TUKind != TU_Module) {\n // Output warning for unused file scoped decls.\n for (UnusedFileScopedDeclsType::iterator I = UnusedFileScopedDecls.begin(ExternalSource.get()), E = UnusedFileScopedDecls.end(); I != E; ++I) {\n // ...\n if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {\n // ...\n if (DiagD->isReferenced()) {\n if (isa<CXXMethodDecl>(DiagD))\n // ...\n else {\n if (FD->getStorageClass() == SC_Static && !FD->isInlineSpecified() && !SourceMgr.isInMainFile(SourceMgr.getExpansionLoc(FD->getLocation())))\n Diag(DiagD->getLocation(), diag::warn_unneeded_static_internal_decl) << DiagD << DiagRange;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-static-function-inheader.cpp"]={"clang/test/SemaCXX/warn-static-function-inheader.h:1:13: warning: \'static\' function \'thing\' declared in header file should be declared \'static inline\' [-Wunneeded-internal-declaration]"} | ["clang/test/SemaCXX/warn-static-function-inheader.cpp"]={"clang/test/SemaCXX/warn-static-function-inheader.h:1:13: warning: \'static\' function \'thing\' declared in header file should be declared \'static inline\' [-Wunneeded-internal-declaration]"} | ||
} | } | ||
}, | }, | ||
["warn_unofficial_aarch64_simdlen_must_be_power_of_2"]={ | ["warn_unofficial_aarch64_simdlen_must_be_power_of_2"]={ | ||
[b]="The value specified in simdlen must be a power of 2 when targeting Advanced SIMD.", | [b]="The value specified in simdlen must be a power of 2 when targeting Advanced SIMD.", | ||
[ | [d]=h, | ||
[ | [a]="The value specified in simdlen must be a power of 2 when targeting Advanced SIMD\\.", | ||
[ | [e]=K, | ||
[ | [c]=s, | ||
[ | [k]={ | ||
["clang/test/OpenMP/declare_simd_aarch64.c"]={"clang/test/OpenMP/declare_simd_aarch64.c:9:34: warning: The value specified in simdlen must be a power of 2 when targeting Advanced SIMD.","clang/test/OpenMP/declare_simd_aarch64.c:47:34: warning: The value specified in simdlen must be a power of 2 when targeting Advanced SIMD."} | ["clang/test/OpenMP/declare_simd_aarch64.c"]={"clang/test/OpenMP/declare_simd_aarch64.c:9:34: warning: The value specified in simdlen must be a power of 2 when targeting Advanced SIMD.","clang/test/OpenMP/declare_simd_aarch64.c:47:34: warning: The value specified in simdlen must be a power of 2 when targeting Advanced SIMD."} | ||
} | } | ||
}, | }, | ||
["warn_unofficial_aarch64_sve_simdlen_constraints"]={ | ["warn_unofficial_aarch64_sve_simdlen_constraints"]={ | ||
[b]="The clause simdlen must fit the %0-bit lanes in the architectural constraints for SVE (min is 128-bit, max is 2048-bit, by steps of 128-bit)", | [b]="The clause simdlen must fit the %0-bit lanes in the architectural constraints for SVE (min is 128-bit, max is 2048-bit, by steps of 128-bit)", | ||
[ | [d]=h, | ||
[ | [a]="The clause simdlen must fit the (.*?)\\-bit lanes in the architectural constraints for SVE \\(min is 128\\-bit, max is 2048\\-bit, by steps of 128\\-bit\\)", | ||
[ | [e]=K, | ||
[ | [c]=s, | ||
[ | [k]={ | ||
["clang/test/OpenMP/declare_simd_aarch64_sve.c"]={"clang/test/OpenMP/declare_simd_aarch64_sve.c:18:34: warning: The clause simdlen must fit the 64-bit lanes in the architectural constraints for SVE (min is 128-bit, max is 2048-bit, by steps of 128-bit)","clang/test/OpenMP/declare_simd_aarch64_sve.c:14:34: warning: The clause simdlen must fit the 64-bit lanes in the architectural constraints for SVE (min is 128-bit, max is 2048-bit, by steps of 128-bit)"} | ["clang/test/OpenMP/declare_simd_aarch64_sve.c"]={"clang/test/OpenMP/declare_simd_aarch64_sve.c:18:34: warning: The clause simdlen must fit the 64-bit lanes in the architectural constraints for SVE (min is 128-bit, max is 2048-bit, by steps of 128-bit)","clang/test/OpenMP/declare_simd_aarch64_sve.c:14:34: warning: The clause simdlen must fit the 64-bit lanes in the architectural constraints for SVE (min is 128-bit, max is 2048-bit, by steps of 128-bit)"} | ||
} | } | ||
}, | }, | ||
["warn_unofficial_converting_to_boxing_syntax_requires_casting"]={ | ["warn_unofficial_converting_to_boxing_syntax_requires_casting"]={ | ||
[b]="converting to boxing syntax requires casting %0 to %1", | [b]="converting to boxing syntax requires casting %0 to %1", | ||
[ | [d]=h, | ||
[ | [a]="converting to boxing syntax requires casting (.*?) to (.*?)", | ||
[ | [e]=K, | ||
[ | [c]=s | ||
}, | }, | ||
["warn_unofficial_mips_requires_arch"]={ | ["warn_unofficial_mips_requires_arch"]={ | ||
[b]="the \'%0\' ASE requires %1 revision %2 or greater", | [b]="the \'%0\' ASE requires %1 revision %2 or greater", | ||
[ | [d]=h, | ||
[ | [a]="the \'(.*?)\' ASE requires (.*?) revision (.*?) or greater", | ||
[ | [e]=K, | ||
[ | [c]=s, | ||
[ | [k]={ | ||
["clang/test/CodeGen/builtins-mips-msa.c"]={"warning: the \'msa\' ASE requires MIPS32 revision 5 or greater"} | ["clang/test/CodeGen/builtins-mips-msa.c"]={"warning: the \'msa\' ASE requires MIPS32 revision 5 or greater"} | ||
} | } | ||
}, | }, | ||
["warn_unofficial_trivial_auto_var_init_stop_after"]={ | ["warn_unofficial_trivial_auto_var_init_stop_after"]={ | ||
[b]="-ftrivial-auto-var-init-stop-after=%0 has been enabled to limit the number of times ftrivial-auto-var-init=%1 gets applied.", | [b]="-ftrivial-auto-var-init-stop-after=%0 has been enabled to limit the number of times ftrivial-auto-var-init=%1 gets applied.", | ||
[ | [d]=h, | ||
[ | [a]="\\-ftrivial\\-auto\\-var\\-init\\-stop\\-after\\=(.*?) has been enabled to limit the number of times ftrivial\\-auto\\-var\\-init\\=(.*?) gets applied\\.", | ||
[ | [e]=K, | ||
[ | [c]=s, | ||
[ | [k]={ | ||
["clang/test/CodeGenCXX/auto-var-init-stop-after.cpp"]={"warning: -ftrivial-auto-var-init-stop-after=5 has been enabled to limit the number of times ftrivial-auto-var-init=zero gets applied."} | ["clang/test/CodeGenCXX/auto-var-init-stop-after.cpp"]={"warning: -ftrivial-auto-var-init-stop-after=5 has been enabled to limit the number of times ftrivial-auto-var-init=zero gets applied."} | ||
} | } | ||
}, | }, | ||
["warn_unpacked_field"]={ | ["warn_unpacked_field"]={ | ||
[ | [i]={n,o,"packed","packed-non-pod"}, | ||
[j]="packed-non-pod", | |||
[ | |||
[b]="not packing field %0 as it is non-POD for the purposes of layout", | [b]="not packing field %0 as it is non-POD for the purposes of layout", | ||
[ | [d]=h, | ||
[ | [a]="not packing field (.*?) as it is non\\-POD for the purposes of layout", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wpacked\\-non\\-pod[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"ec273d3e3a8c",1643408541,"Add a warning for not packing non-POD members in packed structs\n\nDifferential Revision: https://revi...","Add a warning for not packing non-POD members in packed structs\n\nDifferential Revision: https://reviews.llvm.org/D118511"}, | ||
[ | [g]={{Zb,2137,"void ItaniumRecordLayoutBuilder::LayoutField(const FieldDecl *D, bool InsertExtraPadding) {\n // ...\n if (Packed && !FieldPacked && PackedFieldAlign < FieldAlign)\n Diag(D->getLocation(), diag::warn_unpacked_field) << D;"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp"]={"clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:163:15: warning: not packing field \'p1\' as it is non-POD for the purposes of layout [-Wpacked-non-pod]"} | ["clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp"]={"clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:163:15: warning: not packing field \'p1\' as it is non-POD for the purposes of layout [-Wpacked-non-pod]"} | ||
} | } | ||
}, | }, | ||
["warn_unqualified_call_to_std_cast_function"]={ | ["warn_unqualified_call_to_std_cast_function"]={ | ||
[ | [i]={"unqualified-std-cast-call"}, | ||
[j]="unqualified-std-cast-call", | |||
[ | |||
[b]="unqualified call to \'%0\'", | [b]="unqualified call to \'%0\'", | ||
[ | [d]=h, | ||
[ | [a]="unqualified call to \'(.*?)\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunqualified\\-std\\-cast\\-call[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls.\n\nThis adjusts the handlin...","[C++20][Modules] Adjust handling of exports of namespaces and using-decls.\n\nThis adjusts the handling for:\n\nexport module M;\n\nexport namespace {};\n\nexport namespace N {};\nexport using namespace N;\n\nIn the first case, we were allowing empty anonymous namespaces\nas part of an extension allowing empty top-level entities, but that seems\ninappropriate in this case, since the linkage would be internal for the\nanonymous namespace. We now report an error for this.\n\nThe second case was producing a warning diagnostic that this was\naccepted as an extension - however the C++20 standard does allow this\nas well-formed.\n\nIn the third case we keep the current practice that this is accepted with a\nwarning (as an extension). The C++20 standard says it\'s an error.\n\nWe also ensure that using decls are only applied to items with external linkage.\n\nThis adjusts error messages for exports involving redeclarations in modules to\nbe more specific about the reason that the decl has been rejected.\n\nDifferential Revision: https://reviews.llvm.org/D122119"}, | ||
[ | [g]={{u,7043,"// Once a call is fully resolved, warn for unqualified calls to specific\n// C++ standard functions, like move and forward.\nstatic void DiagnosedUnqualifiedCallsToStdFunctions(Sema &S, CallExpr *Call) {\n // ...\n S.Diag(DRE->getLocation(), diag::warn_unqualified_call_to_std_cast_function) << FD->getQualifiedNameAsString() << FixItHint::CreateInsertion(DRE->getLocation(), \"std::\");"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/unqualified-std-call.cpp"]={"clang/test/SemaCXX/unqualified-std-call.cpp:28:3: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:29:4: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:34:3: warning: unqualified call to \'std::forward\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:62:3: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:64:3: warning: unqualified call to \'std::forward\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:93:3: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:102:3: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:103:3: warning: unqualified call to \'std::forward\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:113:3: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:115:3: warning: unqualified call to \'std::forward\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:41:3: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:44:3: warning: unqualified call to \'std::forward\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:69:3: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:70:3: warning: unqualified call to \'std::forward\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:71:4: warning: unqualified call to \'std::forward\' [-Wunqualified-std-cast-call]"} | ["clang/test/SemaCXX/unqualified-std-call.cpp"]={"clang/test/SemaCXX/unqualified-std-call.cpp:28:3: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:29:4: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:34:3: warning: unqualified call to \'std::forward\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:62:3: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:64:3: warning: unqualified call to \'std::forward\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:93:3: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:102:3: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:103:3: warning: unqualified call to \'std::forward\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:113:3: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:115:3: warning: unqualified call to \'std::forward\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:41:3: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:44:3: warning: unqualified call to \'std::forward\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:69:3: warning: unqualified call to \'std::move\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:70:3: warning: unqualified call to \'std::forward\' [-Wunqualified-std-cast-call]","clang/test/SemaCXX/unqualified-std-call.cpp:71:4: warning: unqualified call to \'std::forward\' [-Wunqualified-std-cast-call]"} | ||
} | } | ||
}, | }, | ||
["warn_unreachable"]={ | ["warn_unreachable"]={ | ||
[ | [i]={Sc,xc}, | ||
[j]=Sc, | |||
[ | |||
[b]="code will never be executed", | [b]="code will never be executed", | ||
[ | [d]=h, | ||
[ | [a]="code will never be executed", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunreachable\\-code[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"1bacb81d6f61",1263351594,"Add an unreachable code checker.\n\nllvm-svn: 93287","Add an unreachable code checker.\n\nllvm-svn: 93287"}, | ||
[ | [g]={{y,94,"class UnreachableCodeHandler : public reachable_code::Callback {\n // ...\n void HandleUnreachable(reachable_code::UnreachableKind UK, SourceLocation L, SourceRange SilenceableCondVal, SourceRange R1, SourceRange R2, bool HasFallThroughAttr) override {\n // ...\n unsigned diag = diag::warn_unreachable;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-unreachable.mm"]={"clang/test/Sema/warn-unreachable.mm:10:7: warning: code will never be executed [-Wunreachable-code]"} | ["clang/test/Sema/warn-unreachable.mm"]={"clang/test/Sema/warn-unreachable.mm:10:7: warning: code will never be executed [-Wunreachable-code]"} | ||
} | } | ||
}, | }, | ||
["warn_unreachable_association"]={ | ["warn_unreachable_association"]={ | ||
[ | [i]={Sc,xc,"unreachable-code-generic-assoc"}, | ||
[j]="unreachable-code-generic-assoc", | |||
[ | |||
[b]="due to lvalue conversion of the controlling expression, association of type %0 will never be selected because it is %select{of array type|qualified}1", | [b]="due to lvalue conversion of the controlling expression, association of type %0 will never be selected because it is %select{of array type|qualified}1", | ||
[ | [d]=h, | ||
[ | [a]="due to lvalue conversion of the controlling expression, association of type (.*?) will never be selected because it is (?:of array type|qualified)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunreachable\\-code\\-generic\\-assoc[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={ad,1620530452,bd,cd}, | ||
[ | [g]={{u,1760,"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 if (ControllingExpr && Types[i]->getType()->isIncompleteType())\n // ...\n else if (ControllingExpr && !Types[i]->getType()->isObjectType())\n // ...\n else if (Types[i]->getType()->isVariablyModifiedType())\n // ...\n else if (ControllingExpr) {\n // ...\n if (Reason)\n Diag(Types[i]->getTypeLoc().getBeginLoc(), diag::warn_unreachable_association) << QT << (Reason - 1);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/generic-selection.cpp"]={"clang/test/SemaCXX/generic-selection.cpp:59:13: warning: due to lvalue conversion of the controlling expression, association of type \'const int\' will never be selected because it is qualified [-Wunreachable-code-generic-assoc]","clang/test/SemaCXX/generic-selection.cpp:60:16: warning: due to lvalue conversion of the controlling expression, association of type \'volatile int\' will never be selected because it is qualified [-Wunreachable-code-generic-assoc]","clang/test/SemaCXX/generic-selection.cpp:61:7: warning: due to lvalue conversion of the controlling expression, association of type \'int[12]\' will never be selected because it is of array type [-Wunreachable-code-generic-assoc]"} | ["clang/test/SemaCXX/generic-selection.cpp"]={"clang/test/SemaCXX/generic-selection.cpp:59:13: warning: due to lvalue conversion of the controlling expression, association of type \'const int\' will never be selected because it is qualified [-Wunreachable-code-generic-assoc]","clang/test/SemaCXX/generic-selection.cpp:60:16: warning: due to lvalue conversion of the controlling expression, association of type \'volatile int\' will never be selected because it is qualified [-Wunreachable-code-generic-assoc]","clang/test/SemaCXX/generic-selection.cpp:61:7: warning: due to lvalue conversion of the controlling expression, association of type \'int[12]\' will never be selected because it is of array type [-Wunreachable-code-generic-assoc]"} | ||
} | } | ||
}, | }, | ||
["warn_unreachable_break"]={ | ["warn_unreachable_break"]={ | ||
[ | [i]={xc,"unreachable-code-break"}, | ||
[j]="unreachable-code-break", | |||
[ | |||
[b]="\'break\' will never be executed", | [b]="\'break\' will never be executed", | ||
[ | [d]=h, | ||
[ | [a]="\'break\' will never be executed", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunreachable\\-code\\-break[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"1a8641c1e772",1394846792,"Start breaking -Wunreachable-code up into different diagnostic groups.\n\nRecent work on -Wunreachable...","Start breaking -Wunreachable-code up into different diagnostic groups.\n\nRecent work on -Wunreachable-code has focused on suppressing uninteresting\nunreachable code that center around \"configuration values\", but\nthere are still some set of cases that are sometimes interesting\nor uninteresting depending on the codebase. For example, a dead\n\"break\" statement may not be interesting for a particular codebase,\npotentially because it is auto-generated or simply because code\nis written defensively.\n\nTo address these workflow differences, -Wunreachable-code is now\nbroken into several diagnostic groups:\n\n-Wunreachable-code: intended to be a reasonable \"default\" for\nmost users.\n\nand then other groups that turn on more aggressive checking:\n\n-Wunreachable-code-break: warn about dead break statements\n\n-Wunreachable-code-trivial-return: warn about dead return statements\nthat return \"trivial\" values (e.g., return 0). Other return\nstatements that return non-trivial values are still reported\nunder -Wunreachable-code (this is an area subject to more refinement).\n\n-Wunreachable-code-aggressive: supergroup that enables all these\ngroups.\n\nThe goal is to eventually make -Wunreachable-code good enough to\neither be in -Wall or on-by-default, thus finessing these warnings\ninto different groups helps achieve maximum signal for more users.\n\nTODO: the tests need to be updated to reflect this extra control\nvia diagnostic flags.\n\nllvm-svn: 203994"}, | ||
[ | [g]={{y,97,"class UnreachableCodeHandler : public reachable_code::Callback {\n // ...\n void HandleUnreachable(reachable_code::UnreachableKind UK, SourceLocation L, SourceRange SilenceableCondVal, SourceRange R1, SourceRange R2, bool HasFallThroughAttr) override {\n // ...\n case reachable_code::UK_Break:\n diag = diag::warn_unreachable_break;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-unreachable.c"]={"clang/test/Sema/warn-unreachable.c:165:7: warning: \'break\' will never be executed [-Wunreachable-code-break]","clang/test/Sema/warn-unreachable.c:162:7: warning: \'break\' will never be executed [-Wunreachable-code-break]","clang/test/Sema/warn-unreachable.c:158:7: warning: \'break\' will never be executed [-Wunreachable-code-break]","clang/test/Sema/warn-unreachable.c:155:7: warning: \'break\' will never be executed [-Wunreachable-code-break]"} | ["clang/test/Sema/warn-unreachable.c"]={"clang/test/Sema/warn-unreachable.c:165:7: warning: \'break\' will never be executed [-Wunreachable-code-break]","clang/test/Sema/warn-unreachable.c:162:7: warning: \'break\' will never be executed [-Wunreachable-code-break]","clang/test/Sema/warn-unreachable.c:158:7: warning: \'break\' will never be executed [-Wunreachable-code-break]","clang/test/Sema/warn-unreachable.c:155:7: warning: \'break\' will never be executed [-Wunreachable-code-break]"} | ||
} | } | ||
}, | }, | ||
["warn_unreachable_default"]={ | ["warn_unreachable_default"]={ | ||
[ | [i]={"covered-switch-default"}, | ||
[j]="covered-switch-default", | |||
[ | |||
[b]="default label in switch which covers all enumeration values", | [b]="default label in switch which covers all enumeration values", | ||
[ | [d]=h, | ||
[ | [a]="default label in switch which covers all enumeration values", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wcovered\\-switch\\-default[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"645ae0ce10cb",1327169527,"Add -Wswitch-enum-redundant-default.\n\nThis warning acts as the complement to the main -Wswitch-enum ...","Add -Wswitch-enum-redundant-default.\n\nThis warning acts as the complement to the main -Wswitch-enum warning (which\nwarns whenever a switch over enum without a default doesn\'t cover all values of\n the enum) & has been an an-doc coding convention in LLVM and Clang in my\nexperience. The purpose is to ensure there\'s never a \"dead\" default in a\nswitch-over-enum because this would hide future -Wswitch-enum errors.\n\nThe name warning has a separate flag name so it can be disabled but it\'s grouped\nunder -Wswitch-enum & is on-by-default because of this.\n\nThe existing violations of this rule in test cases have had the warning disabled\n& I\'ve added a specific test for the new behavior (many negative cases already\nexist in the same test file - and none regressed - so I didn\'t add more).\n\nReviewed by Ted Kremenek ( http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120116/051690.html )\n\nllvm-svn: 148640"}, | ||
[ | [g]={{M,1599,"StmtResult Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *BodyStmt) {\n // ...\n if (!HasDependentValue) {\n // ...\n // If switch has default case, then ignore it.\n if (!CaseListIsErroneous && !CaseListIsIncomplete && !HasConstantCond && ET && ET->getDecl()->isCompleteDefinition() && !ET->getDecl()->enumerators().empty()) {\n // ...\n if (TheDefaultStmt && UnhandledNames.empty() && ED->isClosedNonFlag())\n Diag(TheDefaultStmt->getDefaultLoc(), diag::warn_unreachable_default);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/enum-attr.cpp"]={"clang/test/SemaCXX/enum-attr.cpp:38:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]","clang/test/SemaCXX/enum-attr.cpp:51:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]"} | ["clang/test/SemaCXX/enum-attr.cpp"]={"clang/test/SemaCXX/enum-attr.cpp:38:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]","clang/test/SemaCXX/enum-attr.cpp:51:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]"} | ||
} | } | ||
}, | }, | ||
["warn_unreachable_fallthrough_attr"]={ | ["warn_unreachable_fallthrough_attr"]={ | ||
[ | [i]={Sc,xc,"unreachable-code-fallthrough"}, | ||
[j]="unreachable-code-fallthrough", | |||
[ | |||
[b]="fallthrough annotation in unreachable code", | [b]="fallthrough annotation in unreachable code", | ||
[ | [d]=h, | ||
[ | [a]="fallthrough annotation in unreachable code", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunreachable\\-code\\-fallthrough[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={Xb,1615397021,Ub,Rb}, | ||
[ | [g]={{y,82,"class UnreachableCodeHandler : public reachable_code::Callback {\n // ...\n void HandleUnreachable(reachable_code::UnreachableKind UK, SourceLocation L, SourceRange SilenceableCondVal, SourceRange R1, SourceRange R2, bool HasFallThroughAttr) override {\n // ...\n if (HasFallThroughAttr && !S.getDiagnostics().isIgnored(diag::warn_unreachable_fallthrough_attr, SourceLocation()))"},{y,1140,"class FallthroughMapper : public RecursiveASTVisitor<FallthroughMapper> {\n // ...\n bool checkFallThroughIntoBlock(const CFGBlock &B, int &AnnotatedCnt, bool IsTemplateInstantiation) {\n // ...\n while (!BlockQueue.empty()) {\n // ...\n if (!ReachableBlocks.count(P)) {\n for (const CFGElement &Elem : llvm::reverse(*P)) {\n if (std::optional<CFGStmt> CS = Elem.getAs<CFGStmt>()) {\n if (const AttributedStmt *AS = asFallThroughAttr(CS->getStmt())) {\n // Don\'t issue a warning for an unreachable fallthrough\n // attribute in template instantiations as it may not be\n // unreachable in all instantiations of the template.\n if (!IsTemplateInstantiation)\n S.Diag(AS->getBeginLoc(), diag::warn_unreachable_fallthrough_attr);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/switch-implicit-fallthrough.cpp"]={"clang/test/SemaCXX/switch-implicit-fallthrough.cpp:187:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]","clang/test/SemaCXX/switch-implicit-fallthrough.cpp:190:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]","clang/test/SemaCXX/switch-implicit-fallthrough.cpp:193:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]","clang/test/SemaCXX/switch-implicit-fallthrough.cpp:311:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]"} | ["clang/test/SemaCXX/switch-implicit-fallthrough.cpp"]={"clang/test/SemaCXX/switch-implicit-fallthrough.cpp:187:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]","clang/test/SemaCXX/switch-implicit-fallthrough.cpp:190:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]","clang/test/SemaCXX/switch-implicit-fallthrough.cpp:193:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]","clang/test/SemaCXX/switch-implicit-fallthrough.cpp:311:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]"} | ||
} | } | ||
}, | }, | ||
["warn_unreachable_loop_increment"]={ | ["warn_unreachable_loop_increment"]={ | ||
[ | [i]={Sc,xc,"unreachable-code-loop-increment"}, | ||
[j]="unreachable-code-loop-increment", | |||
[ | |||
[b]="loop will run at most once (loop increment never executed)", | [b]="loop will run at most once (loop increment never executed)", | ||
[ | [d]=h, | ||
[ | [a]="loop will run at most once \\(loop increment never executed\\)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunreachable\\-code\\-loop\\-increment[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"1421037ece1f",1395381756,"[-Wunreachable-code] add a specialized diagnostic for unreachable increment expressions of loops.\n\nl...","[-Wunreachable-code] add a specialized diagnostic for unreachable increment expressions of loops.\n\nllvm-svn: 204430"}, | ||
[ | [g]={{y,103,"class UnreachableCodeHandler : public reachable_code::Callback {\n // ...\n void HandleUnreachable(reachable_code::UnreachableKind UK, SourceLocation L, SourceRange SilenceableCondVal, SourceRange R1, SourceRange R2, bool HasFallThroughAttr) override {\n // ...\n case reachable_code::UK_Loop_Increment:\n diag = diag::warn_unreachable_loop_increment;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/unreachable-code.cpp"]={"clang/test/SemaCXX/unreachable-code.cpp:8:8: warning: loop will run at most once (loop increment never executed) [-Wunreachable-code-loop-increment]","clang/test/SemaCXX/unreachable-code.cpp:20:8: warning: loop will run at most once (loop increment never executed) [-Wunreachable-code-loop-increment]"} | ["clang/test/SemaCXX/unreachable-code.cpp"]={"clang/test/SemaCXX/unreachable-code.cpp:8:8: warning: loop will run at most once (loop increment never executed) [-Wunreachable-code-loop-increment]","clang/test/SemaCXX/unreachable-code.cpp:20:8: warning: loop will run at most once (loop increment never executed) [-Wunreachable-code-loop-increment]"} | ||
} | } | ||
}, | }, | ||
["warn_unreachable_return"]={ | ["warn_unreachable_return"]={ | ||
[ | [i]={xc,"unreachable-code-return"}, | ||
[j]="unreachable-code-return", | |||
[ | |||
[b]="\'return\' will never be executed", | [b]="\'return\' will never be executed", | ||
[ | [d]=h, | ||
[ | [a]="\'return\' will never be executed", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunreachable\\-code\\-return[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"ad8753c00eac",1394862426,"Further refine -Wunreachable-code groups so that -Wno-unreachable-code-break doesn\'t turn off all un...","Further refine -Wunreachable-code groups so that -Wno-unreachable-code-break doesn\'t turn off all unreachable code warnings.\n\nAlso relax unreachable \'break\' and \'return\' to not check for being\npreceded by a call to \'noreturn\'. That turns out to not be so\ninteresting in practice.\n\nllvm-svn: 204000"}, | ||
[ | [g]={{y,100,"class UnreachableCodeHandler : public reachable_code::Callback {\n // ...\n void HandleUnreachable(reachable_code::UnreachableKind UK, SourceLocation L, SourceRange SilenceableCondVal, SourceRange R1, SourceRange R2, bool HasFallThroughAttr) override {\n // ...\n case reachable_code::UK_Return:\n diag = diag::warn_unreachable_return;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/warn-unreachable.m"]={"clang/test/SemaObjC/warn-unreachable.m:15:3: warning: \'return\' will never be executed [-Wunreachable-code-return]","clang/test/SemaObjC/warn-unreachable.m:25:12: warning: \'return\' will never be executed [-Wunreachable-code-return]","clang/test/SemaObjC/warn-unreachable.m:34:12: warning: \'return\' will never be executed [-Wunreachable-code-return]"} | ["clang/test/SemaObjC/warn-unreachable.m"]={"clang/test/SemaObjC/warn-unreachable.m:15:3: warning: \'return\' will never be executed [-Wunreachable-code-return]","clang/test/SemaObjC/warn-unreachable.m:25:12: warning: \'return\' will never be executed [-Wunreachable-code-return]","clang/test/SemaObjC/warn-unreachable.m:34:12: warning: \'return\' will never be executed [-Wunreachable-code-return]"} | ||
} | } | ||
}, | }, | ||
["warn_unsafe_buffer_operation"]={ | ["warn_unsafe_buffer_operation"]={ | ||
[ | [i]={"unsafe-buffer-usage"}, | ||
[j]="unsafe-buffer-usage", | |||
[ | |||
[b]="%select{unsafe pointer operation|unsafe pointer arithmetic|unsafe buffer access|function introduces unsafe buffer manipulation}0", | [b]="%select{unsafe pointer operation|unsafe pointer arithmetic|unsafe buffer access|function introduces unsafe buffer manipulation}0", | ||
[ | [d]=h, | ||
[ | [a]="(?:unsafe pointer operation|unsafe pointer arithmetic|unsafe buffer access|function introduces unsafe buffer manipulation)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunsafe\\-buffer\\-usage[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={lb,1625925174,mb,nb}, | ||
[ | [g]={{y,2215,"class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler {\n // ...\n void handleUnsafeOperation(const Stmt *Operation, bool IsRelatedToDecl) override {\n // ...\n if (IsRelatedToDecl) {\n // ...\n } else {\n S.Diag(Loc, diag::warn_unsafe_buffer_operation) << MsgParam << Range;"},{y,2447,"void clang::sema::AnalysisBasedWarnings::IssueWarnings(TranslationUnitDecl *TU) {\n // ...\n // The Callback function that performs analyses:\n auto CallAnalyzers = [&](const Decl *Node) -> void {\n // ...\n if (!Diags.isIgnored(diag::warn_unsafe_buffer_operation, Node->getBeginLoc()) || !Diags.isIgnored(diag::warn_unsafe_buffer_variable, Node->getBeginLoc())) {"},{y,2459,"void clang::sema::AnalysisBasedWarnings::IssueWarnings(TranslationUnitDecl *TU) {\n // ...\n if (!Diags.isIgnored(diag::warn_unsafe_buffer_operation, SourceLocation()) || !Diags.isIgnored(diag::warn_unsafe_buffer_variable, SourceLocation())) {"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-unsafe-buffer-usage-c-linkage.cpp"]={"clang/test/SemaCXX/warn-unsafe-buffer-usage-c-linkage.cpp:5:3: warning: unsafe buffer access [-Wunsafe-buffer-usage]","clang/test/SemaCXX/warn-unsafe-buffer-usage-c-linkage.cpp:16:3: warning: unsafe buffer access [-Wunsafe-buffer-usage]","clang/test/SemaCXX/warn-unsafe-buffer-usage-c-linkage.cpp:22:3: warning: unsafe buffer access [-Wunsafe-buffer-usage]"} | ["clang/test/SemaCXX/warn-unsafe-buffer-usage-c-linkage.cpp"]={"clang/test/SemaCXX/warn-unsafe-buffer-usage-c-linkage.cpp:5:3: warning: unsafe buffer access [-Wunsafe-buffer-usage]","clang/test/SemaCXX/warn-unsafe-buffer-usage-c-linkage.cpp:16:3: warning: unsafe buffer access [-Wunsafe-buffer-usage]","clang/test/SemaCXX/warn-unsafe-buffer-usage-c-linkage.cpp:22:3: warning: unsafe buffer access [-Wunsafe-buffer-usage]"} | ||
} | } | ||
}, | }, | ||
["warn_unsafe_buffer_variable"]={ | ["warn_unsafe_buffer_variable"]={ | ||
[ | [i]={"unsafe-buffer-usage"}, | ||
[j]="unsafe-buffer-usage", | |||
[ | |||
[b]="%0 is an %select{unsafe pointer used for buffer access|unsafe buffer that does not perform bounds checks}1", | [b]="%0 is an %select{unsafe pointer used for buffer access|unsafe buffer that does not perform bounds checks}1", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) is an (?:unsafe pointer used for buffer access|unsafe buffer that does not perform bounds checks)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunsafe\\-buffer\\-usage[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={lb,1625925174,mb,nb}, | ||
[ | [g]={{y,2227,"class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler {\n // ...\n void handleUnsafeVariableGroup(const VarDecl *Variable, const DefMapTy &VarGrpMap, FixItList &&Fixes) override {\n // ...\n S.Diag(Variable->getLocation(), diag::warn_unsafe_buffer_variable) << Variable << (Variable->getType()->isPointerType() ? 0 : 1) << Variable->getSourceRange();"},{y,2449,"void clang::sema::AnalysisBasedWarnings::IssueWarnings(TranslationUnitDecl *TU) {\n // ...\n // The Callback function that performs analyses:\n auto CallAnalyzers = [&](const Decl *Node) -> void {\n // ...\n if (!Diags.isIgnored(diag::warn_unsafe_buffer_operation, Node->getBeginLoc()) || !Diags.isIgnored(diag::warn_unsafe_buffer_variable, Node->getBeginLoc())) {"},{y,2460,"void clang::sema::AnalysisBasedWarnings::IssueWarnings(TranslationUnitDecl *TU) {\n // ...\n if (!Diags.isIgnored(diag::warn_unsafe_buffer_operation, SourceLocation()) || !Diags.isIgnored(diag::warn_unsafe_buffer_variable, SourceLocation())) {"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp"]={"clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:6:9: warning: \'ptr\' is an unsafe pointer used for buffer access [-Wunsafe-buffer-usage]","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:12:7: warning: \'array\' is an unsafe buffer that does not perform bounds checks [-Wunsafe-buffer-usage]","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:18:7: warning: \'ptr\' is an unsafe pointer used for buffer access [-Wunsafe-buffer-usage]","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:24:5: warning: \'array\' is an unsafe buffer that does not perform bounds checks [-Wunsafe-buffer-usage]","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:31:37: warning: \'ptr\' is an unsafe pointer used for buffer access [-Wunsafe-buffer-usage]","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:38:37: warning: \'array\' is an unsafe pointer used for buffer access [-Wunsafe-buffer-usage]","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:87:16: warning: \'ptr\' is an unsafe pointer used for buffer access [-Wunsafe-buffer-usage]","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:96:14: warning: \'array\' is an unsafe buffer that does not perform bounds checks [-Wunsafe-buffer-usage]"} | ["clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp"]={"clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:6:9: warning: \'ptr\' is an unsafe pointer used for buffer access [-Wunsafe-buffer-usage]","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:12:7: warning: \'array\' is an unsafe buffer that does not perform bounds checks [-Wunsafe-buffer-usage]","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:18:7: warning: \'ptr\' is an unsafe pointer used for buffer access [-Wunsafe-buffer-usage]","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:24:5: warning: \'array\' is an unsafe buffer that does not perform bounds checks [-Wunsafe-buffer-usage]","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:31:37: warning: \'ptr\' is an unsafe pointer used for buffer access [-Wunsafe-buffer-usage]","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:38:37: warning: \'array\' is an unsafe pointer used for buffer access [-Wunsafe-buffer-usage]","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:87:16: warning: \'ptr\' is an unsafe pointer used for buffer access [-Wunsafe-buffer-usage]","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:96:14: warning: \'array\' is an unsafe buffer that does not perform bounds checks [-Wunsafe-buffer-usage]"} | ||
} | } | ||
}, | }, | ||
["warn_unsequenced_mod_mod"]={ | ["warn_unsequenced_mod_mod"]={ | ||
[ | [i]={"sequence-point","unsequenced"}, | ||
[j]="unsequenced", | |||
[ | |||
[b]="multiple unsequenced modifications to %0", | [b]="multiple unsequenced modifications to %0", | ||
[ | [d]=h, | ||
[ | [a]="multiple unsequenced modifications to (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunsequenced[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"c406cb736484",1358385476,"Add -Wunsequenced (with compatibility alias -Wsequence-point) to warn on\nexpressions which have unde...","Add -Wunsequenced (with compatibility alias -Wsequence-point) to warn on\nexpressions which have undefined behavior due to multiple unsequenced\nmodifications or an unsequenced modification and use of a variable.\n\nllvm-svn: 172690"}, | ||
[ | [g]={{r,15948,"/// Visitor for expressions which looks for unsequenced operations on the\n/// same object.\nclass SequenceChecker : public ConstEvaluatedExprVisitor<SequenceChecker> {\n // ...\n /// Check whether a modification or use of an object \\p O in an expression\n /// \\p UsageExpr conflicts with a prior usage of kind \\p OtherKind. \\p UI is\n /// the \\p UsageInfo for the object \\p O as obtained via the \\p UsageMap.\n /// \\p IsModMod is true when we are checking for a mod-mod unsequenced\n /// usage and false we are checking for a mod-use unsequenced usage.\n void checkUsage(Object O, UsageInfo &UI, const Expr *UsageExpr, UsageKind OtherKind, bool IsModMod) {\n // ...\n SemaRef.DiagRuntimeBehavior(Mod->getExprLoc(), {Mod, ModOrUse}, SemaRef.PDiag(IsModMod ? diag::warn_unsequenced_mod_mod : diag::warn_unsequenced_mod_use) << O << SourceRange(ModOrUse->getExprLoc()));"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-unsequenced.c"]={"clang/test/Sema/warn-unsequenced.c:13:7: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:15:8: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:17:3: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:18:4: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:19:10: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:20:11: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:21:13: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:22:13: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:23:14: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:27:7: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:30:9: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:32:3: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:33:5: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:34:4: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:35:6: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:37:7: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:40:15: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:80:13: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:84:11: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:85:15: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:88:13: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:89:13: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:93:21: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]"} | ["clang/test/Sema/warn-unsequenced.c"]={"clang/test/Sema/warn-unsequenced.c:13:7: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:15:8: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:17:3: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:18:4: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:19:10: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:20:11: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:21:13: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:22:13: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:23:14: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:27:7: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:30:9: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:32:3: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:33:5: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:34:4: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:35:6: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:37:7: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:40:15: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:80:13: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:84:11: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:85:15: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:88:13: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:89:13: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:93:21: warning: multiple unsequenced modifications to \'a\' [-Wunsequenced]"} | ||
} | } | ||
}, | }, | ||
["warn_unsequenced_mod_use"]={ | ["warn_unsequenced_mod_use"]={ | ||
[ | [i]={"sequence-point","unsequenced"}, | ||
[j]="unsequenced", | |||
[ | |||
[b]="unsequenced modification and access to %0", | [b]="unsequenced modification and access to %0", | ||
[ | [d]=h, | ||
[ | [a]="unsequenced modification and access to (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunsequenced[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"c406cb736484",1358385476,"Add -Wunsequenced (with compatibility alias -Wsequence-point) to warn on\nexpressions which have unde...","Add -Wunsequenced (with compatibility alias -Wsequence-point) to warn on\nexpressions which have undefined behavior due to multiple unsequenced\nmodifications or an unsequenced modification and use of a variable.\n\nllvm-svn: 172690"}, | ||
[ | [g]={{r,15949,"/// Visitor for expressions which looks for unsequenced operations on the\n/// same object.\nclass SequenceChecker : public ConstEvaluatedExprVisitor<SequenceChecker> {\n // ...\n /// Check whether a modification or use of an object \\p O in an expression\n /// \\p UsageExpr conflicts with a prior usage of kind \\p OtherKind. \\p UI is\n /// the \\p UsageInfo for the object \\p O as obtained via the \\p UsageMap.\n /// \\p IsModMod is true when we are checking for a mod-mod unsequenced\n /// usage and false we are checking for a mod-use unsequenced usage.\n void checkUsage(Object O, UsageInfo &UI, const Expr *UsageExpr, UsageKind OtherKind, bool IsModMod) {\n // ...\n SemaRef.DiagRuntimeBehavior(Mod->getExprLoc(), {Mod, ModOrUse}, SemaRef.PDiag(IsModMod ? diag::warn_unsequenced_mod_mod : diag::warn_unsequenced_mod_use) << O << SourceRange(ModOrUse->getExprLoc()));"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-unsequenced.c"]={"clang/test/Sema/warn-unsequenced.c:12:7: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:14:8: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:25:7: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:26:10: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:38:8: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:41:15: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:43:16: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:45:12: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:47:16: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:48:12: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:51:16: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:52:12: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:54:18: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:56:4: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:60:10: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:67:6: warning: unsequenced modification and access to \'q\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:77:10: warning: unsequenced modification and access to \'a\' [-Wunsequenced]"} | ["clang/test/Sema/warn-unsequenced.c"]={"clang/test/Sema/warn-unsequenced.c:12:7: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:14:8: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:25:7: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:26:10: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:38:8: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:41:15: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:43:16: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:45:12: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:47:16: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:48:12: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:51:16: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:52:12: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:54:18: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:56:4: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:60:10: warning: unsequenced modification and access to \'a\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:67:6: warning: unsequenced modification and access to \'q\' [-Wunsequenced]","clang/test/Sema/warn-unsequenced.c:77:10: warning: unsequenced modification and access to \'a\' [-Wunsequenced]"} | ||
} | } | ||
}, | }, | ||
["warn_unsigned_abs"]={ | ["warn_unsigned_abs"]={ | ||
[ | [i]={Lc}, | ||
[j]=Lc, | |||
[ | |||
[b]="taking the absolute value of unsigned type %0 has no effect", | [b]="taking the absolute value of unsigned type %0 has no effect", | ||
[ | [d]=h, | ||
[ | [a]="taking the absolute value of unsigned type (.*?) has no effect", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wabsolute\\-value[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"7eb0b2c1819c",1393377448,"Add -Wabsolute-value, warnings about absolute value functions.\n\nThe warnings fall into three groups....","Add -Wabsolute-value, warnings about absolute value functions.\n\nThe warnings fall into three groups.\n1) Using an absolute value function of the wrong type, for instance, using the\nint absolute value function when the argument is a floating point type.\n2) Using the improper sized absolute value function, for instance, using abs\nwhen the argument is a long long. llabs should be used instead.\n\nFrom these two cases, an implicit conversion will occur which may cause\nunexpected behavior. Where possible, suggest the proper absolute value\nfunction to use, and which header to include if the function is not available.\n\n3) Taking the absolute value of an unsigned value. In addition to this warning,\nsuggest to remove the function call. This usually indicates a logic error\nsince the programmer assumed negative values would have been possible.\n\nllvm-svn: 202211"}, | ||
[ | [g]={{r,12025,"// Warn when using the wrong abs() function.\nvoid Sema::CheckAbsoluteValueFunction(const CallExpr *Call, const FunctionDecl *FDecl) {\n // ...\n // Unsigned types cannot be negative. Suggest removing the absolute value\n // function call.\n if (ArgType->isUnsignedIntegerType()) {\n // ...\n Diag(Call->getExprLoc(), diag::warn_unsigned_abs) << ArgType << ParamType;"},{"clang/utils/TableGen/ClangDiagnosticsEmitter.cpp",1410,"/// diag::warn_unsigned_abs,"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-absolute-value-header.c"]={"clang/test/Sema/warn-absolute-value-header.c:15:9: warning: taking the absolute value of unsigned type \'unsigned int\' has no effect [-Wabsolute-value]"} | ["clang/test/Sema/warn-absolute-value-header.c"]={"clang/test/Sema/warn-absolute-value-header.c:15:9: warning: taking the absolute value of unsigned type \'unsigned int\' has no effect [-Wabsolute-value]"} | ||
} | } | ||
}, | }, | ||
["warn_unsigned_always_true_comparison"]={ | ["warn_unsigned_always_true_comparison"]={ | ||
[ | [i]={Zc,"tautological-unsigned-zero-compare","type-limits"}, | ||
[j]="tautological-unsigned-zero-compare", | |||
[ | |||
[b]="result of comparison of %select{%3|unsigned expression}0 %2 %select{unsigned expression|%3}0 is always %4", | [b]="result of comparison of %select{%3|unsigned expression}0 %2 %select{unsigned expression|%3}0 is always %4", | ||
[ | [d]=h, | ||
[ | [a]="result of comparison of (?:(.*?)|unsigned expression) (.*?) (?:unsigned expression|(.*?)) is always (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtautological\\-unsigned\\-zero\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"bd1fc22043b7",1507839411,"[Sema] Diagnose tautological comparison with type\'s min/max values\n\nSummary:\nCurrently, clang only d...","[Sema] Diagnose tautological comparison with type\'s min/max values\n\nSummary:\nCurrently, clang only diagnoses completely out-of-range comparisons (e.g. `char` and constant `300`),\nand comparisons of unsigned and `0`. But gcc also does diagnose the comparisons with the\n`std::numeric_limits<>::max()` / `std::numeric_limits<>::min()` so to speak\n\nFinally Fixes https://bugs.llvm.org/show_bug.cgi?id=34147\nContinuation of https://reviews.llvm.org/D37565\n\nReviewers: rjmccall, rsmith, aaron.ballman\n\nReviewed By: rsmith\n\nSubscribers: rtrieu, jroelofs, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D38101\n\nllvm-svn: 315614"}, | ||
[ | [g]={{r,13890,"static bool CheckTautologicalComparison(Sema &S, BinaryOperator *E, Expr *Constant, Expr *Other, const llvm::APSInt &Value, bool RhsConstant) {\n // ...\n // FIXME: We use a somewhat different formatting for the in-range cases and\n // cases involving boolean values for historical reasons. We should pick a\n // consistent way of presenting these diagnostics.\n if (!InRange || Other->isKnownToHaveBooleanValue()) {\n // ...\n } else {\n // ...\n unsigned Diag = (isKnownToHaveUnsignedValue(OriginalOther) && Value == 0) ? (HasEnumType(OriginalOther) ? diag::warn_unsigned_enum_always_true_comparison : IsCharTy ? diag::warn_unsigned_char_always_true_comparison : diag::warn_unsigned_always_true_comparison) : diag::warn_tautological_constant_compare;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/compare.c"]={"clang/test/Sema/compare.c:90:19: warning: result of comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:89:20: warning: result of comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:81:13: warning: result of comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:285:11: warning: result of comparison of 0 <= unsigned expression is always true [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:284:11: warning: result of comparison of unsigned expression >= 0 is always true [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:283:11: warning: result of comparison of 0 > unsigned expression is always false [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:282:13: warning: result of comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:297:11: warning: result of comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:299:11: warning: result of comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]"} | ["clang/test/Sema/compare.c"]={"clang/test/Sema/compare.c:90:19: warning: result of comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:89:20: warning: result of comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:81:13: warning: result of comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:285:11: warning: result of comparison of 0 <= unsigned expression is always true [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:284:11: warning: result of comparison of unsigned expression >= 0 is always true [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:283:11: warning: result of comparison of 0 > unsigned expression is always false [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:282:13: warning: result of comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:297:11: warning: result of comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]","clang/test/Sema/compare.c:299:11: warning: result of comparison of unsigned expression < 0 is always false [-Wtautological-unsigned-zero-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_unsigned_bitfield_assigned_signed_enum"]={ | ["warn_unsigned_bitfield_assigned_signed_enum"]={ | ||
[ | [i]={"bitfield-enum-conversion",Ab,Pb}, | ||
[j]="bitfield-enum-conversion", | |||
[ | |||
[b]="assigning value of signed enum type %1 to unsigned bit-field %0; negative enumerators of enum %1 will be converted to positive values", | [b]="assigning value of signed enum type %1 to unsigned bit-field %0; negative enumerators of enum %1 will be converted to positive values", | ||
[ | [d]=h, | ||
[ | [a]="assigning value of signed enum type (.*?) to unsigned bit\\-field (.*?); negative enumerators of enum (.*?) will be converted to positive values", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wbitfield\\-enum\\-conversion[^\\]]*\\]", | ||
[ | [c]=Wb, | ||
[ | [f]={"329f24d6f6e7",1489514462,"Warn on enum assignment to bitfields that can\'t fit all values\n\nThis adds -Wbitfield-enum-conversion...","Warn on enum assignment to bitfields that can\'t fit all values\n\nThis adds -Wbitfield-enum-conversion, which warns on implicit\nconversions that happen on bitfield assignment that change the value of\nsome enumerators.\n\nValues of enum type typically take on a very small range of values, so\nthey are frequently stored in bitfields. Unfortunately, there is no\nconvenient way to calculate the minimum number of bits necessary to\nstore all possible values at compile time, so users usually hard code a\nbitwidth that works today and widen it as necessary to pass basic\ntesting and validation. This is very error-prone, and leads to stale\nwidths as enums grow. This warning aims to catch such bugs.\n\nThis would have found two real bugs in clang and two instances of\nquestionable code. See r297680 and r297654 for the full description of\nthe issues.\n\nThis warning is currently disabled by default while we investigate its\nusefulness outside of LLVM.\n\nThe major cause of false positives with this warning is this kind of\nenum:\n enum E { W, X, Y, Z, SENTINEL_LAST };\nThe last enumerator is an invalid value used to validate inputs or size\nan array. Depending on the prevalance of this style of enum across a\ncodebase, this warning may be more or less feasible to deploy. It also\nhas trouble on sentinel values such as ~0U.\n\nReviewers: rsmith, rtrieu, thakis\n\nReviewed By: thakis\n\nSubscribers: hfinkel, voskresensky.vladimir, sashab, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D30923\n\nllvm-svn: 297761"}, | ||
[ | [g]={{r,14084,"/// 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 (SignedEnum && !SignedBitfield) {\n DiagID = diag::warn_unsigned_bitfield_assigned_signed_enum;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp"]={"clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:27:14: warning: assigning value of signed enum type \'TwoBitsSigned\' to unsigned bit-field \'two_bits\'; negative enumerators of enum \'TwoBitsSigned\' will be converted to positive values [-Wbitfield-enum-conversion]","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:29:14: warning: assigning value of signed enum type \'ThreeBitsSigned\' to unsigned bit-field \'two_bits\'; negative enumerators of enum \'ThreeBitsSigned\' will be converted to positive values [-Wbitfield-enum-conversion]","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:38:16: warning: assigning value of signed enum type \'TwoBitsSigned\' to unsigned bit-field \'three_bits\'; negative enumerators of enum \'TwoBitsSigned\' will be converted to positive values [-Wbitfield-enum-conversion]","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:40:16: warning: assigning value of signed enum type \'ThreeBitsSigned\' to unsigned bit-field \'three_bits\'; negative enumerators of enum \'ThreeBitsSigned\' will be converted to positive values [-Wbitfield-enum-conversion]"} | ["clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp"]={"clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:27:14: warning: assigning value of signed enum type \'TwoBitsSigned\' to unsigned bit-field \'two_bits\'; negative enumerators of enum \'TwoBitsSigned\' will be converted to positive values [-Wbitfield-enum-conversion]","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:29:14: warning: assigning value of signed enum type \'ThreeBitsSigned\' to unsigned bit-field \'two_bits\'; negative enumerators of enum \'ThreeBitsSigned\' will be converted to positive values [-Wbitfield-enum-conversion]","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:38:16: warning: assigning value of signed enum type \'TwoBitsSigned\' to unsigned bit-field \'three_bits\'; negative enumerators of enum \'TwoBitsSigned\' will be converted to positive values [-Wbitfield-enum-conversion]","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:40:16: warning: assigning value of signed enum type \'ThreeBitsSigned\' to unsigned bit-field \'three_bits\'; negative enumerators of enum \'ThreeBitsSigned\' will be converted to positive values [-Wbitfield-enum-conversion]"} | ||
} | } | ||
}, | }, | ||
["warn_unsigned_char_always_true_comparison"]={ | ["warn_unsigned_char_always_true_comparison"]={ | ||
[ | [i]={Zc,"tautological-unsigned-char-zero-compare","type-limits"}, | ||
[j]="tautological-unsigned-char-zero-compare", | |||
[ | |||
[b]="result of comparison of %select{%3|char expression}0 %2 %select{char expression|%3}0 is always %4, since char is interpreted as unsigned", | [b]="result of comparison of %select{%3|char expression}0 %2 %select{char expression|%3}0 is always %4, since char is interpreted as unsigned", | ||
[ | [d]=h, | ||
[ | [a]="result of comparison of (?:(.*?)|char expression) (.*?) (?:char expression|(.*?)) is always (.*?), since char is interpreted as unsigned", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtautological\\-unsigned\\-char\\-zero\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"b83b23275b74",1607502387,"Introduce -Wreserved-identifier\n\nWarn when a declaration uses an identifier that doesn\'t obey the re...","Introduce -Wreserved-identifier\n\nWarn when a declaration uses an identifier that doesn\'t obey the reserved\nidentifier rule from C and/or C++.\n\nDifferential Revision: https://reviews.llvm.org/D93095"}, | ||
[ | [g]={{r,13889,"static bool CheckTautologicalComparison(Sema &S, BinaryOperator *E, Expr *Constant, Expr *Other, const llvm::APSInt &Value, bool RhsConstant) {\n // ...\n // FIXME: We use a somewhat different formatting for the in-range cases and\n // cases involving boolean values for historical reasons. We should pick a\n // consistent way of presenting these diagnostics.\n if (!InRange || Other->isKnownToHaveBooleanValue()) {\n // ...\n } else {\n // ...\n unsigned Diag = (isKnownToHaveUnsignedValue(OriginalOther) && Value == 0) ? (HasEnumType(OriginalOther) ? diag::warn_unsigned_enum_always_true_comparison : IsCharTy ? diag::warn_unsigned_char_always_true_comparison : diag::warn_unsigned_always_true_comparison) : diag::warn_tautological_constant_compare;"}} | ||
}, | }, | ||
["warn_unsigned_enum_always_true_comparison"]={ | ["warn_unsigned_enum_always_true_comparison"]={ | ||
[ | [i]={Zc,"tautological-unsigned-enum-zero-compare","type-limits"}, | ||
[j]="tautological-unsigned-enum-zero-compare", | |||
[ | |||
[b]="result of comparison of %select{%3|unsigned enum expression}0 %2 %select{unsigned enum expression|%3}0 is always %4", | [b]="result of comparison of %select{%3|unsigned enum expression}0 %2 %select{unsigned enum expression|%3}0 is always %4", | ||
[ | [d]=h, | ||
[ | [a]="result of comparison of (?:(.*?)|unsigned enum expression) (.*?) (?:unsigned enum expression|(.*?)) is always (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wtautological\\-unsigned\\-enum\\-zero\\-compare[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"bd1fc22043b7",1507839411,"[Sema] Diagnose tautological comparison with type\'s min/max values\n\nSummary:\nCurrently, clang only d...","[Sema] Diagnose tautological comparison with type\'s min/max values\n\nSummary:\nCurrently, clang only diagnoses completely out-of-range comparisons (e.g. `char` and constant `300`),\nand comparisons of unsigned and `0`. But gcc also does diagnose the comparisons with the\n`std::numeric_limits<>::max()` / `std::numeric_limits<>::min()` so to speak\n\nFinally Fixes https://bugs.llvm.org/show_bug.cgi?id=34147\nContinuation of https://reviews.llvm.org/D37565\n\nReviewers: rjmccall, rsmith, aaron.ballman\n\nReviewed By: rsmith\n\nSubscribers: rtrieu, jroelofs, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D38101\n\nllvm-svn: 315614"}, | ||
[ | [g]={{r,13888,"static bool CheckTautologicalComparison(Sema &S, BinaryOperator *E, Expr *Constant, Expr *Other, const llvm::APSInt &Value, bool RhsConstant) {\n // ...\n // FIXME: We use a somewhat different formatting for the in-range cases and\n // cases involving boolean values for historical reasons. We should pick a\n // consistent way of presenting these diagnostics.\n if (!InRange || Other->isKnownToHaveBooleanValue()) {\n // ...\n } else {\n // ...\n unsigned Diag = (isKnownToHaveUnsignedValue(OriginalOther) && Value == 0) ? (HasEnumType(OriginalOther) ? diag::warn_unsigned_enum_always_true_comparison : IsCharTy ? diag::warn_unsigned_char_always_true_comparison : diag::warn_unsigned_always_true_comparison) : diag::warn_tautological_constant_compare;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/compare.c"]={"clang/test/Sema/compare.c:331:9: warning: result of comparison of unsigned enum expression < 0 is always false [-Wtautological-unsigned-enum-zero-compare]","clang/test/Sema/compare.c:337:9: warning: result of comparison of unsigned enum expression >= 0 is always true [-Wtautological-unsigned-enum-zero-compare]","clang/test/Sema/compare.c:346:9: warning: result of comparison of 0 <= unsigned enum expression is always true [-Wtautological-unsigned-enum-zero-compare]","clang/test/Sema/compare.c:348:9: warning: result of comparison of 0 > unsigned enum expression is always false [-Wtautological-unsigned-enum-zero-compare]","clang/test/Sema/compare.c:357:9: warning: result of comparison of unsigned enum expression < 0 is always false [-Wtautological-unsigned-enum-zero-compare]","clang/test/Sema/compare.c:363:9: warning: result of comparison of unsigned enum expression >= 0 is always true [-Wtautological-unsigned-enum-zero-compare]","clang/test/Sema/compare.c:372:10: warning: result of comparison of 0 <= unsigned enum expression is always true [-Wtautological-unsigned-enum-zero-compare]","clang/test/Sema/compare.c:374:10: warning: result of comparison of 0 > unsigned enum expression is always false [-Wtautological-unsigned-enum-zero-compare]"} | ["clang/test/Sema/compare.c"]={"clang/test/Sema/compare.c:331:9: warning: result of comparison of unsigned enum expression < 0 is always false [-Wtautological-unsigned-enum-zero-compare]","clang/test/Sema/compare.c:337:9: warning: result of comparison of unsigned enum expression >= 0 is always true [-Wtautological-unsigned-enum-zero-compare]","clang/test/Sema/compare.c:346:9: warning: result of comparison of 0 <= unsigned enum expression is always true [-Wtautological-unsigned-enum-zero-compare]","clang/test/Sema/compare.c:348:9: warning: result of comparison of 0 > unsigned enum expression is always false [-Wtautological-unsigned-enum-zero-compare]","clang/test/Sema/compare.c:357:9: warning: result of comparison of unsigned enum expression < 0 is always false [-Wtautological-unsigned-enum-zero-compare]","clang/test/Sema/compare.c:363:9: warning: result of comparison of unsigned enum expression >= 0 is always true [-Wtautological-unsigned-enum-zero-compare]","clang/test/Sema/compare.c:372:10: warning: result of comparison of 0 <= unsigned enum expression is always true [-Wtautological-unsigned-enum-zero-compare]","clang/test/Sema/compare.c:374:10: warning: result of comparison of 0 > unsigned enum expression is always false [-Wtautological-unsigned-enum-zero-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_unsupported_branch_protection"]={ | ["warn_unsupported_branch_protection"]={ | ||
[ | [i]={mc}, | ||
[j]=mc, | |||
[ | |||
[b]="invalid branch protection option \'%0\' in \'%1\'", | [b]="invalid branch protection option \'%0\' in \'%1\'", | ||
[ | [d]=h, | ||
[ | [a]="invalid branch protection option \'(.*?)\' in \'(.*?)\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wbranch\\-protection[^\\]]*\\]", | ||
[ | [c]=s, | ||
[ | [f]={"0687578728ea",1610286626,"[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.\n\nThis is sup...","[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.\n\nThis is support for the user-facing options to create importable header units\nfrom headers in the user or system search paths (or to be given an absolute path).\n\nThis means that an incomplete header path will be passed by the driver and the\nlookup carried out using the search paths present when the front end is run.\n\nTo support this, we introduce file fypes for c++-{user,system,header-unit}-header.\nThese terms are the same as the ones used by GCC, to minimise the differences for\ntooling (and users).\n\nThe preprocessor checks for headers before issuing a warning for\n\"#pragma once\" in a header build. We ensure that the importable header units\nare recognised as headers in order to avoid such warnings.\n\nDifferential Revision: https://reviews.llvm.org/D121096"}, | ||
[ | [g]={{"clang/lib/Driver/ToolChains/Clang.cpp",1618,"static void CollectARMPACBTIOptions(const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, bool isAArch64) {\n // ...\n if (A->getOption().matches(options::OPT_msign_return_address_EQ)) {\n // ...\n } else {\n // ...\n if (!isAArch64 && PBP.Key == \"b_key\")\n D.Diag(diag::warn_unsupported_branch_protection) << \"b-key\" << A->getAsString(Args);"}}, | ||
[ | [k]={ | ||
["clang/test/Preprocessor/arm-target-features.c"]={"clang: warning: invalid branch protection option \'b-key\' in \'-mbranch-protection=bti+pac-ret+b-key+leaf\' [-Wbranch-protection]"} | ["clang/test/Preprocessor/arm-target-features.c"]={"clang: warning: invalid branch protection option \'b-key\' in \'-mbranch-protection=bti+pac-ret+b-key+leaf\' [-Wbranch-protection]"} | ||
} | } | ||
}, | }, | ||
["warn_unsupported_branch_protection_spec"]={ | ["warn_unsupported_branch_protection_spec"]={ | ||
[ | [i]={mc}, | ||
[j]=mc, | |||
[ | |||
[b]="unsupported branch protection specification \'%0\'", | [b]="unsupported branch protection specification \'%0\'", | ||
[ | [d]=h, | ||
[ | [a]="unsupported branch protection specification \'(.*?)\'", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wbranch\\-protection[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables i...","[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables into a record in task untied\nregions but clang does not support record with VLA data members.\n\nDifferential Revision: https://reviews.llvm.org/D99436"}, | ||
[ | [g]={{w,3463,"// Check for things we\'d like to warn about. Multiversioning issues are\n// handled later in the process, once we know how many exist.\nbool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) {\n // ...\n if (!DiagMsg.empty())\n Diag(LiteralLoc, diag::warn_unsupported_branch_protection_spec) << DiagMsg;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/arm-branch-protection-attr-err.c"]={"clang/test/Sema/arm-branch-protection-attr-err.c:19:23: warning: unsupported branch protection specification \'b-key\' [-Wbranch-protection]"} | ["clang/test/Sema/arm-branch-protection-attr-err.c"]={"clang/test/Sema/arm-branch-protection-attr-err.c:19:23: warning: unsupported branch protection specification \'b-key\' [-Wbranch-protection]"} | ||
} | } | ||
}, | }, | ||
["warn_unsupported_lifetime_extension"]={ | ["warn_unsupported_lifetime_extension"]={ | ||
[ | [i]={ic}, | ||
[j]=ic, | |||
[ | |||
[b]="sorry, lifetime extension of %select{temporary|backing array of initializer list}0 created by aggregate initialization using default member initializer is not supported; lifetime of %select{temporary|backing array}0 will end at the end of the full-expression", | [b]="sorry, lifetime extension of %select{temporary|backing array of initializer list}0 created by aggregate initialization using default member initializer is not supported; lifetime of %select{temporary|backing array}0 will end at the end of the full-expression", | ||
[ | [d]=h, | ||
[ | [a]="sorry, lifetime extension of (?:temporary|backing array of initializer list) created by aggregate initialization using default member initializer is not supported; lifetime of (?:temporary|backing array) will end at the end of the full\\-expression", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdangling[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"0e3102d1dc04",1532393708,"Warn if a local variable\'s initializer retains a pointer/reference to a\nnon-lifetime-extended tempor...","Warn if a local variable\'s initializer retains a pointer/reference to a\nnon-lifetime-extended temporary object.\n\nllvm-svn: 337790"}, | ||
[ | [g]={{sb,8143,"void Sema::checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init) {\n // ...\n auto TemporaryVisitor = [&](IndirectLocalPath &Path, Local L, ReferenceKind RK) -> bool {\n // ...\n case LK_Extended: {\n // ...\n case PathLifetimeKind::ShouldExtend:\n // ...\n Diag(DiagLoc, diag::warn_unsupported_lifetime_extension) << RK << DiagRange;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/eval-crashes.cpp"]={"clang/test/SemaCXX/eval-crashes.cpp:32:10: warning: sorry, lifetime extension of temporary created by aggregate initialization using default member initializer is not supported; lifetime of temporary will end at the end of the full-expression [-Wdangling]","clang/test/SemaCXX/eval-crashes.cpp:32:10: warning: sorry, lifetime extension of temporary created by aggregate initialization using default member initializer is not supported; lifetime of temporary will end at the end of the full-expression [-Wdangling]"} | ["clang/test/SemaCXX/eval-crashes.cpp"]={"clang/test/SemaCXX/eval-crashes.cpp:32:10: warning: sorry, lifetime extension of temporary created by aggregate initialization using default member initializer is not supported; lifetime of temporary will end at the end of the full-expression [-Wdangling]","clang/test/SemaCXX/eval-crashes.cpp:32:10: warning: sorry, lifetime extension of temporary created by aggregate initialization using default member initializer is not supported; lifetime of temporary will end at the end of the full-expression [-Wdangling]"} | ||
} | } | ||
}, | }, | ||
["warn_unsupported_target_attribute"]={ | ["warn_unsupported_target_attribute"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="%select{unsupported|duplicate|unknown}0%select{| CPU| tune CPU}1 \'%2\' in the \'%select{target|target_clones|target_version}3\' attribute string; \'%select{target|target_clones|target_version}3\' attribute ignored", | [b]="%select{unsupported|duplicate|unknown}0%select{| CPU| tune CPU}1 \'%2\' in the \'%select{target|target_clones|target_version}3\' attribute string; \'%select{target|target_clones|target_version}3\' attribute ignored", | ||
[ | [d]=h, | ||
[ | [a]="(?:unsupported|duplicate|unknown)(?:| CPU| tune CPU) \'(.*?)\' in the \'(?:target|target_clones|target_version)\' attribute string; \'(?:target|target_clones|target_version)\' attribute ignored", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={"789a7ad1a855",1434072965,"Add a warning for unsupported elements of the target attribute.\n\nSince we\'re ignoring the tune= and ...","Add a warning for unsupported elements of the target attribute.\n\nSince we\'re ignoring the tune= and fpmath= attributes go ahead\nand add a warning alerting people to the fact that we\'re going\nto ignore that part of it during code generation and tie it to\nthe attribute warning set.\n\nllvm-svn: 239583"}, | ||
[ | [g]={{w,3417,"// Check for things we\'d like to warn about. Multiversioning issues are\n// handled later in the process, once we know how many exist.\nbool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) {\n // ...\n if (AttrStr.contains(\"fpmath=\"))\n return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Unsupported << None << \"fpmath=\" << Target;"},{w,3423,"// Check for things we\'d like to warn about. Multiversioning issues are\n// handled later in the process, once we know how many exist.\nbool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) {\n // ...\n // Diagnose use of tune if target doesn\'t support it.\n if (!Context.getTargetInfo().supportsTargetAttributeTune() && AttrStr.contains(\"tune=\"))\n return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Unsupported << None << \"tune=\" << Target;"},{w,3431,"// Check for things we\'d like to warn about. Multiversioning issues are\n// handled later in the process, once we know how many exist.\nbool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) {\n // ...\n if (!ParsedAttrs.CPU.empty() && !Context.getTargetInfo().isValidCPUName(ParsedAttrs.CPU))\n return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Unknown << CPU << ParsedAttrs.CPU << Target;"},{w,3436,"// Check for things we\'d like to warn about. Multiversioning issues are\n// handled later in the process, once we know how many exist.\nbool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) {\n // ...\n if (!ParsedAttrs.Tune.empty() && !Context.getTargetInfo().isValidCPUName(ParsedAttrs.Tune))\n return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Unknown << Tune << ParsedAttrs.Tune << Target;"},{w,3440,"// Check for things we\'d like to warn about. Multiversioning issues are\n// handled later in the process, once we know how many exist.\nbool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) {\n // ...\n if (ParsedAttrs.Duplicate != \"\")\n return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Duplicate << None << ParsedAttrs.Duplicate << Target;"},{w,3446,"// Check for things we\'d like to warn about. Multiversioning issues are\n// handled later in the process, once we know how many exist.\nbool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) {\n // ...\n for (const auto &Feature : ParsedAttrs.Features) {\n // ...\n if (!Context.getTargetInfo().isValidFeatureName(CurFeature))\n return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Unsupported << None << CurFeature << Target;"},{w,3457,"// Check for things we\'d like to warn about. Multiversioning issues are\n// handled later in the process, once we know how many exist.\nbool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) {\n // ...\n if (!Context.getTargetInfo().validateBranchProtection(ParsedAttrs.BranchProtection, ParsedAttrs.CPU, BPI, DiagMsg)) {\n if (DiagMsg.empty())\n return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Unsupported << None << \"branch-protection\" << Target;"},{w,3483,"// Check Target Version attrs\nbool Sema::checkTargetVersionAttr(SourceLocation LiteralLoc, StringRef &AttrStr, bool &isDefault) {\n // ...\n for (auto &CurFeature : Features) {\n // ...\n if (!Context.getTargetInfo().validateCpuSupports(CurFeature))\n return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Unsupported << None << CurFeature << TargetVersion;"},{w,3526,"bool Sema::checkTargetClonesAttrString(SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, bool &HasDefault, bool &HasCommas, bool &HasNotDefault, SmallVectorImpl<SmallString<64>> &StringsBuffer) {\n // ...\n // Warn on empty at the beginning of a string.\n if (Str.size() == 0)\n return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Unsupported << None << \"\" << TargetClones;"},{w,3540,"bool Sema::checkTargetClonesAttrString(SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, bool &HasDefault, bool &HasCommas, bool &HasNotDefault, SmallVectorImpl<SmallString<64>> &StringsBuffer) {\n // ...\n while (!Parts.second.empty()) {\n // ...\n if (Cur.empty())\n return Diag(CurLoc, diag::warn_unsupported_target_attribute) << Unsupported << None << \"\" << TargetClones;"},{w,3559,"bool Sema::checkTargetClonesAttrString(SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, bool &HasDefault, bool &HasCommas, bool &HasNotDefault, SmallVectorImpl<SmallString<64>> &StringsBuffer) {\n // ...\n while (!Parts.second.empty()) {\n // ...\n if (TInfo.getTriple().isAArch64()) {\n // AArch64 target clones specific\n if (Cur == \"default\") {\n // ...\n } else {\n // ...\n while (!CurParts.second.empty()) {\n // ...\n if (!TInfo.validateCpuSupports(CurFeature)) {\n Diag(CurLoc, diag::warn_unsupported_target_attribute) << Unsupported << None << CurFeature << TargetClones;"},{w,3591,"bool Sema::checkTargetClonesAttrString(SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, bool &HasDefault, bool &HasCommas, bool &HasNotDefault, SmallVectorImpl<SmallString<64>> &StringsBuffer) {\n // ...\n while (!Parts.second.empty()) {\n // ...\n if (TInfo.getTriple().isAArch64()) {\n // ...\n } else {\n // Other targets ( currently X86 )\n if (Cur.startswith(\"arch=\")) {\n if (!Context.getTargetInfo().isValidCPUName(Cur.drop_front(sizeof(\"arch=\") - 1)))\n return Diag(CurLoc, diag::warn_unsupported_target_attribute) << Unsupported << CPU << Cur.drop_front(sizeof(\"arch=\") - 1) << TargetClones;"},{w,3598,"bool Sema::checkTargetClonesAttrString(SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, bool &HasDefault, bool &HasCommas, bool &HasNotDefault, SmallVectorImpl<SmallString<64>> &StringsBuffer) {\n // ...\n while (!Parts.second.empty()) {\n // ...\n if (TInfo.getTriple().isAArch64()) {\n // ...\n } else {\n // Other targets ( currently X86 )\n if (Cur.startswith(\"arch=\")) {\n // ...\n } else if (Cur == \"default\") {\n // ...\n } else if (!Context.getTargetInfo().isValidFeatureName(Cur))\n return Diag(CurLoc, diag::warn_unsupported_target_attribute) << Unsupported << None << Cur << TargetClones;"},{w,3607,"bool Sema::checkTargetClonesAttrString(SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, bool &HasDefault, bool &HasCommas, bool &HasNotDefault, SmallVectorImpl<SmallString<64>> &StringsBuffer) {\n // ...\n if (Str.rtrim().endswith(\",\"))\n return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Unsupported << None << \"\" << TargetClones;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-target-clones-aarch64.c"]={"clang/test/Sema/attr-target-clones-aarch64.c:6:36: warning: unsupported \'default\' in the \'target_clones\' attribute string; \'target_clones\' attribute ignored [-Wignored-attributes]","clang/test/Sema/attr-target-clones-aarch64.c:55:35: warning: unsupported \'\' in the \'target_clones\' attribute string; \'target_clones\' attribute ignored [-Wignored-attributes]","clang/test/Sema/attr-target-clones-aarch64.c:59:36: warning: unsupported \'default\' in the \'target_clones\' attribute string; \'target_clones\' attribute ignored [-Wignored-attributes]","clang/test/Sema/attr-target-clones-aarch64.c:59:36: warning: unsupported \'default\' in the \'target_clones\' attribute string; \'target_clones\' attribute ignored [-Wignored-attributes]","clang/test/Sema/attr-target-clones-aarch64.c:61:36: warning: unsupported \'\' in the \'target_clones\' attribute string; \'target_clones\' attribute ignored [-Wignored-attributes]","clang/test/Sema/attr-target-clones-aarch64.c:64:36: warning: unsupported \'bs\' in the \'target_clones\' attribute string; \'target_clones\' attribute ignored [-Wignored-attributes]","clang/test/Sema/attr-target-clones-aarch64.c:68:46: warning: unsupported \'\' in the \'target_clones\' attribute string; \'target_clones\' attribute ignored [-Wignored-attributes]"} | ["clang/test/Sema/attr-target-clones-aarch64.c"]={"clang/test/Sema/attr-target-clones-aarch64.c:6:36: warning: unsupported \'default\' in the \'target_clones\' attribute string; \'target_clones\' attribute ignored [-Wignored-attributes]","clang/test/Sema/attr-target-clones-aarch64.c:55:35: warning: unsupported \'\' in the \'target_clones\' attribute string; \'target_clones\' attribute ignored [-Wignored-attributes]","clang/test/Sema/attr-target-clones-aarch64.c:59:36: warning: unsupported \'default\' in the \'target_clones\' attribute string; \'target_clones\' attribute ignored [-Wignored-attributes]","clang/test/Sema/attr-target-clones-aarch64.c:59:36: warning: unsupported \'default\' in the \'target_clones\' attribute string; \'target_clones\' attribute ignored [-Wignored-attributes]","clang/test/Sema/attr-target-clones-aarch64.c:61:36: warning: unsupported \'\' in the \'target_clones\' attribute string; \'target_clones\' attribute ignored [-Wignored-attributes]","clang/test/Sema/attr-target-clones-aarch64.c:64:36: warning: unsupported \'bs\' in the \'target_clones\' attribute string; \'target_clones\' attribute ignored [-Wignored-attributes]","clang/test/Sema/attr-target-clones-aarch64.c:68:46: warning: unsupported \'\' in the \'target_clones\' attribute string; \'target_clones\' attribute ignored [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_but_set_parameter"]={ | ["warn_unused_but_set_parameter"]={ | ||
[ | [i]={s,n,Vb,"unused-but-set-parameter"}, | ||
[j]="unused-but-set-parameter", | |||
[ | |||
[b]="parameter %0 set but not used", | [b]="parameter %0 set but not used", | ||
[ | [d]=h, | ||
[ | [a]="parameter (.*?) set but not used", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-but\\-set\\-parameter[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={Xb,1615397021,Ub,Rb}, | ||
[ | [g]={{B,2205,"void Sema::DiagnoseUnusedButSetDecl(const VarDecl *VD, DiagReceiverTy DiagReceiver) {\n // ...\n unsigned DiagID = isa<ParmVarDecl>(VD) ? diag::warn_unused_but_set_parameter : diag::warn_unused_but_set_variable;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-unused-but-set-parameters-cpp.cpp"]={"clang/test/SemaCXX/warn-unused-but-set-parameters-cpp.cpp:4:12: warning: parameter \'y\' set but not used [-Wunused-but-set-parameter]","clang/test/SemaCXX/warn-unused-but-set-parameters-cpp.cpp:12:15: warning: parameter \'y\' set but not used [-Wunused-but-set-parameter]"} | ["clang/test/SemaCXX/warn-unused-but-set-parameters-cpp.cpp"]={"clang/test/SemaCXX/warn-unused-but-set-parameters-cpp.cpp:4:12: warning: parameter \'y\' set but not used [-Wunused-but-set-parameter]","clang/test/SemaCXX/warn-unused-but-set-parameters-cpp.cpp:12:15: warning: parameter \'y\' set but not used [-Wunused-but-set-parameter]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_but_set_variable"]={ | ["warn_unused_but_set_variable"]={ | ||
[ | [i]={n,o,p,Q,"unused-but-set-variable"}, | ||
[j]="unused-but-set-variable", | |||
[ | |||
[b]="variable %0 set but not used", | [b]="variable %0 set but not used", | ||
[ | [d]=h, | ||
[ | [a]="variable (.*?) set but not used", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-but\\-set\\-variable[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={Xb,1615397021,Ub,Rb}, | ||
[ | [g]={{B,2206,"void Sema::DiagnoseUnusedButSetDecl(const VarDecl *VD, DiagReceiverTy DiagReceiver) {\n // ...\n unsigned DiagID = isa<ParmVarDecl>(VD) ? diag::warn_unused_but_set_parameter : diag::warn_unused_but_set_variable;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/objc-precise-lifetime-unused-variable.m"]={"clang/test/SemaObjC/objc-precise-lifetime-unused-variable.m:17:8: warning: variable \'y2\' set but not used [-Wunused-but-set-variable]","clang/test/SemaObjC/objc-precise-lifetime-unused-variable.m:10:6: warning: variable \'x2\' set but not used [-Wunused-but-set-variable]"} | ["clang/test/SemaObjC/objc-precise-lifetime-unused-variable.m"]={"clang/test/SemaObjC/objc-precise-lifetime-unused-variable.m:17:8: warning: variable \'y2\' set but not used [-Wunused-but-set-variable]","clang/test/SemaObjC/objc-precise-lifetime-unused-variable.m:10:6: warning: variable \'x2\' set but not used [-Wunused-but-set-variable]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_call"]={ | ["warn_unused_call"]={ | ||
[ | [i]={n,o,p,Q,Y}, | ||
[j]=Y, | |||
[ | |||
[b]="ignoring return value of function declared with %0 attribute", | [b]="ignoring return value of function declared with %0 attribute", | ||
[ | [d]=h, | ||
[ | [a]="ignoring return value of function declared with (.*?) attribute", | ||
[ | [e]=bc, | ||
[ | [c]=P, | ||
[ | [f]={"1a6babf1f41c",1255409628,"make the diagnostic in the \'unused result\' warning more precise\nabout the reason, rdar://7186119.\n\nl...","make the diagnostic in the \'unused result\' warning more precise\nabout the reason, rdar://7186119.\n\nllvm-svn: 83940"}, | ||
[ | [g]={{M,300,"void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) {\n // ...\n if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {\n // ...\n // If the callee has attribute pure, const, or warn_unused_result, warn with\n // a more specific message to make it clear what is happening. If the call\n // is written in a macro body, only warn if it has the warn_unused_result\n // attribute.\n if (const Decl *FD = CE->getCalleeDecl()) {\n // ...\n if (FD->hasAttr<PureAttr>()) {\n Diag(Loc, diag::warn_unused_call) << R1 << R2 << \"pure\";"},{M,304,"void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) {\n // ...\n if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {\n // ...\n // If the callee has attribute pure, const, or warn_unused_result, warn with\n // a more specific message to make it clear what is happening. If the call\n // is written in a macro body, only warn if it has the warn_unused_result\n // attribute.\n if (const Decl *FD = CE->getCalleeDecl()) {\n // ...\n if (FD->hasAttr<ConstAttr>()) {\n Diag(Loc, diag::warn_unused_call) << R1 << R2 << \"const\";"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/unused-expr.c"]={"clang/test/Sema/unused-expr.c:28:3: warning: ignoring return value of function declared with const attribute [-Wunused-value]","clang/test/Sema/unused-expr.c:92:3: warning: ignoring return value of function declared with pure attribute [-Wunused-value]","clang/test/Sema/unused-expr.c:93:3: warning: ignoring return value of function declared with const attribute [-Wunused-value]","clang/test/Sema/unused-expr.c:94:3: warning: ignoring return value of function declared with const attribute [-Wunused-value]","clang/test/Sema/unused-expr.c:143:15: warning: ignoring return value of function declared with pure attribute [-Wunused-value]"} | ["clang/test/Sema/unused-expr.c"]={"clang/test/Sema/unused-expr.c:28:3: warning: ignoring return value of function declared with const attribute [-Wunused-value]","clang/test/Sema/unused-expr.c:92:3: warning: ignoring return value of function declared with pure attribute [-Wunused-value]","clang/test/Sema/unused-expr.c:93:3: warning: ignoring return value of function declared with const attribute [-Wunused-value]","clang/test/Sema/unused-expr.c:94:3: warning: ignoring return value of function declared with const attribute [-Wunused-value]","clang/test/Sema/unused-expr.c:143:15: warning: ignoring return value of function declared with pure attribute [-Wunused-value]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_comma_left_operand"]={ | ["warn_unused_comma_left_operand"]={ | ||
[ | [i]={n,o,p,Q,Y}, | ||
[j]=Y, | |||
[ | |||
[b]="left operand of comma operator has no effect", | [b]="left operand of comma operator has no effect", | ||
[ | [d]=h, | ||
[ | [a]="left operand of comma operator has no effect", | ||
[ | [e]=bc, | ||
[ | [c]=P, | ||
[ | [f]={Xb,1615397021,Ub,Rb}, | ||
[ | [g]={{u,14667,"// C99 6.5.17\nstatic QualType CheckCommaOperands(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc) {\n // ...\n S.DiagnoseUnusedExprResult(LHS.get(), diag::warn_unused_comma_left_operand);"},{M,386,"void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) {\n // ...\n if (DiagID != diag::warn_unused_comma_left_operand || !isSFINAEContext())"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/objc-messaging-1.m"]={"clang/test/Parser/objc-messaging-1.m:9:26: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:9:28: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:11:26: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:11:28: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:13:26: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:13:28: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:13:35: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:13:37: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:15:34: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:15:37: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:17:33: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:17:36: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:19:37: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:19:40: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:23:3: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:23:6: warning: left operand of comma operator has no effect [-Wunused-value]"} | ["clang/test/Parser/objc-messaging-1.m"]={"clang/test/Parser/objc-messaging-1.m:9:26: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:9:28: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:11:26: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:11:28: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:13:26: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:13:28: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:13:35: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:13:37: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:15:34: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:15:37: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:17:33: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:17:36: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:19:37: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:19:40: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:23:3: warning: left operand of comma operator has no effect [-Wunused-value]","clang/test/Parser/objc-messaging-1.m:23:6: warning: left operand of comma operator has no effect [-Wunused-value]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_comparison"]={ | ["warn_unused_comparison"]={ | ||
[ | [i]={n,o,p,Q,"unused-comparison",Y}, | ||
[j]="unused-comparison", | |||
[ | |||
[b]="%select{equality|inequality|relational|three-way}0 comparison result unused", | [b]="%select{equality|inequality|relational|three-way}0 comparison result unused", | ||
[ | [d]=h, | ||
[ | [a]="(?:equality|inequality|relational|three\\-way) comparison result unused", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-comparison[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={"e2669397f1cf",1313573677,"Treating the unused equality comparisons as something other than part of\n-Wunused was a mistake. It ...","Treating the unused equality comparisons as something other than part of\n-Wunused was a mistake. It resulted in duplicate warnings and lots of\nother hacks. Instead, this should be a special sub-category to\n-Wunused-value, much like -Wunused-result is.\n\nMoved to -Wunused-comparison, moved the implementation to piggy back on\nthe -Wunused-value implementation instead of rolling its own, different\nmechanism for catching all of the \"interesting\" statements.\n\nI like the unused-value mechanism for this better, but its currently\nmissing several top-level statements. For now, I\'ve FIXME-ed out those\ntest cases. I\'ll enhance the generic infrastructure to catch these\nstatements in a subsequent patch.\n\nThis patch also removes the cast-to-void fixit hint. This hint isn\'t\navailable on any of the other -Wunused-value diagnostics, and if we want\nit to be, we should add it generically rather than in one specific case.\n\nllvm-svn: 137822"}, | ||
[ | [g]={{M,185,"/// 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 S.Diag(Loc, diag::warn_unused_comparison) << (unsigned)Kind << E->getSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/unused-expr.c"]={"clang/test/Sema/unused-expr.c:10:6: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:14:5: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:57:7: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:59:7: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:62:7: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:65:7: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:69:7: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:71:10: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:73:12: warning: relational comparison result unused [-Wunused-comparison]"} | ["clang/test/Sema/unused-expr.c"]={"clang/test/Sema/unused-expr.c:10:6: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:14:5: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:57:7: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:59:7: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:62:7: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:65:7: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:69:7: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:71:10: warning: relational comparison result unused [-Wunused-comparison]","clang/test/Sema/unused-expr.c:73:12: warning: relational comparison result unused [-Wunused-comparison]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_const_variable"]={ | ["warn_unused_const_variable"]={ | ||
[ | [i]={n,o,p,Q,"unused-const-variable","unused-variable"}, | ||
[j]="unused-const-variable", | |||
[ | |||
[b]="unused variable %0", | [b]="unused variable %0", | ||
[ | [d]=h, | ||
[ | [a]="unused variable (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-const\\-variable[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={"c531daefd9cc",1378895855,"Split -Wunused-variable warning.\n\nWith r190382, -Wunused-variable warns about unused const variables...","Split -Wunused-variable warning.\n\nWith r190382, -Wunused-variable warns about unused const variables when\nappropriate. For codebases that use -Werror, this poses a problem as\nexisting unused const variables need to be cleaned up first. To make the\ntransistion easier, this patch splits -Wunused-variable by pulling out\nan additional -Wunused-const-variable (by default activated along with\n-Wunused-variable).\n\nllvm-svn: 190508"}, | ||
[ | [g]={{S,1401,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n // If there were errors, disable \'unused\' warnings since they will mostly be\n // noise. Don\'t warn for a use from a module: either we should warn on all\n // file-scope declarations in modules or not at all, but whether the\n // declaration is used is immaterial.\n if (!Diags.hasErrorOccurred() && TUKind != TU_Module) {\n // Output warning for unused file scoped decls.\n for (UnusedFileScopedDeclsType::iterator I = UnusedFileScopedDecls.begin(ExternalSource.get()), E = UnusedFileScopedDecls.end(); I != E; ++I) {\n // ...\n if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {\n // ...\n } else {\n // ...\n if (DiagD->isReferenced()) {\n // ...\n } else if (DiagD->getDescribedVarTemplate()) {\n // ...\n } else if (DiagD->getType().isConstQualified()) {\n // ...\n if (SM.getMainFileID() != SM.getFileID(DiagD->getLocation()) || !PP.getLangOpts().IsHeaderFile)\n Diag(DiagD->getLocation(), diag::warn_unused_const_variable) << DiagD << DiagRange;"}}, | ||
[ | [k]={ | ||
["clang/test/Misc/diag-unused-source-ranges.cpp"]={"clang/test/Misc/diag-unused-source-ranges.cpp:124:15:{124:15-124:27}: warning: unused variable \'const_unused\' [-Wunused-const-variable]"} | ["clang/test/Misc/diag-unused-source-ranges.cpp"]={"clang/test/Misc/diag-unused-source-ranges.cpp:124:15:{124:15-124:27}: warning: unused variable \'const_unused\' [-Wunused-const-variable]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_constructor"]={ | ["warn_unused_constructor"]={ | ||
[ | [i]={n,o,p,Q,Y}, | ||
[j]=Y, | |||
[ | |||
[b]="ignoring temporary created by a constructor declared with %0 attribute", | [b]="ignoring temporary created by a constructor declared with %0 attribute", | ||
[ | [d]=h, | ||
[ | [a]="ignoring temporary created by a constructor declared with (.*?) attribute", | ||
[ | [e]=bc, | ||
[ | [c]=P, | ||
[ | [f]={"46441fdb3c1d",1564067456,"Implement P1771\n\nAs passed in the Cologne meeting and treated by Core as a DR,\n[[nodiscard]] was app...","Implement P1771\n\nAs passed in the Cologne meeting and treated by Core as a DR,\n[[nodiscard]] was applied to constructors so that they can be diagnosed\nin cases where the user forgets a variable name for a type.\n\nThe intent is to enable the library to start using this on the\nconstructors of scope_guard/lock_guard.\n\nDifferential Revision: https://reviews.llvm.org/D64914\n\nllvm-svn: 367027"}, | ||
[ | [g]={{M,211,"static bool DiagnoseNoDiscard(Sema &S, const WarnUnusedResultAttr *A, SourceLocation Loc, SourceRange R1, SourceRange R2, bool IsCtor) {\n // ...\n if (Msg.empty()) {\n if (IsCtor)\n return S.Diag(Loc, diag::warn_unused_constructor) << A << R1 << R2;"}}, | ||
[ | [k]={ | ||
["clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp:98:3: warning: ignoring temporary created by a constructor declared with \'nodiscard\' attribute [-Wunused-value]"} | ["clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp:98:3: warning: ignoring temporary created by a constructor declared with \'nodiscard\' attribute [-Wunused-value]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_constructor_msg"]={ | ["warn_unused_constructor_msg"]={ | ||
[ | [i]={n,o,p,Q,Y}, | ||
[j]=Y, | |||
[ | |||
[b]="ignoring temporary created by a constructor declared with %0 attribute: %1", | [b]="ignoring temporary created by a constructor declared with %0 attribute: %1", | ||
[ | [d]=h, | ||
[ | [a]="ignoring temporary created by a constructor declared with (.*?) attribute\\: (.*?)", | ||
[ | [e]=bc, | ||
[ | [c]=P, | ||
[ | [f]={"46441fdb3c1d",1564067456,"Implement P1771\n\nAs passed in the Cologne meeting and treated by Core as a DR,\n[[nodiscard]] was app...","Implement P1771\n\nAs passed in the Cologne meeting and treated by Core as a DR,\n[[nodiscard]] was applied to constructors so that they can be diagnosed\nin cases where the user forgets a variable name for a type.\n\nThe intent is to enable the library to start using this on the\nconstructors of scope_guard/lock_guard.\n\nDifferential Revision: https://reviews.llvm.org/D64914\n\nllvm-svn: 367027"}, | ||
[ | [g]={{M,216,"static bool DiagnoseNoDiscard(Sema &S, const WarnUnusedResultAttr *A, SourceLocation Loc, SourceRange R1, SourceRange R2, bool IsCtor) {\n // ...\n if (IsCtor)\n return S.Diag(Loc, diag::warn_unused_constructor_msg) << A << Msg << R1 << R2;"}}, | ||
[ | [k]={ | ||
["clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp:99:3: warning: ignoring temporary created by a constructor declared with \'nodiscard\' attribute: Don\'t let that S-Char go! [-Wunused-value]","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp:102:3: warning: ignoring temporary created by a constructor declared with \'nodiscard\' attribute: Don\'t throw me away either! [-Wunused-value]","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp:113:3: warning: ignoring temporary created by a constructor declared with \'nodiscard\' attribute: Don\'t throw me away! [-Wunused-value]","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp:115:3: warning: ignoring temporary created by a constructor declared with \'nodiscard\' attribute: Don\'t let that S-Char go! [-Wunused-value]","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp:121:3: warning: ignoring temporary created by a constructor declared with \'nodiscard\' attribute: Don\'t throw me away! [-Wunused-value]"} | ["clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp:99:3: warning: ignoring temporary created by a constructor declared with \'nodiscard\' attribute: Don\'t let that S-Char go! [-Wunused-value]","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp:102:3: warning: ignoring temporary created by a constructor declared with \'nodiscard\' attribute: Don\'t throw me away either! [-Wunused-value]","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp:113:3: warning: ignoring temporary created by a constructor declared with \'nodiscard\' attribute: Don\'t throw me away! [-Wunused-value]","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp:115:3: warning: ignoring temporary created by a constructor declared with \'nodiscard\' attribute: Don\'t let that S-Char go! [-Wunused-value]","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp:121:3: warning: ignoring temporary created by a constructor declared with \'nodiscard\' attribute: Don\'t throw me away! [-Wunused-value]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_container_subscript_expr"]={ | ["warn_unused_container_subscript_expr"]={ | ||
[ | [i]={n,o,p,Q,Y}, | ||
[j]=Y, | |||
[ | |||
[b]="container access result unused - container access should not be used for side effects", | [b]="container access result unused - container access should not be used for side effects", | ||
[ | [d]=h, | ||
[ | [a]="container access result unused \\- container access should not be used for side effects", | ||
[ | [e]=bc, | ||
[ | [c]=P, | ||
[ | [f]={"e65b086e07a6",1331064356,"Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,\nNSNumber, and boolea...","Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,\nNSNumber, and boolean literals. This includes both Sema and Codegen support.\nIncluded is also support for new Objective-C container subscripting.\n\nMy apologies for the large patch. It was very difficult to break apart.\nThe patch introduces changes to the driver as well to cause clang to link\nin additional runtime support when needed to support the new language features.\n\nDocs are forthcoming to document the implementation and behavior of these features.\n\nllvm-svn: 152137"}, | ||
[ | [g]={{M,345,"void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) {\n // ...\n if (const ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(E)) {\n // ...\n } else if (const PseudoObjectExpr *POE = dyn_cast<PseudoObjectExpr>(E)) {\n // ...\n if (isa<ObjCSubscriptRefExpr>(Source))\n DiagID = diag::warn_unused_container_subscript_expr;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/objc-container-subscripting-2.m"]={"clang/test/SemaObjC/objc-container-subscripting-2.m:25:3: warning: container access result unused - container access should not be used for side effects [-Wunused-value]","clang/test/SemaObjC/objc-container-subscripting-2.m:28:3: warning: container access result unused - container access should not be used for side effects [-Wunused-value]"} | ["clang/test/SemaObjC/objc-container-subscripting-2.m"]={"clang/test/SemaObjC/objc-container-subscripting-2.m:25:3: warning: container access result unused - container access should not be used for side effects [-Wunused-value]","clang/test/SemaObjC/objc-container-subscripting-2.m:28:3: warning: container access result unused - container access should not be used for side effects [-Wunused-value]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_exception_param"]={ | ["warn_unused_exception_param"]={ | ||
[ | [i]={"unused-exception-parameter"}, | ||
[j]="unused-exception-parameter", | |||
[ | |||
[b]="unused exception parameter %0", | [b]="unused exception parameter %0", | ||
[ | [d]=h, | ||
[ | [a]="unused exception parameter (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-exception\\-parameter[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"3f324d569bfc",1272912674,"Diagnose unused exception parameters under a different warning group\n(-Wunused-exception-parameter) ...","Diagnose unused exception parameters under a different warning group\n(-Wunused-exception-parameter) than normal variables, since it\'s more\ncommon to name and then ignore an exception parameter. This warning is\nneither enabled by default nor by -Wall. Fixes <rdar://problem/7931045>.\n\nllvm-svn: 102931"}, | ||
[ | [g]={{B,2150,"/// DiagnoseUnusedDecl - Emit warnings about declarations that are not used\n/// unless they are marked attr(unused).\nvoid Sema::DiagnoseUnusedDecl(const NamedDecl *D, DiagReceiverTy DiagReceiver) {\n // ...\n if (isa<VarDecl>(D) && cast<VarDecl>(D)->isExceptionVariable())\n DiagID = diag::warn_unused_exception_param;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/warn-unused-exception-param.m"]={"clang/test/SemaObjC/warn-unused-exception-param.m:3:21: warning: unused exception parameter \'a\' [-Wunused-exception-parameter]"} | ["clang/test/SemaObjC/warn-unused-exception-param.m"]={"clang/test/SemaObjC/warn-unused-exception-param.m:3:21: warning: unused exception parameter \'a\' [-Wunused-exception-parameter]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_expr"]={ | ["warn_unused_expr"]={ | ||
[ | [i]={n,o,p,Q,Y}, | ||
[j]=Y, | |||
[ | |||
[b]="expression result unused", | [b]="expression result unused", | ||
[ | [d]=h, | ||
[ | [a]="expression result unused", | ||
[ | [e]=bc, | ||
[ | [c]=P, | ||
[ | [f]={vc,1237025389,xb,xb}, | ||
[ | [g]={{"clang/lib/Interpreter/Interpreter.cpp",360,"llvm::Expected<PartialTranslationUnit &> Interpreter::Parse(llvm::StringRef Code) {\n // ...\n getCompilerInstance()->getDiagnostics().setSeverity(clang::diag::warn_unused_expr, diag::Severity::Ignored, SourceLocation());"},{Sb,8843,"ExprResult Sema::ActOnFinishFullExpr(Expr *FE, SourceLocation CC, bool DiscardedValue, bool IsConstexpr, bool IsTemplateArgument) {\n // ...\n if (DiscardedValue) {\n // ...\n DiagnoseUnusedExprResult(FullExpr.get(), diag::warn_unused_expr);"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGen/2004-06-08-OpaqueStructArg.c"]={"clang/test/CodeGen/2004-06-08-OpaqueStructArg.c:6:7: warning: expression result unused [-Wunused-value]"} | ["clang/test/CodeGen/2004-06-08-OpaqueStructArg.c"]={"clang/test/CodeGen/2004-06-08-OpaqueStructArg.c:6:7: warning: expression result unused [-Wunused-value]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_function"]={ | ["warn_unused_function"]={ | ||
[ | [i]={n,o,p,Q,"unused-function"}, | ||
[j]="unused-function", | |||
[ | |||
[b]="unused function %0", | [b]="unused function %0", | ||
[ | [d]=h, | ||
[ | [a]="unused function (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-function[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={"90073804fb1c",1265933250,"Implementing unused function warning.\n\nllvm-svn: 95940","Implementing unused function warning.\n\nllvm-svn: 95940"}, | ||
[ | [g]={{S,1378,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n // If there were errors, disable \'unused\' warnings since they will mostly be\n // noise. Don\'t warn for a use from a module: either we should warn on all\n // file-scope declarations in modules or not at all, but whether the\n // declaration is used is immaterial.\n if (!Diags.hasErrorOccurred() && TUKind != TU_Module) {\n // Output warning for unused file scoped decls.\n for (UnusedFileScopedDeclsType::iterator I = UnusedFileScopedDecls.begin(ExternalSource.get()), E = UnusedFileScopedDecls.end(); I != E; ++I) {\n // ...\n if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {\n // ...\n if (DiagD->isReferenced()) {\n // ...\n } else {\n if (FD->getDescribedFunctionTemplate())\n // ...\n else\n Diag(DiagD->getLocation(), isa<CXXMethodDecl>(DiagD) ? diag::warn_unused_member_function : diag::warn_unused_function) << DiagD << DiagRange;"}}, | ||
[ | [k]={ | ||
["clang/test/Misc/diag-unused-source-ranges.cpp"]={"clang/test/Misc/diag-unused-source-ranges.cpp:52:12:{52:12-52:23}: warning: unused function \'unused_func\' [-Wunused-function]","clang/test/Misc/diag-unused-source-ranges.cpp:69:6:{69:6-69:21}: warning: unused function \'arrow_decl<int>\' [-Wunused-function]"} | ["clang/test/Misc/diag-unused-source-ranges.cpp"]={"clang/test/Misc/diag-unused-source-ranges.cpp:52:12:{52:12-52:23}: warning: unused function \'unused_func\' [-Wunused-function]","clang/test/Misc/diag-unused-source-ranges.cpp:69:6:{69:6-69:21}: warning: unused function \'arrow_decl<int>\' [-Wunused-function]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_label"]={ | ["warn_unused_label"]={ | ||
[ | [i]={n,o,p,Q,"unused-label"}, | ||
[j]="unused-label", | |||
[ | |||
[b]="unused label %0", | [b]="unused label %0", | ||
[ | [d]=h, | ||
[ | [a]="unused label (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-label[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={"72664df10386",1284931285,"Implement -Wunused-label.\n\nllvm-svn: 114315","Implement -Wunused-label.\n\nllvm-svn: 114315"}, | ||
[ | [g]={{B,2152,"/// DiagnoseUnusedDecl - Emit warnings about declarations that are not used\n/// unless they are marked attr(unused).\nvoid Sema::DiagnoseUnusedDecl(const NamedDecl *D, DiagReceiverTy DiagReceiver) {\n // ...\n if (isa<VarDecl>(D) && cast<VarDecl>(D)->isExceptionVariable())\n // ...\n else if (isa<LabelDecl>(D))\n DiagID = diag::warn_unused_label;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-unused-label-error.cpp"]={"clang/test/SemaCXX/warn-unused-label-error.cpp:7:5: warning: unused label \'A\' [-Wunused-label]"} | ["clang/test/SemaCXX/warn-unused-label-error.cpp"]={"clang/test/SemaCXX/warn-unused-label-error.cpp:7:5: warning: unused label \'A\' [-Wunused-label]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_lambda_capture"]={ | ["warn_unused_lambda_capture"]={ | ||
[ | [i]={n,o,p,Q,"unused-lambda-capture"}, | ||
[j]="unused-lambda-capture", | |||
[ | |||
[b]="lambda capture %0 is not %select{used|required to be captured for this use}1", | [b]="lambda capture %0 is not %select{used|required to be captured for this use}1", | ||
[ | [d]=h, | ||
[ | [a]="lambda capture (.*?) is not (?:used|required to be captured for this use)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-lambda\\-capture[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={"87a036259bb4",1484319666,"[Sema] Add warning for unused lambda captures\n\nSummary:\nWarn when a lambda explicitly captures somet...","[Sema] Add warning for unused lambda captures\n\nSummary:\nWarn when a lambda explicitly captures something that is not used in its body.\n\nThe warning is part of -Wunused and can be enabled with -Wunused-lambda-capture.\n\nReviewers: rsmith, arphaman, jbcoe, aaron.ballman\n\nSubscribers: Quuxplusone, arphaman, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D28467\n\nllvm-svn: 291905"}, | ||
[ | [g]={{"clang/lib/Sema/SemaLambda.cpp",1879,"bool Sema::DiagnoseUnusedLambdaCapture(SourceRange CaptureRange, const Capture &From) {\n // ...\n auto diag = Diag(From.getLocation(), diag::warn_unused_lambda_capture);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-unused-lambda-capture.cpp"]={"clang/test/SemaCXX/warn-unused-lambda-capture.cpp:43:36: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:44:43: warning: lambda capture \'i\' is not required to be captured for this use [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:45:45: warning: lambda capture \'i\' is not required to be captured for this use [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:46:42: warning: lambda capture \'k\' is not required to be captured for this use [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:49:41: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:52:50: warning: lambda capture \'j\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:55:45: warning: lambda capture \'j\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:58:51: warning: lambda capture \'j\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:64:38: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:68:37: warning: lambda capture \'trivial\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:71:53: warning: lambda capture \'cons\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:87:34: warning: lambda capture \'this\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:90:39: warning: lambda capture \'this\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:99:34: warning: lambda capture \'this\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:102:39: warning: lambda capture \'this\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:111:34: warning: lambda capture \'this\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:123:34: warning: lambda capture \'this\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:200:23: warning: lambda capture \'c\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:148:36: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:149:43: warning: lambda capture \'i\' is not required to be captured for this use [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:150:45: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:151:42: warning: lambda capture \'k\' is not required to be captured for this use [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:152:50: warning: lambda capture \'k\' is not required to be captured for this use [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:155:41: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:158:50: warning: lambda capture \'j\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:161:45: warning: lambda capture \'j\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:164:51: warning: lambda capture \'j\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:168:53: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:172:38: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:176:37: warning: lambda capture \'trivial\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:179:53: warning: lambda capture \'cons\' is not used [-Wunused-lambda-capture]"} | ["clang/test/SemaCXX/warn-unused-lambda-capture.cpp"]={"clang/test/SemaCXX/warn-unused-lambda-capture.cpp:43:36: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:44:43: warning: lambda capture \'i\' is not required to be captured for this use [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:45:45: warning: lambda capture \'i\' is not required to be captured for this use [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:46:42: warning: lambda capture \'k\' is not required to be captured for this use [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:49:41: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:52:50: warning: lambda capture \'j\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:55:45: warning: lambda capture \'j\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:58:51: warning: lambda capture \'j\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:64:38: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:68:37: warning: lambda capture \'trivial\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:71:53: warning: lambda capture \'cons\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:87:34: warning: lambda capture \'this\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:90:39: warning: lambda capture \'this\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:99:34: warning: lambda capture \'this\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:102:39: warning: lambda capture \'this\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:111:34: warning: lambda capture \'this\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:123:34: warning: lambda capture \'this\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:200:23: warning: lambda capture \'c\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:148:36: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:149:43: warning: lambda capture \'i\' is not required to be captured for this use [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:150:45: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:151:42: warning: lambda capture \'k\' is not required to be captured for this use [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:152:50: warning: lambda capture \'k\' is not required to be captured for this use [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:155:41: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:158:50: warning: lambda capture \'j\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:161:45: warning: lambda capture \'j\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:164:51: warning: lambda capture \'j\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:168:53: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:172:38: warning: lambda capture \'i\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:176:37: warning: lambda capture \'trivial\' is not used [-Wunused-lambda-capture]","clang/test/SemaCXX/warn-unused-lambda-capture.cpp:179:53: warning: lambda capture \'cons\' is not used [-Wunused-lambda-capture]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_local_typedef"]={ | ["warn_unused_local_typedef"]={ | ||
[ | [i]={n,o,p,Q,"unused-local-typedef","unused-local-typedefs"}, | ||
[j]="unused-local-typedef", | |||
[ | |||
[b]="unused %select{typedef|type alias}0 %1", | [b]="unused %select{typedef|type alias}0 %1", | ||
[ | [d]=h, | ||
[ | [a]="unused (?:typedef|type alias) (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-local\\-typedef[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={"728894340f2a",1409966755,"Add -Wunused-local-typedef, a warning that finds unused local typedefs.\n\nThe warning warns on Typede...","Add -Wunused-local-typedef, a warning that finds unused local typedefs.\n\nThe warning warns on TypedefNameDecls -- typedefs and C++11 using aliases --\nthat are !isReferenced(). Since the isReferenced() bit on TypedefNameDecls\nwasn\'t used for anything before this warning it wasn\'t always set correctly,\nso this patch also adds a few missing MarkAnyDeclReferenced() calls in\nvarious places for TypedefNameDecls.\n\nThis is made a bit complicated due to local typedefs possibly being used only\nafter their local scope has closed. Consider:\n\n template <class T>\n void template_fun(T t) {\n typename T::Foo s3foo; // YYY\n (void)s3foo;\n }\n void template_fun_user() {\n struct Local {\n typedef int Foo; // XXX\n } p;\n template_fun(p);\n }\n\nHere the typedef in XXX is only used at end-of-translation unit, when YYY in\ntemplate_fun() gets instantiated. To handle this, typedefs that are unused when\ntheir scope exits are added to a set of potentially unused typedefs, and that\nset gets checked at end-of-TU. Typedefs that are still unused at that point then\nget warned on. There\'s also serialization code for this set, so that the\nwarning works with precompiled headers and modules. For modules, the warning\nis emitted when the module is built, for precompiled headers each time the\nheader gets used.\n\nFinally, consider a function using C++14 auto return types to return a local\ntype defined in a header:\n\n auto f() {\n struct S { typedef int a; };\n return S();\n }\n\nHere, the typedef escapes its local scope and could be used by only some\ntranslation units including the header. To not warn on this, add a\nRecursiveASTVisitor that marks all delcs on local types returned from auto\nfunctions as referenced. (Except if it\'s a function with internal linkage, or\nthe decls are private and the local type has no friends -- in these cases, it\n_is_ safe to warn.)\n\nSeveral of the included testcases (most of the interesting ones) were provided\nby Richard Smith.\n\n(gcc\'s spelling -Wunused-local-typedefs is supported as an alias for this\nwarning.)\n\nllvm-svn: 217298"}, | ||
[ | [g]={{S,1022,"void Sema::emitAndClearUnusedLocalTypedefWarnings() {\n // ...\n for (const TypedefNameDecl *TD : UnusedLocalTypedefNameCandidates) {\n // ...\n Diag(TD->getLocation(), diag::warn_unused_local_typedef) << isa<TypeAliasDecl>(TD) << TD->getDeclName();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/c2x-maybe_unused.c"]={"clang/test/Sema/c2x-maybe_unused.c:21:15: warning: unused typedef \'I\' [-Wunused-local-typedef]"} | ["clang/test/Sema/c2x-maybe_unused.c"]={"clang/test/Sema/c2x-maybe_unused.c:21:15: warning: unused typedef \'I\' [-Wunused-local-typedef]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_member_function"]={ | ["warn_unused_member_function"]={ | ||
[ | [i]={"unused-member-function"}, | ||
[j]="unused-member-function", | |||
[ | |||
[b]="unused member function %0", | [b]="unused member function %0", | ||
[ | [d]=h, | ||
[ | [a]="unused member function (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-member\\-function[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"beb71b315a89",1282082804,"Rename -Wunused-method -> -Wunused-member-function.\n\nllvm-svn: 111305","Rename -Wunused-method -> -Wunused-member-function.\n\nllvm-svn: 111305"}, | ||
[ | [g]={{S,1377,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n // If there were errors, disable \'unused\' warnings since they will mostly be\n // noise. Don\'t warn for a use from a module: either we should warn on all\n // file-scope declarations in modules or not at all, but whether the\n // declaration is used is immaterial.\n if (!Diags.hasErrorOccurred() && TUKind != TU_Module) {\n // Output warning for unused file scoped decls.\n for (UnusedFileScopedDeclsType::iterator I = UnusedFileScopedDecls.begin(ExternalSource.get()), E = UnusedFileScopedDecls.end(); I != E; ++I) {\n // ...\n if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {\n // ...\n if (DiagD->isReferenced()) {\n // ...\n } else {\n if (FD->getDescribedFunctionTemplate())\n // ...\n else\n Diag(DiagD->getLocation(), isa<CXXMethodDecl>(DiagD) ? diag::warn_unused_member_function : diag::warn_unused_function) << DiagD << DiagRange;"}}, | ||
[ | [k]={ | ||
["clang/test/Misc/diag-unused-source-ranges.cpp"]={"clang/test/Misc/diag-unused-source-ranges.cpp:106:8:{106:8-106:11}: warning: unused member function \'fun\' [-Wunused-member-function]"} | ["clang/test/Misc/diag-unused-source-ranges.cpp"]={"clang/test/Misc/diag-unused-source-ranges.cpp:106:8:{106:8-106:11}: warning: unused member function \'fun\' [-Wunused-member-function]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_parameter"]={ | ["warn_unused_parameter"]={ | ||
[ | [i]={s,n,Vb,"unused-parameter"}, | ||
[j]="unused-parameter", | |||
[ | |||
[b]="unused parameter %0", | [b]="unused parameter %0", | ||
[ | [d]=h, | ||
[ | [a]="unused parameter (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-parameter[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"c9c02ed8f499",1245455562,"Keep track of when declarations are \"used\" according to C and\nC++. This logic is required to trigger...","Keep track of when declarations are \"used\" according to C and\nC++. This logic is required to trigger implicit instantiation of\nfunction templates and member functions of class templates, which will\nbe implemented separately.\n\nThis commit includes support for -Wunused-parameter, printing warnings\nfor named parameters that are not used within a function/Objective-C\nmethod/block. Fixes <rdar://problem/6505209>.\n\nllvm-svn: 73797"}, | ||
[ | [g]={{B,14854,"void Sema::DiagnoseUnusedParameters(ArrayRef<ParmVarDecl *> Parameters) {\n // ...\n for (const ParmVarDecl *Parameter : Parameters) {\n if (!Parameter->isReferenced() && Parameter->getDeclName() && !Parameter->hasAttr<UnusedAttr>()) {\n Diag(Parameter->getLocation(), diag::warn_unused_parameter) << Parameter->getDeclName();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-unused.c"]={"clang/test/Sema/attr-unused.c:29:12: warning: unused parameter \'x\' [-Wunused-parameter]"} | ["clang/test/Sema/attr-unused.c"]={"clang/test/Sema/attr-unused.c:29:12: warning: unused parameter \'x\' [-Wunused-parameter]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_private_field"]={ | ["warn_unused_private_field"]={ | ||
[ | [i]={n,o,p,Q,"unused-private-field"}, | ||
[j]="unused-private-field", | |||
[ | |||
[b]="private field %0 is not used", | [b]="private field %0 is not used", | ||
[ | [d]=h, | ||
[ | [a]="private field (.*?) is not used", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-private\\-field[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={"0baec549a3f4",1338971524,"Introduce -Wunused-private-field. If enabled, this warning detects\nunused private fields of classes ...","Introduce -Wunused-private-field. If enabled, this warning detects\nunused private fields of classes that are fully defined in the current\ntranslation unit.\n\nllvm-svn: 158054"}, | ||
[ | [g]={{S,1413,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n if (!Diags.isIgnored(diag::warn_unused_private_field, SourceLocation())) {"},{S,1422,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n if (!Diags.isIgnored(diag::warn_unused_private_field, SourceLocation())) {\n // ...\n for (const NamedDecl *D : UnusedPrivateFields) {\n // ...\n if (RD && !RD->isUnion() && IsRecordFullyDefined(RD, RecordsComplete, MNCComplete)) {\n Diag(D->getLocation(), diag::warn_unused_private_field) << D->getDeclName();"},{T,3704,"/// 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 if (!Diags.isIgnored(diag::warn_unused_private_field, FD->getLocation())) {"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-unused-private-field.cpp"]={"clang/test/SemaCXX/warn-unused-private-field.cpp:45:7: warning: private field \'unused_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:63:7: warning: private field \'unused_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:124:7: warning: private field \'primitive_type_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:125:6: warning: private field \'pointer_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:126:7: warning: private field \'no_initializer_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:127:7: warning: private field \'default_initializer_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:128:7: warning: private field \'other_initializer_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:129:14: warning: private field \'unused_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:130:7: warning: private field \'in_class_initializer_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:132:11: warning: private field \'trivial_initializer_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:137:11: warning: private field \'trivial_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:173:7: warning: private field \'unused_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:205:7: warning: private field \'d\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:240:9: warning: private field \'p_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:241:8: warning: private field \'b_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:242:6: warning: private field \'a_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:243:9: warning: private field \'p2_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:253:12: warning: private field \'p\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:262:7: warning: private field \'a\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:277:7: warning: private field \'n\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:285:7: warning: private field \'n\' is not used [-Wunused-private-field]"} | ["clang/test/SemaCXX/warn-unused-private-field.cpp"]={"clang/test/SemaCXX/warn-unused-private-field.cpp:45:7: warning: private field \'unused_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:63:7: warning: private field \'unused_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:124:7: warning: private field \'primitive_type_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:125:6: warning: private field \'pointer_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:126:7: warning: private field \'no_initializer_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:127:7: warning: private field \'default_initializer_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:128:7: warning: private field \'other_initializer_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:129:14: warning: private field \'unused_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:130:7: warning: private field \'in_class_initializer_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:132:11: warning: private field \'trivial_initializer_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:137:11: warning: private field \'trivial_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:173:7: warning: private field \'unused_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:205:7: warning: private field \'d\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:240:9: warning: private field \'p_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:241:8: warning: private field \'b_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:242:6: warning: private field \'a_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:243:9: warning: private field \'p2_\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:253:12: warning: private field \'p\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:262:7: warning: private field \'a\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:277:7: warning: private field \'n\' is not used [-Wunused-private-field]","clang/test/SemaCXX/warn-unused-private-field.cpp:285:7: warning: private field \'n\' is not used [-Wunused-private-field]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_property_backing_ivar"]={ | ["warn_unused_property_backing_ivar"]={ | ||
[ | [i]={n,o,p,Q,"unused-property-ivar"}, | ||
[j]="unused-property-ivar", | |||
[ | |||
[b]="ivar %0 which backs the property is not referenced in this property\'s accessor", | [b]="ivar %0 which backs the property is not referenced in this property\'s accessor", | ||
[ | [d]=h, | ||
[ | [a]="ivar (.*?) which backs the property is not referenced in this property\'s accessor", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-property\\-ivar[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={"5e3429c39583",1382737490,"ObjectiveC: under -Wunused-property-ivar warn if property\'s\nbacking warning is not used in one of it...","ObjectiveC: under -Wunused-property-ivar warn if property\'s\nbacking warning is not used in one of its accessor methods.\n// rdar://14989999\n\nllvm-svn: 193439"}, | ||
[ | [g]={{I,5346,"void Sema::DiagnoseUnusedBackingIvarInAccessor(Scope *S, const ObjCImplementationDecl *ImplD) {\n // ...\n for (const auto *CurMethod : ImplD->instance_methods()) {\n unsigned DIAG = diag::warn_unused_property_backing_ivar;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/unused-backing-ivar-warning.m"]={"clang/test/SemaObjC/unused-backing-ivar-warning.m:18:1: warning: ivar \'_x\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:21:1: warning: ivar \'_y\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:25:1: warning: ivar \'_v\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:38:1: warning: ivar \'_u\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:48:1: warning: ivar \'tIvar\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:122:1: warning: ivar \'q\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:123:1: warning: ivar \'q\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:124:1: warning: ivar \'r\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:145:1: warning: ivar \'_p2\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:200:1: warning: ivar \'_cidURL1\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]"} | ["clang/test/SemaObjC/unused-backing-ivar-warning.m"]={"clang/test/SemaObjC/unused-backing-ivar-warning.m:18:1: warning: ivar \'_x\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:21:1: warning: ivar \'_y\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:25:1: warning: ivar \'_v\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:38:1: warning: ivar \'_u\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:48:1: warning: ivar \'tIvar\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:122:1: warning: ivar \'q\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:123:1: warning: ivar \'q\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:124:1: warning: ivar \'r\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:145:1: warning: ivar \'_p2\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]","clang/test/SemaObjC/unused-backing-ivar-warning.m:200:1: warning: ivar \'_cidURL1\' which backs the property is not referenced in this property\'s accessor [-Wunused-property-ivar]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_property_expr"]={ | ["warn_unused_property_expr"]={ | ||
[ | [i]={"unused-getter-return-value"}, | ||
[j]="unused-getter-return-value", | |||
[ | |||
[b]="property access result unused - getters should not be used for side effects", | [b]="property access result unused - getters should not be used for side effects", | ||
[ | [d]=h, | ||
[ | [a]="property access result unused \\- getters should not be used for side effects", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-getter\\-return\\-value[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"2ba5ca9d4fd5",1250441847,"Improve the diagnostic emitted when an unused ObjC property getter\nis found. Instead of complaining...","Improve the diagnostic emitted when an unused ObjC property getter\nis found. Instead of complaining about a generic \"unused expr\",\nemit:\nt.m:7:3: warning: property access result unused - getters should not have side effects\n\nWhile objc property getters *could* have side effects, according to\nthe language best practices, they *shouldn\'t*. Hopefully the\ndiagnostic now gets this across.\n\nllvm-svn: 79192"}, | ||
[ | [g]={{M,347,"void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) {\n // ...\n if (const ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(E)) {\n // ...\n } else if (const PseudoObjectExpr *POE = dyn_cast<PseudoObjectExpr>(E)) {\n // ...\n if (isa<ObjCSubscriptRefExpr>(Source))\n // ...\n else if (isa<ObjCPropertyRefExpr>(Source))\n DiagID = diag::warn_unused_property_expr;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/access-property-getter.m"]={"clang/test/SemaObjC/access-property-getter.m:8:5: warning: property access result unused - getters should not be used for side effects [-Wunused-getter-return-value]"} | ["clang/test/SemaObjC/access-property-getter.m"]={"clang/test/SemaObjC/access-property-getter.m:8:5: warning: property access result unused - getters should not be used for side effects [-Wunused-getter-return-value]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_result"]={ | ["warn_unused_result"]={ | ||
[ | [i]={n,o,p,Q,"unused-result",Y}, | ||
[j]="unused-result", | |||
[ | |||
[b]="ignoring return value of function declared with %0 attribute", | [b]="ignoring return value of function declared with %0 attribute", | ||
[ | [d]=h, | ||
[ | [a]="ignoring return value of function declared with (.*?) attribute", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-result[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={"a17cf6330fb7",1312499464,"Specialize diag::warn_unused_call for the \"warn_unused_result\" attribute, so\nit can be controlled wi...","Specialize diag::warn_unused_call for the \"warn_unused_result\" attribute, so\nit can be controlled with a distinct flag.\n\nllvm-svn: 136941"}, | ||
[ | [g]={{M,212,"static bool DiagnoseNoDiscard(Sema &S, const WarnUnusedResultAttr *A, SourceLocation Loc, SourceRange R1, SourceRange R2, bool IsCtor) {\n // ...\n if (Msg.empty()) {\n // ...\n return S.Diag(Loc, diag::warn_unused_result) << A << R1 << R2;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/unused-expr.c"]={"clang/test/Sema/unused-expr.c:79:3: warning: ignoring return value of function declared with \'warn_unused_result\' attribute [-Wunused-result]","clang/test/Sema/unused-expr.c:91:3: warning: ignoring return value of function declared with \'warn_unused_result\' attribute [-Wunused-result]","clang/test/Sema/unused-expr.c:95:12: warning: ignoring return value of function declared with \'warn_unused_result\' attribute [-Wunused-result]","clang/test/Sema/unused-expr.c:104:3: warning: ignoring return value of function declared with \'warn_unused_result\' attribute [-Wunused-result]","clang/test/Sema/unused-expr.c:148:3: warning: ignoring return value of function declared with \'warn_unused_result\' attribute [-Wunused-result]"} | ["clang/test/Sema/unused-expr.c"]={"clang/test/Sema/unused-expr.c:79:3: warning: ignoring return value of function declared with \'warn_unused_result\' attribute [-Wunused-result]","clang/test/Sema/unused-expr.c:91:3: warning: ignoring return value of function declared with \'warn_unused_result\' attribute [-Wunused-result]","clang/test/Sema/unused-expr.c:95:12: warning: ignoring return value of function declared with \'warn_unused_result\' attribute [-Wunused-result]","clang/test/Sema/unused-expr.c:104:3: warning: ignoring return value of function declared with \'warn_unused_result\' attribute [-Wunused-result]","clang/test/Sema/unused-expr.c:148:3: warning: ignoring return value of function declared with \'warn_unused_result\' attribute [-Wunused-result]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_result_msg"]={ | ["warn_unused_result_msg"]={ | ||
[ | [i]={n,o,p,Q,"unused-result",Y}, | ||
[j]="unused-result", | |||
[ | |||
[b]="ignoring return value of function declared with %0 attribute: %1", | [b]="ignoring return value of function declared with %0 attribute: %1", | ||
[ | [d]=h, | ||
[ | [a]="ignoring return value of function declared with (.*?) attribute\\: (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-result[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={"3bef014e7d79",1563609394,"Implement P1301R4, which allows specifying an optional message on the [[nodiscard]] attribute.\n\nThis...","Implement P1301R4, which allows specifying an optional message on the [[nodiscard]] attribute.\n\nThis also bumps the attribute feature test value and introduces the notion of a C++2a extension warning.\n\nllvm-svn: 366626"}, | ||
[ | [g]={{M,218,"static bool DiagnoseNoDiscard(Sema &S, const WarnUnusedResultAttr *A, SourceLocation Loc, SourceRange R1, SourceRange R2, bool IsCtor) {\n // ...\n return S.Diag(Loc, diag::warn_unused_result_msg) << A << Msg << R1 << R2;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/c2x-nodiscard.c"]={"clang/test/Sema/c2x-nodiscard.c:35:3: warning: ignoring return value of function declared with \'nodiscard\' attribute: Wrong [-Wunused-result]"} | ["clang/test/Sema/c2x-nodiscard.c"]={"clang/test/Sema/c2x-nodiscard.c:35:3: warning: ignoring return value of function declared with \'nodiscard\' attribute: Wrong [-Wunused-result]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_result_typedef_unsupported_spelling"]={ | ["warn_unused_result_typedef_unsupported_spelling"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="\'[[%select{nodiscard|gnu::warn_unused_result}0]]\' attribute ignored when applied to a typedef; consider using \'__attribute__((warn_unused_result))\' or \'[[clang::warn_unused_result]]\' instead", | [b]="\'[[%select{nodiscard|gnu::warn_unused_result}0]]\' attribute ignored when applied to a typedef; consider using \'__attribute__((warn_unused_result))\' or \'[[clang::warn_unused_result]]\' instead", | ||
[ | [d]=h, | ||
[ | [a]="\'\\[\\[(?:nodiscard|gnu\\:\\:warn_unused_result)\\]\\]\' attribute ignored when applied to a typedef; consider using \'__attribute__\\(\\(warn_unused_result\\)\\)\' or \'\\[\\[clang\\:\\:warn_unused_result\\]\\]\' instead", | ||
[ | [e]=R, | ||
[ | [c]=l, | ||
[ | [f]={ad,1620530452,bd,cd}, | ||
[ | [g]={{w,3182,"static void handleWarnUnusedResult(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if ((!AL.isGNUAttribute() && !(AL.isStandardAttributeSyntax() && AL.isClangScope())) && isa<TypedefNameDecl>(D)) {\n S.Diag(AL.getLoc(), diag::warn_unused_result_typedef_unsupported_spelling) << AL.isGNUScope();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-unused-result.cpp"]={"clang/test/SemaCXX/warn-unused-result.cpp:271:3: warning: \'[[nodiscard]]\' attribute ignored when applied to a typedef; consider using \'__attribute__((warn_unused_result))\' or \'[[clang::warn_unused_result]]\' instead [-Wignored-attributes]","clang/test/SemaCXX/warn-unused-result.cpp:272:3: warning: \'[[gnu::warn_unused_result]]\' attribute ignored when applied to a typedef; consider using \'__attribute__((warn_unused_result))\' or \'[[clang::warn_unused_result]]\' instead [-Wignored-attributes]"} | ["clang/test/SemaCXX/warn-unused-result.cpp"]={"clang/test/SemaCXX/warn-unused-result.cpp:271:3: warning: \'[[nodiscard]]\' attribute ignored when applied to a typedef; consider using \'__attribute__((warn_unused_result))\' or \'[[clang::warn_unused_result]]\' instead [-Wignored-attributes]","clang/test/SemaCXX/warn-unused-result.cpp:272:3: warning: \'[[gnu::warn_unused_result]]\' attribute ignored when applied to a typedef; consider using \'__attribute__((warn_unused_result))\' or \'[[clang::warn_unused_result]]\' instead [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_template"]={ | ["warn_unused_template"]={ | ||
[ | [i]={"unused-template"}, | ||
[j]="unused-template", | |||
[ | |||
[b]="unused %select{function|variable}0 template %1", | [b]="unused %select{function|variable}0 template %1", | ||
[ | [d]=h, | ||
[ | [a]="unused (?:function|variable) template (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-template[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"64e1e1ea0a27",1494329141,"Reland \"Warn about unused static file scope function template declarations.\"\n\nThis patch reinstates ...","Reland \"Warn about unused static file scope function template declarations.\"\n\nThis patch reinstates r299930, reverted in r299956, as a separate diagnostic\noption (-Wunused-template). \n\nllvm-svn: 302518"}, | ||
[ | [g]={{S,1373,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n // If there were errors, disable \'unused\' warnings since they will mostly be\n // noise. Don\'t warn for a use from a module: either we should warn on all\n // file-scope declarations in modules or not at all, but whether the\n // declaration is used is immaterial.\n if (!Diags.hasErrorOccurred() && TUKind != TU_Module) {\n // Output warning for unused file scoped decls.\n for (UnusedFileScopedDeclsType::iterator I = UnusedFileScopedDecls.begin(ExternalSource.get()), E = UnusedFileScopedDecls.end(); I != E; ++I) {\n // ...\n if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {\n // ...\n if (DiagD->isReferenced()) {\n // ...\n } else {\n if (FD->getDescribedFunctionTemplate())\n Diag(DiagD->getLocation(), diag::warn_unused_template) << /*function=*/0 << DiagD << DiagRange;"},{S,1395,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n // If there were errors, disable \'unused\' warnings since they will mostly be\n // noise. Don\'t warn for a use from a module: either we should warn on all\n // file-scope declarations in modules or not at all, but whether the\n // declaration is used is immaterial.\n if (!Diags.hasErrorOccurred() && TUKind != TU_Module) {\n // Output warning for unused file scoped decls.\n for (UnusedFileScopedDeclsType::iterator I = UnusedFileScopedDecls.begin(ExternalSource.get()), E = UnusedFileScopedDecls.end(); I != E; ++I) {\n // ...\n if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {\n // ...\n } else {\n // ...\n if (DiagD->isReferenced()) {\n // ...\n } else if (DiagD->getDescribedVarTemplate()) {\n Diag(DiagD->getLocation(), diag::warn_unused_template) << /*variable=*/1 << DiagD << DiagRange;"}}, | ||
[ | [k]={ | ||
["clang/test/Misc/diag-unused-source-ranges.cpp"]={"clang/test/Misc/diag-unused-source-ranges.cpp:28:32:{28:32-28:37}: warning: unused function template \'templ\' [-Wunused-template]","clang/test/Misc/diag-unused-source-ranges.cpp:42:10:{42:10-42:13}: warning: unused function template \'foo\' [-Wunused-template]","clang/test/Misc/diag-unused-source-ranges.cpp:63:6:{63:6-63:16}: warning: unused function template \'arrow_decl\' [-Wunused-template]","clang/test/Misc/diag-unused-source-ranges.cpp:76:10:{76:10-76:20}: warning: unused function template \'func_templ\' [-Wunused-template]","clang/test/Misc/diag-unused-source-ranges.cpp:90:35:{90:35-90:47}: warning: unused function template \'never_called\' [-Wunused-template]","clang/test/Misc/diag-unused-source-ranges.cpp:97:22:{97:22-97:31}: warning: unused variable template \'var_templ\' [-Wunused-template]"} | ["clang/test/Misc/diag-unused-source-ranges.cpp"]={"clang/test/Misc/diag-unused-source-ranges.cpp:28:32:{28:32-28:37}: warning: unused function template \'templ\' [-Wunused-template]","clang/test/Misc/diag-unused-source-ranges.cpp:42:10:{42:10-42:13}: warning: unused function template \'foo\' [-Wunused-template]","clang/test/Misc/diag-unused-source-ranges.cpp:63:6:{63:6-63:16}: warning: unused function template \'arrow_decl\' [-Wunused-template]","clang/test/Misc/diag-unused-source-ranges.cpp:76:10:{76:10-76:20}: warning: unused function template \'func_templ\' [-Wunused-template]","clang/test/Misc/diag-unused-source-ranges.cpp:90:35:{90:35-90:47}: warning: unused function template \'never_called\' [-Wunused-template]","clang/test/Misc/diag-unused-source-ranges.cpp:97:22:{97:22-97:31}: warning: unused variable template \'var_templ\' [-Wunused-template]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_variable"]={ | ["warn_unused_variable"]={ | ||
[ | [i]={n,o,p,Q,"unused-variable"}, | ||
[j]="unused-variable", | |||
[ | |||
[b]="unused variable %0", | [b]="unused variable %0", | ||
[ | [d]=h, | ||
[ | [a]="unused variable (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-variable[^\\]]*\\]", | ||
[ | [c]=P, | ||
[ | [f]={"3beaf9bbcdb3",1255037742,"Implement support for -Wunused-variable, from Oscar Bonilla!\n\nllvm-svn: 83577","Implement support for -Wunused-variable, from Oscar Bonilla!\n\nllvm-svn: 83577"}, | ||
[ | [g]={{S,1404,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n // If there were errors, disable \'unused\' warnings since they will mostly be\n // noise. Don\'t warn for a use from a module: either we should warn on all\n // file-scope declarations in modules or not at all, but whether the\n // declaration is used is immaterial.\n if (!Diags.hasErrorOccurred() && TUKind != TU_Module) {\n // Output warning for unused file scoped decls.\n for (UnusedFileScopedDeclsType::iterator I = UnusedFileScopedDecls.begin(ExternalSource.get()), E = UnusedFileScopedDecls.end(); I != E; ++I) {\n // ...\n if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {\n // ...\n } else {\n // ...\n if (DiagD->isReferenced()) {\n // ...\n } else if (DiagD->getDescribedVarTemplate()) {\n // ...\n } else if (DiagD->getType().isConstQualified()) {\n // ...\n } else {\n Diag(DiagD->getLocation(), diag::warn_unused_variable) << DiagD << DiagRange;"},{B,2154,"/// DiagnoseUnusedDecl - Emit warnings about declarations that are not used\n/// unless they are marked attr(unused).\nvoid Sema::DiagnoseUnusedDecl(const NamedDecl *D, DiagReceiverTy DiagReceiver) {\n // ...\n if (isa<VarDecl>(D) && cast<VarDecl>(D)->isExceptionVariable())\n // ...\n else if (isa<LabelDecl>(D))\n // ...\n else\n DiagID = diag::warn_unused_variable;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaTemplate/unused-variables.cpp"]={"clang/test/SemaTemplate/unused-variables.cpp:12:6: warning: unused variable \'x1\' [-Wunused-variable]","clang/test/SemaTemplate/unused-variables.cpp:18:5: warning: unused variable \'u\' [-Wunused-variable]"} | ["clang/test/SemaTemplate/unused-variables.cpp"]={"clang/test/SemaTemplate/unused-variables.cpp:12:6: warning: unused variable \'x1\' [-Wunused-variable]","clang/test/SemaTemplate/unused-variables.cpp:18:5: warning: unused variable \'u\' [-Wunused-variable]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_voidptr"]={ | ["warn_unused_voidptr"]={ | ||
[ | [i]={n,o,p,Q,Y}, | ||
[j]=Y, | |||
[ | |||
[b]="expression result unused; should this cast be to \'void\'?", | [b]="expression result unused; should this cast be to \'void\'?", | ||
[ | [d]=h, | ||
[ | [a]="expression result unused; should this cast be to \'void\'\\?", | ||
[ | [e]=bc, | ||
[ | [c]=P, | ||
[ | [f]={"2351cb9139a4",1270592654,"Devote a special diagnostic to the typo\n (void*) someFunction(5, 10, 15, 20);\nwhere the cast is pre...","Devote a special diagnostic to the typo\n (void*) someFunction(5, 10, 15, 20);\nwhere the cast is presumably meant to be to \'void\'.\n\nllvm-svn: 100574"}, | ||
[ | [g]={{M,369,"void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) {\n // ...\n }\n // Diagnose \"(void*) blah\" as a typo for \"(void) blah\".\n else if (const CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(E)) {\n // ...\n // We really do want to use the non-canonical type here.\n if (T == Context.VoidPtrTy) {\n // ...\n Diag(Loc, diag::warn_unused_voidptr) << FixItHint::CreateRemoval(TL.getStarLoc());"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/unused-expr.c"]={"clang/test/Sema/unused-expr.c:112:3: warning: expression result unused; should this cast be to \'void\'? [-Wunused-value]"} | ["clang/test/Sema/unused-expr.c"]={"clang/test/Sema/unused-expr.c:112:3: warning: expression result unused; should this cast be to \'void\'? [-Wunused-value]"} | ||
} | } | ||
}, | }, | ||
["warn_unused_volatile"]={ | ["warn_unused_volatile"]={ | ||
[ | [i]={"unused-volatile-lvalue"}, | ||
[j]="unused-volatile-lvalue", | |||
[ | |||
[b]="expression result unused; assign into a variable to force a volatile load", | [b]="expression result unused; assign into a variable to force a volatile load", | ||
[ | [d]=h, | ||
[ | [a]="expression result unused; assign into a variable to force a volatile load", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunused\\-volatile\\-lvalue[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"c11535c248cf",1337820425,"Add a warning to diagnose statements in C++ like \"*(volatile int*)x;\". Conceptually, this is part o...","Add a warning to diagnose statements in C++ like \"*(volatile int*)x;\". Conceptually, this is part of -Wunused-value, but I added a separate flag -Wunused-volatile-lvalue so it doesn\'t get turned off by accident with -Wno-unused-value. I also made a few minor improvements to existing unused value warnings in the process. <rdar://problem/11516811>.\n\nllvm-svn: 157362"}, | ||
[ | [g]={{M,379,"void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) {\n // ...\n // Tell the user to assign it into a variable to force a volatile load if this\n // isn\'t an array.\n if (E->isGLValue() && E->getType().isVolatileQualified() && !E->getType()->isArrayType()) {\n Diag(Loc, diag::warn_unused_volatile) << R1 << R2;"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGen/exprs.c"]={"clang/test/CodeGen/exprs.c:166:3: warning: expression result unused; assign into a variable to force a volatile load [-Wunused-volatile-lvalue]","clang/test/CodeGen/exprs.c:166:14: warning: expression result unused; assign into a variable to force a volatile load [-Wunused-volatile-lvalue]","clang/test/CodeGen/exprs.c:166:25: warning: expression result unused; assign into a variable to force a volatile load [-Wunused-volatile-lvalue]","clang/test/CodeGen/exprs.c:166:59: warning: expression result unused; assign into a variable to force a volatile load [-Wunused-volatile-lvalue]"} | ["clang/test/CodeGen/exprs.c"]={"clang/test/CodeGen/exprs.c:166:3: warning: expression result unused; assign into a variable to force a volatile load [-Wunused-volatile-lvalue]","clang/test/CodeGen/exprs.c:166:14: warning: expression result unused; assign into a variable to force a volatile load [-Wunused-volatile-lvalue]","clang/test/CodeGen/exprs.c:166:25: warning: expression result unused; assign into a variable to force a volatile load [-Wunused-volatile-lvalue]","clang/test/CodeGen/exprs.c:166:59: warning: expression result unused; assign into a variable to force a volatile load [-Wunused-volatile-lvalue]"} | ||
} | } | ||
}, | }, | ||
["warn_use_in_invalid_state"]={ | ["warn_use_in_invalid_state"]={ | ||
[ | [i]={yb}, | ||
[j]=yb, | |||
[ | |||
[b]="invalid invocation of method \'%0\' on object \'%1\' while it is in the \'%2\' state", | [b]="invalid invocation of method \'%0\' on object \'%1\' while it is in the \'%2\' state", | ||
[ | [d]=h, | ||
[ | [a]="invalid invocation of method \'(.*?)\' on object \'(.*?)\' while it is in the \'(.*?)\' state", | ||
[ | [e]=jc, | ||
[ | [c]=l, | ||
[ | [f]={"210791a021a1",1380922086,"Consumed Analysis: Change callable_when so that it can take a list of states\nthat a function can be...","Consumed Analysis: Change callable_when so that it can take a list of states\nthat a function can be called in. This reduced the total number of annotations\nneeded and makes writing more complicated behaviour less burdensome.\nPatch by chriswails@gmail.com.\n\nllvm-svn: 191983"}, | ||
[ | [g]={{y,2148,"class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {\n // ...\n void warnUseInInvalidState(StringRef MethodName, StringRef VariableName, StringRef State, SourceLocation Loc) override {\n PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_use_in_invalid_state) << MethodName << VariableName << State);"}}, | ||
[ | [k]={ | ||
[ | [Tc]={ | ||
[1]="clang/test/SemaCXX/warn-consumed-analysis.cpp:95:3: warning: invalid invocation of method \'operator*\' on object \'var0\' while it is in the \'consumed\' state [-Wconsumed]", | [1]="clang/test/SemaCXX/warn-consumed-analysis.cpp:95:3: warning: invalid invocation of method \'operator*\' on object \'var0\' while it is in the \'consumed\' state [-Wconsumed]", | ||
[2]="clang/test/SemaCXX/warn-consumed-analysis.cpp:96:3: warning: invalid invocation of method \'operator*\' on object \'var1\' while it is in the \'consumed\' state [-Wconsumed]", | [2]="clang/test/SemaCXX/warn-consumed-analysis.cpp:96:3: warning: invalid invocation of method \'operator*\' on object \'var1\' while it is in the \'consumed\' state [-Wconsumed]", | ||
Line 10,093: | Line 8,208: | ||
}, | }, | ||
["warn_use_of_private_header_outside_module"]={ | ["warn_use_of_private_header_outside_module"]={ | ||
[ | [i]={"private-header"}, | ||
[j]="private-header", | |||
[ | |||
[b]="use of private header from outside its module: \'%0\'", | [b]="use of private header from outside its module: \'%0\'", | ||
[ | [d]=Hb, | ||
[ | [a]="use of private header from outside its module\\: \'(.*?)\'", | ||
[ | [e]=" \\[[^\\]]*\\-Wprivate\\-header[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"11152dd55f7a",1424304628,"Allow errors on use of a private module header to be disabled, to better support incremental transit...","Allow errors on use of a private module header to be disabled, to better support incremental transition to modules.\n\nllvm-svn: 229788"}, | ||
[ | [g]={{"clang/lib/Lex/ModuleMap.cpp",521,"void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule, bool RequestingModuleIsModuleInterface, SourceLocation FilenameLoc, StringRef Filename, FileEntryRef File) {\n // ...\n // We have found a header, but it is private.\n if (Private) {\n Diags.Report(FilenameLoc, diag::warn_use_of_private_header_outside_module) << Filename;"}}, | ||
[ | [k]={ | ||
["clang/test/Modules/modulemaps-nomodules.cpp"]={"clang/test/Modules/modulemaps-nomodules.cpp:7:10: error: use of private header from outside its module: \'header.h\' [-Wprivate-header]"} | ["clang/test/Modules/modulemaps-nomodules.cpp"]={"clang/test/Modules/modulemaps-nomodules.cpp:7:10: error: use of private header from outside its module: \'header.h\' [-Wprivate-header]"} | ||
} | } | ||
}, | }, | ||
["warn_use_of_temp_in_invalid_state"]={ | ["warn_use_of_temp_in_invalid_state"]={ | ||
[ | [i]={yb}, | ||
[j]=yb, | |||
[ | |||
[b]="invalid invocation of method \'%0\' on a temporary object while it is in the \'%1\' state", | [b]="invalid invocation of method \'%0\' on a temporary object while it is in the \'%1\' state", | ||
[ | [d]=h, | ||
[ | [a]="invalid invocation of method \'(.*?)\' on a temporary object while it is in the \'(.*?)\' state", | ||
[ | [e]=jc, | ||
[ | [c]=l, | ||
[ | [f]={"210791a021a1",1380922086,"Consumed Analysis: Change callable_when so that it can take a list of states\nthat a function can be...","Consumed Analysis: Change callable_when so that it can take a list of states\nthat a function can be called in. This reduced the total number of annotations\nneeded and makes writing more complicated behaviour less burdensome.\nPatch by chriswails@gmail.com.\n\nllvm-svn: 191983"}, | ||
[ | [g]={{y,2140,"class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {\n // ...\n void warnUseOfTempInInvalidState(StringRef MethodName, StringRef State, SourceLocation Loc) override {\n PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_use_of_temp_in_invalid_state) << MethodName << State);"}}, | ||
[ | [k]={ | ||
[ | [Tc]={"clang/test/SemaCXX/warn-consumed-analysis.cpp:138:27: warning: invalid invocation of method \'~DestructorTester\' on a temporary object while it is in the \'unconsumed\' state [-Wconsumed]","clang/test/SemaCXX/warn-consumed-analysis.cpp:143:3: warning: invalid invocation of method \'operator*\' on a temporary object while it is in the \'consumed\' state [-Wconsumed]","clang/test/SemaCXX/warn-consumed-analysis.cpp:764:3: warning: invalid invocation of method \'~Status\' on a temporary object while it is in the \'unconsumed\' state [-Wconsumed]","clang/test/SemaCXX/warn-consumed-analysis.cpp:780:21: warning: invalid invocation of method \'~Status\' on a temporary object while it is in the \'unconsumed\' state [-Wconsumed]"} | ||
} | } | ||
}, | }, | ||
["warn_used_but_marked_unused"]={ | ["warn_used_but_marked_unused"]={ | ||
[ | [i]={"used-but-marked-unused"}, | ||
[j]="used-but-marked-unused", | |||
[ | |||
[b]="%0 was marked unused but was used", | [b]="%0 was marked unused but was used", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) was marked unused but was used", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wused\\-but\\-marked\\-unused[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"73067a02db9a",1287790628,"Warn if a variable marked with the \"unused\" attribute is used. Patch by Darin Adler!\n\nllvm-svn: 1171...","Warn if a variable marked with the \"unused\" attribute is used. Patch by Darin Adler!\n\nllvm-svn: 117184"}, | ||
[ | [g]={{gb,846,"void Sema::ActOnPragmaUnused(const Token &IdTok, Scope *curScope, SourceLocation PragmaLoc) {\n // ...\n // Warn if this was used before being marked unused.\n if (VD->isUsed())\n Diag(PragmaLoc, diag::warn_used_but_marked_unused) << Name;"},{u,111,"static void DiagnoseUnusedOfDecl(Sema &S, NamedDecl *D, SourceLocation Loc) {\n // Warn if this is used but marked unused.\n if (const auto *A = D->getAttr<UnusedAttr>()) {\n // [[maybe_unused]] should not diagnose uses, but __attribute__((unused))\n // should diagnose them.\n if (A->getSemanticSpelling() != UnusedAttr::CXX11_maybe_unused && A->getSemanticSpelling() != UnusedAttr::C2x_maybe_unused) {\n // ...\n if (DC && !DC->hasAttr<UnusedAttr>())\n S.Diag(Loc, diag::warn_used_but_marked_unused) << D;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-unused.c"]={"clang/test/Sema/attr-unused.c:23:3: warning: \'Int_unused\' was marked unused but was used [-Wused-but-marked-unused]","clang/test/Sema/attr-unused.c:26:10: warning: \'Test0_unused\' was marked unused but was used [-Wused-but-marked-unused]","clang/test/Sema/attr-unused.c:42:10: warning: \'x\' was marked unused but was used [-Wused-but-marked-unused]"} | ["clang/test/Sema/attr-unused.c"]={"clang/test/Sema/attr-unused.c:23:3: warning: \'Int_unused\' was marked unused but was used [-Wused-but-marked-unused]","clang/test/Sema/attr-unused.c:26:10: warning: \'Test0_unused\' was marked unused but was used [-Wused-but-marked-unused]","clang/test/Sema/attr-unused.c:42:10: warning: \'x\' was marked unused but was used [-Wused-but-marked-unused]"} | ||
} | } | ||
}, | }, | ||
["warn_user_literal_reserved"]={ | ["warn_user_literal_reserved"]={ | ||
[ | [i]={Xc,"user-defined-literals"}, | ||
[j]="user-defined-literals", | |||
[ | |||
[b]="user-defined literal suffixes %select{<ERROR>|not starting with \'_\'|containing \'__\'}0 are reserved%select{; no literal will invoke this operator|}1", | [b]="user-defined literal suffixes %select{<ERROR>|not starting with \'_\'|containing \'__\'}0 are reserved%select{; no literal will invoke this operator|}1", | ||
[ | [d]=h, | ||
[ | [a]="user\\-defined literal suffixes (?:not starting with \'_\'|containing \'__\') are reserved(?:; no literal will invoke this operator|)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wuser\\-defined\\-literals[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"86325ad2b521",1314744035,"Allow C99 hexfloats in C++0x mode. This change resolves the standards\ncollision between C99 hexfloat...","Allow C99 hexfloats in C++0x mode. This change resolves the standards\ncollision between C99 hexfloats and C++0x user-defined literals by\ngiving C99 hexfloats precedence. Also, warning about user-defined\nliterals that conflict with hexfloats and those that have names that\nare reserved by the implementation. Fixes <rdar://problem/9940194>.\n\nllvm-svn: 138839"}, | ||
[ | [g]={{T,16507,"/// 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 (Status != ReservedLiteralSuffixIdStatus::NotReserved && !getSourceManager().isInSystemHeader(FnDecl->getLocation())) {\n // ...\n Diag(FnDecl->getLocation(), diag::warn_user_literal_reserved) << static_cast<int>(Status) << StringLiteralParser::isValidUDSuffix(getLangOpts(), II->getName());"}}, | ||
[ | [k]={ | ||
["clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp"]={"clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp:4:6: warning: user-defined literal suffixes not starting with \'_\' are reserved; no literal will invoke this operator [-Wuser-defined-literals]","clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp:5:6: warning: user-defined literal suffixes not starting with \'_\' are reserved; no literal will invoke this operator [-Wuser-defined-literals]"} | ["clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp"]={"clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp:4:6: warning: user-defined literal suffixes not starting with \'_\' are reserved; no literal will invoke this operator [-Wuser-defined-literals]","clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp:5:6: warning: user-defined literal suffixes not starting with \'_\' are reserved; no literal will invoke this operator [-Wuser-defined-literals]"} | ||
} | } | ||
}, | }, | ||
["warn_using_directive_in_header"]={ | ["warn_using_directive_in_header"]={ | ||
[ | [i]={"header-hygiene"}, | ||
[j]="header-hygiene", | |||
[ | |||
[b]="using namespace directive in global context in header", | [b]="using namespace directive in global context in header", | ||
[ | [d]=h, | ||
[ | [a]="using namespace directive in global context in header", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wheader\\-hygiene[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"96a4bddefbfc",1300464652,"Add an opt-in -Wheader-hygiene, which current diagnoses the use of\nglobal using directives in C++ he...","Add an opt-in -Wheader-hygiene, which current diagnoses the use of\nglobal using directives in C++ headers, from Elliot Glaysher!\n\nllvm-svn: 127881"}, | ||
[ | [g]={{T,11986,"Decl *Sema::ActOnUsingDirective(Scope *S, SourceLocation UsingLoc, SourceLocation NamespcLoc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *NamespcName, const ParsedAttributesView &AttrList) {\n // ...\n if (!R.empty()) {\n // ...\n if (IsUsingDirectiveInToplevelContext(CurContext) && !SourceMgr.isInMainFile(SourceMgr.getExpansionLoc(IdentLoc))) {\n Diag(IdentLoc, diag::warn_using_directive_in_header);"}} | ||
}, | }, | ||
["warn_utf8_symbol_homoglyph"]={ | ["warn_utf8_symbol_homoglyph"]={ | ||
[ | [i]={"unicode-homoglyph"}, | ||
[j]="unicode-homoglyph", | |||
[ | |||
[b]="treating Unicode character <U+%0> as an identifier character rather than as \'%1\' symbol", | [b]="treating Unicode character <U+%0> as an identifier character rather than as \'%1\' symbol", | ||
[ | [d]=h, | ||
[ | [a]="treating Unicode character \\<U\\+(.*?)\\> as an identifier character rather than as \'(.*?)\' symbol", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunicode\\-homoglyph[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"77091b167fd9",1513257308,"Warn if we find a Unicode homoglyph for a symbol in an identifier.\n\nSpecifically, warn if:\n * we fin...","Warn if we find a Unicode homoglyph for a symbol in an identifier.\n\nSpecifically, warn if:\n * we find a character that the language standard says we must treat as an\n identifier, and\n * that character is not reasonably an identifier character (it\'s a punctuation\n character or similar), and \n * it renders identically to a valid non-identifier character in common\n fixed-width fonts.\n\nSome tools \"helpfully\" substitute the surprising characters for the expected\ncharacters, and replacing semicolons with Greek question marks is a common\n\"prank\".\n\nllvm-svn: 320697"}, | ||
[ | [g]={{Ib,1661,"/// After encountering UTF-8 character C and interpreting it as an identifier\n/// character, check whether it\'s a homoglyph for a common non-identifier\n/// source character that is unlikely to be an intentional identifier\n/// character and warn if so.\nstatic void maybeDiagnoseUTF8Homoglyph(DiagnosticsEngine &Diags, uint32_t C, CharSourceRange Range) {\n // ...\n if (Homoglyph->Character == C) {\n if (Homoglyph->LooksLike) {\n // ...\n Diags.Report(Range.getBegin(), diag::warn_utf8_symbol_homoglyph) << Range << codepointAsHexString(C) << LooksLikeStr;"}}, | ||
[ | [k]={ | ||
["clang/test/Lexer/unicode.c"]={"clang/test/Lexer/unicode.c:89:6: warning: treating Unicode character <U+037E> as an identifier character rather than as \';\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:90:7: warning: treating Unicode character <U+A789> as an identifier character rather than as \':\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:90:10: warning: treating Unicode character <U+A789> as an identifier character rather than as \':\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:90:19: warning: treating Unicode character <U+037E> as an identifier character rather than as \';\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:6: warning: treating Unicode character <U+FF1D> as an identifier character rather than as \'=\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:9: warning: treating Unicode character <U+FF3B> as an identifier character rather than as \'[\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:12: warning: treating Unicode character <U+FF1D> as an identifier character rather than as \'=\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:15: warning: treating Unicode character <U+FF3D> as an identifier character rather than as \']\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:18: warning: treating Unicode character <U+FF08> as an identifier character rather than as \'(\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:25: warning: treating Unicode character <U+FF09> as an identifier character rather than as \')\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:28: warning: treating Unicode character <U+FF5B> as an identifier character rather than as \'{\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:37: warning: treating Unicode character <U+FF5E> as an identifier character rather than as \'~\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:41: warning: treating Unicode character <U+FF1B> as an identifier character rather than as \';\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:44: warning: treating Unicode character <U+FF5D> as an identifier character rather than as \'}\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:47: warning: treating Unicode character <U+FF08> as an identifier character rather than as \'(\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:50: warning: treating Unicode character <U+FF09> as an identifier character rather than as \')\' symbol [-Wunicode-homoglyph]"} | ["clang/test/Lexer/unicode.c"]={"clang/test/Lexer/unicode.c:89:6: warning: treating Unicode character <U+037E> as an identifier character rather than as \';\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:90:7: warning: treating Unicode character <U+A789> as an identifier character rather than as \':\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:90:10: warning: treating Unicode character <U+A789> as an identifier character rather than as \':\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:90:19: warning: treating Unicode character <U+037E> as an identifier character rather than as \';\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:6: warning: treating Unicode character <U+FF1D> as an identifier character rather than as \'=\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:9: warning: treating Unicode character <U+FF3B> as an identifier character rather than as \'[\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:12: warning: treating Unicode character <U+FF1D> as an identifier character rather than as \'=\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:15: warning: treating Unicode character <U+FF3D> as an identifier character rather than as \']\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:18: warning: treating Unicode character <U+FF08> as an identifier character rather than as \'(\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:25: warning: treating Unicode character <U+FF09> as an identifier character rather than as \')\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:28: warning: treating Unicode character <U+FF5B> as an identifier character rather than as \'{\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:37: warning: treating Unicode character <U+FF5E> as an identifier character rather than as \'~\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:41: warning: treating Unicode character <U+FF1B> as an identifier character rather than as \';\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:44: warning: treating Unicode character <U+FF5D> as an identifier character rather than as \'}\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:47: warning: treating Unicode character <U+FF08> as an identifier character rather than as \'(\' symbol [-Wunicode-homoglyph]","clang/test/Lexer/unicode.c:92:50: warning: treating Unicode character <U+FF09> as an identifier character rather than as \')\' symbol [-Wunicode-homoglyph]"} | ||
} | } | ||
}, | }, | ||
["warn_utf8_symbol_zero_width"]={ | ["warn_utf8_symbol_zero_width"]={ | ||
[ | [i]={"unicode-zero-width"}, | ||
[j]="unicode-zero-width", | |||
[ | |||
[b]="identifier contains Unicode character <U+%0> that is invisible in some environments", | [b]="identifier contains Unicode character <U+%0> that is invisible in some environments", | ||
[ | [d]=h, | ||
[ | [a]="identifier contains Unicode character \\<U\\+(.*?)\\> that is invisible in some environments", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wunicode\\-zero\\-width[^\\]]*\\]", | ||
[ | [c]=x, | ||
[ | [f]={"8ed7776bc404",1536348339,"PR38870: Add warning for zero-width unicode characters appearing in\nidentifiers.\n\nllvm-svn: 341700","PR38870: Add warning for zero-width unicode characters appearing in\nidentifiers.\n\nllvm-svn: 341700"}, | ||
[ | [g]={{Ib,1664,"/// After encountering UTF-8 character C and interpreting it as an identifier\n/// character, check whether it\'s a homoglyph for a common non-identifier\n/// source character that is unlikely to be an intentional identifier\n/// character and warn if so.\nstatic void maybeDiagnoseUTF8Homoglyph(DiagnosticsEngine &Diags, uint32_t C, CharSourceRange Range) {\n // ...\n if (Homoglyph->Character == C) {\n if (Homoglyph->LooksLike) {\n // ...\n } else {\n Diags.Report(Range.getBegin(), diag::warn_utf8_symbol_zero_width) << Range << codepointAsHexString(C);"}}, | ||
[ | [k]={ | ||
["clang/test/Lexer/unicode.c"]={"clang/test/Lexer/unicode.c:94:9: warning: identifier contains Unicode character <U+FEFF> that is invisible in some environments [-Wunicode-zero-width]","clang/test/Lexer/unicode.c:94:13: warning: identifier contains Unicode character <U+200D> that is invisible in some environments [-Wunicode-zero-width]","clang/test/Lexer/unicode.c:98:8: warning: identifier contains Unicode character <U+200B> that is invisible in some environments [-Wunicode-zero-width]"} | ["clang/test/Lexer/unicode.c"]={"clang/test/Lexer/unicode.c:94:9: warning: identifier contains Unicode character <U+FEFF> that is invisible in some environments [-Wunicode-zero-width]","clang/test/Lexer/unicode.c:94:13: warning: identifier contains Unicode character <U+200D> that is invisible in some environments [-Wunicode-zero-width]","clang/test/Lexer/unicode.c:98:8: warning: identifier contains Unicode character <U+200B> that is invisible in some environments [-Wunicode-zero-width]"} | ||
} | } | ||
}, | }, | ||
["warn_va_start_type_is_undefined"]={ | ["warn_va_start_type_is_undefined"]={ | ||
[ | [i]={sc}, | ||
[j]=sc, | |||
[ | |||
[b]="passing %select{an object that undergoes default argument promotion|an object of reference type|a parameter declared with the \'register\' keyword}0 to \'va_start\' has undefined behavior", | [b]="passing %select{an object that undergoes default argument promotion|an object of reference type|a parameter declared with the \'register\' keyword}0 to \'va_start\' has undefined behavior", | ||
[ | [d]=h, | ||
[ | [a]="passing (?:an object that undergoes default argument promotion|an object of reference type|a parameter declared with the \'register\' keyword) to \'va_start\' has undefined behavior", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wvarargs[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"1de59c5d92b9",1461504621,"Improve diagnostic checking for va_start to also warn on other instances of undefined behavior, such...","Improve diagnostic checking for va_start to also warn on other instances of undefined behavior, such as a parameter declared with the register keyword in C, or a parameter of a type that undergoes default argument promotion.\n\nThis helps cover some more of the CERT secure coding rule EXP58-CPP. Pass an object of the correct type to va_start (https://www.securecoding.cert.org/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start).\n\nllvm-svn: 267338"}, | ||
[ | [g]={{r,8171,"/// Check the arguments to \'__builtin_va_start\' or \'__builtin_ms_va_start\'\n/// for validity. Emit an error and return true on failure; return false\n/// on success.\nbool Sema::SemaBuiltinVAStart(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (!SecondArgIsLastNamedArgument)\n // ...\n else if (IsCRegister || Type->isReferenceType() || Type->isSpecificBuiltinType(BuiltinType::Float) || [=] {\n // ...\n Diag(Arg->getBeginLoc(), diag::warn_va_start_type_is_undefined) << Reason;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/varargs-x86-64.c"]={"clang/test/Sema/varargs-x86-64.c:32:29: warning: passing an object that undergoes default argument promotion to \'va_start\' has undefined behavior [-Wvarargs]","clang/test/Sema/varargs-x86-64.c:33:30: warning: passing an object that undergoes default argument promotion to \'va_start\' has undefined behavior [-Wvarargs]"} | ["clang/test/Sema/varargs-x86-64.c"]={"clang/test/Sema/varargs-x86-64.c:32:29: warning: passing an object that undergoes default argument promotion to \'va_start\' has undefined behavior [-Wvarargs]","clang/test/Sema/varargs-x86-64.c:33:30: warning: passing an object that undergoes default argument promotion to \'va_start\' has undefined behavior [-Wvarargs]"} | ||
} | } | ||
}, | }, | ||
["warn_var_decl_not_read_only"]={ | ["warn_var_decl_not_read_only"]={ | ||
[ | [i]={"read-only-types"}, | ||
[j]="read-only-types", | |||
[ | |||
[b]="object of type %0 cannot be placed in read-only memory", | [b]="object of type %0 cannot be placed in read-only memory", | ||
[ | [d]=h, | ||
[ | [a]="object of type (.*?) cannot be placed in read\\-only memory", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wread\\-only\\-types[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={lb,1625925174,mb,nb}, | ||
[ | [g]={{B,7438,"// 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 S.Diag(VD->getLocation(), diag::warn_var_decl_not_read_only) << RD;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-read-only-placement.cpp"]={"clang/test/Sema/attr-read-only-placement.cpp:8:3: warning: object of type \'A\' cannot be placed in read-only memory [-Wread-only-types]","clang/test/Sema/attr-read-only-placement.cpp:11:3: warning: object of type \'A\' cannot be placed in read-only memory [-Wread-only-types]","clang/test/Sema/attr-read-only-placement.cpp:20:3: warning: object of type \'B\' cannot be placed in read-only memory [-Wread-only-types]","clang/test/Sema/attr-read-only-placement.cpp:24:3: warning: object of type \'B\' cannot be placed in read-only memory [-Wread-only-types]","clang/test/Sema/attr-read-only-placement.cpp:26:3: warning: object of type \'B\' cannot be placed in read-only memory [-Wread-only-types]","clang/test/Sema/attr-read-only-placement.cpp:28:3: warning: object of type \'B\' cannot be placed in read-only memory [-Wread-only-types]","clang/test/Sema/attr-read-only-placement.cpp:33:14: warning: object of type \'B\' cannot be placed in read-only memory [-Wread-only-types]","clang/test/Sema/attr-read-only-placement.cpp:44:3: warning: object of type \'C\' cannot be placed in read-only memory [-Wread-only-types]"} | ["clang/test/Sema/attr-read-only-placement.cpp"]={"clang/test/Sema/attr-read-only-placement.cpp:8:3: warning: object of type \'A\' cannot be placed in read-only memory [-Wread-only-types]","clang/test/Sema/attr-read-only-placement.cpp:11:3: warning: object of type \'A\' cannot be placed in read-only memory [-Wread-only-types]","clang/test/Sema/attr-read-only-placement.cpp:20:3: warning: object of type \'B\' cannot be placed in read-only memory [-Wread-only-types]","clang/test/Sema/attr-read-only-placement.cpp:24:3: warning: object of type \'B\' cannot be placed in read-only memory [-Wread-only-types]","clang/test/Sema/attr-read-only-placement.cpp:26:3: warning: object of type \'B\' cannot be placed in read-only memory [-Wread-only-types]","clang/test/Sema/attr-read-only-placement.cpp:28:3: warning: object of type \'B\' cannot be placed in read-only memory [-Wread-only-types]","clang/test/Sema/attr-read-only-placement.cpp:33:14: warning: object of type \'B\' cannot be placed in read-only memory [-Wread-only-types]","clang/test/Sema/attr-read-only-placement.cpp:44:3: warning: object of type \'C\' cannot be placed in read-only memory [-Wread-only-types]"} | ||
} | } | ||
}, | }, | ||
["warn_var_deref_requires_any_lock"]={ | ["warn_var_deref_requires_any_lock"]={ | ||
[ | [i]={kb,rb}, | ||
[j]=rb, | |||
[ | |||
[b]="%select{reading|writing}1 the value pointed to by %0 requires holding %select{any mutex|any mutex exclusively}1", | [b]="%select{reading|writing}1 the value pointed to by %0 requires holding %select{any mutex|any mutex exclusively}1", | ||
[ | [d]=h, | ||
[ | [a]="(?:reading|writing) the value pointed to by (.*?) requires holding (?:any mutex|any mutex exclusively)", | ||
[ | [e]=dc, | ||
[ | [c]=l, | ||
[ | [f]={"dd5fd87a6dfe",1314656871,"Thread safety: added basic handling for pt_guarded_by/var and guarded_by/var annotations. We identif...","Thread safety: added basic handling for pt_guarded_by/var and guarded_by/var annotations. We identify situations where we are accessing (reading or writing) guarded variables, and report an error if the appropriate locks are not held.\n\nllvm-svn: 138774"}, | ||
[ | [g]={{y,1947,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleNoMutexHeld(const NamedDecl *D, ProtectedOperationKind POK, AccessKind AK, SourceLocation Loc) override {\n // ...\n unsigned DiagID = POK == POK_VarAccess ? diag::warn_variable_requires_any_lock : diag::warn_var_deref_requires_any_lock;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-thread-safety-analysis.c"]={"clang/test/Sema/warn-thread-safety-analysis.c:114:11: warning: reading the value pointed to by \'d_\' requires holding any mutex [-Wthread-safety-analysis]"} | ["clang/test/Sema/warn-thread-safety-analysis.c"]={"clang/test/Sema/warn-thread-safety-analysis.c:114:11: warning: reading the value pointed to by \'d_\' requires holding any mutex [-Wthread-safety-analysis]"} | ||
} | } | ||
}, | }, | ||
["warn_var_deref_requires_lock"]={ | ["warn_var_deref_requires_lock"]={ | ||
[ | [i]={kb,rb}, | ||
[j]=rb, | |||
[ | |||
[b]="%select{reading|writing}3 the value pointed to by %1 requires holding %0 %select{\'%2\'|\'%2\' exclusively}3", | [b]="%select{reading|writing}3 the value pointed to by %1 requires holding %0 %select{\'%2\'|\'%2\' exclusively}3", | ||
[ | [d]=h, | ||
[ | [a]="(?:reading|writing) the value pointed to by (.*?) requires holding (.*?) (?:\'(.*?)\'|\'(.*?)\' exclusively)", | ||
[ | [e]=dc, | ||
[ | [c]=l, | ||
[ | [f]={"dd5fd87a6dfe",1314656871,"Thread safety: added basic handling for pt_guarded_by/var and guarded_by/var annotations. We identif...","Thread safety: added basic handling for pt_guarded_by/var and guarded_by/var annotations. We identify situations where we are accessing (reading or writing) guarded variables, and report an error if the appropriate locks are not held.\n\nllvm-svn: 138774"}, | ||
[ | [g]={{y,1994,"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 case POK_VarDereference:\n DiagID = diag::warn_var_deref_requires_lock;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-thread-safety-analysis.cpp"]={ | ["clang/test/SemaCXX/warn-thread-safety-analysis.cpp"]={ | ||
[1]="clang/test/SemaCXX/warn-thread-safety-analysis.cpp:422:6: warning: writing the value pointed to by \'pgb_field\' requires holding mutex \'sls_mu\' exclusively [-Wthread-safety-analysis]", | [1]="clang/test/SemaCXX/warn-thread-safety-analysis.cpp:422:6: warning: writing the value pointed to by \'pgb_field\' requires holding mutex \'sls_mu\' exclusively [-Wthread-safety-analysis]", | ||
Line 10,337: | Line 8,414: | ||
}, | }, | ||
["warn_var_deref_requires_lock_precise"]={ | ["warn_var_deref_requires_lock_precise"]={ | ||
[ | [i]={kb,"thread-safety-precise"}, | ||
[j]="thread-safety-precise", | |||
[ | |||
[b]="%select{reading|writing}3 the value pointed to by %1 requires holding %0 %select{\'%2\'|\'%2\' exclusively}3", | [b]="%select{reading|writing}3 the value pointed to by %1 requires holding %0 %select{\'%2\'|\'%2\' exclusively}3", | ||
[ | [d]=h, | ||
[ | [a]="(?:reading|writing) the value pointed to by (.*?) requires holding (.*?) (?:\'(.*?)\'|\'(.*?)\' exclusively)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wthread\\-safety\\-precise[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"5ff1644e624e",1347307103,"Thread-safety analysis: differentiate between two forms of analysis; a precise\nanalysis that may giv...","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]={{y,1964,"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 case POK_VarDereference:\n DiagID = diag::warn_var_deref_requires_lock_precise;"}} | ||
}, | }, | ||
["warn_var_template_missing"]={ | ["warn_var_template_missing"]={ | ||
[ | [i]={"undefined-var-template"}, | ||
[j]="undefined-var-template", | |||
[ | |||
[b]="instantiation of variable %q0 required here, but no definition is available", | [b]="instantiation of variable %q0 required here, but no definition is available", | ||
[ | [d]=h, | ||
[ | [a]="instantiation of variable (.*?) required here, but no definition is available", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wundefined\\-var\\-template[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"7dcc97e7ac0a",1461046792,"Warn if function or variable cannot be implicitly instantiated\n\nWith this patch compiler emits warni...","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]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",5527,"/// 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 Diag(PointOfInstantiation, diag::warn_var_template_missing) << Var;"}}, | ||
[ | [k]={ | ||
["clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp:28:26: warning: instantiation of variable \'X<long>::member3\' required here, but no definition is available [-Wundefined-var-template]"} | ["clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp:28:26: warning: instantiation of variable \'X<long>::member3\' required here, but no definition is available [-Wundefined-var-template]"} | ||
} | } | ||
}, | }, | ||
["warn_variable_requires_any_lock"]={ | ["warn_variable_requires_any_lock"]={ | ||
[ | [i]={kb,rb}, | ||
[j]=rb, | |||
[ | |||
[b]="%select{reading|writing}1 variable %0 requires holding %select{any mutex|any mutex exclusively}1", | [b]="%select{reading|writing}1 variable %0 requires holding %select{any mutex|any mutex exclusively}1", | ||
[ | [d]=h, | ||
[ | [a]="(?:reading|writing) variable (.*?) requires holding (?:any mutex|any mutex exclusively)", | ||
[ | [e]=dc, | ||
[ | [c]=l, | ||
[ | [f]={"dd5fd87a6dfe",1314656871,"Thread safety: added basic handling for pt_guarded_by/var and guarded_by/var annotations. We identif...","Thread safety: added basic handling for pt_guarded_by/var and guarded_by/var annotations. We identify situations where we are accessing (reading or writing) guarded variables, and report an error if the appropriate locks are not held.\n\nllvm-svn: 138774"}, | ||
[ | [g]={{y,1946,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleNoMutexHeld(const NamedDecl *D, ProtectedOperationKind POK, AccessKind AK, SourceLocation Loc) override {\n // ...\n unsigned DiagID = POK == POK_VarAccess ? diag::warn_variable_requires_any_lock : diag::warn_var_deref_requires_any_lock;"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-thread-safety-analysis.c"]={"clang/test/Sema/warn-thread-safety-analysis.c:113:3: warning: writing variable \'c_\' requires holding any mutex exclusively [-Wthread-safety-analysis]"} | ["clang/test/Sema/warn-thread-safety-analysis.c"]={"clang/test/Sema/warn-thread-safety-analysis.c:113:3: warning: writing variable \'c_\' requires holding any mutex exclusively [-Wthread-safety-analysis]"} | ||
} | } | ||
}, | }, | ||
["warn_variable_requires_lock"]={ | ["warn_variable_requires_lock"]={ | ||
[ | [i]={kb,rb}, | ||
[j]=rb, | |||
[ | |||
[b]="%select{reading|writing}3 variable %1 requires holding %0 %select{\'%2\'|\'%2\' exclusively}3", | [b]="%select{reading|writing}3 variable %1 requires holding %0 %select{\'%2\'|\'%2\' exclusively}3", | ||
[ | [d]=h, | ||
[ | [a]="(?:reading|writing) variable (.*?) requires holding (.*?) (?:\'(.*?)\'|\'(.*?)\' exclusively)", | ||
[ | [e]=dc, | ||
[ | [c]=l, | ||
[ | [f]={"dd5fd87a6dfe",1314656871,"Thread safety: added basic handling for pt_guarded_by/var and guarded_by/var annotations. We identif...","Thread safety: added basic handling for pt_guarded_by/var and guarded_by/var annotations. We identify situations where we are accessing (reading or writing) guarded variables, and report an error if the appropriate locks are not held.\n\nllvm-svn: 138774"}, | ||
[ | [g]={{y,1991,"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 case POK_VarAccess:\n DiagID = diag::warn_variable_requires_lock;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-thread-safety-verbose.cpp"]={"clang/test/SemaCXX/warn-thread-safety-verbose.cpp:31:5: warning: writing variable \'a\' requires holding mutex \'mu\' exclusively [-Wthread-safety-analysis]","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:35:13: warning: reading variable \'a\' requires holding mutex \'mu\' [-Wthread-safety-analysis]","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:54:5: warning: writing variable \'a\' requires holding mutex \'mu\' exclusively [-Wthread-safety-analysis]"} | ["clang/test/SemaCXX/warn-thread-safety-verbose.cpp"]={"clang/test/SemaCXX/warn-thread-safety-verbose.cpp:31:5: warning: writing variable \'a\' requires holding mutex \'mu\' exclusively [-Wthread-safety-analysis]","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:35:13: warning: reading variable \'a\' requires holding mutex \'mu\' [-Wthread-safety-analysis]","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:54:5: warning: writing variable \'a\' requires holding mutex \'mu\' exclusively [-Wthread-safety-analysis]"} | ||
} | } | ||
}, | }, | ||
["warn_variable_requires_lock_precise"]={ | ["warn_variable_requires_lock_precise"]={ | ||
[ | [i]={kb,"thread-safety-precise"}, | ||
[j]="thread-safety-precise", | |||
[ | |||
[b]="%select{reading|writing}3 variable %1 requires holding %0 %select{\'%2\'|\'%2\' exclusively}3", | [b]="%select{reading|writing}3 variable %1 requires holding %0 %select{\'%2\'|\'%2\' exclusively}3", | ||
[ | [d]=h, | ||
[ | [a]="(?:reading|writing) variable (.*?) requires holding (.*?) (?:\'(.*?)\'|\'(.*?)\' exclusively)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wthread\\-safety\\-precise[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"5ff1644e624e",1347307103,"Thread-safety analysis: differentiate between two forms of analysis; a precise\nanalysis that may giv...","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]={{y,1961,"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 case POK_VarAccess:\n DiagID = diag::warn_variable_requires_lock_precise;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-thread-safety-analysis.cpp"]={"clang/test/SemaCXX/warn-thread-safety-analysis.cpp:583:8: warning: writing variable \'a\' requires holding mutex \'fooB.mu\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:604:12: warning: writing variable \'a\' requires holding mutex \'BarA.Foo.mu\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:613:20: warning: writing variable \'a\' requires holding mutex \'BarA.FooPointer->mu\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:622:13: warning: writing variable \'a\' requires holding mutex \'BarA.Foo2.mu\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1338:7: warning: writing variable \'a_\' requires holding mutex \'b2->mu1_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1369:12: warning: reading variable \'a_\' requires holding mutex \'b1.mu1_\' [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1374:6: warning: writing variable \'a_\' requires holding mutex \'b1.mu1_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1404:13: warning: writing variable \'a_\' requires holding mutex \'child->lock_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2461:18: warning: writing variable \'a\' requires holding mutex \'bar.getFooey().mu_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2467:18: warning: writing variable \'a\' requires holding mutex \'bar.getFoo2(b).mu_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2473:21: warning: writing variable \'a\' requires holding mutex \'bar.getFoo3(a, c).mu_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2479:21: warning: writing variable \'a\' requires holding mutex \'getBarFoo(bar, b).mu_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2485:39: warning: writing variable \'a\' requires holding mutex \'((0 < a) ? fooArray[b] : fooArray[c]).mu_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5200:31: warning: reading variable \'val\' requires holding mutex \'b.mu\' [-Wthread-safety-precise]"} | ["clang/test/SemaCXX/warn-thread-safety-analysis.cpp"]={"clang/test/SemaCXX/warn-thread-safety-analysis.cpp:583:8: warning: writing variable \'a\' requires holding mutex \'fooB.mu\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:604:12: warning: writing variable \'a\' requires holding mutex \'BarA.Foo.mu\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:613:20: warning: writing variable \'a\' requires holding mutex \'BarA.FooPointer->mu\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:622:13: warning: writing variable \'a\' requires holding mutex \'BarA.Foo2.mu\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1338:7: warning: writing variable \'a_\' requires holding mutex \'b2->mu1_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1369:12: warning: reading variable \'a_\' requires holding mutex \'b1.mu1_\' [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1374:6: warning: writing variable \'a_\' requires holding mutex \'b1.mu1_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1404:13: warning: writing variable \'a_\' requires holding mutex \'child->lock_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2461:18: warning: writing variable \'a\' requires holding mutex \'bar.getFooey().mu_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2467:18: warning: writing variable \'a\' requires holding mutex \'bar.getFoo2(b).mu_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2473:21: warning: writing variable \'a\' requires holding mutex \'bar.getFoo3(a, c).mu_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2479:21: warning: writing variable \'a\' requires holding mutex \'getBarFoo(bar, b).mu_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2485:39: warning: writing variable \'a\' requires holding mutex \'((0 < a) ? fooArray[b] : fooArray[c]).mu_\' exclusively [-Wthread-safety-precise]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5200:31: warning: reading variable \'val\' requires holding mutex \'b.mu\' [-Wthread-safety-precise]"} | ||
} | } | ||
}, | }, | ||
["warn_variable_sized_ivar_visibility"]={ | ["warn_variable_sized_ivar_visibility"]={ | ||
[ | [i]={n,o,p,"objc-flexible-array"}, | ||
[j]="objc-flexible-array", | |||
[ | |||
[b]="field %0 with variable sized type %1 is not visible to subclasses and can conflict with their instance variables", | [b]="field %0 with variable sized type %1 is not visible to subclasses and can conflict with their instance variables", | ||
[ | [d]=h, | ||
[ | [a]="field (.*?) with variable sized type (.*?) is not visible to subclasses and can conflict with their instance variables", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wobjc\\-flexible\\-array[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"30680e943735",1508796101,"[Sema] Add support for flexible array members in Obj-C.\n\nAllow Obj-C ivars with incomplete array typ...","[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]={{I,3869,"static void DiagnoseVariableSizedIvars(Sema &S, ObjCContainerDecl *OCD) {\n // ...\n // Check if variable sized ivar is in interface and visible to subclasses.\n if (!isa<ObjCInterfaceDecl>(OCD)) {\n for (auto *ivar : Ivars) {\n if (!ivar->isInvalidDecl() && IsVariableSizedType(ivar->getType())) {\n S.Diag(ivar->getLocation(), diag::warn_variable_sized_ivar_visibility) << ivar->getDeclName() << ivar->getType();"}}, | ||
[ | [k]={ | ||
["clang/test/SemaObjC/flexible-array.m"]={"clang/test/SemaObjC/flexible-array.m:20:8: warning: field \'flexible\' with variable sized type \'char[]\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:27:8: warning: field \'flexible\' with variable sized type \'char[]\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:34:8: warning: field \'flexible\' with variable sized type \'char[]\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:62:8: warning: field \'flexible\' with variable sized type \'char[]\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:69:8: warning: field \'flexible\' with variable sized type \'char[]\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:94:8: warning: field \'flexible\' with variable sized type \'char[]\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:102:8: warning: field \'flexible\' with variable sized type \'char[]\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:189:17: warning: field \'flexible\' with variable sized type \'struct Packet\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:196:17: warning: field \'flexible\' with variable sized type \'struct Packet\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]"} | ["clang/test/SemaObjC/flexible-array.m"]={"clang/test/SemaObjC/flexible-array.m:20:8: warning: field \'flexible\' with variable sized type \'char[]\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:27:8: warning: field \'flexible\' with variable sized type \'char[]\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:34:8: warning: field \'flexible\' with variable sized type \'char[]\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:62:8: warning: field \'flexible\' with variable sized type \'char[]\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:69:8: warning: field \'flexible\' with variable sized type \'char[]\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:94:8: warning: field \'flexible\' with variable sized type \'char[]\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:102:8: warning: field \'flexible\' with variable sized type \'char[]\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:189:17: warning: field \'flexible\' with variable sized type \'struct Packet\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]","clang/test/SemaObjC/flexible-array.m:196:17: warning: field \'flexible\' with variable sized type \'struct Packet\' is not visible to subclasses and can conflict with their instance variables [-Wobjc-flexible-array]"} | ||
} | } | ||
}, | }, | ||
["warn_variables_not_in_loop_body"]={ | ["warn_variables_not_in_loop_body"]={ | ||
[ | [i]={n,o,"for-loop-analysis","loop-analysis",p}, | ||
[j]="for-loop-analysis", | |||
[ | |||
[b]="variable%select{s| %1|s %1 and %2|s %1, %2, and %3|s %1, %2, %3, and %4}0 used in loop condition not modified in loop body", | [b]="variable%select{s| %1|s %1 and %2|s %1, %2, and %3|s %1, %2, %3, and %4}0 used in loop condition not modified in loop body", | ||
[ | [d]=h, | ||
[ | [a]="variable(?:s| (.*?)|s (.*?) and (.*?)|s (.*?), (.*?), and (.*?)|s (.*?), (.*?), (.*?), and (.*?)) used in loop condition not modified in loop body", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wfor\\-loop\\-analysis[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"451a5db01baf",1335808890,"Add -Wloop-analysis. This warning will fire on for loops which the variables\nin the loop conditiona...","Add -Wloop-analysis. This warning will fire on for loops which the variables\nin the loop conditional do not change.\n\nllvm-svn: 155835"}, | ||
[ | [g]={{M,1904,"void CheckForLoopConditionalStatement(Sema &S, Expr *Second, Expr *Third, Stmt *Body) {\n // ...\n if (S.Diags.isIgnored(diag::warn_variables_not_in_loop_body, Second->getBeginLoc()))"},{M,1908,"void CheckForLoopConditionalStatement(Sema &S, Expr *Second, Expr *Third, Stmt *Body) {\n // ...\n PartialDiagnostic PDiag = S.PDiag(diag::warn_variables_not_in_loop_body);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-loop-analysis.cpp"]={"clang/test/SemaCXX/warn-loop-analysis.cpp:17:15: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:24:15: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:31:17: warning: variable \'j\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:34:17: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:38:20: warning: variables \'i\' and \'j\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:49:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:53:10: warning: variables \'i\' and \'j\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:58:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:62:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:66:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:70:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:74:10: warning: variable \'ptr\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:78:11: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:82:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:86:10: warning: variables \'i\', \'j\', and \'k\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:90:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:95:10: warning: variables \'i\' and \'j\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:98:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:101:11: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:105:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:106:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:114:9: warning: variable \'x\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:125:10: warning: variable \'a\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:126:10: warning: variables \'a\' and \'b\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:127:10: warning: variables \'a\', \'b\', and \'c\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:128:10: warning: variables \'a\', \'b\', \'c\', and \'d\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:129:10: warning: variables used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:130:10: warning: variables used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:131:10: warning: variables \'a\', \'c\', \'d\', and \'b\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:132:10: warning: variables \'d\', \'c\', \'b\', and \'a\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:138:15: warning: variable \'a\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:140:15: warning: variable \'a\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:142:15: warning: variable \'a\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:144:15: warning: variable \'a\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:294:29: warning: variables \'a\' and \'b\' used in loop condition not modified in loop body [-Wfor-loop-analysis]"} | ["clang/test/SemaCXX/warn-loop-analysis.cpp"]={"clang/test/SemaCXX/warn-loop-analysis.cpp:17:15: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:24:15: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:31:17: warning: variable \'j\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:34:17: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:38:20: warning: variables \'i\' and \'j\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:49:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:53:10: warning: variables \'i\' and \'j\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:58:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:62:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:66:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:70:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:74:10: warning: variable \'ptr\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:78:11: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:82:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:86:10: warning: variables \'i\', \'j\', and \'k\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:90:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:95:10: warning: variables \'i\' and \'j\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:98:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:101:11: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:105:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:106:10: warning: variable \'i\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:114:9: warning: variable \'x\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:125:10: warning: variable \'a\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:126:10: warning: variables \'a\' and \'b\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:127:10: warning: variables \'a\', \'b\', and \'c\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:128:10: warning: variables \'a\', \'b\', \'c\', and \'d\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:129:10: warning: variables used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:130:10: warning: variables used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:131:10: warning: variables \'a\', \'c\', \'d\', and \'b\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:132:10: warning: variables \'d\', \'c\', \'b\', and \'a\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:138:15: warning: variable \'a\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:140:15: warning: variable \'a\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:142:15: warning: variable \'a\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:144:15: warning: variable \'a\' used in loop condition not modified in loop body [-Wfor-loop-analysis]","clang/test/SemaCXX/warn-loop-analysis.cpp:294:29: warning: variables \'a\' and \'b\' used in loop condition not modified in loop body [-Wfor-loop-analysis]"} | ||
} | } | ||
}, | }, | ||
["warn_vbase_moved_multiple_times"]={ | ["warn_vbase_moved_multiple_times"]={ | ||
[ | [i]={"multiple-move-vbase"}, | ||
[j]="multiple-move-vbase", | |||
[ | |||
[b]="defaulted move assignment operator of %0 will move assign virtual base class %1 multiple times", | [b]="defaulted move assignment operator of %0 will move assign virtual base class %1 multiple times", | ||
[ | [d]=h, | ||
[ | [a]="defaulted move assignment operator of (.*?) will move assign virtual base class (.*?) multiple times", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wmultiple\\-move\\-vbase[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"b2504bdc0d0e",1383539174,"Issue a diagnostic if an implicitly-defined move assignment operator would move\nthe same virtual bas...","Issue a diagnostic if an implicitly-defined move assignment operator would move\nthe same virtual base class multiple times (and the move assignment is used,\nand the move assignment for the virtual base is not trivial).\n\nllvm-svn: 193977"}, | ||
[ | [g]={{T,15083,"/// Check if we\'re implicitly defining a move assignment operator for a class\n/// with virtual bases. Such a move assignment might move-assign the virtual\n/// base multiple times.\nstatic void checkMoveAssignmentForRepeatedMove(Sema &S, CXXRecordDecl *Class, SourceLocation CurrentLocation) {\n // ...\n for (auto &BI : Class->bases()) {\n // ...\n while (!Worklist.empty()) {\n // ...\n if (BaseSpec->isVirtual()) {\n // ...\n if (Existing && Existing != &BI) {\n S.Diag(CurrentLocation, diag::warn_vbase_moved_multiple_times) << Class << Base;"}}, | ||
[ | [k]={ | ||
["clang/test/CXX/special/class.copy/implicit-move.cpp"]={"clang/test/CXX/special/class.copy/implicit-move.cpp:278:45: warning: defaulted move assignment operator of \'F<DR1402::VbaseMove::B>\' will move assign virtual base class \'B\' multiple times [-Wmultiple-move-vbase]","clang/test/CXX/special/class.copy/implicit-move.cpp:278:45: warning: defaulted move assignment operator of \'F<DR1402::VbaseMove::D>\' will move assign virtual base class \'D\' multiple times [-Wmultiple-move-vbase]","clang/test/CXX/special/class.copy/implicit-move.cpp:278:45: warning: defaulted move assignment operator of \'J<DR1402::VbaseMove::B>\' will move assign virtual base class \'B\' multiple times [-Wmultiple-move-vbase]","clang/test/CXX/special/class.copy/implicit-move.cpp:278:45: warning: defaulted move assignment operator of \'J<DR1402::VbaseMove::D>\' will move assign virtual base class \'D\' multiple times [-Wmultiple-move-vbase]"} | ["clang/test/CXX/special/class.copy/implicit-move.cpp"]={"clang/test/CXX/special/class.copy/implicit-move.cpp:278:45: warning: defaulted move assignment operator of \'F<DR1402::VbaseMove::B>\' will move assign virtual base class \'B\' multiple times [-Wmultiple-move-vbase]","clang/test/CXX/special/class.copy/implicit-move.cpp:278:45: warning: defaulted move assignment operator of \'F<DR1402::VbaseMove::D>\' will move assign virtual base class \'D\' multiple times [-Wmultiple-move-vbase]","clang/test/CXX/special/class.copy/implicit-move.cpp:278:45: warning: defaulted move assignment operator of \'J<DR1402::VbaseMove::B>\' will move assign virtual base class \'B\' multiple times [-Wmultiple-move-vbase]","clang/test/CXX/special/class.copy/implicit-move.cpp:278:45: warning: defaulted move assignment operator of \'J<DR1402::VbaseMove::D>\' will move assign virtual base class \'D\' multiple times [-Wmultiple-move-vbase]"} | ||
} | } | ||
}, | }, | ||
["warn_vector_long_decl_spec_combination"]={ | ["warn_vector_long_decl_spec_combination"]={ | ||
[ | [i]={wb}, | ||
[j]=wb, | |||
[ | |||
[b]="Use of \'long\' with \'__vector\' is deprecated", | [b]="Use of \'long\' with \'__vector\' is deprecated", | ||
[ | [d]=h, | ||
[ | [a]="Use of \'long\' with \'__vector\' is deprecated", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdeprecated[^\\]]*\\]", | ||
[ | [c]=Tb, | ||
[ | [f]={"2233460de6ed",1265328742,"First stage of adding AltiVec support\n\nllvm-svn: 95335","First stage of adding AltiVec support\n\nllvm-svn: 95335"}, | ||
[ | [g]={{"clang/lib/Sema/DeclSpec.cpp",1241,"/// Finish - This does final analysis of the declspec, rejecting things like\n/// \"_Imaginary\" (lacking an FP type). After calling this method, DeclSpec is\n/// guaranteed to be self-consistent, even if an error occurred.\nvoid DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) {\n // ...\n // Validate and finalize AltiVec vector declspec.\n if (TypeAltiVecVector) {\n // ...\n if (TypeAltiVecBool) {\n // ...\n } else if (TypeSpecType == TST_double) {\n // ...\n } else if (TypeSpecType == TST_float) {\n // ...\n } else if (getTypeSpecWidth() == TypeSpecifierWidth::Long) {\n // Vector long is unsupported for ZVector, or without VSX, and deprecated\n // for AltiVec.\n // It has also been historically deprecated on AIX (as an alias for\n // \"vector int\" in both 32-bit and 64-bit modes). It was then made\n // unsupported in the Clang-based XL compiler since the deprecated type\n // has a number of conflicting semantics and continuing to support it\n // is a disservice to users.\n if (S.getLangOpts().ZVector || !S.Context.getTargetInfo().hasFeature(\"vsx\") || S.Context.getTargetInfo().getTriple().isOSAIX())\n // ...\n else\n S.Diag(TSWRange.getBegin(), diag::warn_vector_long_decl_spec_combination) << getSpecifierName((TST)TypeSpecType, Policy);"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/altivec.c"]={"clang/test/Parser/altivec.c:59:10: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:62:17: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:65:19: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:68:10: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:71:17: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:74:19: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:77:8: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:80:15: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:83:17: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:86:8: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:89:15: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:92:17: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]"} | ["clang/test/Parser/altivec.c"]={"clang/test/Parser/altivec.c:59:10: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:62:17: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:65:19: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:68:10: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:71:17: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:74:19: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:77:8: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:80:15: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:83:17: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:86:8: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:89:15: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]","clang/test/Parser/altivec.c:92:17: warning: Use of \'long\' with \'__vector\' is deprecated [-Wdeprecated]"} | ||
} | } | ||
}, | }, | ||
["warn_vector_mode_deprecated"]={ | ["warn_vector_mode_deprecated"]={ | ||
[ | [i]={wb,"deprecated-attributes"}, | ||
[j]="deprecated-attributes", | |||
[ | |||
[b]="specifying vector types with the \'mode\' attribute is deprecated; use the \'vector_size\' attribute instead", | [b]="specifying vector types with the \'mode\' attribute is deprecated; use the \'vector_size\' attribute instead", | ||
[ | [d]=h, | ||
[ | [a]="specifying vector types with the \'mode\' attribute is deprecated; use the \'vector_size\' attribute instead", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-attributes[^\\]]*\\]", | ||
[ | [c]=Tb, | ||
[ | [f]={"f278eb10b7da",1447927991,"PR10235: support for vector mode attributes + warning, by Dmitry Polukhin.\nAdd support for vector mo...","PR10235: support for vector mode attributes + warning, by Dmitry Polukhin.\nAdd support for vector mode attributes like \"attribute((mode(V4SF)))\". Also add warning about deprecated vector modes like GCC does.\nDifferential Revision: http://reviews.llvm.org/D14744\n\nllvm-svn: 253551"}, | ||
[ | [g]={{w,4761,"void Sema::AddModeAttr(Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Name, bool InInstantiation) {\n // ...\n if (Str.size() >= 4 && Str[0] == \'V\') {\n // ...\n if (VectorStringLength && !Str.substr(1, VectorStringLength).getAsInteger(10, VectorSize) && VectorSize.isPowerOf2()) {\n // ...\n // Avoid duplicate warning from template instantiation.\n if (!InInstantiation)\n Diag(AttrLoc, diag::warn_vector_mode_deprecated);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-mode-enums.c"]={"clang/test/Sema/attr-mode-enums.c:12:38: warning: specifying vector types with the \'mode\' attribute is deprecated; use the \'vector_size\' attribute instead [-Wdeprecated-attributes]","clang/test/Sema/attr-mode-enums.c:14:31: warning: specifying vector types with the \'mode\' attribute is deprecated; use the \'vector_size\' attribute instead [-Wdeprecated-attributes]","clang/test/Sema/attr-mode-enums.c:16:34: warning: specifying vector types with the \'mode\' attribute is deprecated; use the \'vector_size\' attribute instead [-Wdeprecated-attributes]","clang/test/Sema/attr-mode-enums.c:18:35: warning: specifying vector types with the \'mode\' attribute is deprecated; use the \'vector_size\' attribute instead [-Wdeprecated-attributes]","clang/test/Sema/attr-mode-enums.c:20:30: warning: specifying vector types with the \'mode\' attribute is deprecated; use the \'vector_size\' attribute instead [-Wdeprecated-attributes]","clang/test/Sema/attr-mode-enums.c:22:23: warning: specifying vector types with the \'mode\' attribute is deprecated; use the \'vector_size\' attribute instead [-Wdeprecated-attributes]"} | ["clang/test/Sema/attr-mode-enums.c"]={"clang/test/Sema/attr-mode-enums.c:12:38: warning: specifying vector types with the \'mode\' attribute is deprecated; use the \'vector_size\' attribute instead [-Wdeprecated-attributes]","clang/test/Sema/attr-mode-enums.c:14:31: warning: specifying vector types with the \'mode\' attribute is deprecated; use the \'vector_size\' attribute instead [-Wdeprecated-attributes]","clang/test/Sema/attr-mode-enums.c:16:34: warning: specifying vector types with the \'mode\' attribute is deprecated; use the \'vector_size\' attribute instead [-Wdeprecated-attributes]","clang/test/Sema/attr-mode-enums.c:18:35: warning: specifying vector types with the \'mode\' attribute is deprecated; use the \'vector_size\' attribute instead [-Wdeprecated-attributes]","clang/test/Sema/attr-mode-enums.c:20:30: warning: specifying vector types with the \'mode\' attribute is deprecated; use the \'vector_size\' attribute instead [-Wdeprecated-attributes]","clang/test/Sema/attr-mode-enums.c:22:23: warning: specifying vector types with the \'mode\' attribute is deprecated; use the \'vector_size\' attribute instead [-Wdeprecated-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_verbatim_block_end_without_start"]={ | ["warn_verbatim_block_end_without_start"]={ | ||
[ | [i]={Ac}, | ||
[j]=Ac, | |||
[ | |||
[b]="\'%select{\\|@}0%1\' command does not terminate a verbatim text block", | [b]="\'%select{\\|@}0%1\' command does not terminate a verbatim text block", | ||
[ | [d]=h, | ||
[ | [a]="\'(?:\\\\|@)(.*?)\' command does not terminate a verbatim text block", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wdocumentation[^\\]]*\\]", | ||
[ | [c]="Documentation Issue", | ||
[ | [f]={"76b91c343111",1353198631,"Documentation parsing: propely handle a lone \'\\endverbatim\' and emit a warning.\n\nWe actually used to...","Documentation parsing: propely handle a lone \'\\endverbatim\' and emit a warning.\n\nWe actually used to assert on this.\n\nThanks to NAKAMURA Takumi for noticing this!\n\nllvm-svn: 168277"}, | ||
[ | [g]={{"clang/lib/AST/CommentParser.cpp",571,"BlockContentComment *Parser::parseParagraphOrBlockCommand() {\n // ...\n while (true) {\n // ...\n case tok::backslash_command:\n case tok::at_command: {\n // ...\n if (Info->IsVerbatimBlockEndCommand) {\n Diag(Tok.getLocation(), diag::warn_verbatim_block_end_without_start) << Tok.is(tok::at_command) << Info->Name << SourceRange(Tok.getLocation(), Tok.getEndLocation());"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-documentation-fixits.cpp"]={"clang/test/Sema/warn-documentation-fixits.cpp:123:5: warning: \'\\endcode\' command does not terminate a verbatim text block [-Wdocumentation]"} | ["clang/test/Sema/warn-documentation-fixits.cpp"]={"clang/test/Sema/warn-documentation-fixits.cpp:123:5: warning: \'\\endcode\' command does not terminate a verbatim text block [-Wdocumentation]"} | ||
} | } | ||
}, | }, | ||
["warn_vla_used"]={ | ["warn_vla_used"]={ | ||
[ | [i]={"vla"}, | ||
[j]="vla", | |||
[ | |||
[b]="variable length array used", | [b]="variable length array used", | ||
[ | [d]=h, | ||
[ | [a]="variable length array used", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wvla[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"6c926ccbd2bd",1358971371,"Implement -Wvla correctly\n\nGCC implements -Wvla as \"warn on every VLA\" (this is useful to find every...","Implement -Wvla correctly\n\nGCC implements -Wvla as \"warn on every VLA\" (this is useful to find every VLA,\nfor example, if they are forbidden by coding guidelines). Currently Clang\nimplements -Wvla as \"warn on VLA when it is an extension\".\n\nThe attached patch makes our behavior match GCC. The existing vla extwarn is\nmoved under -Wvla-extension and is still included into -Wgnu.\n\nThis fixes PR5953.\n\nllvm-svn: 173286"}, | ||
[ | [g]={{L,2583,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n } else if (getLangOpts().C99) {\n VLADiag = diag::warn_vla_used;"}}, | ||
[ | [k]={ | ||
[ | [Uc]={"clang/test/Sema/cast.c:3:11: warning: variable length array used [-Wvla]"} | ||
} | } | ||
}, | }, | ||
["warn_void_pointer_to_enum_cast"]={ | ["warn_void_pointer_to_enum_cast"]={ | ||
[ | [i]={"pointer-to-enum-cast",Ic,Ic,"void-pointer-to-enum-cast","void-pointer-to-int-cast"}, | ||
[j]="void-pointer-to-enum-cast", | |||
[ | |||
[b]="cast to smaller integer type %1 from %0", | [b]="cast to smaller integer type %1 from %0", | ||
[ | [d]=h, | ||
[ | [a]="cast to smaller integer type (.*?) from (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wvoid\\-pointer\\-to\\-enum\\-cast[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={gc,1576908663,fc,hc}, | ||
[ | [g]={{Eb,3171,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n // If either type is a pointer, the other type has to be either an\n // integer or a pointer.\n if (!DestType->isArithmeticType()) {\n // ...\n } else if (!SrcType->isArithmeticType()) {\n // ...\n if ((Self.Context.getTypeSize(SrcType) > Self.Context.getTypeSize(DestType)) && !DestType->isBooleanType()) {\n // ...\n if (SrcType->isVoidPointerType())\n Diag = DestType->isEnumeralType() ? diag::warn_void_pointer_to_enum_cast : diag::warn_void_pointer_to_int_cast;"}}, | ||
[ | [k]={ | ||
[ | [Uc]={"clang/test/Sema/cast.c:195:9: warning: cast to smaller integer type \'X\' from \'VoidPtr\' (aka \'void *\') [-Wvoid-pointer-to-enum-cast]"} | ||
} | } | ||
}, | }, | ||
["warn_void_pointer_to_int_cast"]={ | ["warn_void_pointer_to_int_cast"]={ | ||
[ | [i]={Ic,"void-pointer-to-int-cast"}, | ||
[j]="void-pointer-to-int-cast", | |||
[ | |||
[b]="cast to smaller integer type %1 from %0", | [b]="cast to smaller integer type %1 from %0", | ||
[ | [d]=h, | ||
[ | [a]="cast to smaller integer type (.*?) from (.*?)", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wvoid\\-pointer\\-to\\-int\\-cast[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={gc,1576908663,fc,hc}, | ||
[ | [g]={{Eb,2467,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n // ...\n if (DestType->isIntegralType(Self.Context)) {\n // ...\n // C++ 5.2.10p4: A pointer can be explicitly converted to any integral\n // type large enough to hold it; except in Microsoft mode, where the\n // integral type size doesn\'t matter (except we don\'t allow bool).\n if ((Self.Context.getTypeSize(SrcType) > Self.Context.getTypeSize(DestType))) {\n // ...\n if (MicrosoftException) {\n unsigned Diag = SrcType->isVoidPointerType() ? diag::warn_void_pointer_to_int_cast : diag::warn_pointer_to_int_cast;"},{Eb,3172,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n // If either type is a pointer, the other type has to be either an\n // integer or a pointer.\n if (!DestType->isArithmeticType()) {\n // ...\n } else if (!SrcType->isArithmeticType()) {\n // ...\n if ((Self.Context.getTypeSize(SrcType) > Self.Context.getTypeSize(DestType)) && !DestType->isBooleanType()) {\n // ...\n if (SrcType->isVoidPointerType())\n Diag = DestType->isEnumeralType() ? diag::warn_void_pointer_to_enum_cast : diag::warn_void_pointer_to_int_cast;"}}, | ||
[ | [k]={ | ||
[ | [Uc]={"clang/test/Sema/cast.c:159:10: warning: cast to smaller integer type \'Int\' (aka \'int\') from \'VoidPtr\' (aka \'void *\') [-Wvoid-pointer-to-int-cast]"} | ||
} | } | ||
}, | }, | ||
["warn_wasm_dynamic_exception_spec_ignored"]={ | ["warn_wasm_dynamic_exception_spec_ignored"]={ | ||
[ | [i]={"wasm-exception-spec"}, | ||
[j]="wasm-exception-spec", | |||
[ | |||
[b]="dynamic exception specifications with types are currently ignored in wasm", | [b]="dynamic exception specifications with types are currently ignored in wasm", | ||
[ | [d]=h, | ||
[ | [a]="dynamic exception specifications with types are currently ignored in wasm", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wwasm\\-exception\\-spec[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={gc,1576908663,fc,hc}, | ||
[ | [g]={{"clang/lib/CodeGen/CGException.cpp",498,"void CodeGenFunction::EmitStartEHSpec(const Decl *D) {\n // ...\n // In C++17 and later, \'throw()\' aka EST_DynamicNone is treated the same way\n // as noexcept. In earlier standards, it is handled in this block, along with\n // \'throw(X...)\'.\n if (EST == EST_Dynamic || (EST == EST_DynamicNone && !getLangOpts().CPlusPlus17)) {\n // ...\n // In Wasm EH we currently treat \'throw()\' in the same way as \'noexcept\'. In\n // case of throw with types, we ignore it and print a warning for now.\n // TODO Correctly handle exception specification in Wasm EH\n if (CGM.getLangOpts().hasWasmExceptions()) {\n if (EST == EST_DynamicNone)\n // ...\n else\n CGM.getDiags().Report(D->getLocation(), diag::warn_wasm_dynamic_exception_spec_ignored) << FD->getExceptionSpecSourceRange();"},{"clang/lib/CodeGen/CGException.cpp",512,"void CodeGenFunction::EmitStartEHSpec(const Decl *D) {\n // ...\n // In C++17 and later, \'throw()\' aka EST_DynamicNone is treated the same way\n // as noexcept. In earlier standards, it is handled in this block, along with\n // \'throw(X...)\'.\n if (EST == EST_Dynamic || (EST == EST_DynamicNone && !getLangOpts().CPlusPlus17)) {\n // ...\n // Currently Emscripten EH only handles \'throw()\' but not \'throw\' with\n // types. \'throw()\' handling will be done in JS glue code so we don\'t need\n // to do anything in that case. Just print a warning message in case of\n // throw with types.\n // TODO Correctly handle exception specification in Emscripten EH\n if (getTarget().getCXXABI() == TargetCXXABI::WebAssembly && CGM.getLangOpts().getExceptionHandling() == LangOptions::ExceptionHandlingKind::None && EST == EST_Dynamic)\n CGM.getDiags().Report(D->getLocation(), diag::warn_wasm_dynamic_exception_spec_ignored) << FD->getExceptionSpecSourceRange();"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGenCXX/wasm-eh.cpp"]={"clang/test/CodeGenCXX/wasm-eh.cpp:389:6: warning: dynamic exception specifications with types are currently ignored in wasm [-Wwasm-exception-spec]"} | ["clang/test/CodeGenCXX/wasm-eh.cpp"]={"clang/test/CodeGenCXX/wasm-eh.cpp:389:6: warning: dynamic exception specifications with types are currently ignored in wasm [-Wwasm-exception-spec]"} | ||
} | } | ||
}, | }, | ||
["warn_weak_identifier_undeclared"]={ | ["warn_weak_identifier_undeclared"]={ | ||
[b]="weak identifier %0 never declared", | [b]="weak identifier %0 never declared", | ||
[ | [d]=h, | ||
[ | [a]="weak identifier (.*?) never declared", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[ | [f]={"7d470f3466c0",1248923739,"PR3679 - handle #pragma weak\n\nllvm-svn: 77573","PR3679 - handle #pragma weak\n\nllvm-svn: 77573"}, | ||
[ | [g]={{S,1190,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n for (const auto &WeakIDs : WeakUndeclaredIdentifiers) {\n // ...\n if (PrevDecl != nullptr && !(isa<FunctionDecl>(PrevDecl) || isa<VarDecl>(PrevDecl)))\n // ...\n else\n for (const auto &WI : WeakIDs.second)\n Diag(WI.getLocation(), diag::warn_weak_identifier_undeclared) << WeakIDs.first;"}}, | ||
[ | [k]={ | ||
["clang/test/Parser/pragma-weak.c"]={"clang/test/Parser/pragma-weak.c:13:76: warning: weak identifier \'y\' never declared"} | ["clang/test/Parser/pragma-weak.c"]={"clang/test/Parser/pragma-weak.c:13:76: warning: weak identifier \'y\' never declared"} | ||
} | } | ||
}, | }, | ||
["warn_weak_import"]={ | ["warn_weak_import"]={ | ||
[b]="an already-declared variable is made a weak_import declaration %0", | [b]="an already-declared variable is made a weak_import declaration %0", | ||
[ | [d]=h, | ||
[ | [a]="an already\\-declared variable is made a weak_import declaration (.*?)", | ||
[ | [e]=K, | ||
[ | [c]=l, | ||
[ | [f]={"33e022650ade",1308780530,"Issue warning if weak_import attribute is added to an already\ndeclared variable and ignore it. // rd...","Issue warning if weak_import attribute is added to an already\ndeclared variable and ignore it. // rdar://9538608\n\nllvm-svn: 133654"}, | ||
[ | [g]={{B,4592,"/// 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 // Warn if an already-declared variable is made a weak_import in a subsequent\n // declaration\n if (New->hasAttr<WeakImportAttr>() && Old->getStorageClass() == SC_None && !Old->hasAttr<WeakImportAttr>()) {\n Diag(New->getLocation(), diag::warn_weak_import) << New->getDeclName();"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/attr-weak.c"]={"clang/test/Sema/attr-weak.c:21:12: warning: an already-declared variable is made a weak_import declaration \'C\'"} | ["clang/test/Sema/attr-weak.c"]={"clang/test/Sema/attr-weak.c:21:12: warning: an already-declared variable is made a weak_import declaration \'C\'"} | ||
} | } | ||
}, | }, | ||
["warn_weak_template_vtable"]={ | ["warn_weak_template_vtable"]={ | ||
[ | [i]={"weak-template-vtables"}, | ||
[j]="weak-template-vtables", | |||
[ | |||
[b]="this warning is no longer in use and will be removed in the next release", | [b]="this warning is no longer in use and will be removed in the next release", | ||
[ | [d]=h, | ||
[ | [a]="this warning is no longer in use and will be removed in the next release", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wweak\\-template\\-vtables[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"72b61203f447",1323455570,"Provide a separate warning for weak vtables in explicit template instantiations. There\'s no (current...","Provide a separate warning for weak vtables in explicit template instantiations. There\'s no (current) way to fix such templates to emit strong symbols/vtables, but perhaps users want to know about the cost being incurred anyway.\n\nllvm-svn: 146265"} | ||
}, | }, | ||
["warn_weak_vtable"]={ | ["warn_weak_vtable"]={ | ||
[ | [i]={"weak-vtables"}, | ||
[j]="weak-vtables", | |||
[ | |||
[b]="%0 has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit", | [b]="%0 has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit", | ||
[ | [d]=h, | ||
[ | [a]="(.*?) has no out\\-of\\-line virtual method definitions; its vtable will be emitted in every translation unit", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wweak\\-vtables[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"0da714a3e216",1265423230,"Implement a warning diagnostic for weak vtables. Fixes PR6116.\n\nllvm-svn: 95472","Implement a warning diagnostic for weak vtables. Fixes PR6116.\n\nllvm-svn: 95472"}, | ||
[ | [g]={{T,18396,"bool Sema::DefineUsedVTables() {\n // ...\n for (unsigned I = 0; I != VTableUses.size(); ++I) {\n // ...\n // Warn if we\'re emitting a weak vtable. The vtable will be weak if there is\n // no key function or the key function is inlined. Don\'t warn in C++ ABIs\n // that lack key functions, since the user won\'t be able to make one.\n if (Context.getTargetInfo().getCXXABI().hasKeyFunctions() && Class->isExternallyVisible() && ClassTSK != TSK_ImplicitInstantiation && ClassTSK != TSK_ExplicitInstantiationDefinition) {\n // ...\n if (!KeyFunction || (KeyFunction->hasBody(KeyFunctionDef) && KeyFunctionDef->isInlined()))\n Diag(Class->getLocation(), diag::warn_weak_vtable) << Class;"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-weak-vtables.cpp"]={"clang/test/SemaCXX/warn-weak-vtables.cpp:10:8: warning: \'A\' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Wweak-vtables]","clang/test/SemaCXX/warn-weak-vtables.cpp:53:7: warning: \'VeryDerived\' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Wweak-vtables]","clang/test/SemaCXX/warn-weak-vtables.cpp:75:19: warning: \'TemplVirt<long>\' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Wweak-vtables]"} | ["clang/test/SemaCXX/warn-weak-vtables.cpp"]={"clang/test/SemaCXX/warn-weak-vtables.cpp:10:8: warning: \'A\' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Wweak-vtables]","clang/test/SemaCXX/warn-weak-vtables.cpp:53:7: warning: \'VeryDerived\' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Wweak-vtables]","clang/test/SemaCXX/warn-weak-vtables.cpp:75:19: warning: \'TemplVirt<long>\' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Wweak-vtables]"} | ||
} | } | ||
}, | }, | ||
["warn_wrong_absolute_value_type"]={ | ["warn_wrong_absolute_value_type"]={ | ||
[ | [i]={Lc}, | ||
[j]=Lc, | |||
[ | |||
[b]="using %select{integer|floating point|complex}1 absolute value function %0 when argument is of %select{integer|floating point|complex}2 type", | [b]="using %select{integer|floating point|complex}1 absolute value function %0 when argument is of %select{integer|floating point|complex}2 type", | ||
[ | [d]=h, | ||
[ | [a]="using (?:integer|floating point|complex) absolute value function (.*?) when argument is of (?:integer|floating point|complex) type", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wabsolute\\-value[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"7eb0b2c1819c",1393377448,"Add -Wabsolute-value, warnings about absolute value functions.\n\nThe warnings fall into three groups....","Add -Wabsolute-value, warnings about absolute value functions.\n\nThe warnings fall into three groups.\n1) Using an absolute value function of the wrong type, for instance, using the\nint absolute value function when the argument is a floating point type.\n2) Using the improper sized absolute value function, for instance, using abs\nwhen the argument is a long long. llabs should be used instead.\n\nFrom these two cases, an implicit conversion will occur which may cause\nunexpected behavior. Where possible, suggest the proper absolute value\nfunction to use, and which header to include if the function is not available.\n\n3) Taking the absolute value of an unsigned value. In addition to this warning,\nsuggest to remove the function call. This usually indicates a logic error\nsince the programmer assumed negative values would have been possible.\n\nllvm-svn: 202211"}, | ||
[ | [g]={{r,12079,"// Warn when using the wrong abs() function.\nvoid Sema::CheckAbsoluteValueFunction(const CallExpr *Call, const FunctionDecl *FDecl) {\n // ...\n Diag(Call->getExprLoc(), diag::warn_wrong_absolute_value_type) << FDecl << ParamValueKind << ArgValueKind;"},{"clang/utils/TableGen/ClangDiagnosticsEmitter.cpp",1411,"/// diag::warn_wrong_absolute_value_type,"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/warn-absolute-value-header.c"]={"clang/test/Sema/warn-absolute-value-header.c:27:9: warning: using integer absolute value function \'abs\' when argument is of floating point type [-Wabsolute-value]","clang/test/Sema/warn-absolute-value-header.c:31:9: warning: using integer absolute value function \'abs\' when argument is of floating point type [-Wabsolute-value]"} | ["clang/test/Sema/warn-absolute-value-header.c"]={"clang/test/Sema/warn-absolute-value-header.c:27:9: warning: using integer absolute value function \'abs\' when argument is of floating point type [-Wabsolute-value]","clang/test/Sema/warn-absolute-value-header.c:31:9: warning: using integer absolute value function \'abs\' when argument is of floating point type [-Wabsolute-value]"} | ||
} | } | ||
}, | }, | ||
["warn_wrong_clang_attr_namespace"]={ | ["warn_wrong_clang_attr_namespace"]={ | ||
[ | [i]={O,A}, | ||
[j]=A, | |||
[ | |||
[b]="\'__clang__\' is a predefined macro name, not an attribute scope specifier; did you mean \'_Clang\' instead?", | [b]="\'__clang__\' is a predefined macro name, not an attribute scope specifier; did you mean \'_Clang\' instead?", | ||
[ | [d]=h, | ||
[ | [a]="\'__clang__\' is a predefined macro name, not an attribute scope specifier; did you mean \'_Clang\' instead\\?", | ||
[ | [e]=R, | ||
[ | [c]=v, | ||
[ | [f]={"c44c17424628",1541783985,"Introduce the _Clang scoped attribute token.\n\nCurrently, we only accept clang as the scoped attribut...","Introduce the _Clang scoped attribute token.\n\nCurrently, we only accept clang as the scoped attribute identifier for double square bracket attributes provided by Clang, but this has the potential to conflict with user-defined macros. To help alleviate these concerns, this introduces the _Clang scoped attribute identifier as an alias for clang. It also introduces a warning with a fixit on the off chance someone attempts to use __clang__ as the scoped attribute (which is a predefined compiler identification macro).\n\nllvm-svn: 346521"}, | ||
[ | [g]={{"clang/lib/Parse/ParseDeclCXX.cpp",4257,"/// Try to parse an \'identifier\' which appears within an attribute-token.\n///\n/// \\return the parsed identifier on success, and 0 if the next token is not an\n/// attribute-token.\n///\n/// C++11 [dcl.attr.grammar]p3:\n/// If a keyword or an alternative token that satisfies the syntactic\n/// requirements of an identifier is contained in an attribute-token,\n/// it is considered an identifier.\nIdentifierInfo *Parser::TryParseCXX11AttributeIdentifier(SourceLocation &Loc, Sema::AttributeCompletion Completion, const IdentifierInfo *Scope) {\n // ...\n case tok::numeric_constant: {\n // If we got a numeric constant, check to see if it comes from a macro that\n // corresponds to the predefined __clang__ macro. If it does, warn the user\n // and recover by pretending they said _Clang instead.\n if (Tok.getLocation().isMacroID()) {\n // ...\n if (Spelling == \"__clang__\") {\n // ...\n Diag(Tok, diag::warn_wrong_clang_attr_namespace) << FixItHint::CreateReplacement(TokRange, \"_Clang\");"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/attr-optnone.cpp"]={"clang/test/SemaCXX/attr-optnone.cpp:77:3: warning: \'__clang__\' is a predefined macro name, not an attribute scope specifier; did you mean \'_Clang\' instead? [-Wignored-attributes]"} | ["clang/test/SemaCXX/attr-optnone.cpp"]={"clang/test/SemaCXX/attr-optnone.cpp:77:3: warning: \'__clang__\' is a predefined macro name, not an attribute scope specifier; did you mean \'_Clang\' instead? [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_xor_used_as_pow"]={ | ["warn_xor_used_as_pow"]={ | ||
[ | [i]={Pc}, | ||
[j]=Pc, | |||
[ | |||
[b]="result of \'%0\' is %1; did you mean exponentiation?", | [b]="result of \'%0\' is %1; did you mean exponentiation?", | ||
[ | [d]=h, | ||
[ | [a]="result of \'(.*?)\' is (.*?); did you mean exponentiation\\?", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wxor\\-used\\-as\\-pow[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={tc,1567434909,kc,zc}, | ||
[ | [g]={{u,13680,"static void diagnoseXorMisusedAsPow(Sema &S, const ExprResult &XorLHS, const ExprResult &XorRHS, const SourceLocation Loc) {\n // ...\n if (LeftSideValue == 2 && RightSideIntValue >= 0) {\n // ...\n if (Overflow) {\n if (RightSideIntValue < 64)\n // ...\n else if (RightSideIntValue == 64)\n S.Diag(Loc, diag::warn_xor_used_as_pow) << ExprStr << toString(XorValue, 10, true);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-xor-as-pow.cpp"]={"clang/test/SemaCXX/warn-xor-as-pow.cpp:83:11: warning: result of \'2 ^ 64\' is 66; did you mean exponentiation? [-Wxor-used-as-pow]"} | ["clang/test/SemaCXX/warn-xor-as-pow.cpp"]={"clang/test/SemaCXX/warn-xor-as-pow.cpp:83:11: warning: result of \'2 ^ 64\' is 66; did you mean exponentiation? [-Wxor-used-as-pow]"} | ||
} | } | ||
}, | }, | ||
["warn_xor_used_as_pow_base"]={ | ["warn_xor_used_as_pow_base"]={ | ||
[ | [i]={Pc}, | ||
[j]=Pc, | |||
[ | |||
[b]="result of \'%0\' is %1; did you mean \'%2\'?", | [b]="result of \'%0\' is %1; did you mean \'%2\'?", | ||
[ | [d]=h, | ||
[ | [a]="result of \'(.*?)\' is (.*?); did you mean \'(.*?)\'\\?", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wxor\\-used\\-as\\-pow[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"920890e26812",1566155654,"[Diagnostics] Diagnose misused xor as pow\n\nSummary:\nMotivation:\nhttps://twitter.com/jfbastien/status...","[Diagnostics] Diagnose misused xor as pow\n\nSummary:\nMotivation:\nhttps://twitter.com/jfbastien/status/1139298419988549632\nhttps://twitter.com/mikemx7f/status/1139335901790625793\nhttps://codesearch.isocpp.org/cgi-bin/cgi_ppsearch?q=10+%5E&search=Search\n\nReviewers: jfb, rsmith, regehr, aaron.ballman\n\nReviewed By: aaron.ballman\n\nSubscribers: lebedev.ri, Quuxplusone, erik.pilkington, riccibruno, dexonsmith, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D63423\n\nllvm-svn: 369217"}, | ||
[ | [g]={{u,13675,"static void diagnoseXorMisusedAsPow(Sema &S, const ExprResult &XorLHS, const ExprResult &XorRHS, const SourceLocation Loc) {\n // ...\n if (LeftSideValue == 2 && RightSideIntValue >= 0) {\n // ...\n if (Overflow) {\n if (RightSideIntValue < 64)\n S.Diag(Loc, diag::warn_xor_used_as_pow_base) << ExprStr << toString(XorValue, 10, true) << (\"1LL << \" + RHSStr) << FixItHint::CreateReplacement(ExprRange, \"1LL << \" + RHSStr);"},{u,13694,"static void diagnoseXorMisusedAsPow(Sema &S, const ExprResult &XorLHS, const ExprResult &XorRHS, const SourceLocation Loc) {\n // ...\n if (LeftSideValue == 2 && RightSideIntValue >= 0) {\n // ...\n } else if (LeftSideValue == 10) {\n // ...\n S.Diag(Loc, diag::warn_xor_used_as_pow_base) << ExprStr << toString(XorValue, 10, true) << SuggestedValue << FixItHint::CreateReplacement(ExprRange, SuggestedValue);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-xor-as-pow.cpp"]={"clang/test/SemaCXX/warn-xor-as-pow.cpp:80:11: warning: result of \'2 ^ 32\' is 34; did you mean \'1LL << 32\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:88:12: warning: result of \'10 ^ 0\' is 10; did you mean \'1e0\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:91:12: warning: result of \'10 ^ 1\' is 11; did you mean \'1e1\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:94:12: warning: result of \'10 ^ 2\' is 8; did you mean \'1e2\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:97:12: warning: result of \'10 ^ 4\' is 14; did you mean \'1e4\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:100:12: warning: result of \'10 ^ +4\' is 14; did you mean \'1e4\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:103:12: warning: result of \'10 ^ 10\' is 0; did you mean \'1e10\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:106:13: warning: result of \'TEN ^ 10\' is 0; did you mean \'1e10\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:109:12: warning: result of \'10 ^ TEN\' is 0; did you mean \'1e10\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:112:12: warning: result of \'10 ^ 100\' is 110; did you mean \'1e100\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:116:12: warning: result of \'10 ^ -EXP\' is -9; did you mean \'1e-3\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:119:12: warning: result of \'10 ^ +EXP\' is 9; did you mean \'1e3\'? [-Wxor-used-as-pow]"} | ["clang/test/SemaCXX/warn-xor-as-pow.cpp"]={"clang/test/SemaCXX/warn-xor-as-pow.cpp:80:11: warning: result of \'2 ^ 32\' is 34; did you mean \'1LL << 32\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:88:12: warning: result of \'10 ^ 0\' is 10; did you mean \'1e0\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:91:12: warning: result of \'10 ^ 1\' is 11; did you mean \'1e1\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:94:12: warning: result of \'10 ^ 2\' is 8; did you mean \'1e2\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:97:12: warning: result of \'10 ^ 4\' is 14; did you mean \'1e4\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:100:12: warning: result of \'10 ^ +4\' is 14; did you mean \'1e4\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:103:12: warning: result of \'10 ^ 10\' is 0; did you mean \'1e10\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:106:13: warning: result of \'TEN ^ 10\' is 0; did you mean \'1e10\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:109:12: warning: result of \'10 ^ TEN\' is 0; did you mean \'1e10\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:112:12: warning: result of \'10 ^ 100\' is 110; did you mean \'1e100\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:116:12: warning: result of \'10 ^ -EXP\' is -9; did you mean \'1e-3\'? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:119:12: warning: result of \'10 ^ +EXP\' is 9; did you mean \'1e3\'? [-Wxor-used-as-pow]"} | ||
} | } | ||
}, | }, | ||
["warn_xor_used_as_pow_base_extra"]={ | ["warn_xor_used_as_pow_base_extra"]={ | ||
[ | [i]={Pc}, | ||
[j]=Pc, | |||
[ | |||
[b]="result of \'%0\' is %1; did you mean \'%2\' (%3)?", | [b]="result of \'%0\' is %1; did you mean \'%2\' (%3)?", | ||
[ | [d]=h, | ||
[ | [a]="result of \'(.*?)\' is (.*?); did you mean \'(.*?)\' \\((.*?)\\)\\?", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wxor\\-used\\-as\\-pow[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"920890e26812",1566155654,"[Diagnostics] Diagnose misused xor as pow\n\nSummary:\nMotivation:\nhttps://twitter.com/jfbastien/status...","[Diagnostics] Diagnose misused xor as pow\n\nSummary:\nMotivation:\nhttps://twitter.com/jfbastien/status/1139298419988549632\nhttps://twitter.com/mikemx7f/status/1139335901790625793\nhttps://codesearch.isocpp.org/cgi-bin/cgi_ppsearch?q=10+%5E&search=Search\n\nReviewers: jfb, rsmith, regehr, aaron.ballman\n\nReviewed By: aaron.ballman\n\nSubscribers: lebedev.ri, Quuxplusone, erik.pilkington, riccibruno, dexonsmith, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D63423\n\nllvm-svn: 369217"}, | ||
[ | [g]={{u,13687,"static void diagnoseXorMisusedAsPow(Sema &S, const ExprResult &XorLHS, const ExprResult &XorRHS, const SourceLocation Loc) {\n // ...\n if (LeftSideValue == 2 && RightSideIntValue >= 0) {\n // ...\n if (Overflow) {\n // ...\n } else {\n S.Diag(Loc, diag::warn_xor_used_as_pow_base_extra) << ExprStr << toString(XorValue, 10, true) << SuggestedExpr << toString(PowValue, 10, true) << FixItHint::CreateReplacement(ExprRange, (RightSideIntValue == 0) ? \"1\" : SuggestedExpr);"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-xor-as-pow.cpp"]={"clang/test/SemaCXX/warn-xor-as-pow.cpp:36:11: warning: result of \'2 ^ 0\' is 2; did you mean \'1 << 0\' (1)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:39:11: warning: result of \'2 ^ 1\' is 3; did you mean \'1 << 1\' (2)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:42:11: warning: result of \'2 ^ 2\' is 0; did you mean \'1 << 2\' (4)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:45:11: warning: result of \'2 ^ 8\' is 10; did you mean \'1 << 8\' (256)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:48:11: warning: result of \'2 ^ +8\' is 10; did you mean \'1 << +8\' (256)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:51:13: warning: result of \'TWO ^ 8\' is 10; did you mean \'1 << 8\' (256)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:54:11: warning: result of \'2 ^ 16\' is 18; did you mean \'1 << 16\' (65536)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:57:11: warning: result of \'2 ^ TEN\' is 8; did you mean \'1 << TEN\' (1024)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:60:18: warning: result of \'2 ^ ALPHA_OFFSET\' is 1; did you mean \'1 << ALPHA_OFFSET\' (8)? [-Wxor-used-as-pow]"} | ["clang/test/SemaCXX/warn-xor-as-pow.cpp"]={"clang/test/SemaCXX/warn-xor-as-pow.cpp:36:11: warning: result of \'2 ^ 0\' is 2; did you mean \'1 << 0\' (1)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:39:11: warning: result of \'2 ^ 1\' is 3; did you mean \'1 << 1\' (2)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:42:11: warning: result of \'2 ^ 2\' is 0; did you mean \'1 << 2\' (4)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:45:11: warning: result of \'2 ^ 8\' is 10; did you mean \'1 << 8\' (256)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:48:11: warning: result of \'2 ^ +8\' is 10; did you mean \'1 << +8\' (256)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:51:13: warning: result of \'TWO ^ 8\' is 10; did you mean \'1 << 8\' (256)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:54:11: warning: result of \'2 ^ 16\' is 18; did you mean \'1 << 16\' (65536)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:57:11: warning: result of \'2 ^ TEN\' is 8; did you mean \'1 << TEN\' (1024)? [-Wxor-used-as-pow]","clang/test/SemaCXX/warn-xor-as-pow.cpp:60:18: warning: result of \'2 ^ ALPHA_OFFSET\' is 1; did you mean \'1 << ALPHA_OFFSET\' (8)? [-Wxor-used-as-pow]"} | ||
} | } | ||
}, | }, | ||
["warn_zero_as_null_pointer_constant"]={ | ["warn_zero_as_null_pointer_constant"]={ | ||
[ | [i]={"zero-as-null-pointer-constant"}, | ||
[j]="zero-as-null-pointer-constant", | |||
[ | |||
[b]="zero as null pointer constant", | [b]="zero as null pointer constant", | ||
[ | [d]=h, | ||
[ | [a]="zero as null pointer constant", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wzero\\-as\\-null\\-pointer\\-constant[^\\]]*\\]", | ||
[ | [c]=Jb, | ||
[ | [f]={"d7ba86b6bf54",1494000668,"Introduce Wzero-as-null-pointer-constant.\n\nAdd an opt-in warning that fires when 0 is used as a null...","Introduce Wzero-as-null-pointer-constant.\n\nAdd an opt-in warning that fires when 0 is used as a null pointer. \ngcc has this warning, and there\'s some demand for it.\n\nhttps://reviews.llvm.org/D32914\n\nllvm-svn: 302247"}, | ||
[ | [g]={{S,598,"void Sema::diagnoseZeroToNullptrConversion(CastKind Kind, const Expr *E) {\n // ...\n if (Diags.isIgnored(diag::warn_zero_as_null_pointer_constant, E->getBeginLoc()))"},{S,623,"void Sema::diagnoseZeroToNullptrConversion(CastKind Kind, const Expr *E) {\n // ...\n Diag(E->getBeginLoc(), diag::warn_zero_as_null_pointer_constant) << FixItHint::CreateReplacement(E->getSourceRange(), \"nullptr\");"}}, | ||
[ | [k]={ | ||
["clang/test/SemaCXX/warn-zero-nullptr-cxx20.cpp"]={"clang/test/SemaCXX/warn-zero-nullptr-cxx20.cpp:48:14: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]","clang/test/SemaCXX/warn-zero-nullptr-cxx20.cpp:49:26: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]","clang/test/SemaCXX/warn-zero-nullptr-cxx20.cpp:50:33: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]"} | ["clang/test/SemaCXX/warn-zero-nullptr-cxx20.cpp"]={"clang/test/SemaCXX/warn-zero-nullptr-cxx20.cpp:48:14: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]","clang/test/SemaCXX/warn-zero-nullptr-cxx20.cpp:49:26: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]","clang/test/SemaCXX/warn-zero-nullptr-cxx20.cpp:50:33: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]"} | ||
} | } | ||
}, | }, | ||
["warn_zero_size_struct_union_compat"]={ | ["warn_zero_size_struct_union_compat"]={ | ||
[ | [i]={"c++-compat"}, | ||
[j]="c++-compat", | |||
[ | |||
[b]="%select{|empty }0%select{struct|union}1 has size 0 in C, %select{size 1|non-zero size}2 in C++", | [b]="%select{|empty }0%select{struct|union}1 has size 0 in C, %select{size 1|non-zero size}2 in C++", | ||
[ | [d]=h, | ||
[ | [a]="(?:|empty )(?:struct|union) has size 0 in C, (?:size 1|non\\-zero size) in C\\+\\+", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+\\-compat[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"89578fd43981",1370698198,"Recognition of empty structures and unions is moved to semantic stage\n\nDifferential Revision: http:/...","Recognition of empty structures and unions is moved to semantic stage\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D586\n\nllvm-svn: 183609"}, | ||
[ | [g]={{B,19128,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n // Okay, we successfully defined \'Record\'.\n if (Record) {\n // ...\n if (CheckForZeroSize) {\n // ...\n // Empty structs are an extension in C (C99 6.7.2.1p7). They are\n // allowed in C++, but warn if its declaration is inside\n // extern \"C\" block.\n if (ZeroSize) {\n Diag(RecLoc, getLangOpts().CPlusPlus ? diag::warn_zero_size_struct_union_in_extern_c : diag::warn_zero_size_struct_union_compat) << IsEmpty << Record->isUnion() << (NonBitFields > 1);"}}, | ||
[ | [k]={ | ||
["clang/test/Sema/empty1.c"]={"clang/test/Sema/empty1.c:5:1: warning: empty struct has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:8:1: warning: empty union has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:11:1: warning: struct has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:15:1: warning: union has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:19:1: warning: struct has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:24:1: warning: union has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:29:1: warning: struct has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:33:1: warning: union has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:37:1: warning: struct has size 0 in C, non-zero size in C++ [-Wc++-compat]"} | ["clang/test/Sema/empty1.c"]={"clang/test/Sema/empty1.c:5:1: warning: empty struct has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:8:1: warning: empty union has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:11:1: warning: struct has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:15:1: warning: union has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:19:1: warning: struct has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:24:1: warning: union has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:29:1: warning: struct has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:33:1: warning: union has size 0 in C, size 1 in C++ [-Wc++-compat]","clang/test/Sema/empty1.c:37:1: warning: struct has size 0 in C, non-zero size in C++ [-Wc++-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_zero_size_struct_union_in_extern_c"]={ | ["warn_zero_size_struct_union_in_extern_c"]={ | ||
[ | [i]={n,o,"extern-c-compat",p}, | ||
[j]="extern-c-compat", | |||
[ | |||
[b]="%select{|empty }0%select{struct|union}1 has size 0 in C, %select{size 1|non-zero size}2 in C++", | [b]="%select{|empty }0%select{struct|union}1 has size 0 in C, %select{size 1|non-zero size}2 in C++", | ||
[ | [d]=h, | ||
[ | [a]="(?:|empty )(?:struct|union) has size 0 in C, (?:size 1|non\\-zero size) in C\\+\\+", | ||
[ | [e]=" \\[(?:\\-Werror,)?\\-Wextern\\-c\\-compat[^\\]]*\\]", | ||
[ | [c]=l, | ||
[ | [f]={"3cb8022849b9",1384395183,"Added warning on structures/unions that are empty or contain only\nbit fields of zero size. Warnings ...","Added warning on structures/unions that are empty or contain only\nbit fields of zero size. Warnings are generated in C++ mode and if\nonly such type is defined inside extern \"C\" block.\nThe patch fixed PR5065.\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2151\n\nllvm-svn: 194653"}, | ||
[ | [g]={{B,19127,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n // Okay, we successfully defined \'Record\'.\n if (Record) {\n // ...\n if (CheckForZeroSize) {\n // ...\n // Empty structs are an extension in C (C99 6.7.2.1p7). They are\n // allowed in C++, but warn if its declaration is inside\n // extern \"C\" block.\n if (ZeroSize) {\n Diag(RecLoc, getLangOpts().CPlusPlus ? diag::warn_zero_size_struct_union_in_extern_c : diag::warn_zero_size_struct_union_compat) << IsEmpty << Record->isUnion() << (NonBitFields > 1);"}}, | ||
[ | [k]={ | ||
["clang/test/CodeGenCXX/c-linkage.cpp"]={"clang/test/CodeGenCXX/c-linkage.cpp:29:3: warning: empty struct has size 0 in C, size 1 in C++ [-Wextern-c-compat]"} | ["clang/test/CodeGenCXX/c-linkage.cpp"]={"clang/test/CodeGenCXX/c-linkage.cpp:29:3: warning: empty struct has size 0 in C, size 1 in C++ [-Wextern-c-compat]"} | ||
} | } | ||
} | } | ||
}; | }; |
edits