Module:ClangDiags/DiagsLongData3
Jump to navigation
Jump to search
Documentation for this module may be created at Module:ClangDiags/DiagsLongData3/doc
local a=""; local b="hierarchical_hist"; local c="commit"; local d="id_hist"; local e="category_hist"; local f="message_hist"; local g="regex3"; local h="regex2"; local i="regex1"; local j="source"; local k="(?:error|fatal error)\\: "; local l="tests2"; local m="Semantic Issue"; local n="Parse Issue"; local o="None"; local p="clang/lib/Parse/ParseDecl.cpp"; local q="clang/lib/Driver/ToolChains/Clang.cpp"; local r="clang/lib/Parse/ParseDeclCXX.cpp"; local s="9.0"; local t="16.0"; local u="b1c4d5507fad"; local v="The basic representation of diagnostics information in tablegen format, plus (uncommented and incomp..."; local w="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 x="15.0"; local y="14.0"; local z="clang/lib/Parse/ParseObjc.cpp"; local A="clang/lib/Sema/SemaDecl.cpp"; local B="clang/lib/Parse/ParseStmt.cpp"; local C="11.0"; local D="12.0"; local E="clang/lib/Parse/ParseOpenMP.cpp"; local F="clang/lib/Parse/ParseExpr.cpp"; local G="clang/lib/Sema/SemaTemplate.cpp"; local H="10.0"; local I="5.0"; local J="8.0"; local K="7.0"; local L="13.0"; local M="clang/lib/Parse/Parser.cpp"; local N="clang/lib/Driver/Driver.cpp"; local O="clang/lib/Parse/ParseExprCXX.cpp"; local P="clang/lib/Parse/ParsePragma.cpp"; local Q="clang/lib/Sema/SemaDeclCXX.cpp"; local R="clang/lib/Sema/SemaInit.cpp"; local S="clang/lib/Lex/PPMacroExpansion.cpp"; local T="Update tablegen diagnostic files to be in sync with the def files."; local U="5a8987ca5113"; local V="clang/lib/Sema/SemaStmt.cpp"; local W="Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"; local X="clang/lib/Sema/SemaDeclObjC.cpp"; local Y="clang/lib/Parse/ParseTemplate.cpp"; local Z="clang/lib/Frontend/CompilerInvocation.cpp"; local ab="fatal error\\: "; local bb="clang/lib/Parse/ParseCXXInlineMethods.cpp"; local cb="Modules Issue"; local db="clang/lib/Sema/SemaChecking.cpp"; local eb="clang/lib/Driver/SanitizerArgs.cpp"; local fb="clang/lib/Sema/SemaModule.cpp"; local gb="6.0"; local hb="clang/lib/Driver/ToolChains/CommonArgs.cpp"; local ib="clang/lib/Frontend/CompilerInstance.cpp"; local jb="11.1"; local kb="clang/lib/Serialization/ASTReader.cpp"; local lb="clang/lib/Lex/LiteralSupport.cpp"; local mb="Lexical or Preprocessor Issue"; local nb="clang/lib/Lex/Pragma.cpp"; local ob="clang/lib/Parse/ParseHLSL.cpp"; local pb="clang/lib/Driver/ToolChains/Arch/Mips.cpp"; local qb="clang/lib/Parse/ParseStmtAsm.cpp"; local rb="clang/lib/Sema/SemaExpr.cpp"; local sb="clang/tools/driver/cc1as_main.cpp"; local tb="clang/lib/Sema/SemaDeclAttr.cpp"; local ub="WIP implementation of explicit instantiation of function templates,\nmember functions of class template specializations, and static data\nmembers. The mechanics are (mostly) present, but the semantic analysis\nis very weak.\n\nllvm-svn: 82789"; local vb="WIP implementation of explicit instantiation of function templates,"; local wb="for range declaration must declare a variable"; local xb="Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a"; local yb="450f0084a27b"; local zb="AST Deserialization Issue"; local Ab="0bf3140424a0"; local Bb="Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a\nbit by me). \n\nllvm-svn: 116122"; local Cb="4f495980c41b"; local Db="Add Diagnostic files for Frontend and move a couple errors over."; local Eb="[c++1z] N4295: fold-expressions.\n\nThis is a new form of expression of the form:\n\n (expr op ... op expr)\n\nwhere one of the exprs is a parameter pack. It expands into\n\n (expr1 op (expr2onwards op ... op expr))\n\n(and likewise if the pack is on the right). The non-pack operand can be\nomitted; in that case, an empty pack gives a fallback value or an error,\ndepending on the operator.\n\nllvm-svn: 221573"; local Fb="0f0af19b0581"; local Gb="[c++1z] N4295: fold-expressions."; local Hb="case value"; local Ib="Add Diagnostic files for Frontend and move a couple errors over.\n - Notably, clang now exits with an error if it can\'t find a\n file. This flushed out a bug in the CGColorSpace.c test case. :)\n\nllvm-svn: 66789"; local Jb="enumerator value"; local Kb="non-type template argument"; local Lb=" is not a constant expression"; local Mb="clang/lib/Sema/SemaObjCProperty.cpp"; local Nb="array size"; local Ob="clang/lib/CodeGen/BackendUtil.cpp"; local Pb="clang/lib/Sema/SemaCXXScopeSpec.cpp"; local Qb="Add support for C++0x\'s range-based for loops, as specified by the C++11 draft standard (N3291).\n\nllvm-svn: 129541"; local Rb="Add support for C++0x\'s range-based for loops, as specified by the C++11 draft standard (N3291)."; local Sb="02e85f3bc5fc"; local Tb="clang/lib/Driver/ToolChains/Darwin.cpp"; return { ["err_drv_print_header_env_var"]={ [d]={{nil,t,"err_drv_print_header_env_var"}}, [f]={{nil,t,"environment variable CC_PRINT_HEADERS_%select{FORMAT|FILTERING}0 has invalid value %1"}}, [b]={{nil,t,{"environment variable CC_PRINT_HEADERS_",{"FORMAT","FILTERING"}," has invalid value B"}}}, [i]=k, [h]="environment variable CC_PRINT_HEADERS_(?:FORMAT|FILTERING) has invalid value (.*?)", [g]=a, [e]={{nil,t,o}}, [c]={"3738ce05a70c",1668637223,"Add support for a backdoor driver option that enables emitting header","Add support for a backdoor driver option that enables emitting header\nusage information in JSON to a file\n\nEach line in the file is a JSON object that has the name of the main\nsource file followed by the list of system header files included\ndirectly or indirectly from that file.\n\nFor example:\n\n{\"source\":\"/tmp/foo.c\",\n \"includes\":[\"/usr/include/stdio.h\", \"/usr/include/stdlib.h\"]}\n\nTo reduce the amount of data written to the file, only the system\nheaders that are directly included from a non-system header file are\nrecorded.\n\nIn order to emit the header information in JSON, it is necessary to set\nthe following environment variables:\n\nCC_PRINT_HEADERS_FORMAT=json CC_PRINT_HEADERS_FILTERING=only-direct-system\n\nThe following combination is equivalent to setting CC_PRINT_HEADERS=1:\n\nCC_PRINT_HEADERS_FORMAT=textual CC_PRINT_HEADERS_FILTERING=none\n\nDifferential Revision: https://reviews.llvm.org/D137996"}, [j]={{"clang/tools/driver/driver.cpp",280,"static bool SetBackdoorDriverOutputsFromEnvVars(Driver &TheDriver) {\n // ...\n if (checkEnvVar<bool>(\"CC_PRINT_HEADERS\", \"CC_PRINT_HEADERS_FILE\", TheDriver.CCPrintHeadersFilename)) {\n // ...\n } else {\n // ...\n if (!EnvVar.empty()) {\n // ...\n if (!TheDriver.CCPrintHeadersFormat) {\n TheDriver.Diag(clang::diag::err_drv_print_header_env_var) << 0 << EnvVar;"},{"clang/tools/driver/driver.cpp",288,"static bool SetBackdoorDriverOutputsFromEnvVars(Driver &TheDriver) {\n // ...\n if (checkEnvVar<bool>(\"CC_PRINT_HEADERS\", \"CC_PRINT_HEADERS_FILE\", TheDriver.CCPrintHeadersFilename)) {\n // ...\n } else {\n // ...\n if (!EnvVar.empty()) {\n // ...\n if (!stringToHeaderIncludeFiltering(FilteringStr, Filtering)) {\n TheDriver.Diag(clang::diag::err_drv_print_header_env_var) << 1 << FilteringStr;"}} }, ["err_drv_print_header_env_var_combination"]={ [d]={{nil,t,"err_drv_print_header_env_var_combination"}}, [f]={{nil,t,"unsupported combination: CC_PRINT_HEADERS_FORMAT=%0 and CC_PRINT_HEADERS_FILTERING=%1"}}, [b]={{nil,t,"unsupported combination: CC_PRINT_HEADERS_FORMAT=A and CC_PRINT_HEADERS_FILTERING=B"}}, [i]=k, [h]="unsupported combination\\: CC_PRINT_HEADERS_FORMAT\\=(.*?) and CC_PRINT_HEADERS_FILTERING\\=(.*?)", [g]=a, [e]={{nil,t,o}}, [c]={"3738ce05a70c",1668637223,"Add support for a backdoor driver option that enables emitting header","Add support for a backdoor driver option that enables emitting header\nusage information in JSON to a file\n\nEach line in the file is a JSON object that has the name of the main\nsource file followed by the list of system header files included\ndirectly or indirectly from that file.\n\nFor example:\n\n{\"source\":\"/tmp/foo.c\",\n \"includes\":[\"/usr/include/stdio.h\", \"/usr/include/stdlib.h\"]}\n\nTo reduce the amount of data written to the file, only the system\nheaders that are directly included from a non-system header file are\nrecorded.\n\nIn order to emit the header information in JSON, it is necessary to set\nthe following environment variables:\n\nCC_PRINT_HEADERS_FORMAT=json CC_PRINT_HEADERS_FILTERING=only-direct-system\n\nThe following combination is equivalent to setting CC_PRINT_HEADERS=1:\n\nCC_PRINT_HEADERS_FORMAT=textual CC_PRINT_HEADERS_FILTERING=none\n\nDifferential Revision: https://reviews.llvm.org/D137996"}, [j]={{"clang/tools/driver/driver.cpp",297,"static bool SetBackdoorDriverOutputsFromEnvVars(Driver &TheDriver) {\n // ...\n if (checkEnvVar<bool>(\"CC_PRINT_HEADERS\", \"CC_PRINT_HEADERS_FILE\", TheDriver.CCPrintHeadersFilename)) {\n // ...\n } else {\n // ...\n if (!EnvVar.empty()) {\n // ...\n if ((TheDriver.CCPrintHeadersFormat == HIFMT_Textual && Filtering != HIFIL_None) || (TheDriver.CCPrintHeadersFormat == HIFMT_JSON && Filtering != HIFIL_Only_Direct_System)) {\n TheDriver.Diag(clang::diag::err_drv_print_header_env_var_combination) << EnvVar << FilteringStr;"}} }, ["err_drv_print_header_env_var_combination_cc1"]={ [d]={{nil,t,"err_drv_print_header_env_var_combination_cc1"}}, [f]={{nil,t,"unsupported combination: -header-include-format=%0 and -header-include-filtering=%1"}}, [b]={{nil,t,"unsupported combination: -header-include-format=A and -header-include-filtering=B"}}, [i]=k, [h]="unsupported combination\\: \\-header\\-include\\-format\\=(.*?) and \\-header\\-include\\-filtering\\=(.*?)", [g]=a, [e]={{nil,t,o}}, [c]={"3738ce05a70c",1668637223,"Add support for a backdoor driver option that enables emitting header","Add support for a backdoor driver option that enables emitting header\nusage information in JSON to a file\n\nEach line in the file is a JSON object that has the name of the main\nsource file followed by the list of system header files included\ndirectly or indirectly from that file.\n\nFor example:\n\n{\"source\":\"/tmp/foo.c\",\n \"includes\":[\"/usr/include/stdio.h\", \"/usr/include/stdlib.h\"]}\n\nTo reduce the amount of data written to the file, only the system\nheaders that are directly included from a non-system header file are\nrecorded.\n\nIn order to emit the header information in JSON, it is necessary to set\nthe following environment variables:\n\nCC_PRINT_HEADERS_FORMAT=json CC_PRINT_HEADERS_FILTERING=only-direct-system\n\nThe following combination is equivalent to setting CC_PRINT_HEADERS=1:\n\nCC_PRINT_HEADERS_FORMAT=textual CC_PRINT_HEADERS_FILTERING=none\n\nDifferential Revision: https://reviews.llvm.org/D137996"}, [j]={{Z,2167,"#include \"clang/Driver/Options.inc\"\n // ...\n // Check for invalid combinations of header-include-format\n // and header-include-filtering.\n if ((Opts.HeaderIncludeFormat == HIFMT_Textual && Opts.HeaderIncludeFiltering != HIFIL_None) || (Opts.HeaderIncludeFormat == HIFMT_JSON && Opts.HeaderIncludeFiltering != HIFIL_Only_Direct_System))\n Diags.Report(diag::err_drv_print_header_env_var_combination_cc1) << Args.getLastArg(OPT_header_include_format_EQ)->getValue() << Args.getLastArg(OPT_header_include_filtering_EQ)->getValue();"}} }, ["err_drv_riscv_unsupported_with_linker_relaxation"]={ [d]={{nil,x,"err_drv_riscv_unsupported_with_linker_relaxation"}}, [f]={{nil,x,"%0 is unsupported with RISC-V linker relaxation (-mrelax)"}}, [b]={{nil,x,"A is unsupported with RISC-V linker relaxation (-mrelax)"}}, [i]=k, [h]="(.*?) is unsupported with RISC\\-V linker relaxation \\(\\-mrelax\\)", [g]=a, [e]={{nil,x,o}}, [c]={"aef03c9b3bed",1651866463,"[clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clan...","[clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang\n\nGCC 12 has been released and contains unconditional support for\n-ftrivial-auto-var-init=zero:\nhttps://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-ftrivial-auto-var-init\n\nMaintain compatibility with GCC, and remove the -enable flag for \"zero\"\nmode. The flag is left to generate an \"unused\" warning, though, to not\nbreak all the existing users. The flag will be fully removed in Clang 17.\n\nLink: https://github.com/llvm/llvm-project/issues/44842\n\nReviewed By: nickdesaulniers, MaskRay, srhines, xbolva00\n\nDifferential Revision: https://reviews.llvm.org/D125142"}, [j]={{"clang/lib/Driver/ToolChains/Arch/RISCV.cpp",158,"void riscv::getRISCVTargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features) {\n // ...\n // -mrelax is default, unless -mno-relax is specified.\n if (Args.hasFlag(options::OPT_mrelax, options::OPT_mno_relax, true)) {\n // ...\n if (getDebugFissionKind(D, Args, A) != DwarfFissionKind::None)\n D.Diag(clang::diag::err_drv_riscv_unsupported_with_linker_relaxation) << A->getAsString(Args);"}} }, ["err_drv_ropi_incompatible_with_cxx"]={ [d]="err_drv_ropi_incompatible_with_cxx", [f]="ROPI is not compatible with c++", [b]="ROPI is not compatible with c++", [i]=k, [h]="ROPI is not compatible with c\\+\\+", [g]=a, [e]=o, [c]={"218c4cbd3d7c",1470670120,"[ARM] Command-line options for embedded position-independent code","[ARM] Command-line options for embedded position-independent code\n\nThis patch (with the corresponding ARM backend patch) adds support for\nsome new relocation models:\n\n* Read-only position independence (ROPI): Code and read-only data is accessed\n PC-relative. The offsets between all code and RO data sections are known at\n static link time.\n* Read-write position independence (RWPI): Read-write data is accessed relative\n to a static base register. The offsets between all writeable data sections\n are known at static link time.\n\nThese two modes are independent (they specify how different objects\nshould be addressed), so they can be used individually or together.\n\nThese modes are intended for bare-metal systems or systems with small\nreal-time operating systems. They are designed to avoid the need for a\ndynamic linker, the only initialisation required is setting the static\nbase register to an appropriate value for RWPI code.\n\nThere is one C construct not currently supported by these modes: global\nvariables initialised to the address of another global variable or\nfunction, where that address is not known at static-link time. There are\na few possible ways to solve this:\n\n* Disallow this, and require the user to write their own initialisation\n function if they need variables like this.\n* Emit dynamic initialisers for these variables in the compiler, called from\n the .init_array section (as is currently done for C++ dynamic initialisers).\n We have a patch to do this, described in my original RFC email\n (http://lists.llvm.org/pipermail/llvm-dev/2015-December/093022.html), but the\n feedback from that RFC thread was that this is not something that belongs in\n clang.\n* Use a small dynamic loader to fix up these variables, by adding the\n difference between the load and execution address of the relevant section.\n This would require linker co-operation to generate a table of addresses that\n need fixing up.\n\nDifferential Revision: https://reviews.llvm.org/D23196\n\nllvm-svn: 278016"}, [j]={{q,5270,"#endif\n // ...\n if (IsROPI && types::isCXX(Input.getType()) && !Args.hasArg(options::OPT_fallow_unsupported))\n D.Diag(diag::err_drv_ropi_incompatible_with_cxx);"}} }, ["err_drv_ropi_rwpi_incompatible_with_pic"]={ [d]="err_drv_ropi_rwpi_incompatible_with_pic", [f]="embedded and GOT-based position independence are incompatible", [b]="embedded and GOT-based position independence are incompatible", [i]=k, [h]="embedded and GOT\\-based position independence are incompatible", [g]=a, [e]=o, [c]={"218c4cbd3d7c",1470670120,"[ARM] Command-line options for embedded position-independent code","[ARM] Command-line options for embedded position-independent code\n\nThis patch (with the corresponding ARM backend patch) adds support for\nsome new relocation models:\n\n* Read-only position independence (ROPI): Code and read-only data is accessed\n PC-relative. The offsets between all code and RO data sections are known at\n static link time.\n* Read-write position independence (RWPI): Read-write data is accessed relative\n to a static base register. The offsets between all writeable data sections\n are known at static link time.\n\nThese two modes are independent (they specify how different objects\nshould be addressed), so they can be used individually or together.\n\nThese modes are intended for bare-metal systems or systems with small\nreal-time operating systems. They are designed to avoid the need for a\ndynamic linker, the only initialisation required is setting the static\nbase register to an appropriate value for RWPI code.\n\nThere is one C construct not currently supported by these modes: global\nvariables initialised to the address of another global variable or\nfunction, where that address is not known at static-link time. There are\na few possible ways to solve this:\n\n* Disallow this, and require the user to write their own initialisation\n function if they need variables like this.\n* Emit dynamic initialisers for these variables in the compiler, called from\n the .init_array section (as is currently done for C++ dynamic initialisers).\n We have a patch to do this, described in my original RFC email\n (http://lists.llvm.org/pipermail/llvm-dev/2015-December/093022.html), but the\n feedback from that RFC thread was that this is not something that belongs in\n clang.\n* Use a small dynamic loader to fix up these variables, by adding the\n difference between the load and execution address of the relevant section.\n This would require linker co-operation to generate a table of addresses that\n need fixing up.\n\nDifferential Revision: https://reviews.llvm.org/D23196\n\nllvm-svn: 278016"}, [j]={{hb,1587,"/// Parses the various -fpic/-fPIC/-fpie/-fPIE arguments. Then,\n/// smooshes them together with platform defaults, to decide whether\n/// this compile should be using PIC mode or not. Returns a tuple of\n/// (RelocationModel, PICLevel, IsPIE).\nstd::tuple<llvm::Reloc::Model, unsigned, bool> tools::ParsePICArgs(const ToolChain &ToolChain, const ArgList &Args) {\n // ...\n // ROPI and RWPI are not compatible with PIC or PIE.\n if ((ROPI || RWPI) && (PIC || PIE))\n ToolChain.getDriver().Diag(diag::err_drv_ropi_rwpi_incompatible_with_pic);"}} }, ["err_drv_small_columns"]={ [d]={{nil,L,"err_drv_small_columns"}}, [f]={{nil,L,"invalid value \'%1\' in \'%0\', value must be \'%2\' or greater"}}, [b]={{nil,L,"invalid value \'B\' in \'A\', value must be \'C\' or greater"}}, [i]=k, [h]="invalid value \'(.*?)\' in \'(.*?)\', value must be \'(.*?)\' or greater", [g]=a, [e]={{nil,L,o}}, [c]={"0687578728ea",1610286626,"[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.","[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"} }, ["err_drv_ssp_missing_offset_argument"]={ [d]={{nil,y,"err_drv_ssp_missing_offset_argument"}}, [f]={{nil,y,"\'%0\' is used without \'-mstack-protector-guard-offset\', and there is no default"}}, [b]={{nil,y,"\'A\' is used without \'-mstack-protector-guard-offset\', and there is no default"}}, [i]=k, [h]="\'(.*?)\' is used without \'\\-mstack\\-protector\\-guard\\-offset\', and there is no default", [g]=a, [e]={{nil,y,o}}, [c]={"0687578728ea",1610286626,"[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.","[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"}, [j]={{q,3391,"static void RenderSSPOptions(const Driver &D, const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, bool KernelOrKext) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mstack_protector_guard_EQ)) {\n // ...\n if ((EffectiveTriple.isARM() || EffectiveTriple.isThumb()) && Value == \"tls\") {\n if (!Args.hasArg(options::OPT_mstack_protector_guard_offset_EQ)) {\n D.Diag(diag::err_drv_ssp_missing_offset_argument) << A->getAsString(Args);"}} }, ["err_drv_target_variant_invalid"]={ [d]={{nil,x,"err_drv_target_variant_invalid"}}, [f]={{nil,x,"unsupported \'%0\' value \'%1\'; use \'ios-macabi\' instead"}}, [b]={{nil,x,"unsupported \'A\' value \'B\'; use \'ios-macabi\' instead"}}, [i]=k, [h]="unsupported \'(.*?)\' value \'(.*?)\'; use \'ios\\-macabi\' instead", [g]=a, [e]={{nil,x,o}}, [c]={"0687578728ea",1610286626,"[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.","[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"}, [j]={{Tb,2082,"/// Returns the deployment target that\'s specified using the -target option.\nstd::optional<DarwinPlatform> getDeploymentTargetFromTargetArg(DerivedArgList &Args, const llvm::Triple &Triple, const Driver &TheDriver, const std::optional<DarwinSDKInfo> &SDKInfo) {\n // ...\n for (const Arg *A : Args.filtered(options::OPT_darwin_target_variant)) {\n // ...\n // Find a matching <arch>-<vendor> target variant triple that can be used.\n if ((Triple.getArch() == llvm::Triple::aarch64 || TVT.getArchName() == Triple.getArchName()) && TVT.getArch() == Triple.getArch() && TVT.getSubArch() == Triple.getSubArch() && TVT.getVendor() == Triple.getVendor()) {\n // ...\n TheDriver.Diag(diag::err_drv_target_variant_invalid) << A->getSpelling() << A->getValue();"}} }, ["err_drv_trivial_auto_var_init_stop_after_invalid_value"]={ [d]={{nil,C,"err_drv_trivial_auto_var_init_stop_after_invalid_value"}}, [f]={{nil,y,"\'-ftrivial-auto-var-init-stop-after=*\' only accepts positive integers"},{L,C,"-ftrivial-auto-var-init-stop-after=* only accepts positive integers."}}, [b]={{nil,y,"\'-ftrivial-auto-var-init-stop-after=*\' only accepts positive integers"},{L,C,"-ftrivial-auto-var-init-stop-after=* only accepts positive integers."}}, [i]=k, [h]="\'\\-ftrivial\\-auto\\-var\\-init\\-stop\\-after\\=\\*\' only accepts positive integers", [g]=a, [e]={{nil,C,o}}, [c]={"0175999805cf",1585492323,"[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee","[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee\n\nAMDGPU backend need to know whether floating point opcodes that support exception\nflag gathering quiet and propagate signaling NaN inputs per IEEE754-2008, which is\nconveyed by a function attribute \"amdgpu-ieee\". \"amdgpu-ieee\"=\"false\" turns this off.\nWithout this function attribute backend assumes it is on for compute functions.\n\n-mamdgpu-ieee and -mno-amdgpu-ieee are added to Clang to control this function attribute.\nBy default it is on. -mno-amdgpu-ieee requires -fno-honor-nans or equivalent.\n\nReviewed by: Matt Arsenault\n\nDifferential Revision: https://reviews.llvm.org/D77013"}, [j]={{q,3535,"static void RenderTrivialAutoVarInitOptions(const Driver &D, const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_ftrivial_auto_var_init_stop_after)) {\n // ...\n if (std::stoi(Val.str()) <= 0)\n D.Diag(diag::err_drv_trivial_auto_var_init_stop_after_invalid_value);"}} }, ["err_drv_trivial_auto_var_init_stop_after_missing_dependency"]={ [d]={{nil,C,"err_drv_trivial_auto_var_init_stop_after_missing_dependency"}}, [f]={{nil,y,"\'-ftrivial-auto-var-init-stop-after=*\' is used without \'-ftrivial-auto-var-init=zero\' or \'-ftrivial-auto-var-init=pattern\'"},{L,C,"-ftrivial-auto-var-init-stop-after=* is used without -ftrivial-auto-var-init=zero or -ftrivial-auto-var-init=pattern."}}, [b]={{nil,y,"\'-ftrivial-auto-var-init-stop-after=*\' is used without \'-ftrivial-auto-var-init=zero\' or \'-ftrivial-auto-var-init=pattern\'"},{L,C,"-ftrivial-auto-var-init-stop-after=* is used without -ftrivial-auto-var-init=zero or -ftrivial-auto-var-init=pattern."}}, [i]=k, [h]="\'\\-ftrivial\\-auto\\-var\\-init\\-stop\\-after\\=\\*\' is used without \'\\-ftrivial\\-auto\\-var\\-init\\=zero\' or \'\\-ftrivial\\-auto\\-var\\-init\\=pattern\'", [g]=a, [e]={{nil,C,o}}, [c]={"0175999805cf",1585492323,"[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee","[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee\n\nAMDGPU backend need to know whether floating point opcodes that support exception\nflag gathering quiet and propagate signaling NaN inputs per IEEE754-2008, which is\nconveyed by a function attribute \"amdgpu-ieee\". \"amdgpu-ieee\"=\"false\" turns this off.\nWithout this function attribute backend assumes it is on for compute functions.\n\n-mamdgpu-ieee and -mno-amdgpu-ieee are added to Clang to control this function attribute.\nBy default it is on. -mno-amdgpu-ieee requires -fno-honor-nans or equivalent.\n\nReviewed by: Matt Arsenault\n\nDifferential Revision: https://reviews.llvm.org/D77013"}, [j]={{q,3531,"static void RenderTrivialAutoVarInitOptions(const Driver &D, const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_ftrivial_auto_var_init_stop_after)) {\n if (!Args.hasArg(options::OPT_ftrivial_auto_var_init) || StringRef(Args.getLastArg(options::OPT_ftrivial_auto_var_init)->getValue()) == \"uninitialized\")\n D.Diag(diag::err_drv_trivial_auto_var_init_stop_after_missing_dependency);"}} }, ["err_drv_unable_to_remove_file"]={ [d]="err_drv_unable_to_remove_file", [f]="unable to remove file: %0", [b]="unable to remove file: A", [i]=k, [h]="unable to remove file\\: (.*?)", [g]=a, [e]=o, [c]={"6c17bfd99b1c",1237414563,"Driver: Cleanup temporary/result files.","Driver: Cleanup temporary/result files.\n\nllvm-svn: 67248"}, [j]={{"clang/lib/Driver/Compilation.cpp",135,"bool Compilation::CleanupFile(const char *File, bool IssueErrors) const {\n // ...\n if (std::error_code EC = llvm::sys::fs::remove(File)) {\n // ...\n if (IssueErrors)\n getDriver().Diag(diag::err_drv_unable_to_remove_file) << EC.message();"},{"clang/lib/Driver/ToolChains/BareMetal.cpp",421,"void baremetal::StaticLibTool::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Output.isFilename() && llvm::sys::fs::exists(OutputFileName)) {\n if (std::error_code EC = llvm::sys::fs::remove(OutputFileName)) {\n D.Diag(diag::err_drv_unable_to_remove_file) << EC.message();"},{Tb,844,"void darwin::StaticLibTool::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Output.isFilename() && llvm::sys::fs::exists(OutputFileName)) {\n if (std::error_code EC = llvm::sys::fs::remove(OutputFileName)) {\n D.Diag(diag::err_drv_unable_to_remove_file) << EC.message();"},{"clang/lib/Driver/ToolChains/Fuchsia.cpp",230,"void fuchsia::StaticLibTool::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Output.isFilename() && llvm::sys::fs::exists(OutputFileName)) {\n if (std::error_code EC = llvm::sys::fs::remove(OutputFileName)) {\n D.Diag(diag::err_drv_unable_to_remove_file) << EC.message();"},{"clang/lib/Driver/ToolChains/Gnu.cpp",360,"void tools::gnutools::StaticLibTool::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Output.isFilename() && llvm::sys::fs::exists(OutputFileName)) {\n if (std::error_code EC = llvm::sys::fs::remove(OutputFileName)) {\n D.Diag(diag::err_drv_unable_to_remove_file) << EC.message();"}} }, ["err_drv_unable_to_set_working_directory"]={ [d]={{nil,H,"err_drv_unable_to_set_working_directory"}}, [f]={{nil,H,"unable to set working directory: %0"}}, [b]={{nil,H,"unable to set working directory: A"}}, [i]=k, [h]="unable to set working directory\\: (.*?)", [g]=a, [e]={{nil,H,o}}, [c]={"4593e4131aff",1534346725,"AMDGPU: Teach toolchain to link rocm device libs","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)."}, [j]={{N,1271,"Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {\n // ...\n // Check for working directory option before accessing any files\n if (Arg *WD = Args.getLastArg(options::OPT_working_directory))\n if (VFS->setCurrentWorkingDirectory(WD->getValue()))\n Diag(diag::err_drv_unable_to_set_working_directory) << WD->getValue();"}} }, ["err_drv_undetermined_gpu_arch"]={ [d]={{nil,t,"err_drv_undetermined_gpu_arch"}}, [f]={{nil,t,"cannot determine %0 architecture: %1; consider passing it via \'%2\'"}}, [b]={{nil,t,"cannot determine A architecture: B; consider passing it via \'C\'"}}, [i]=k, [h]="cannot determine (.*?) architecture\\: (.*?); consider passing it via \'(.*?)\'", [g]=a, [e]={{nil,t,o}}, [c]={"f89327e28bc1",1672206488,"[Driver] [Modules] Support -fmodule-output (1/2)","[Driver] [Modules] Support -fmodule-output (1/2)\n\nPatches to support the one-phase compilation model for modules.\n\nThe behavior:\n(1) If -o and -c is specified , the module file is in the same path\nwithin the same directory as the output the -o specified and with a new\nsuffix .pcm.\n(2) Otherwise, the module file is in the same path within the working\ndirectory directory with the name of the input file with a new suffix\n.pcm\n\nFor example,\n\n```\nHello.cppm Use.cpp\n```\n\nA trivial one and the contents are ignored. When we run:\n\n```\nclang++ -std=c++20 -fmodule-output Hello.cppm -c\n```\n\nThe directory would look like:\n\n```\nHello.cppm Hello.o Hello.pcm Use.cpp\n```\n\nAnd if we run:\n\n```\nclang++ -std=c++20 -fmodule-output Hello.cppm -c -o output/Hello.o\n```\n\nThen the `output` directory may look like:\n\n```\nHello.o Hello.pcm\n```\n\nReviewed By: dblaikie, iains, tahonermann\n\nDifferential Revision: https://reviews.llvm.org/D137058"}, [j]={{N,3179,"/// Provides a convenient interface for different programming models to generate\n/// the required device actions.\nclass OffloadingActionBuilder final {\n // ...\n /// Base class for CUDA/HIP action builder. It injects device code in\n /// the host backend action.\n class CudaActionBuilderBase : public DeviceActionBuilder {\n // ...\n bool initialize() override {\n // ...\n for (Arg *A : Args) {\n // ...\n for (StringRef ArchStr : llvm::split(A->getValue(), \",\")) {\n if (A->getOption().matches(options::OPT_no_offload_arch_EQ) && ArchStr == \"all\") {\n // ...\n } else if (ArchStr == \"native\") {\n // ...\n if (!GPUsOrErr) {\n TC.getDriver().Diag(diag::err_drv_undetermined_gpu_arch) << llvm::Triple::getArchTypeName(TC.getArch()) << llvm::toString(GPUsOrErr.takeError()) << \"--offload-arch\";"},{N,4443,"llvm::DenseSet<StringRef> Driver::getOffloadArchs(Compilation &C, const llvm::opt::DerivedArgList &Args, Action::OffloadKind Kind, const ToolChain *TC, bool SuppressError) const {\n // ...\n for (auto *Arg : Args) {\n // ...\n // Add or remove the seen architectures in order of appearance. If an\n // invalid architecture is given we simply exit.\n if (Arg->getOption().matches(options::OPT_offload_arch_EQ)) {\n for (StringRef Arch : llvm::split(Arg->getValue(), \",\")) {\n if (Arch == \"native\" || Arch.empty()) {\n // ...\n if (!GPUsOrErr) {\n if (SuppressError)\n // ...\n else\n TC->getDriver().Diag(diag::err_drv_undetermined_gpu_arch) << llvm::Triple::getArchTypeName(TC->getArch()) << llvm::toString(GPUsOrErr.takeError()) << \"--offload-arch\";"},{"clang/lib/Driver/ToolChains/AMDGPU.cpp",645,"DerivedArgList *AMDGPUToolChain::TranslateArgs(const DerivedArgList &Args, StringRef BoundArch, Action::OffloadKind DeviceOffloadKind) const {\n // ...\n if (LastMCPUArg && StringRef(LastMCPUArg->getValue()) == \"native\") {\n // ...\n if (!GPUsOrErr) {\n getDriver().Diag(diag::err_drv_undetermined_gpu_arch) << llvm::Triple::getArchTypeName(getArch()) << llvm::toString(GPUsOrErr.takeError()) << \"-mcpu\";"},{"clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp",94,"llvm::opt::DerivedArgList *AMDGPUOpenMPToolChain::TranslateArgs(const llvm::opt::DerivedArgList &Args, StringRef BoundArch, Action::OffloadKind DeviceOffloadKind) const {\n // ...\n if (DeviceOffloadKind == Action::OFK_OpenMP) {\n // ...\n if (!DAL->hasArg(options::OPT_march_EQ)) {\n // ...\n if (Arch.empty()) {\n // ...\n if (!ArchsOrErr) {\n // ...\n getDriver().Diag(diag::err_drv_undetermined_gpu_arch) << llvm::Triple::getArchTypeName(getArch()) << ErrMsg << \"-march\";"},{"clang/lib/Driver/ToolChains/Cuda.cpp",926,"llvm::opt::DerivedArgList *CudaToolChain::TranslateArgs(const llvm::opt::DerivedArgList &Args, StringRef BoundArch, Action::OffloadKind DeviceOffloadKind) const {\n // ...\n // For OpenMP device offloading, append derived arguments. Make sure\n // flags are not duplicated.\n // Also append the compute capability.\n if (DeviceOffloadKind == Action::OFK_OpenMP) {\n // ...\n if (!DAL->hasArg(options::OPT_march_EQ)) {\n // ...\n if (Arch.empty()) {\n // ...\n if (!ArchsOrErr) {\n // ...\n getDriver().Diag(diag::err_drv_undetermined_gpu_arch) << llvm::Triple::getArchTypeName(getArch()) << ErrMsg << \"-march\";"}} }, ["err_drv_unknown_argument"]={ [d]="err_drv_unknown_argument", [f]="unknown argument: \'%0\'", [b]="unknown argument: \'A\'", [i]=k, [h]="unknown argument\\: \'(.*?)\'", [g]=a, [e]=o, [c]={"0ac66427a9f2",1259531573,"clang -cc1: Use proper diagnostics for all parsing errors.","clang -cc1: Use proper diagnostics for all parsing errors.\n\nllvm-svn: 90100"}, [j]={{N,328,"InputArgList Driver::ParseArgStrings(ArrayRef<const char *> ArgStrings, bool IsClCompatMode, bool &ContainsError) {\n // ...\n for (const Arg *A : Args.filtered(options::OPT_UNKNOWN)) {\n // ...\n if (getOpts().findNearest(ArgString, Nearest, IncludedFlagsBitmask, ExcludedFlagsBitmask) > 1) {\n if (!IsCLMode() && getOpts().findExact(ArgString, Nearest, options::CC1Option)) {\n // ...\n } else {\n DiagID = IsCLMode() ? diag::warn_drv_unknown_argument_clang_cl : diag::err_drv_unknown_argument;"},{q,241,"/// The -mrecip flag requires processing of many optional parameters.\nstatic void ParseMRecip(const Driver &D, const ArgList &Args, ArgStringList &OutStrings) {\n // ...\n for (unsigned i = 0; i != NumOptions; ++i) {\n // ...\n if (OptionIter == OptionStrings.end()) {\n // ...\n if (OptionIter == OptionStrings.end()) {\n // ...\n D.Diag(diag::err_drv_unknown_argument) << Val;"},{Z,4401,"bool CompilerInvocation::CreateFromArgsImpl(CompilerInvocation &Res, ArrayRef<const char *> CommandLineArgs, DiagnosticsEngine &Diags, const char *Argv0) {\n // ...\n // Issue errors on unknown arguments.\n for (const auto *A : Args.filtered(OPT_UNKNOWN)) {\n // ...\n if (Opts.findNearest(ArgString, Nearest, IncludedFlagsBitmask) > 1)\n Diags.Report(diag::err_drv_unknown_argument) << ArgString;"},{sb,225,"bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts, ArrayRef<const char *> Argv, DiagnosticsEngine &Diags) {\n // ...\n // Issue errors on unknown arguments.\n for (const Arg *A : Args.filtered(OPT_UNKNOWN)) {\n // ...\n if (OptTbl.findNearest(ArgString, Nearest, IncludedFlagsBitmask) > 1)\n Diags.Report(diag::err_drv_unknown_argument) << ArgString;"},{sb,296,"bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts, ArrayRef<const char *> Argv, DiagnosticsEngine &Diags) {\n // ...\n // Frontend Options\n if (Args.hasArg(OPT_INPUT)) {\n // ...\n for (const Arg *A : Args.filtered(OPT_INPUT)) {\n if (First) {\n // ...\n } else {\n Diags.Report(diag::err_drv_unknown_argument) << A->getAsString(Args);"}}, [l]={ ["clang/test/CodeGen/libcalls-ld.c"]={"error: unknown argument: \'-fno-math-errno\'"} } }, ["err_drv_unknown_argument_with_suggestion"]={ [d]={{nil,K,"err_drv_unknown_argument_with_suggestion"}}, [f]={{nil,s,"unknown argument \'%0\'; did you mean \'%1\'?"},{J,K,"unknown argument \'%0\', did you mean \'%1\'?"}}, [b]={{nil,s,"unknown argument \'A\'; did you mean \'B\'?"},{J,K,"unknown argument \'A\', did you mean \'B\'?"}}, [i]=k, [h]="unknown argument \'(.*?)\'; did you mean \'(.*?)\'\\?", [g]=a, [e]={{nil,K,o}}, [c]={"24910765e266",1515198340,"[Driver] Suggest correctly spelled driver options","[Driver] Suggest correctly spelled driver options\n\nSummary:\nDepends on https://reviews.llvm.org/D41732.\n\nUtilities such as `opt`, when invoked with arguments that are very\nnearly spelled correctly, suggest the correctly spelled options:\n\n```\nbin/opt -hel\nopt: Unknown command line argument \'-hel\'. Try: \'bin/opt -help\'\nopt: Did you mean \'-help\'?\n```\n\nClang, on the other hand, prior to this commit, does not:\n\n```\nbin/clang -hel\nclang-6.0: error: unknown argument: \'-hel\'\n```\n\nThis commit makes use of the new libLLVMOption API from\nhttps://reviews.llvm.org/D41732 in order to provide correct suggestions:\n\n```\nbin/clang -hel\nclang-6.0: error: unknown argument: \'-hel\', did you mean \'-help\'?\n```\n\nTest Plan: `check-clang`\n\nReviewers: yamaguchi, v.g.vassilev, teemperor, ruiu, bruno\n\nReviewed By: bruno\n\nSubscribers: bruno, jroelofs, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D41733\n\nllvm-svn: 321917"}, [j]={{N,324,"InputArgList Driver::ParseArgStrings(ArrayRef<const char *> ArgStrings, bool IsClCompatMode, bool &ContainsError) {\n // ...\n for (const Arg *A : Args.filtered(options::OPT_UNKNOWN)) {\n // ...\n if (getOpts().findNearest(ArgString, Nearest, IncludedFlagsBitmask, ExcludedFlagsBitmask) > 1) {\n if (!IsCLMode() && getOpts().findExact(ArgString, Nearest, options::CC1Option)) {\n DiagID = diag::err_drv_unknown_argument_with_suggestion;"},{N,334,"InputArgList Driver::ParseArgStrings(ArrayRef<const char *> ArgStrings, bool IsClCompatMode, bool &ContainsError) {\n // ...\n for (const Arg *A : Args.filtered(options::OPT_UNKNOWN)) {\n // ...\n if (getOpts().findNearest(ArgString, Nearest, IncludedFlagsBitmask, ExcludedFlagsBitmask) > 1) {\n // ...\n } else {\n DiagID = IsCLMode() ? diag::warn_drv_unknown_argument_clang_cl_with_suggestion : diag::err_drv_unknown_argument_with_suggestion;"},{Z,4403,"bool CompilerInvocation::CreateFromArgsImpl(CompilerInvocation &Res, ArrayRef<const char *> CommandLineArgs, DiagnosticsEngine &Diags, const char *Argv0) {\n // ...\n // Issue errors on unknown arguments.\n for (const auto *A : Args.filtered(OPT_UNKNOWN)) {\n // ...\n if (Opts.findNearest(ArgString, Nearest, IncludedFlagsBitmask) > 1)\n // ...\n else\n Diags.Report(diag::err_drv_unknown_argument_with_suggestion) << ArgString << Nearest;"},{sb,227,"bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts, ArrayRef<const char *> Argv, DiagnosticsEngine &Diags) {\n // ...\n // Issue errors on unknown arguments.\n for (const Arg *A : Args.filtered(OPT_UNKNOWN)) {\n // ...\n if (OptTbl.findNearest(ArgString, Nearest, IncludedFlagsBitmask) > 1)\n // ...\n else\n Diags.Report(diag::err_drv_unknown_argument_with_suggestion) << ArgString << Nearest;"}} }, ["err_drv_unknown_indirect_jump_opt"]={ [d]={{nil,I,"err_drv_unknown_indirect_jump_opt"}}, [f]={{nil,I,"unknown \'-mindirect-jump=\' option \'%0\'"}}, [b]={{nil,I,"unknown \'-mindirect-jump=\' option \'A\'"}}, [i]=k, [h]="unknown \'\\-mindirect\\-jump\\=\' option \'(.*?)\'", [g]=a, [e]={{nil,I,o}}, [c]={"0bc2d9b0c5ef",1519171505,"[mips] Spectre variant two mitigation for MIPSR2","[mips] Spectre variant two mitigation for MIPSR2\n\nThis patch provides mitigation for CVE-2017-5715, Spectre variant two,\nwhich affects the P5600 and P6600. It provides the option\n-mindirect-jump=hazard, which instructs the LLVM backend to replace\nindirect branches with their hazard barrier variants.\n\nThis option is accepted when targeting MIPS revision two or later.\n\nThe migitation strategy suggested by MIPS for these processors is to\nuse two hazard barrier instructions. \'jalr.hb\' and \'jr.hb\' are hazard\nbarrier variants of the \'jalr\' and \'jr\' instructions respectively.\n\nThese instructions impede the execution of instruction stream until\narchitecturally defined hazards (changes to the instruction stream,\nprivileged registers which may affect execution) are cleared. These\ninstructions in MIPS\' designs are not speculated past.\n\nThese instructions are used with the option -mindirect-jump=hazard\nwhen branching indirectly and for indirect function calls.\n\nThese instructions are defined by the MIPS32R2 ISA, so this mitigation\nmethod is not compatible with processors which implement an earlier\nrevision of the MIPS ISA.\n\nImplementation note: I\'ve opted to provide this as an\n-mindirect-jump={hazard,...} style option in case alternative\nmitigation methods are required for other implementations of the MIPS\nISA in future, e.g. retpoline style solutions.\n\nReviewers: atanasyan\n\nDifferential Revision: https://reviews.llvm.org/D43487\n\nllvm-svn: 325651"}, [j]={{pb,393,"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_mindirect_jump_EQ)) {\n // ...\n if (Val == \"hazard\") {\n // ...\n } else\n D.Diag(diag::err_drv_unknown_indirect_jump_opt) << Val;"}} }, ["err_drv_unknown_language"]={ [d]="err_drv_unknown_language", [f]="language not recognized: \'%0\'", [b]="language not recognized: \'A\'", [i]=k, [h]="language not recognized\\: \'(.*?)\'", [g]=a, [e]=o, [c]={Cb,1236852856,Db,Ib}, [j]={{N,2780,"// 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 // Follow gcc behavior and treat as linker input for invalid -x\n // options. Its not clear why we shouldn\'t just revert to unknown; but\n // this isn\'t very important, we might as well be bug compatible.\n if (!InputType) {\n Diag(clang::diag::err_drv_unknown_language) << A->getValue();"}} }, ["err_drv_unknown_objc_runtime"]={ [d]="err_drv_unknown_objc_runtime", [f]="unknown or ill-formed Objective-C runtime \'%0\'", [b]="unknown or ill-formed Objective-C runtime \'A\'", [i]=k, [h]="unknown or ill\\-formed Objective\\-C runtime \'(.*?)\'", [g]=a, [e]=o, [c]={"5fb5df9c8385",1340173126,"Restructure how the driver communicates information about the","Restructure how the driver communicates information about the\ntarget Objective-C runtime down to the frontend: break this\ndown into a single target runtime kind and version, and compute\nall the relevant information from that. This makes it\nrelatively painless to add support for new runtimes to the\ncompiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z,\navailable at the driver level as a better and more general\nalternative to -fgnu-runtime and -fnext-runtime. This new\nconcept of an Objective-C runtime also encompasses what we\nwere previously separating out as the \"Objective-C ABI\", so\nfragile vs. non-fragile runtimes are now really modelled as\ndifferent kinds of runtime, paving the way for better overall\ndifferentiation.\n\nAs a sort of special case, continue to accept the -cc1 flag\n-fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak.\n\nI won\'t go so far as to say \"no functionality change\", even\nignoring the new driver flag, but subtle changes in driver\nsemantics are almost certainly not intended.\n\nllvm-svn: 158793"}, [j]={{q,7592,"/// Add options related to the Objective-C runtime/ABI.\n///\n/// Returns true if the runtime is non-fragile.\nObjCRuntime Clang::AddObjCRuntimeArgs(const ArgList &args, const InputInfoList &inputs, ArgStringList &cmdArgs, RewriteKind rewriteKind) const {\n // ...\n // Just forward -fobjc-runtime= to the frontend. This supercedes\n // options about fragility.\n if (runtimeArg && runtimeArg->getOption().matches(options::OPT_fobjc_runtime_EQ)) {\n // ...\n if (runtime.tryParse(value)) {\n getToolChain().getDriver().Diag(diag::err_drv_unknown_objc_runtime) << value;"},{Z,3655,"#include \"clang/Driver/Options.inc\"\n // ...\n if (Opts.ObjC) {\n if (Arg *arg = Args.getLastArg(OPT_fobjc_runtime_EQ)) {\n // ...\n if (Opts.ObjCRuntime.tryParse(value))\n Diags.Report(diag::err_drv_unknown_objc_runtime) << value;"}} }, ["err_drv_unknown_stdin_type"]={ [d]="err_drv_unknown_stdin_type", [f]="-E or -x required when input is from standard input", [b]="-E or -x required when input is from standard input", [i]=k, [h]="\\-E or \\-x required when input is from standard input", [g]=a, [e]=o, [c]={Cb,1236852856,Db,Ib}, [j]={{N,2672,"// 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 // Infer the input type if necessary.\n if (InputType == types::TY_Nothing) {\n // ...\n // stdin must be handled specially.\n if (memcmp(Value, \"-\", 2) == 0) {\n if (IsFlangMode()) {\n // ...\n } else {\n // ...\n if (!Args.hasArgNoClaim(options::OPT_E) && !CCCIsCPP())\n Diag(IsCLMode() ? clang::diag::err_drv_unknown_stdin_type_clang_cl : clang::diag::err_drv_unknown_stdin_type);"}} }, ["err_drv_unknown_stdin_type_clang_cl"]={ [d]="err_drv_unknown_stdin_type_clang_cl", [f]="use /Tc or /Tp to set input type for standard input", [b]="use /Tc or /Tp to set input type for standard input", [i]=k, [h]="use \\/Tc or \\/Tp to set input type for standard input", [g]=a, [e]=o, [c]={"cfdd8b54cfae",1390957480,"clang-cl: Better error message when trying to compile stdin (PR18640)","clang-cl: Better error message when trying to compile stdin (PR18640)\n\nWe should suggest using /Tc or /Tp to set the input type, instead of\nerroneously suggesting -x, which isn\'t a clang-cl flag.\n\nllvm-svn: 200362"}, [j]={{N,2671,"// 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 // Infer the input type if necessary.\n if (InputType == types::TY_Nothing) {\n // ...\n // stdin must be handled specially.\n if (memcmp(Value, \"-\", 2) == 0) {\n if (IsFlangMode()) {\n // ...\n } else {\n // ...\n if (!Args.hasArgNoClaim(options::OPT_E) && !CCCIsCPP())\n Diag(IsCLMode() ? clang::diag::err_drv_unknown_stdin_type_clang_cl : clang::diag::err_drv_unknown_stdin_type);"}} }, ["err_drv_unknown_target_triple"]={ [d]="err_drv_unknown_target_triple", [f]="unknown target triple \'%0\'", [b]="unknown target triple \'A\'", [i]=k, [h]="unknown target triple \'(.*?)\'", [g]=a, [e]=o, [c]={"6adb9a0602bc",1678065956,"[AMDGPU] Emit predefined macro `__AMDGCN_CUMODE__`","[AMDGPU] Emit predefined macro `__AMDGCN_CUMODE__`\n\nPredefine __AMDGCN_CUMODE__ as 1 or 0 when compilation assumes CU or WGP modes.\n\nIf WGP mode is not supported, ignore -mno-cumode and emit a warning.\n\nThis is needed for implementing device functions like __smid\n(https://github.com/ROCm-Developer-Tools/hipamd/blob/312dff7b794337aa040be0691acc78e9f968a8d2/include/hip/amd_detail/amd_device_functions.h#L957)\n\nReviewed by: Matt Arsenault, Artem Belevich, Brian Sumner\n\nDifferential Revision: https://reviews.llvm.org/D145343"} }, ["err_drv_unsupported_embed_bitcode"]={ [d]={{nil,J,"err_drv_unsupported_embed_bitcode"}}, [f]={{nil,J,"%0 is not supported with -fembed-bitcode"}}, [b]={{nil,J,"A is not supported with -fembed-bitcode"}}, [i]=k, [h]="(.*?) is not supported with \\-fembed\\-bitcode", [g]=a, [e]={{nil,J,o}}, [c]={"4593e4131aff",1534346725,"AMDGPU: Teach toolchain to link rocm device libs","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)."}, [j]={{q,5047,"void Clang::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n // Embed-bitcode option.\n // Only white-listed flags below are allowed to be embedded.\n if (C.getDriver().embedBitcodeInObject() && !IsUsingLTO && (isa<BackendJobAction>(JA) || isa<AssembleJobAction>(JA))) {\n // ...\n for (const auto &A : Args)\n if (llvm::is_contained(kBitcodeOptionIgnorelist, A->getOption().getID()))\n D.Diag(diag::err_drv_unsupported_embed_bitcode) << A->getSpelling();"}} }, ["err_drv_unsupported_fpatchable_function_entry_argument"]={ [d]={{nil,H,"err_drv_unsupported_fpatchable_function_entry_argument"}}, [f]={{nil,H,"the second argument of \'-fpatchable-function-entry\' must be smaller than the first argument"}}, [b]={{nil,H,"the second argument of \'-fpatchable-function-entry\' must be smaller than the first argument"}}, [i]=k, [h]="the second argument of \'\\-fpatchable\\-function\\-entry\' must be smaller than the first argument", [g]=a, [e]={{nil,H,o}}, [c]={"4593e4131aff",1534346725,"AMDGPU: Teach toolchain to link rocm device libs","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)."}, [j]={{q,6372,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_fpatchable_function_entry_EQ)) {\n // ...\n if (!Triple.isAArch64() && !Triple.isLoongArch() && !Triple.isRISCV() && !Triple.isX86())\n // ...\n else if (S.consumeInteger(10, Size) || (!S.empty() && (!S.consume_front(\",\") || S.consumeInteger(10, Offset) || !S.empty())))\n // ...\n else if (Size < Offset)\n D.Diag(diag::err_drv_unsupported_fpatchable_function_entry_argument);"}} }, ["err_drv_unsupported_indirect_jump_opt"]={ [d]={{nil,I,"err_drv_unsupported_indirect_jump_opt"}}, [f]={{nil,I,"\'-mindirect-jump=%0\' is unsupported with the \'%1\' architecture"}}, [b]={{nil,I,"\'-mindirect-jump=A\' is unsupported with the \'B\' architecture"}}, [i]=k, [h]="\'\\-mindirect\\-jump\\=(.*?)\' is unsupported with the \'(.*?)\' architecture", [g]=a, [e]={{nil,I,o}}, [c]={"0bc2d9b0c5ef",1519171505,"[mips] Spectre variant two mitigation for MIPSR2","[mips] Spectre variant two mitigation for MIPSR2\n\nThis patch provides mitigation for CVE-2017-5715, Spectre variant two,\nwhich affects the P5600 and P6600. It provides the option\n-mindirect-jump=hazard, which instructs the LLVM backend to replace\nindirect branches with their hazard barrier variants.\n\nThis option is accepted when targeting MIPS revision two or later.\n\nThe migitation strategy suggested by MIPS for these processors is to\nuse two hazard barrier instructions. \'jalr.hb\' and \'jr.hb\' are hazard\nbarrier variants of the \'jalr\' and \'jr\' instructions respectively.\n\nThese instructions impede the execution of instruction stream until\narchitecturally defined hazards (changes to the instruction stream,\nprivileged registers which may affect execution) are cleared. These\ninstructions in MIPS\' designs are not speculated past.\n\nThese instructions are used with the option -mindirect-jump=hazard\nwhen branching indirectly and for indirect function calls.\n\nThese instructions are defined by the MIPS32R2 ISA, so this mitigation\nmethod is not compatible with processors which implement an earlier\nrevision of the MIPS ISA.\n\nImplementation note: I\'ve opted to provide this as an\n-mindirect-jump={hazard,...} style option in case alternative\nmitigation methods are required for other implementations of the MIPS\nISA in future, e.g. retpoline style solutions.\n\nReviewers: atanasyan\n\nDifferential Revision: https://reviews.llvm.org/D43487\n\nllvm-svn: 325651"}, [j]={{pb,382,"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_mindirect_jump_EQ)) {\n // ...\n if (Val == \"hazard\") {\n // ...\n if (B && B->getOption().matches(options::OPT_mmicromips))\n D.Diag(diag::err_drv_unsupported_indirect_jump_opt) << \"hazard\""},{pb,385,"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_mindirect_jump_EQ)) {\n // ...\n if (Val == \"hazard\") {\n // ...\n if (B && B->getOption().matches(options::OPT_mmicromips))\n // ...\n else if (C && C->getOption().matches(options::OPT_mips16))\n D.Diag(diag::err_drv_unsupported_indirect_jump_opt) << \"hazard\""},{pb,390,"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_mindirect_jump_EQ)) {\n // ...\n if (Val == \"hazard\") {\n // ...\n if (B && B->getOption().matches(options::OPT_mmicromips))\n // ...\n else if (C && C->getOption().matches(options::OPT_mips16))\n // ...\n else if (mips::supportsIndirectJumpHazardBarrier(CPUName))\n // ...\n else\n D.Diag(diag::err_drv_unsupported_indirect_jump_opt) << \"hazard\" << CPUName;"}} }, ["err_drv_unsupported_noabicalls_pic"]={ [d]={{nil,K,"err_drv_unsupported_noabicalls_pic"}}, [f]={{nil,J,"position-independent code requires \'-mabicalls\'"},{"7.1",K,"position-independent code requires 342200230-mabicalls342200231"}}, [b]={{nil,J,"position-independent code requires \'-mabicalls\'"},{"7.1",K,"position-independent code requires 342200230-mabicalls342200231"}}, [i]=k, [h]="position\\-independent code requires \'\\-mabicalls\'", [g]=a, [e]={{nil,K,o}}, [c]={"f9b3fc5e2bc7",1525702794,"[mips] Improve handling of -fno-[pic/PIC] option","[mips] Improve handling of -fno-[pic/PIC] option\n\nIn order to disable PIC and to match GCC behaviour, -mno-abicalls\noption is neccessary. When -fno-[pic/PIC] is used witout -mno-abicalls,\nwarning is reported. An error is reported when -fno-pic or -fno-PIC is\nused in combination with -mabicalls.\n\nDepends on D44381.\n\nDifferential Revision: https://reviews.llvm.org/D44684\n\nllvm-svn: 331636"}, [j]={{pb,253,"void mips::getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features) {\n // ...\n if (ABICallsArg && !UseAbiCalls && IsPIC) {\n D.Diag(diag::err_drv_unsupported_noabicalls_pic);"}} }, ["err_drv_unsupported_opt"]={ [d]="err_drv_unsupported_opt", [f]="unsupported option \'%0\'", [b]="unsupported option \'A\'", [i]=k, [h]="unsupported option \'(.*?)\'", [g]=a, [e]=o, [c]={Cb,1236852856,Db,Ib}, [j]={{N,296,"InputArgList Driver::ParseArgStrings(ArrayRef<const char *> ArgStrings, bool IsClCompatMode, bool &ContainsError) {\n // ...\n // Check for unsupported options.\n for (const Arg *A : Args) {\n if (A->getOption().hasFlag(options::Unsupported)) {\n // ...\n if (getOpts().findNearest(ArgString, Nearest, IncludedFlagsBitmask, ExcludedFlagsBitmask | options::Unsupported) > 1) {\n DiagID = diag::err_drv_unsupported_opt;"},{N,772,"/// Compute the desired OpenMP runtime from the flags provided.\nDriver::OpenMPRuntimeKind Driver::getOpenMPRuntime(const ArgList &Args) const {\n // ...\n if (RT == OMPRT_Unknown) {\n if (A)\n // ...\n else\n // ...\n Diag(diag::err_drv_unsupported_opt) << \"-fopenmp\";"},{"clang/lib/Driver/ToolChains/Arch/SystemZ.cpp",27,"systemz::FloatABI systemz::getSystemZFloatABI(const Driver &D, const ArgList &Args) {\n // ...\n if (Args.hasArg(options::OPT_mfloat_abi_EQ))\n D.Diag(diag::err_drv_unsupported_opt) << Args.getLastArg(options::OPT_mfloat_abi_EQ)->getAsString(Args);"},{q,2256,"void Clang::AddSystemZTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const {\n // ...\n if (HasBackchain && HasPackedStack && !HasSoftFloat) {\n // ...\n D.Diag(diag::err_drv_unsupported_opt) << \"-mpacked-stack -mbackchain -mhard-float\";"},{Tb,1464,"void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, ArgStringList &CmdArgs, bool ForceLinkBuiltinRT) const {\n // ...\n // Reject -static-libgcc for now, we can deal with this when and if someone\n // cares. This is useful in situations where someone wants to statically link\n // something like libstdc++, and needs its runtime support routines.\n if (const Arg *A = Args.getLastArg(options::OPT_static_libgcc)) {\n getDriver().Diag(diag::err_drv_unsupported_opt) << A->getAsString(Args);"}} }, ["err_drv_unsupported_opt_for_language_mode"]={ [d]={{nil,y,"err_drv_unsupported_opt_for_language_mode"}}, [f]={{nil,y,"unsupported option \'%0\' for language mode \'%1\'"}}, [b]={{nil,y,"unsupported option \'A\' for language mode \'B\'"}}, [i]=k, [h]="unsupported option \'(.*?)\' for language mode \'(.*?)\'", [g]=a, [e]={{nil,y,o}}, [c]={"0687578728ea",1610286626,"[C++20][Modules][HU 2/5] Support searching Header Units in user or system search paths.","[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"}, [j]={{N,825,"void Driver::CreateOffloadingDeviceToolChains(Compilation &C, InputList &Inputs) {\n // ...\n if (IsCuda) {\n // ...\n } else if (IsHIP) {\n if (auto *OMPTargetArg = C.getInputArgs().getLastArg(options::OPT_fopenmp_targets_EQ)) {\n Diag(clang::diag::err_drv_unsupported_opt_for_language_mode) << OMPTargetArg->getSpelling() << \"HIP\";"},{q,4937,"void Clang::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (isa<AnalyzeJobAction>(JA)) {\n // ...\n } else if (isa<MigrateJobAction>(JA)) {\n // ...\n } else if (isa<PreprocessJobAction>(JA)) {\n // ...\n } else if (isa<AssembleJobAction>(JA)) {\n // ...\n } else if (isa<PrecompileJobAction>(JA)) {\n // ...\n } else if (isa<VerifyPCHJobAction>(JA)) {\n // ...\n } else if (isa<ExtractAPIJobAction>(JA)) {\n // ...\n } else {\n // ...\n if (IsUsingLTO) {\n if (IsDeviceOffloadAction && !JA.isDeviceOffloading(Action::OFK_OpenMP) && !Args.hasFlag(options::OPT_offload_new_driver, options::OPT_no_offload_new_driver, false) && !Triple.isAMDGPU()) {\n // ...\n } else if (Triple.isNVPTX() && !IsRDCMode && JA.isDeviceOffloading(Action::OFK_Cuda)) {\n D.Diag(diag::err_drv_unsupported_opt_for_language_mode) << Args.getLastArg(options::OPT_foffload_lto, options::OPT_foffload_lto_EQ)->getAsString(Args) << \"-fno-gpu-rdc\";"}} }, ["err_drv_unsupported_opt_for_target"]={ [d]="err_drv_unsupported_opt_for_target", [f]="unsupported option \'%0\' for target \'%1\'", [b]="unsupported option \'A\' for target \'B\'", [i]=k, [h]="unsupported option \'(.*?)\' for target \'(.*?)\'", [g]=a, [e]=o, [c]={"76a943be7bee",1353297123,"Completely re-work how the Clang driver interprets PIC and PIE options.","Completely re-work how the Clang driver interprets PIC and PIE options.\n\nThere were numerous issues here that were all entangled, and so I\'ve\ntried to do a general simplification of the logic.\n1) The logic was mimicing actual GCC bugs, rather than \"features\". These\n have been fixed in trunk GCC, and this fixes Clang as well. Notably,\n the logic was always intended to be last-match-wins like any other\n flag.\n2) The logic for handling \'-mdynamic-no-pic\' was preposterously unclear.\n It also allowed the use of this flag on non-Darwin platforms where it\n has no actual meaning. Now this option is handled directly based on\n tests of how llvm-gcc behaves, and it is only supported on Darwin.\n3) The APIs for the Driver\'s ToolChains had the implementation ugliness\n of dynamic-no-pic leaking through them. They also had the\n implementation details of the LLVM relocation model flag names\n leaking through.\n4) The actual results of passing these flags was incorrect on Darwin in\n many cases. For example, Darwin *always* uses PIC level 2 if it uses\n in PIC level, and Darwin *always* uses PIC on 64-bit regardless of\n the flags specified, including -fPIE. Darwin never compiles in PIE\n mode, but it can *link* in PIE mode.\n5) Also, PIC was not always being enabled even when PIE was. This isn\'t\n a supported mode at all and may have caused some fallout in builds\n with complex PIC and PIE interactions.\n\nThe result is (I hope) cleaner and clearer for readers. I\'ve also left\ncomments and tests about some of the truly strage behavior that is\nobserved on Darwin platforms. We have no real testing of Windows\nplatforms and PIC, but I don\'t have the tools handy to figure that out.\nHopefully others can beef up our testing here.\n\nUnfortunately, I can\'t test this for every platform. =/ If folks have\ndependencies on these flags that aren\'t covered by tests, they may\nbreak. I\'ve audited and ensured that all the changes in behavior of the\nexisting tests are intentional and good. In particular I\'ve tried to\nmake sure the Darwin behavior (which is more suprising than the Linux\nbehavior) also matches that of \'gcc\' on my mac.\n\nllvm-svn: 168297"}, [j]={ [1]={N,605,"/// Compute target triple from args.\n///\n/// This routine provides the logic to compute a target triple from various\n/// args passed to the driver and the default triple string.\nstatic llvm::Triple computeTargetTriple(const Driver &D, StringRef TargetTriple, const ArgList &Args, StringRef DarwinArchName = \"\") {\n // ...\n // The `-maix[32|64]` flags are only valid for AIX targets.\n if (Arg *A = Args.getLastArgNoClaim(options::OPT_maix32, options::OPT_maix64); A && !Target.isOSAIX())\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args) << Target.str();"}, [2]={N,652,"/// Compute target triple from args.\n///\n/// This routine provides the logic to compute a target triple from various\n/// args passed to the driver and the default triple string.\nstatic llvm::Triple computeTargetTriple(const Driver &D, StringRef TargetTriple, const ArgList &Args, StringRef DarwinArchName = \"\") {\n // ...\n // Handle -miamcu flag.\n if (Args.hasFlag(options::OPT_miamcu, options::OPT_mno_iamcu, false)) {\n if (Target.get32BitArchVariant().getArch() != llvm::Triple::x86)\n D.Diag(diag::err_drv_unsupported_opt_for_target) << \"-miamcu\" << Target.str();"}, [3]={N,4976,"void Driver::BuildJobs(Compilation &C) const {\n // ...\n for (Arg *A : C.getArgs()) {\n // FIXME: It would be nice to be able to send the argument to the\n // DiagnosticsEngine, so that extra values, position, and so on could be\n // printed.\n if (!A->isClaimed()) {\n // ...\n // In clang-cl, don\'t mention unknown arguments here since they have\n // already been warned about.\n if (!IsCLMode() || !A->getOption().matches(options::OPT_UNKNOWN)) {\n if (A->getOption().hasFlag(options::TargetSpecific) && !A->isIgnoredTargetSpecific() && !HasAssembleJob) {\n Diag(diag::err_drv_unsupported_opt_for_target) << A->getSpelling() << getTargetTriple();"}, [4]={eb,450,"SanitizerArgs::SanitizerArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, bool DiagnoseErrors) {\n // ...\n for (const llvm::opt::Arg *Arg : llvm::reverse(Args)) {\n if (Arg->getOption().matches(options::OPT_fsanitize_EQ)) {\n // ...\n if (SanitizerMask KindsToDiagnose = Add & ~Supported & ~DiagnosedKinds) {\n if (DiagnoseErrors) {\n // ...\n D.Diag(diag::err_drv_unsupported_opt_for_target) << Desc << TC.getTriple().str();"}, [5]={eb,601,"SanitizerArgs::SanitizerArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, bool DiagnoseErrors) {\n // ...\n // Report error if there are non-trapping sanitizers that require\n // c++abi-specific parts of UBSan runtime, and they are not provided by the\n // toolchain. We don\'t have a good way to check the latter, so we just\n // check if the toolchan supports vptr.\n if (~Supported & SanitizerKind::Vptr) {\n // ...\n if (KindsToDiagnose) {\n // ...\n if (DiagnoseErrors)\n D.Diag(diag::err_drv_unsupported_opt_for_target) << (\"-fno-sanitize-trap=\" + toString(S)) << TC.getTriple().str();"}, [6]={"clang/lib/Driver/ToolChain.cpp",158,"bool ToolChain::useIntegratedBackend() const {\n // ...\n if ((IBackend && !IsIntegratedBackendSupported()) || (!IBackend && !IsNonIntegratedBackendSupported()))\n DiagID = clang::diag::err_drv_unsupported_opt_for_target;"}, [7]={"clang/lib/Driver/ToolChains/AIX.cpp",44,"void aix::Assembler::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Arg *A = C.getArgs().getLastArg(options::OPT_G)) {\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getSpelling() << D.getTargetTriple();"}, [8]={"clang/lib/Driver/ToolChains/AIX.cpp",124,"void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Arg *A = C.getArgs().getLastArg(options::OPT_G)) {\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getSpelling() << D.getTargetTriple();"}, [9]={"clang/lib/Driver/ToolChains/Arch/ARM.cpp",351,"void arm::setFloatABIInTriple(const Driver &D, const ArgList &Args, llvm::Triple &Triple) {\n // ...\n default: {\n // ...\n if (DefaultABI != arm::FloatABI::Invalid && isHardFloat != (DefaultABI == arm::FloatABI::Hard)) {\n // ...\n D.Diag(diag::err_drv_unsupported_opt_for_target) << ABIArg->getAsString(Args) << Triple.getTriple();"}, [10]={"clang/lib/Driver/ToolChains/Arch/X86.cpp",128,"void x86::getX86TargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features) {\n // Claim and report unsupported -mabi=. Note: we don\'t support \"sysv_abi\" or\n // \"ms_abi\" as default function attributes.\n if (const Arg *A = Args.getLastArg(clang::driver::options::OPT_mabi_EQ)) {\n // ...\n if (A->getValue() != DefaultAbi)\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getSpelling() << Triple.getTriple();"}, [11]={q,754,"static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, const JobAction &JA, const InputInfo &Output, const ArgList &Args, SanitizerArgs &SanArgs, ArgStringList &CmdArgs) {\n // ...\n if (TC.getTriple().isOSAIX()) {\n if (Arg *ProfileSampleUseArg = getLastProfileSampleUseArg(Args))\n D.Diag(diag::err_drv_unsupported_opt_for_target) << ProfileSampleUseArg->getSpelling() << TC.getTriple().str();"}, [12]={q,2080,"void Clang::AddPPCTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const {\n // ...\n if (VecExtabi) {\n if (!T.isOSAIX())\n D.Diag(diag::err_drv_unsupported_opt_for_target) << \"-mabi=vec-extabi\" << T.str();"}, [13]={q,3379,"static void RenderSSPOptions(const Driver &D, const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, bool KernelOrKext) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mstack_protector_guard_EQ)) {\n // ...\n if (!EffectiveTriple.isX86() && !EffectiveTriple.isAArch64() && !EffectiveTriple.isARM() && !EffectiveTriple.isThumb())\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args) << TripleStr;"}, [14]={q,3425,"static void RenderSSPOptions(const Driver &D, const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, bool KernelOrKext) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mstack_protector_guard_offset_EQ)) {\n // ...\n if (!EffectiveTriple.isX86() && !EffectiveTriple.isAArch64() && !EffectiveTriple.isARM() && !EffectiveTriple.isThumb())\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args) << TripleStr;"}, [15]={q,3444,"static void RenderSSPOptions(const Driver &D, const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, bool KernelOrKext) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mstack_protector_guard_reg_EQ)) {\n // ...\n if (!EffectiveTriple.isX86() && !EffectiveTriple.isAArch64())\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args) << TripleStr;"}, [16]={q,4488,"static void renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T, const ArgList &Args, bool EmitCodeView, bool IRInput, ArgStringList &CmdArgs, llvm::codegenoptions::DebugInfoKind &DebugInfoKind, DwarfFissionKind &DwarfFission) {\n // ...\n if (Args.hasFlag(options::OPT_fdebug_types_section, options::OPT_fno_debug_types_section, false)) {\n if (!(T.isOSBinFormatELF() || T.isOSBinFormatWasm())) {\n D.Diag(diag::err_drv_unsupported_opt_for_target) << Args.getLastArg(options::OPT_fdebug_types_section)->getAsString(Args) << T.getTriple();"}, [17]={q,4930,"void Clang::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (isa<AnalyzeJobAction>(JA)) {\n // ...\n } else if (isa<MigrateJobAction>(JA)) {\n // ...\n } else if (isa<PreprocessJobAction>(JA)) {\n // ...\n } else if (isa<AssembleJobAction>(JA)) {\n // ...\n } else if (isa<PrecompileJobAction>(JA)) {\n // ...\n } else if (isa<VerifyPCHJobAction>(JA)) {\n // ...\n } else if (isa<ExtractAPIJobAction>(JA)) {\n // ...\n } else {\n // ...\n if (IsUsingLTO) {\n if (IsDeviceOffloadAction && !JA.isDeviceOffloading(Action::OFK_OpenMP) && !Args.hasFlag(options::OPT_offload_new_driver, options::OPT_no_offload_new_driver, false) && !Triple.isAMDGPU()) {\n D.Diag(diag::err_drv_unsupported_opt_for_target) << Args.getLastArg(options::OPT_foffload_lto, options::OPT_foffload_lto_EQ)->getAsString(Args) << Triple.getTriple();"}, [18]={q,5249,"#endif\n // ...\n if (LastPICDataRelArg) {\n // ...\n if (!Triple.isSystemZ())\n D.Diag(diag::err_drv_unsupported_opt_for_target) << (NoPICDataIsTextRelative ? \"-mno-pic-data-is-text-relative\" : \"-mpic-data-is-text-relative\") << RawTriple.str();"}, [19]={q,5345,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_fveclib)) {\n // ...\n if (Name == \"SVML\") {\n if (Triple.getArch() != llvm::Triple::x86 && Triple.getArch() != llvm::Triple::x86_64)\n D.Diag(diag::err_drv_unsupported_opt_for_target) << Name << Triple.getArchName();"}, [20]={q,5350,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_fveclib)) {\n // ...\n if (Name == \"SVML\") {\n // ...\n } else if (Name == \"LIBMVEC-X86\") {\n if (Triple.getArch() != llvm::Triple::x86 && Triple.getArch() != llvm::Triple::x86_64)\n D.Diag(diag::err_drv_unsupported_opt_for_target) << Name << Triple.getArchName();"}, [21]={q,5355,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_fveclib)) {\n // ...\n if (Name == \"SVML\") {\n // ...\n } else if (Name == \"LIBMVEC-X86\") {\n // ...\n } else if (Name == \"SLEEF\" || Name == \"ArmPL\") {\n if (Triple.getArch() != llvm::Triple::aarch64 && Triple.getArch() != llvm::Triple::aarch64_be)\n D.Diag(diag::err_drv_unsupported_opt_for_target) << Name << Triple.getArchName();"}, [22]={q,5372,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mabi_EQ_quadword_atomics)) {\n if (!Triple.isOSAIX() || Triple.isPPC32())\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getSpelling() << RawTriple.str();"}, [23]={q,5381,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mlong_double_128)) {\n // Emit the unsupported option error until the Clang\'s library integration\n // support for 128-bit long double is available for AIX.\n if (Triple.isOSAIX())\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getSpelling() << RawTriple.str();"}, [24]={q,5410,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_maix_struct_return, options::OPT_msvr4_struct_return)) {\n if (!TC.getTriple().isPPC32()) {\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getSpelling() << RawTriple.str();"}, [25]={q,5423,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_fpcc_struct_return, options::OPT_freg_struct_return)) {\n if (TC.getArch() != llvm::Triple::x86) {\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getSpelling() << RawTriple.str();"}, [26]={q,5519,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_fextend_args_EQ)) {\n // ...\n if (Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64) {\n // ...\n } else\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getOption().getName() << TripleStr;"}, [27]={q,5527,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mdouble_EQ)) {\n if (TC.getArch() == llvm::Triple::avr)\n // ...\n else\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args) << TripleStr;"}, [28]={q,5538,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_LongDouble_Group)) {\n if (TC.getTriple().isX86())\n // ...\n else if (TC.getTriple().isPPC() && (A->getOption().getID() != options::OPT_mlong_double_80))\n // ...\n else\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args) << TripleStr;"}, [29]={q,5682,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mtls_size_EQ)) {\n // ...\n if (!Triple.isAArch64() || !Triple.isOSBinFormatELF())\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getOption().getName() << TripleStr;"}, [30]={q,5839,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_fbasic_block_sections_EQ)) {\n // ...\n if (Triple.isX86() && Triple.isOSBinFormatELF()) {\n // ...\n } else if (Triple.isNVPTX()) {\n // ...\n } else if (Val != \"none\") {\n // ...\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args) << TripleStr;"}, [31]={q,5866,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_fsplit_machine_functions, options::OPT_fno_split_machine_functions)) {\n // This codegen pass is only available on x86-elf targets.\n if (Triple.isX86() && Triple.isOSBinFormatELF()) {\n // ...\n } else {\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args) << TripleStr;"}, [32]={q,6250,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_fzero_call_used_regs_EQ)) {\n // FIXME: There\'s no reason for this to be restricted to X86. The backend\n // code needs to be changed to include the appropriate function calls\n // automatically.\n if (!Triple.isX86() && !Triple.isAArch64())\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args) << TripleStr;"}, [33]={q,6364,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_fpatchable_function_entry_EQ)) {\n // ...\n if (!Triple.isAArch64() && !Triple.isLoongArch() && !Triple.isRISCV() && !Triple.isX86())\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args) << TripleStr;"}, [34]={q,6390,"#endif\n // ...\n if (TC.SupportsProfiling()) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mfentry)) {\n if (Arch == llvm::Triple::systemz || TC.getTriple().isX86())\n // ...\n else\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args) << TripleStr;"}, [35]={q,6397,"#endif\n // ...\n if (TC.SupportsProfiling()) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mnop_mcount)) {\n if (Arch == llvm::Triple::systemz)\n // ...\n else\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args) << TripleStr;"}, [36]={q,6404,"#endif\n // ...\n if (TC.SupportsProfiling()) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mrecord_mcount)) {\n if (Arch == llvm::Triple::systemz)\n // ...\n else\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args) << TripleStr;"}, [37]={q,6411,"#endif\n // ...\n if (Arg *A = Args.getLastArgNoClaim(options::OPT_pg)) {\n if (TC.getTriple().isOSzOS()) {\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args) << TripleStr;"}, [38]={q,6417,"#endif\n // ...\n if (Arg *A = Args.getLastArgNoClaim(options::OPT_p)) {\n if (!(TC.getTriple().isOSAIX() || TC.getTriple().isOSOpenBSD())) {\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args) << TripleStr;"}, [39]={q,6433,"#endif\n // ...\n // Reject AIX-specific link options on other targets.\n if (!TC.getTriple().isOSAIX()) {\n for (const Arg *A : Args.filtered(options::OPT_b, options::OPT_K, options::OPT_mxcoff_build_id_EQ)) {\n D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getSpelling() << TripleStr;"}, [40]={q,7202,"#endif\n // ...\n if (FRecordSwitches && !Triple.isOSBinFormatELF() && !Triple.isOSBinFormatXCOFF() && !Triple.isOSBinFormatMachO())\n D.Diag(diag::err_drv_unsupported_opt_for_target) << Args.getLastArg(options::OPT_frecord_command_line)->getAsString(Args) << TripleStr;"}, [41]={q,7482,"#endif\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_fsymbol_partition_EQ)) {\n // ...\n if (!TC.getTriple().isOSBinFormatELF())\n D.Diag(diag::err_drv_unsupported_opt_for_target) << Str << TC.getTripleString();"}, [42]={hb,758,"#endif\n // ...\n if (Args.hasArg(options::OPT_mxcoff_roptr) || Args.hasArg(options::OPT_mno_xcoff_roptr)) {\n // ...\n if (!IsOSAIX)\n D.Diag(diag::err_drv_unsupported_opt_for_target) << OptStr << ToolChain.getTriple().str();"}, [43]={hb,1229,"// Should be called before we add system libraries (C++ ABI, libstdc++/libc++,\n// C runtime, etc). Returns true if sanitizer system deps need to be linked in.\nbool tools::addSanitizerRuntimes(const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs) {\n // ...\n if (SanArgs.hasMemTag()) {\n if (!TC.getTriple().isAndroid()) {\n TC.getDriver().Diag(diag::err_drv_unsupported_opt_for_target) << \"-fsanitize=memtag*\" << TC.getTriple().str();"}, [44]={hb,1491,"/// Parses the various -fpic/-fPIC/-fpie/-fPIE arguments. Then,\n/// smooshes them together with platform defaults, to decide whether\n/// this compile should be using PIC mode or not. Returns a tuple of\n/// (RelocationModel, PICLevel, IsPIE).\nstd::tuple<llvm::Reloc::Model, unsigned, bool> tools::ParsePICArgs(const ToolChain &ToolChain, const ArgList &Args) {\n // ...\n if (Triple.isOSWindows() && !Triple.isOSCygMing() && LastPICArg && LastPICArg == Args.getLastArg(options::OPT_fPIC, options::OPT_fpic, options::OPT_fPIE, options::OPT_fpie)) {\n ToolChain.getDriver().Diag(diag::err_drv_unsupported_opt_for_target) << LastPICArg->getSpelling() << Triple.str();"}, [45]={hb,1543,"/// Parses the various -fpic/-fPIC/-fpie/-fPIE arguments. Then,\n/// smooshes them together with platform defaults, to decide whether\n/// this compile should be using PIC mode or not. Returns a tuple of\n/// (RelocationModel, PICLevel, IsPIE).\nstd::tuple<llvm::Reloc::Model, unsigned, bool> tools::ParsePICArgs(const ToolChain &ToolChain, const ArgList &Args) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mdynamic_no_pic)) {\n // This is a very special mode. It trumps the other modes, almost no one\n // uses it, and it isn\'t even valid on any OS but Darwin.\n if (!Triple.isOSDarwin())\n ToolChain.getDriver().Diag(diag::err_drv_unsupported_opt_for_target) << A->getSpelling() << Triple.str();"}, [46]={hb,1573,"/// Parses the various -fpic/-fPIC/-fpie/-fPIE arguments. Then,\n/// smooshes them together with platform defaults, to decide whether\n/// this compile should be using PIC mode or not. Returns a tuple of\n/// (RelocationModel, PICLevel, IsPIE).\nstd::tuple<llvm::Reloc::Model, unsigned, bool> tools::ParsePICArgs(const ToolChain &ToolChain, const ArgList &Args) {\n // ...\n if (LastROPIArg && LastROPIArg->getOption().matches(options::OPT_fropi)) {\n if (!EmbeddedPISupported)\n ToolChain.getDriver().Diag(diag::err_drv_unsupported_opt_for_target) << LastROPIArg->getSpelling() << Triple.str();"}, [47]={hb,1580,"/// Parses the various -fpic/-fPIC/-fpie/-fPIE arguments. Then,\n/// smooshes them together with platform defaults, to decide whether\n/// this compile should be using PIC mode or not. Returns a tuple of\n/// (RelocationModel, PICLevel, IsPIE).\nstd::tuple<llvm::Reloc::Model, unsigned, bool> tools::ParsePICArgs(const ToolChain &ToolChain, const ArgList &Args) {\n // ...\n if (LastRWPIArg && LastRWPIArg->getOption().matches(options::OPT_frwpi)) {\n if (!EmbeddedPISupported)\n ToolChain.getDriver().Diag(diag::err_drv_unsupported_opt_for_target) << LastRWPIArg->getSpelling() << Triple.str();"}, [48]={"clang/lib/Driver/ToolChains/PS4CPU.cpp",240,"void tools::PScpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Args.hasArg(options::OPT_fuse_ld_EQ)) {\n D.Diag(diag::err_drv_unsupported_opt_for_target) << \"-fuse-ld\" << TC.getTriple().str();"}, [49]={"clang/lib/Driver/ToolChains/PS4CPU.cpp",257,"toolchains::PS4PS5Base::PS4PS5Base(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, StringRef Platform, const char *EnvVar) : Generic_ELF(D, Triple, Args) {\n if (Args.hasArg(clang::driver::options::OPT_static))\n D.Diag(clang::diag::err_drv_unsupported_opt_for_target) << \"-static\" << Platform;"}, [50]={"clang/lib/Driver/ToolChains/PS4CPU.cpp",362,"void toolchains::PS4PS5Base::addClangTargetOptions(const ArgList &DriverArgs, ArgStringList &CC1Args, Action::OffloadKind DeviceOffloadingKind) const {\n // PS4/PS5 do not use init arrays.\n if (DriverArgs.hasArg(options::OPT_fuse_init_array)) {\n // ...\n getDriver().Diag(clang::diag::err_drv_unsupported_opt_for_target) << A->getAsString(DriverArgs) << getTriple().str();"}, [51]={"clang/lib/Driver/XRayArgs.cpp",41,"XRayArgs::XRayArgs(const ToolChain &TC, const ArgList &Args) {\n // ...\n if (Triple.isMacOSX()) {\n // ...\n default:\n D.Diag(diag::err_drv_unsupported_opt_for_target) << XRayInstrument->getSpelling() << Triple.str();"}, [52]={"clang/lib/Driver/XRayArgs.cpp",59,"XRayArgs::XRayArgs(const ToolChain &TC, const ArgList &Args) {\n // ...\n if (Triple.isMacOSX()) {\n // ...\n } else if (Triple.isOSBinFormatELF()) {\n // ...\n default:\n D.Diag(diag::err_drv_unsupported_opt_for_target) << XRayInstrument->getSpelling() << Triple.str();"}, [53]={"clang/lib/Driver/XRayArgs.cpp",63,"XRayArgs::XRayArgs(const ToolChain &TC, const ArgList &Args) {\n // ...\n if (Triple.isMacOSX()) {\n // ...\n } else if (Triple.isOSBinFormatELF()) {\n // ...\n } else {\n D.Diag(diag::err_drv_unsupported_opt_for_target) << XRayInstrument->getSpelling() << Triple.str();"}, [54]={Z,1919,"#include \"clang/Driver/Options.inc\"\n // ...\n // X86_32 has -fppc-struct-return and -freg-struct-return.\n // PPC32 has -maix-struct-return and -msvr4-struct-return.\n if (Arg *A = Args.getLastArg(OPT_fpcc_struct_return, OPT_freg_struct_return, OPT_maix_struct_return, OPT_msvr4_struct_return)) {\n // TODO: We might want to consider enabling these options on AIX in the\n // future.\n if (T.isOSAIX())\n Diags.Report(diag::err_drv_unsupported_opt_for_target) << A->getSpelling() << T.str();"}, [55]={Z,1935,"#include \"clang/Driver/Options.inc\"\n // ...\n if (Arg *A = Args.getLastArg(OPT_mxcoff_roptr)) {\n if (!T.isOSAIX())\n Diags.Report(diag::err_drv_unsupported_opt_for_target) << A->getSpelling() << T.str();"}, [56]={Z,1954,"#include \"clang/Driver/Options.inc\"\n // ...\n if (Arg *A = Args.getLastArg(OPT_mabi_EQ_quadword_atomics)) {\n if (!T.isOSAIX() || T.isPPC32())\n Diags.Report(diag::err_drv_unsupported_opt_for_target) << A->getSpelling() << T.str();"} }, [l]={ ["clang/test/Preprocessor/predefined-arch-macros.c"]={"clang: error: unsupported option \'-mcpu=\' for target \'x86_64-unknown-linux-gnu\'"} } }, ["err_drv_unsupported_opt_with_suggestion"]={ [d]={{nil,K,"err_drv_unsupported_opt_with_suggestion"}}, [f]={{nil,s,"unsupported option \'%0\'; did you mean \'%1\'?"},{J,K,"unsupported option \'%0\', did you mean \'%1\'?"}}, [b]={{nil,s,"unsupported option \'A\'; did you mean \'B\'?"},{J,K,"unsupported option \'A\', did you mean \'B\'?"}}, [i]=k, [h]="unsupported option \'(.*?)\'; did you mean \'(.*?)\'\\?", [g]=a, [e]={{nil,K,o}}, [c]={"24910765e266",1515198340,"[Driver] Suggest correctly spelled driver options","[Driver] Suggest correctly spelled driver options\n\nSummary:\nDepends on https://reviews.llvm.org/D41732.\n\nUtilities such as `opt`, when invoked with arguments that are very\nnearly spelled correctly, suggest the correctly spelled options:\n\n```\nbin/opt -hel\nopt: Unknown command line argument \'-hel\'. Try: \'bin/opt -help\'\nopt: Did you mean \'-help\'?\n```\n\nClang, on the other hand, prior to this commit, does not:\n\n```\nbin/clang -hel\nclang-6.0: error: unknown argument: \'-hel\'\n```\n\nThis commit makes use of the new libLLVMOption API from\nhttps://reviews.llvm.org/D41732 in order to provide correct suggestions:\n\n```\nbin/clang -hel\nclang-6.0: error: unknown argument: \'-hel\', did you mean \'-help\'?\n```\n\nTest Plan: `check-clang`\n\nReviewers: yamaguchi, v.g.vassilev, teemperor, ruiu, bruno\n\nReviewed By: bruno\n\nSubscribers: bruno, jroelofs, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D41733\n\nllvm-svn: 321917"}, [j]={{N,299,"InputArgList Driver::ParseArgStrings(ArrayRef<const char *> ArgStrings, bool IsClCompatMode, bool &ContainsError) {\n // ...\n // Check for unsupported options.\n for (const Arg *A : Args) {\n if (A->getOption().hasFlag(options::Unsupported)) {\n // ...\n if (getOpts().findNearest(ArgString, Nearest, IncludedFlagsBitmask, ExcludedFlagsBitmask | options::Unsupported) > 1) {\n // ...\n } else {\n DiagID = diag::err_drv_unsupported_opt_with_suggestion;"},{N,2643,"// Construct a the list of inputs and their types.\nvoid Driver::BuildInputs(const ToolChain &TC, DerivedArgList &Args, InputList &Inputs) const {\n // ...\n // Warn -x after last input file has no effect\n if (!IsCLMode()) {\n // ...\n } else {\n // In CL mode suggest /TC or /TP since -x doesn\'t make sense if passed via\n // /clang:.\n if (auto *A = Args.getLastArg(options::OPT_x))\n Diag(diag::err_drv_unsupported_opt_with_suggestion) << A->getAsString(Args) << \"/TC\' or \'/TP\";"}} }, ["err_drv_unsupported_option_argument"]={ [d]="err_drv_unsupported_option_argument", [f]={{nil,t,"unsupported argument \'%1\' to option \'%0\'"},{x,x,"unsupported argument \'%1\' to option \'-%0\'"},{y,nil,"unsupported argument \'%1\' to option \'%0\'"}}, [b]={{nil,t,"unsupported argument \'B\' to option \'A\'"},{x,x,"unsupported argument \'B\' to option \'-A\'"},{y,nil,"unsupported argument \'B\' to option \'A\'"}}, [i]=k, [h]="unsupported argument \'(.*?)\' to option \'(.*?)\'", [g]=a, [e]=o, [c]={"2b4de14b1d0c",1287441375,"Driver/IA: Accept and ignore -force_cpusubtype_ALL, as in \'clang -c","Driver/IA: Accept and ignore -force_cpusubtype_ALL, as in \'clang -c\n-Wa,-force_cpusubtype_ALL t.c\'.\n - Tweaks -Wa, and -Xassembler handling to only accept an explicit short list of\n arguments and give an obvious unsupported error on others.\n\nllvm-svn: 116759"}, [j]={{N,254,"void Driver::setDriverMode(StringRef Value) {\n // ...\n if (auto M = llvm::StringSwitch<std::optional<DriverMode>>(Value).Case(\"gcc\", GCCMode).Case(\"g++\", GXXMode).Case(\"cpp\", CPPMode).Case(\"cl\", CLMode).Case(\"flang\", FlangMode).Case(\"dxc\", DXCMode).Default(std::nullopt))\n // ...\n else\n Diag(diag::err_drv_unsupported_option_argument) << OptName << Value;"},{N,725,"// Parse the LTO options and record the type of LTO compilation\n// based on which -f(no-)?lto(=.*)? or -f(no-)?offload-lto(=.*)?\n// option occurs last.\nstatic driver::LTOKind parseLTOMode(Driver &D, const llvm::opt::ArgList &Args, OptSpecifier OptEq, OptSpecifier OptNeg) {\n // ...\n if (LTOMode == LTOK_Unknown) {\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << A->getValue();"},{N,768,"/// Compute the desired OpenMP runtime from the flags provided.\nDriver::OpenMPRuntimeKind Driver::getOpenMPRuntime(const ArgList &Args) const {\n // ...\n if (RT == OMPRT_Unknown) {\n if (A)\n Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << A->getValue();"},{eb,265,"static SanitizerMask parseSanitizeTrapArgs(const Driver &D, const llvm::opt::ArgList &Args, bool DiagnoseErrors) {\n // ...\n for (const llvm::opt::Arg *Arg : llvm::reverse(Args)) {\n if (Arg->getOption().matches(options::OPT_fsanitize_trap_EQ)) {\n // ...\n if (InvalidValues && DiagnoseErrors) {\n // ...\n D.Diag(diag::err_drv_unsupported_option_argument) << Arg->getSpelling() << toString(S);"},{eb,639,"SanitizerArgs::SanitizerArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, bool DiagnoseErrors) {\n // ...\n for (const auto *Arg : Args) {\n if (Arg->getOption().matches(options::OPT_fsanitize_recover_EQ)) {\n // ...\n // Report error if user explicitly tries to recover from unrecoverable\n // sanitizer.\n if (SanitizerMask KindsToDiagnose = Add & Unrecoverable & ~DiagnosedUnrecoverableKinds) {\n // ...\n if (DiagnoseErrors)\n D.Diag(diag::err_drv_unsupported_option_argument) << Arg->getSpelling() << toString(SetToDiagnose);"},{eb,654,"SanitizerArgs::SanitizerArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, bool DiagnoseErrors) {\n // ...\n for (const auto *Arg : Args) {\n if (Arg->getOption().matches(options::OPT_fsanitize_recover_EQ)) {\n // ...\n } else if (Arg->getOption().matches(options::OPT_fno_sanitize_recover_EQ)) {\n // ...\n // Report error if user explicitly tries to disable recovery from\n // always recoverable sanitizer.\n if (SanitizerMask KindsToDiagnose = Remove & AlwaysRecoverable & ~DiagnosedAlwaysRecoverableKinds) {\n // ...\n if (DiagnoseErrors)\n D.Diag(diag::err_drv_unsupported_option_argument) << Arg->getSpelling() << toString(SetToDiagnose);"},{eb,995,"SanitizerArgs::SanitizerArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, bool DiagnoseErrors) {\n // ...\n if (AllAddedKinds & SanitizerKind::Address) {\n // ...\n if (const auto *Arg = Args.getLastArg(options::OPT_sanitize_address_destructor_EQ)) {\n // ...\n if (parsedAsanDtorKind == llvm::AsanDtorKind::Invalid && DiagnoseErrors) {\n TC.getDriver().Diag(clang::diag::err_drv_unsupported_option_argument) << Arg->getSpelling() << Arg->getValue();"},{eb,1008,"SanitizerArgs::SanitizerArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, bool DiagnoseErrors) {\n // ...\n if (AllAddedKinds & SanitizerKind::Address) {\n // ...\n if (const auto *Arg = Args.getLastArg(options::OPT_sanitize_address_use_after_return_EQ)) {\n // ...\n if (parsedAsanUseAfterReturn == llvm::AsanDetectStackUseAfterReturnMode::Invalid && DiagnoseErrors) {\n TC.getDriver().Diag(clang::diag::err_drv_unsupported_option_argument) << Arg->getSpelling() << Arg->getValue();"},{eb,1412,"SanitizerMask parseArgValues(const Driver &D, const llvm::opt::Arg *A, bool DiagnoseErrors) {\n // ...\n for (int i = 0, n = A->getNumValues(); i != n; ++i) {\n // ...\n if (Kind)\n // ...\n else if (DiagnoseErrors)\n D.Diag(clang::diag::err_drv_unsupported_option_argument) << A->getSpelling() << Value;"},{eb,1447,"int parseCoverageFeatures(const Driver &D, const llvm::opt::Arg *A, bool DiagnoseErrors) {\n // ...\n for (int i = 0, n = A->getNumValues(); i != n; ++i) {\n // ...\n if (F == 0 && DiagnoseErrors)\n D.Diag(clang::diag::err_drv_unsupported_option_argument) << A->getSpelling() << Value;"},{eb,1470,"int parseBinaryMetadataFeatures(const Driver &D, const llvm::opt::Arg *A, bool DiagnoseErrors) {\n // ...\n for (int i = 0, n = A->getNumValues(); i != n; ++i) {\n // ...\n if (F == 0 && DiagnoseErrors)\n D.Diag(clang::diag::err_drv_unsupported_option_argument) << A->getSpelling() << Value;"},{"clang/lib/Driver/ToolChains/AIX.cpp",175,"void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Arg *A = Args.getLastArg(clang::driver::options::OPT_mxcoff_build_id_EQ)) {\n // ...\n if (BuildId[0] != \'0\' || BuildId[1] != \'x\' || BuildId.find_if_not(llvm::isHexDigit, 2) != StringRef::npos)\n ToolChain.getDriver().Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << BuildId;"},{"clang/lib/Driver/ToolChains/Arch/AArch64.cpp",297,"void aarch64::getAArch64TargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features, bool ForAS) {\n // ...\n if (!success) {\n auto Diag = D.Diag(diag::err_drv_unsupported_option_argument);"},{"clang/lib/Driver/ToolChains/Arch/AArch64.cpp",358,"void aarch64::getAArch64TargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features, bool ForAS) {\n // ...\n // Enable/disable straight line speculation hardening.\n if (Arg *A = Args.getLastArg(options::OPT_mharden_sls_EQ)) {\n // ...\n if (Scope != \"none\") {\n // ...\n for (auto Opt : Opts) {\n // ...\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Scope;"},{"clang/lib/Driver/ToolChains/Arch/ARM.cpp",140,"// Check if -march is valid by checking if it can be canonicalised and parsed.\n// getARMArch is used here instead of just checking the -march value in order\n// to handle -march=native correctly.\nstatic void checkARMArchName(const Driver &D, const Arg *A, const ArgList &Args, llvm::StringRef ArchName, llvm::StringRef CPUName, std::vector<StringRef> &Features, const llvm::Triple &Triple, llvm::ARM::FPUKind &ArgFPUKind) {\n // ...\n if (ArchKind == llvm::ARM::ArchKind::INVALID || (Split.second.size() && !DecodeARMFeatures(D, Split.second, CPUName, ArchKind, Features, ArgFPUKind)))\n D.Diag(clang::diag::err_drv_unsupported_option_argument) << A->getSpelling() << A->getValue();"},{"clang/lib/Driver/ToolChains/Arch/ARM.cpp",158,"// Check -mcpu=. Needs ArchName to handle -mcpu=generic.\nstatic void checkARMCPUName(const Driver &D, const Arg *A, const ArgList &Args, llvm::StringRef CPUName, llvm::StringRef ArchName, std::vector<StringRef> &Features, const llvm::Triple &Triple, llvm::ARM::FPUKind &ArgFPUKind) {\n // ...\n if (ArchKind == llvm::ARM::ArchKind::INVALID || (Split.second.size() && !DecodeARMFeatures(D, Split.second, CPU, ArchKind, Features, ArgFPUKind)))\n D.Diag(clang::diag::err_drv_unsupported_option_argument) << A->getSpelling() << A->getValue();"},{"clang/lib/Driver/ToolChains/Arch/ARM.cpp",946,"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 // Enable/disable straight line speculation hardening.\n if (Arg *A = Args.getLastArg(options::OPT_mharden_sls_EQ)) {\n // ...\n if (Scope != \"none\") {\n // ...\n for (auto Opt : Opts) {\n // ...\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Scope;"},{pb,303,"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 // ...\n } else\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val;"},{pb,324,"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 // ...\n } else {\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val;"},{"clang/lib/Driver/ToolChains/Arch/RISCV.cpp",64,"// Get features except standard extension feature\nstatic void getRISCFeaturesFromMcpu(const Driver &D, const Arg *A, const llvm::Triple &Triple, StringRef Mcpu, std::vector<StringRef> &Features) {\n // ...\n if (!llvm::RISCV::parseCPU(Mcpu, Is64Bit)) {\n // Try inverting Is64Bit in case the CPU is valid, but for the wrong target.\n if (llvm::RISCV::parseCPU(Mcpu, !Is64Bit))\n // ...\n else\n D.Diag(clang::diag::err_drv_unsupported_option_argument) << A->getSpelling() << Mcpu;"},{"clang/lib/Driver/ToolChains/Arch/X86.cpp",267,"void x86::getX86TargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features) {\n // ...\n // Enable/disable straight line speculation hardening.\n if (Arg *A = Args.getLastArg(options::OPT_mharden_sls_EQ)) {\n // ...\n if (Scope == \"all\") {\n // ...\n } else if (Scope == \"return\") {\n // ...\n } else if (Scope == \"indirect-jmp\") {\n // ...\n } else if (Scope != \"none\") {\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Scope;"},{q,871,"static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, const JobAction &JA, const InputInfo &Output, const ArgList &Args, SanitizerArgs &SanArgs, ArgStringList &CmdArgs) {\n // ...\n if (const auto *A = Args.getLastArg(options::OPT_fprofile_update_EQ)) {\n // ...\n if (Val == \"atomic\" || Val == \"prefer-atomic\")\n // ...\n else if (Val != \"single\")\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val;"},{q,1043,"static void RenderDebugInfoCompressionArgs(const ArgList &Args, ArgStringList &CmdArgs, const Driver &D, const ToolChain &TC) {\n // ...\n if (checkDebugInfoOption(A, Args, D, TC)) {\n // ...\n if (Value == \"none\") {\n // ...\n } else if (Value == \"zlib\") {\n // ...\n } else if (Value == \"zstd\") {\n // ...\n } else {\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Value;"},{q,1607,"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 if (Scope != \"none\" && Scope != \"non-leaf\" && Scope != \"all\")\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Scope;"},{q,1615,"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 (!llvm::ARM::parseBranchProtection(A->getValue(), PBP, DiagMsg))\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << DiagMsg;"},{q,1836,"void Clang::AddAArch64TargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const {\n // ...\n // Handle -msve_vector_bits=<bits>\n if (Arg *A = Args.getLastArg(options::OPT_msve_vector_bits_EQ)) {\n // ...\n if (Val.equals(\"128\") || Val.equals(\"256\") || Val.equals(\"512\") || Val.equals(\"1024\") || Val.equals(\"2048\") || Val.equals(\"128+\") || Val.equals(\"256+\") || Val.equals(\"512+\") || Val.equals(\"1024+\") || Val.equals(\"2048+\")) {\n // ...\n } else if (!Val.equals(\"scalable\"))\n // ...\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val;"},{q,2004,"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 if (Val == \"never\" || Val == \"always\" || Val == \"optimal\") {\n // ...\n } else\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val;"},{q,2201,"void Clang::AddRISCVTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const {\n // ...\n // Handle -mrvv-vector-bits=<bits>\n if (Arg *A = Args.getLastArg(options::OPT_mrvv_vector_bits_EQ)) {\n // ...\n // If we got a valid value try to use it.\n if (Bits != 0) {\n // ...\n } else if (!Val.equals(\"scalable\")) {\n // ...\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val;"},{q,2306,"void Clang::AddX86TargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_masm_EQ)) {\n // ...\n if (Value == \"intel\" || Value == \"att\") {\n // ...\n } else {\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Value;"},{q,2389,"void Clang::AddLanaiTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mregparm_EQ)) {\n // ...\n if (Value.getAsInteger(10, Mregparm)) {\n if (Mregparm != 4) {\n getToolChain().getDriver().Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Value;"},{q,2573,"static void CollectArgsForIntegratedAssembler(Compilation &C, const ArgList &Args, ArgStringList &CmdArgs, const Driver &D) {\n // ...\n for (const Arg *A : Args.filtered(options::OPT_Wa_COMMA, options::OPT_Xassembler, options::OPT_mimplicit_it_EQ)) {\n // ...\n if (A->getOption().getID() == options::OPT_mimplicit_it_EQ) {\n // ...\n case llvm::Triple::arm:\n case llvm::Triple::armeb:\n case llvm::Triple::thumb:\n case llvm::Triple::thumbeb:\n // ...\n if (!CheckARMImplicitITArg(ImplicitIt))\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << ImplicitIt;"},{q,2736,"static void CollectArgsForIntegratedAssembler(Compilation &C, const ArgList &Args, ArgStringList &CmdArgs, const Driver &D) {\n // ...\n for (const Arg *A : Args.filtered(options::OPT_Wa_COMMA, options::OPT_Xassembler, options::OPT_mimplicit_it_EQ)) {\n // ...\n for (StringRef Value : A->getValues()) {\n // ...\n if (Value == \"-force_cpusubtype_ALL\") {\n // ...\n } else if (Value == \"-L\") {\n // ...\n } else if (Value == \"--fatal-warnings\") {\n // ...\n } else if (Value == \"--no-warn\" || Value == \"-W\") {\n // ...\n } else if (Value == \"--noexecstack\") {\n // ...\n } else if (Value.startswith(\"-compress-debug-sections\") || Value.startswith(\"--compress-debug-sections\") || Value == \"-nocompress-debug-sections\" || Value == \"--nocompress-debug-sections\") {\n // ...\n } else if (Value == \"-mrelax-relocations=yes\" || Value == \"--mrelax-relocations=yes\") {\n // ...\n } else if (Value == \"-mrelax-relocations=no\" || Value == \"--mrelax-relocations=no\") {\n // ...\n } else if (Value.startswith(\"-I\")) {\n // ...\n } else if (Value.startswith(\"-gdwarf-\")) {\n // ...\n } else if (Value.startswith(\"-mcpu\") || Value.startswith(\"-mfpu\") || Value.startswith(\"-mhwdiv\") || Value.startswith(\"-march\")) {\n // ...\n } else if (Value == \"-defsym\") {\n // ...\n } else if (Value == \"-fdebug-compilation-dir\") {\n // ...\n } else if (Value.consume_front(\"-fdebug-compilation-dir=\")) {\n // ...\n } else if (Value == \"--version\") {\n // ...\n } else {\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Value;"},{q,2873,"static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, bool OFastEnabled, const ArgList &Args, ArgStringList &CmdArgs, const JobAction &JA) {\n // ...\n for (const Arg *A : Args) {\n // ...\n case options::OPT_ffp_model_EQ: {\n // ...\n if (Val.equals(\"fast\")) {\n // ...\n } else if (Val.equals(\"precise\")) {\n // ...\n } else if (Val.equals(\"strict\")) {\n // ...\n } else\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val;"},{q,2960,"static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, bool OFastEnabled, const ArgList &Args, ArgStringList &CmdArgs, const JobAction &JA) {\n // ...\n for (const Arg *A : Args) {\n // ...\n // Validate and pass through -ffp-contract option.\n case options::OPT_ffp_contract: {\n // ...\n if (PreciseFPModel) {\n // ...\n } else if (Val.equals(\"fast\") || Val.equals(\"on\") || Val.equals(\"off\")) {\n // ...\n } else\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val;"},{q,2988,"static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, bool OFastEnabled, const ArgList &Args, ArgStringList &CmdArgs, const JobAction &JA) {\n // ...\n for (const Arg *A : Args) {\n // ...\n // Validate and pass through -ffp-exception-behavior option.\n case options::OPT_ffp_exception_behavior_EQ: {\n // ...\n if (Val.equals(\"ignore\") || Val.equals(\"maytrap\"))\n // ...\n else if (Val.equals(\"strict\")) {\n // ...\n } else\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val;"},{q,3000,"static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, bool OFastEnabled, const ArgList &Args, ArgStringList &CmdArgs, const JobAction &JA) {\n // ...\n for (const Arg *A : Args) {\n // ...\n // Validate and pass through -ffp-eval-method option.\n case options::OPT_ffp_eval_method_EQ: {\n // ...\n if (Val.equals(\"double\") || Val.equals(\"extended\") || Val.equals(\"source\"))\n // ...\n else\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val;"},{q,3017,"static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, bool OFastEnabled, const ArgList &Args, ArgStringList &CmdArgs, const JobAction &JA) {\n // ...\n for (const Arg *A : Args) {\n // ...\n case options::OPT_fexcess_precision_EQ: {\n // ...\n if (Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64) {\n if (Val.equals(\"standard\") || Val.equals(\"fast\"))\n // ...\n // To make it GCC compatible, allow the value of \"16\" which\n // means disable excess precision, the same meaning than clang\'s\n // equivalent value \"none\".\n else if (Val.equals(\"16\"))\n // ...\n else\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val;"},{q,3021,"static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, bool OFastEnabled, const ArgList &Args, ArgStringList &CmdArgs, const JobAction &JA) {\n // ...\n for (const Arg *A : Args) {\n // ...\n case options::OPT_fexcess_precision_EQ: {\n // ...\n if (Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64) {\n // ...\n } else {\n if (!(Val.equals(\"standard\") || Val.equals(\"fast\")))\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val;"},{q,3501,"static void RenderTrivialAutoVarInitOptions(const Driver &D, const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs) {\n // ...\n for (const Arg *A : Args) {\n // ...\n case options::OPT_ftrivial_auto_var_init: {\n // ...\n if (Val == \"uninitialized\" || Val == \"zero\" || Val == \"pattern\")\n // ...\n else\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val;"},{q,4176,"DwarfFissionKind tools::getDebugFissionKind(const Driver &D, const ArgList &Args, Arg *&Arg) {\n // ...\n D.Diag(diag::err_drv_unsupported_option_argument) << Arg->getSpelling() << Arg->getValue();"},{q,8038,"void ClangAs::AddX86TargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_masm_EQ)) {\n // ...\n if (Value == \"intel\" || Value == \"att\") {\n // ...\n } else {\n getToolChain().getDriver().Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Value;"},{hb,319,"void tools::addLinkerCompressDebugSectionsOption(const ToolChain &TC, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) {\n // GNU ld supports --compress-debug-sections=none|zlib|zlib-gnu|zlib-gabi\n // whereas zlib is an alias to zlib-gabi and zlib-gnu is obsoleted. Therefore\n // -gz=none|zlib are translated to --compress-debug-sections=none|zlib. -gz\n // is not translated since ld --compress-debug-sections option requires an\n // argument.\n if (const Arg *A = Args.getLastArg(options::OPT_gz_EQ)) {\n // ...\n if (V == \"none\" || V == \"zlib\" || V == \"zstd\")\n // ...\n else\n TC.getDriver().Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << V;"},{"clang/lib/Driver/ToolChains/Flang.cpp",285,"static void addFloatingPointOptions(const Driver &D, const ArgList &Args, ArgStringList &CmdArgs) {\n // ...\n if (const Arg *A = Args.getLastArg(options::OPT_ffp_contract)) {\n // ...\n if (Val == \"fast\" || Val == \"off\") {\n // ...\n } else if (Val == \"on\") {\n // ...\n } else\n // ...\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val;"},{"clang/lib/Driver/ToolChains/Gnu.cpp",716,"void tools::gnutools::Assembler::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (const Arg *A = Args.getLastArg(options::OPT_gz, options::OPT_gz_EQ)) {\n if (A->getOption().getID() == options::OPT_gz) {\n // ...\n } else {\n // ...\n if (Value == \"none\" || Value == \"zlib\" || Value == \"zstd\") {\n // ...\n } else {\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Value;"},{"clang/lib/Driver/ToolChains/Hexagon.cpp",43,"static void handleHVXWarnings(const Driver &D, const ArgList &Args) {\n // Handle the unsupported values passed to mhvx-length.\n if (Arg *A = Args.getLastArg(options::OPT_mhexagon_hvx_length_EQ)) {\n // ...\n if (!Val.equals_insensitive(\"64b\") && !Val.equals_insensitive(\"128b\"))\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val;"},{"clang/lib/Driver/ToolChains/MinGW.cpp",180,"void tools::MinGW::Linker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mguard_EQ)) {\n // ...\n if (GuardArgs == \"none\")\n // ...\n else if (GuardArgs == \"cf\" || GuardArgs == \"cf-nochecks\")\n // ...\n else\n D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << GuardArgs;"},{"clang/lib/Driver/ToolChains/MinGW.cpp",698,"void toolchains::MinGW::addClangTargetOptions(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, Action::OffloadKind DeviceOffloadKind) const {\n if (Arg *A = DriverArgs.getLastArg(options::OPT_mguard_EQ)) {\n // ...\n if (GuardArgs == \"none\") {\n // ...\n } else if (GuardArgs == \"cf\") {\n // ...\n } else if (GuardArgs == \"cf-nochecks\") {\n // ...\n } else {\n getDriver().Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << GuardArgs;"},{"clang/lib/Driver/ToolChains/MSP430.cpp",104,"void msp430::getMSP430TargetFeatures(const Driver &D, const ArgList &Args, std::vector<StringRef> &Features) {\n // ...\n if (HWMult == \"16bit\") {\n // ...\n } else if (HWMult == \"32bit\") {\n // ...\n } else if (HWMult == \"f5series\") {\n // ...\n } else {\n D.Diag(clang::diag::err_drv_unsupported_option_argument) << HWMultArg->getSpelling() << HWMult;"},{Z,1738,"#include \"clang/Driver/Options.inc\"\n // ...\n if (const Arg *A = Args.getLastArg(OPT_gsimple_template_names_EQ)) {\n // ...\n if (Value != \"simple\" && Value != \"mangled\")\n Diags.Report(diag::err_drv_unsupported_option_argument) << A->getSpelling() << A->getValue();"}} }, ["err_drv_unsupported_rtlib_for_platform"]={ [d]="err_drv_unsupported_rtlib_for_platform", [f]="unsupported runtime library \'%0\' for platform \'%1\'", [b]="unsupported runtime library \'A\' for platform \'B\'", [i]=k, [h]="unsupported runtime library \'(.*?)\' for platform \'(.*?)\'", [g]=a, [e]=o, [c]={"f4916cde7668",1323298995,"Driver: Add a --rtlib={compiler-rt,libgcc} argument which I plan to use to allow","Driver: Add a --rtlib={compiler-rt,libgcc} argument which I plan to use to allow\ndual support for compiler-rt on Linux, during bringup.\n\nllvm-svn: 146094"}, [j]={{hb,1870,"void tools::AddRunTimeLibs(const ToolChain &TC, const Driver &D, ArgStringList &CmdArgs, const ArgList &Args) {\n // ...\n case ToolChain::RLT_Libgcc:\n // Make sure libgcc is not used under MSVC environment by default\n if (TC.getTriple().isKnownWindowsMSVCEnvironment()) {\n // ...\n if (A && A->getValue() != StringRef(\"platform\")) {\n TC.getDriver().Diag(diag::err_drv_unsupported_rtlib_for_platform) << A->getValue() << \"MSVC\";"},{Tb,1437,"ToolChain::RuntimeLibType DarwinClang::GetRuntimeLibType(const ArgList &Args) const {\n if (Arg *A = Args.getLastArg(options::OPT_rtlib_EQ)) {\n // ...\n if (Value != \"compiler-rt\" && Value != \"platform\")\n getDriver().Diag(clang::diag::err_drv_unsupported_rtlib_for_platform) << Value << \"darwin\";"}} }, ["err_drv_unsupported_static_sanitizer_darwin"]={ [d]="err_drv_unsupported_static_sanitizer_darwin", [f]="static %0 runtime is not supported on darwin", [b]="static A runtime is not supported on darwin", [i]=k, [h]="static (.*?) runtime is not supported on darwin", [g]=a, [e]=o, [c]={"4e7d40e0928c",1677697623,"[Sanitizers] Error out for -static-libsan on darwin","[Sanitizers] Error out for -static-libsan on darwin\nsince it is not supported\n\nDifferential Revision: https://reviews.llvm.org/D144672"}, [j]={{Tb,1480,"void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, ArgStringList &CmdArgs, bool ForceLinkBuiltinRT) const {\n // ...\n if (!Sanitize.needsSharedRt()) {\n // ...\n if (sanitizer) {\n getDriver().Diag(diag::err_drv_unsupported_static_sanitizer_darwin) << sanitizer;"}} }, ["err_dtor_expr_without_call"]={ [d]="err_dtor_expr_without_call", [f]="reference to %select{destructor|pseudo-destructor}0 must be called%select{|; did you mean to call it with no arguments?}1", [b]={{nil,nil,{"reference to ",{"destructor","pseudo-destructor"}," must be called",{a,"; did you mean to call it with no arguments?"}}}}, [i]=k, [h]="reference to (?:destructor|pseudo\\-destructor) must be called(?:|; did you mean to call it with no arguments\\?)", [g]=a, [e]=m, [c]={"bddb73fa1df4",1252088980,"If a destructor is referenced or a pseudo-destructor expression is","If a destructor is referenced or a pseudo-destructor expression is\nformed without a trailing \'(\', diagnose the error (these expressions\nmust be immediately called), emit a fix-it hint, and fix the code.\n\nllvm-svn: 81015"}, [j]={{rb,21553,"/// Check for operands with placeholder types and complain if found.\n/// Returns ExprError() if there was an error and no recovery was possible.\nExprResult Sema::CheckPlaceholderExpr(Expr *E) {\n // ...\n // Bound member functions.\n case BuiltinType::BoundMember: {\n // ...\n // Try to give a nicer diagnostic if it is a bound member that we recognize.\n if (isa<CXXPseudoDestructorExpr>(BME)) {\n PD = PDiag(diag::err_dtor_expr_without_call) << /*pseudo-destructor*/ 1;"},{rb,21596,"/// Check for operands with placeholder types and complain if found.\n/// Returns ExprError() if there was an error and no recovery was possible.\nExprResult Sema::CheckPlaceholderExpr(Expr *E) {\n // ...\n // Bound member functions.\n case BuiltinType::BoundMember: {\n // ...\n // Try to give a nicer diagnostic if it is a bound member that we recognize.\n if (isa<CXXPseudoDestructorExpr>(BME)) {\n // ...\n } else if (const auto *ME = dyn_cast<MemberExpr>(BME)) {\n if (ME->getMemberNameInfo().getName().getNameKind() == DeclarationName::CXXDestructorName)\n PD = PDiag(diag::err_dtor_expr_without_call) << /*destructor*/ 0;"}}, [l]={ ["clang/test/Frontend/crash-diagnostic-renderer.cpp"]={"clang/test/Frontend/crash-diagnostic-renderer.cpp:13:19: error: reference to pseudo-destructor must be called; did you mean to call it with no arguments?"} } }, ["err_dup_implementation_category"]={ [d]="err_dup_implementation_category", [f]="reimplementation of category %1 for class %0", [b]="reimplementation of category B for class A", [i]=k, [h]="reimplementation of category (.*?) for class (.*?)", [g]=a, [e]=m, [c]={"6d9fab76195c",1248134753,"- Introduce ASTContext::getObjCImplementation() and ASTContext::setObjCImplementation() which use a ...","- Introduce ASTContext::getObjCImplementation() and ASTContext::setObjCImplementation() which use a DenseMap to associate\n an interface/category with its implementation (if one exists).\n\n- Introduce ObjCInterfaceDecl::get/setImplementation() and ObjCCategoryDecl::get/setImplementation() that use the above methods.\n\n- Add a compiler error for when a category is reimplemented.\n\nllvm-svn: 76508"}, [j]={{X,1964,"/// ActOnStartCategoryImplementation - Perform semantic checks on the\n/// category implementation declaration and build an ObjCCategoryImplDecl\n/// object.\nObjCCategoryImplDecl *Sema::ActOnStartCategoryImplementation(SourceLocation AtCatImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CatName, SourceLocation CatLoc, const ParsedAttributesView &Attrs) {\n // ...\n /// Check that CatName, category name, is not used in another implementation.\n if (CatIDecl) {\n if (CatIDecl->getImplementation()) {\n Diag(ClassLoc, diag::err_dup_implementation_category) << ClassName << CatName;"}}, [l]={ ["clang/test/SemaObjC/category-1.m"]={"clang/test/SemaObjC/category-1.m:60:17: error: reimplementation of category \'x\' for class \'XCRemoteComputerManager\'"} } }, ["err_dup_implementation_class"]={ [d]="err_dup_implementation_class", [f]="reimplementation of class %0", [b]="reimplementation of class A", [i]=k, [h]="reimplementation of class (.*?)", [g]=a, [e]=m, [c]={u,1236199783,v,w}, [j]={{X,2091,"ObjCImplementationDecl *Sema::ActOnStartClassImplementation(SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc, const ParsedAttributesView &Attrs) {\n // ...\n // Check that there is no duplicate implementation of this class.\n if (IDecl->getImplementation()) {\n // ...\n Diag(ClassLoc, diag::err_dup_implementation_class) << ClassName;"}}, [l]={ ["clang/test/SemaObjC/class-impl-1.m"]={"clang/test/SemaObjC/class-impl-1.m:14:17: error: reimplementation of class \'INTF\'"} } }, ["err_dup_virtual"]={ [d]="err_dup_virtual", [f]="duplicate \'virtual\' in base specifier", [b]="duplicate \'virtual\' in base specifier", [i]=k, [h]="duplicate \'virtual\' in base specifier", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{r,2282,"/// ParseBaseSpecifier - Parse a C++ base-specifier. A base-specifier is\n/// one entry in the base class list of a class specifier, for example:\n/// class foo : public bar, virtual private baz {\n/// \'public bar\' and \'virtual private baz\' are each base-specifiers.\n///\n/// base-specifier: [C++ class.derived]\n/// attribute-specifier-seq[opt] base-type-specifier\n/// attribute-specifier-seq[opt] \'virtual\' access-specifier[opt]\n/// base-type-specifier\n/// attribute-specifier-seq[opt] access-specifier \'virtual\'[opt]\n/// base-type-specifier\nBaseResult Parser::ParseBaseSpecifier(Decl *ClassDecl) {\n // ...\n // Parse the \'virtual\' keyword (again!), in case it came after the\n // access specifier.\n if (Tok.is(tok::kw_virtual)) {\n // ...\n if (IsVirtual) {\n // ...\n Diag(VirtualLoc, diag::err_dup_virtual) << FixItHint::CreateRemoval(VirtualLoc);"}}, [l]={ ["clang/test/SemaCXX/inherit.cpp"]={"clang/test/SemaCXX/inherit.cpp:8:20: error: duplicate \'virtual\' in base specifier"} } }, ["err_duplicate_base_class"]={ [d]="err_duplicate_base_class", [f]="base class %0 specified more than once as a direct base class", [b]="base class A specified more than once as a direct base class", [i]=k, [h]="base class (.*?) specified more than once as a direct base class", [g]=a, [e]=m, [c]={U,1237025389,T,W}, [j]={{Q,2904,"/// Performs the actual work of attaching the given base class\n/// specifiers to a C++ class.\nbool Sema::AttachBaseSpecifiers(CXXRecordDecl *Class, MutableArrayRef<CXXBaseSpecifier *> Bases) {\n // ...\n for (unsigned idx = 0; idx < Bases.size(); ++idx) {\n // ...\n if (KnownBase) {\n // ...\n Diag(Bases[idx]->getBeginLoc(), diag::err_duplicate_base_class) << KnownBase->getType() << Bases[idx]->getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/inherit.cpp"]={"clang/test/SemaCXX/inherit.cpp:31:22: error: base class \'G_copy\' (aka \'G\') specified more than once as a direct base class","clang/test/SemaCXX/inherit.cpp:32:11: error: base class \'G_copy\' (aka \'G\') specified more than once as a direct base class"} } }, ["err_duplicate_case"]={ [d]="err_duplicate_case", [f]="duplicate case value \'%0\'", [b]="duplicate case value \'A\'", [i]=k, [h]="duplicate case value \'(.*?)\'", [g]=a, [e]=m, [c]={U,1237025389,T,W}, [j]={{V,1374,"StmtResult Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *BodyStmt) {\n // ...\n if (!HasDependentValue) {\n // ...\n if (!CaseVals.empty()) {\n for (unsigned i = 0, e = CaseVals.size(); i != e; ++i) {\n // ...\n if (i != 0 && CaseVals[i].first == CaseVals[i - 1].first) {\n // ...\n if (PrevString == CurrString)\n Diag(CaseVals[i].second->getLHS()->getBeginLoc(), diag::err_duplicate_case) << (PrevString.empty() ? CaseValStr.str() : PrevString);"},{V,1474,"StmtResult Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *BodyStmt) {\n // ...\n if (!HasDependentValue) {\n // ...\n // Detect duplicate case ranges, which usually don\'t exist at all in\n // the first place.\n if (!CaseRanges.empty()) {\n // ...\n // Rescan the ranges, looking for overlap with singleton values and other\n // ranges. Since the range list is sorted, we only need to compare case\n // ranges with their neighbors.\n for (unsigned i = 0, e = CaseRanges.size(); i != e; ++i) {\n // ...\n if (OverlapStmt) {\n // ...\n Diag(CR->getLHS()->getBeginLoc(), diag::err_duplicate_case) << toString(OverlapVal, 10);"}}, [l]={ ["clang/test/Parser/switch-recovery.cpp"]={"clang/test/Parser/switch-recovery.cpp:206:8: error: duplicate case value \'1\'"} } }, ["err_duplicate_case_differing_expr"]={ [d]="err_duplicate_case_differing_expr", [f]="duplicate case value: \'%0\' and \'%1\' both equal \'%2\'", [b]="duplicate case value: \'A\' and \'B\' both equal \'C\'", [i]=k, [h]="duplicate case value\\: \'(.*?)\' and \'(.*?)\' both equal \'(.*?)\'", [g]=a, [e]=m, [c]={"9841df655e37",1337146378,"Produce more useful \'duplicate case\' diagnostics. Fixes PR9243, from Terry Long!","Produce more useful \'duplicate case\' diagnostics. Fixes PR9243, from Terry Long!\n\nllvm-svn: 156904"}, [j]={{V,1378,"StmtResult Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *BodyStmt) {\n // ...\n if (!HasDependentValue) {\n // ...\n if (!CaseVals.empty()) {\n for (unsigned i = 0, e = CaseVals.size(); i != e; ++i) {\n // ...\n if (i != 0 && CaseVals[i].first == CaseVals[i - 1].first) {\n // ...\n if (PrevString == CurrString)\n // ...\n else\n Diag(CaseVals[i].second->getLHS()->getBeginLoc(), diag::err_duplicate_case_differing_expr) << (PrevString.empty() ? CaseValStr.str() : PrevString) << (CurrString.empty() ? CaseValStr.str() : CurrString) << CaseValStr;"}}, [l]={ ["clang/test/Sema/switch.c"]={"clang/test/Sema/switch.c:357:10: error: duplicate case value: \'3\' and \'a\' both equal \'3\'","clang/test/Sema/switch.c:348:10: error: duplicate case value: \'7\' and \'kTest19Enum1\' both equal \'7\'","clang/test/Sema/switch.c:352:10: error: duplicate case value: \'kTest19Enum1\' and \'kTest19Enum2\' both equal \'7\'"} } }, ["err_duplicate_class_def"]={ [d]="err_duplicate_class_def", [f]="duplicate interface definition for class %0", [b]="duplicate interface definition for class A", [i]=k, [h]="duplicate interface definition for class (.*?)", [g]=a, [e]=m, [c]={u,1236199783,v,w}, [j]={{X,1066,"ObjCInterfaceDecl *Sema::ActOnStartClassInterface(Scope *S, SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef<ParsedType> SuperTypeArgs, SourceRange SuperTypeArgsRange, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList, SkipBodyInfo *SkipBody) {\n // ...\n if (PrevIDecl) {\n // Class already seen. Was it a definition?\n if (ObjCInterfaceDecl *Def = PrevIDecl->getDefinition()) {\n if (SkipBody && !hasVisibleDefinition(Def)) {\n // ...\n } else {\n Diag(AtInterfaceLoc, diag::err_duplicate_class_def) << PrevIDecl->getDeclName();"}}, [l]={ ["clang/test/SemaObjC/arc-invalid.m"]={"clang/test/SemaObjC/arc-invalid.m:26:1: error: duplicate interface definition for class \'WebView\'"} } }, ["err_duplicate_class_virt_specifier"]={ [d]={{nil,L,"err_duplicate_class_virt_specifier"}}, [f]={{nil,L,"class already marked \'%0\'"}}, [b]={{nil,L,"class already marked \'A\'"}}, [i]=k, [h]="class already marked \'(.*?)\'", [g]=a, [e]={{nil,L,n}}, [c]={"4b63d0e0a7e5",1295715406,"Parse class-virt-specifier-seqs.","Parse class-virt-specifier-seqs.\n\nllvm-svn: 124036"}, [j]={{r,3506,"/// ParseCXXMemberSpecification - Parse the class definition.\n///\n/// member-specification:\n/// member-declaration member-specification[opt]\n/// access-specifier \':\' member-specification[opt]\n///\nvoid Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AttrFixitLoc, ParsedAttributes &Attrs, unsigned TagType, Decl *TagDecl) {\n // ...\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n // ...\n if (isCXX11FinalKeyword()) {\n if (FinalLoc.isValid()) {\n // ...\n Diag(Skipped, diag::err_duplicate_class_virt_specifier) << VirtSpecifiers::getSpecifierName(Specifier);"},{r,3516,"/// ParseCXXMemberSpecification - Parse the class definition.\n///\n/// member-specification:\n/// member-declaration member-specification[opt]\n/// access-specifier \':\' member-specification[opt]\n///\nvoid Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AttrFixitLoc, ParsedAttributes &Attrs, unsigned TagType, Decl *TagDecl) {\n // ...\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n // ...\n if (isCXX11FinalKeyword()) {\n // ...\n } else {\n if (AbstractLoc.isValid()) {\n // ...\n Diag(Skipped, diag::err_duplicate_class_virt_specifier) << VirtSpecifiers::getSpecifierName(Specifier);"}}, [l]={ ["clang/test/SemaCXX/MicrosoftExtensions.cpp"]={"clang/test/SemaCXX/MicrosoftExtensions.cpp:502:36: error: class already marked \'final\'","clang/test/SemaCXX/MicrosoftExtensions.cpp:508:36: error: class already marked \'sealed\'","clang/test/SemaCXX/MicrosoftExtensions.cpp:516:45: error: class already marked \'final\'","clang/test/SemaCXX/MicrosoftExtensions.cpp:524:45: error: class already marked \'abstract\'"} } }, ["err_duplicate_declspec"]={ [d]={{nil,s,"err_duplicate_declspec"}}, [f]={{nil,s,"duplicate \'%0\' declaration specifier"}}, [b]={{nil,s,"duplicate \'A\' declaration specifier"}}, [i]=k, [h]="duplicate \'(.*?)\' declaration specifier", [g]=a, [e]={{nil,s,o}}, [c]={"5fe2ddbdf47d",1556928540,"[clang] adding explicit(bool) from c++2a","[clang] adding explicit(bool) from c++2a\n\nthis patch adds support for the explicit bool specifier.\n\nChanges:\n- The parsing for the explicit(bool) specifier was added in ParseDecl.cpp.\n- The storage of the explicit specifier was changed. the explicit specifier was stored as a boolean value in the FunctionDeclBitfields and in the DeclSpec class. now it is stored as a PointerIntPair<Expr*, 2> with a flag and a potential expression in CXXConstructorDecl, CXXDeductionGuideDecl, CXXConversionDecl and in the DeclSpec class.\n- Following the AST change, Serialization, ASTMatchers, ASTComparator and ASTPrinter were adapted.\n- Template instantiation was adapted to instantiate the potential expressions of the explicit(bool) specifier When instantiating their associated declaration.\n- The Add*Candidate functions were adapted, they now take a Boolean indicating if the context allowing explicit constructor or conversion function and this boolean is used to remove invalid overloads that required template instantiation to be detected.\n- Test for Semantic and Serialization were added.\n\nThis patch is not yet complete. I still need to check that interaction with CTAD and deduction guides is correct. and add more tests for AST operations. But I wanted first feedback.\nPerhaps this patch should be spited in smaller patches, but making each patch testable as a standalone may be tricky.\n\nPatch by Tyker\n\nDifferential Revision: https://reviews.llvm.org/D60934\n\nllvm-svn: 359949"}, [j]={{p,4489,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n // If the specifier wasn\'t legal, issue a diagnostic.\n if (isInvalid) {\n // ...\n if (DiagID == diag::ext_duplicate_declspec || DiagID == diag::ext_warn_duplicate_declspec || DiagID == diag::err_duplicate_declspec)"},{"clang/lib/Sema/DeclSpec.cpp",1045,"bool DeclSpec::setFunctionSpecExplicit(SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, ExplicitSpecifier ExplicitSpec, SourceLocation CloseParenLoc) {\n // \'explicit explicit\' is ok, but warn as this is likely not what the user\n // intended.\n if (hasExplicitSpecifier()) {\n DiagID = (ExplicitSpec.getExpr() || FS_explicit_specifier.getExpr()) ? diag::err_duplicate_declspec : diag::ext_warn_duplicate_declspec;"}}, [l]={ ["clang/test/SemaCXX/cxx2a-explicit-bool.cpp"]={"clang/test/SemaCXX/cxx2a-explicit-bool.cpp:50:19: error: duplicate \'explicit\' declaration specifier"} } }, ["err_duplicate_default_assoc"]={ [d]="err_duplicate_default_assoc", [f]="duplicate default generic association", [b]="duplicate default generic association", [i]=k, [h]="duplicate default generic association", [g]=a, [e]=n, [c]={"91147596414d",1302827748,"C1X: implement generic selections","C1X: implement generic selections\n\nAs an extension, generic selection support has been added for all\nsupported languages. The syntax is the same as for C1X.\n\nllvm-svn: 129554"}, [j]={{F,3362,"/// ParseGenericSelectionExpression - Parse a C11 generic-selection\n/// [C11 6.5.1.1].\n///\n/// \\verbatim\n/// generic-selection:\n/// _Generic ( assignment-expression , generic-assoc-list )\n/// generic-assoc-list:\n/// generic-association\n/// generic-assoc-list , generic-association\n/// generic-association:\n/// type-name : assignment-expression\n/// default : assignment-expression\n/// \\endverbatim\n///\n/// As an extension, Clang also accepts:\n/// \\verbatim\n/// generic-selection:\n/// _Generic ( type-name, generic-assoc-list )\n/// \\endverbatim\nExprResult Parser::ParseGenericSelectionExpression() {\n // ...\n do {\n // ...\n if (Tok.is(tok::kw_default)) {\n // C11 6.5.1.1p2 \"A generic selection shall have no more than one default\n // generic association.\"\n if (!DefaultLoc.isInvalid()) {\n Diag(Tok, diag::err_duplicate_default_assoc);"}}, [l]={ ["clang/test/Parser/c1x-generic-selection.c"]={"clang/test/Parser/c1x-generic-selection.c:9:7: error: duplicate default generic association"} } }, ["err_duplicate_ivar_declaration"]={ [d]="err_duplicate_ivar_declaration", [f]="instance variable is already declared", [b]="instance variable is already declared", [i]=k, [h]="instance variable is already declared", [g]=a, [e]=m, [c]={"34e3cef4836d",1266613134,"Start supporting declaration of ivars in @implementation","Start supporting declaration of ivars in @implementation\nblocks. WIP.\n\nllvm-svn: 96696"}, [j]={{A,19178,"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 } else {\n // ...\n if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(EnclosingDecl)) {\n // ...\n } else if (ObjCImplementationDecl *IMPDecl = dyn_cast<ObjCImplementationDecl>(EnclosingDecl)) {\n // ...\n } else if (ObjCCategoryDecl *CDecl = dyn_cast<ObjCCategoryDecl>(EnclosingDecl)) {\n // ...\n for (unsigned i = 0, e = RecFields.size(); i != e; ++i) {\n if (IDecl) {\n if (const ObjCIvarDecl *ClsIvar = IDecl->getIvarDecl(ClsFields[i]->getIdentifier())) {\n Diag(ClsFields[i]->getLocation(), diag::err_duplicate_ivar_declaration);"},{A,19186,"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 } else {\n // ...\n if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(EnclosingDecl)) {\n // ...\n } else if (ObjCImplementationDecl *IMPDecl = dyn_cast<ObjCImplementationDecl>(EnclosingDecl)) {\n // ...\n } else if (ObjCCategoryDecl *CDecl = dyn_cast<ObjCCategoryDecl>(EnclosingDecl)) {\n // ...\n for (unsigned i = 0, e = RecFields.size(); i != e; ++i) {\n if (IDecl) {\n // ...\n for (const auto *Ext : IDecl->known_extensions()) {\n if (const ObjCIvarDecl *ClsExtIvar = Ext->getIvarDecl(ClsFields[i]->getIdentifier())) {\n Diag(ClsFields[i]->getLocation(), diag::err_duplicate_ivar_declaration);"},{X,2173,"void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **ivars, unsigned numIvars, SourceLocation RBrace) {\n // ...\n if (LangOpts.ObjCRuntime.isNonFragile()) {\n // ...\n for (unsigned i = 0; i < numIvars; i++) {\n // ...\n if (const ObjCIvarDecl *ClsIvar = IDecl->getIvarDecl(ImplIvar->getIdentifier())) {\n Diag(ImplIvar->getLocation(), diag::err_duplicate_ivar_declaration);"},{X,2181,"void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **ivars, unsigned numIvars, SourceLocation RBrace) {\n // ...\n if (LangOpts.ObjCRuntime.isNonFragile()) {\n // ...\n for (unsigned i = 0; i < numIvars; i++) {\n // ...\n // Check class extensions (unnamed categories) for duplicate ivars.\n for (const auto *CDecl : IDecl->visible_extensions()) {\n if (const ObjCIvarDecl *ClsExtIvar = CDecl->getIvarDecl(ImplIvar->getIdentifier())) {\n Diag(ImplIvar->getLocation(), diag::err_duplicate_ivar_declaration);"},{kb,9473,"void ASTReader::finishPendingActions() {\n while (!PendingIdentifierInfos.empty() || !PendingDeducedFunctionTypes.empty() || !PendingDeducedVarTypes.empty() || !PendingIncompleteDeclChains.empty() || !PendingDeclChains.empty() || !PendingMacroIDs.empty() || !PendingDeclContextInfos.empty() || !PendingUpdateRecords.empty() || !PendingObjCExtensionIvarRedeclarations.empty()) {\n // ...\n while (!PendingObjCExtensionIvarRedeclarations.empty()) {\n // ...\n if (Ctx.IsEquivalent(ExtensionsPair.first, ExtensionsPair.second)) {\n // ...\n } else {\n for (auto IvarPair : DuplicateIvars) {\n Diag(IvarPair.first->getLocation(), diag::err_duplicate_ivar_declaration) << IvarPair.first->getIdentifier();"},{"clang/lib/Serialization/ASTReaderDecl.cpp",1347,"void ASTDeclReader::VisitObjCIvarDecl(ObjCIvarDecl *IVD) {\n // ...\n if (PrevIvar && PrevIvar != IVD) {\n // ...\n if (ParentExt && PrevParentExt) {\n // ...\n } else if (ParentExt || PrevParentExt) {\n // ...\n Reader.Diag(IVD->getLocation(), diag::err_duplicate_ivar_declaration) << II;"}}, [l]={ ["clang/test/SemaObjC/ivar-lookup.m"]={"clang/test/SemaObjC/ivar-lookup.m:60:7: error: instance variable is already declared","clang/test/SemaObjC/ivar-lookup.m:67:7: error: instance variable is already declared","clang/test/SemaObjC/ivar-lookup.m:73:7: error: instance variable is already declared","clang/test/SemaObjC/ivar-lookup.m:74:7: error: instance variable is already declared","clang/test/SemaObjC/ivar-lookup.m:80:7: error: instance variable is already declared","clang/test/SemaObjC/ivar-lookup.m:145:6: error: instance variable is already declared","clang/test/SemaObjC/ivar-lookup.m:151:6: error: instance variable is already declared","clang/test/SemaObjC/ivar-lookup.m:152:12: error: instance variable is already declared","clang/test/SemaObjC/ivar-lookup.m:153:10: error: instance variable is already declared","clang/test/SemaObjC/ivar-lookup.m:154:10: error: instance variable is already declared","clang/test/SemaObjC/ivar-lookup.m:154:10: error: instance variable is already declared"} } }, ["err_duplicate_ivar_use"]={ [d]="err_duplicate_ivar_use", [f]="synthesized properties %0 and %1 both claim instance variable %2", [b]="synthesized properties A and B both claim instance variable C", [i]=k, [h]="synthesized properties (.*?) and (.*?) both claim instance variable (.*?)", [g]=a, [e]=m, [c]={"f881267db9a9",1480718311,"Mass-rename the handful of error_* diagnostics to err_*.","Mass-rename the handful of error_* diagnostics to err_*.\n\nllvm-svn: 288545"}, [j]={{Mb,1561,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n if (IC) {\n if (Synthesize)\n if (ObjCPropertyImplDecl *PPIDecl = IC->FindPropertyImplIvarDecl(PropertyIvar)) {\n Diag(PropertyLoc, diag::err_duplicate_ivar_use) << PropertyId << PPIDecl->getPropertyDecl()->getIdentifier() << PropertyIvar;"},{Mb,1600,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n if (IC) {\n // ...\n } else {\n if (Synthesize)\n if (ObjCPropertyImplDecl *PPIDecl = CatImplClass->FindPropertyImplIvarDecl(PropertyIvar)) {\n Diag(PropertyDiagLoc, diag::err_duplicate_ivar_use) << PropertyId << PPIDecl->getPropertyDecl()->getIdentifier() << PropertyIvar;"}}, [l]={ ["clang/test/SemaObjC/property-impl-misuse.m"]={"clang/test/SemaObjC/property-impl-misuse.m:15:13: error: synthesized properties \'Z\' and \'Y\' both claim instance variable \'Y\'"} } }, ["err_duplicate_mangled_name"]={ [d]="err_duplicate_mangled_name", [f]={{nil,K,"definition with same mangled name \'%0\' as another definition"},{gb,nil,"definition with same mangled name as another definition"}}, [b]={{nil,K,"definition with same mangled name \'A\' as another definition"},{gb,nil,"definition with same mangled name as another definition"}}, [i]=k, [h]="definition with same mangled name \'(.*?)\' as another definition", [g]=a, [e]={{nil,J,o},{"7.1",nil,m}}, [c]={"f405dd62ecd6",1385232095,"[CodeGen] If there is a function definition with duplicate mangled name, emit an error instead of as...","[CodeGen] If there is a function definition with duplicate mangled name, emit an error instead of asserting.\n\nrdar://15522601 & http://llvm.org/PR18031\n\nllvm-svn: 195556"}, [j]={{"clang/lib/CodeGen/CodeGenModule.cpp",4320,"/// GetOrCreateLLVMFunction - If the specified mangled name is not in the\n/// module, create and return an llvm Function with the specified type. If there\n/// is something in the module with the specified name, return it potentially\n/// bitcasted to the right type.\n///\n/// If D is non-null, it specifies a decl that correspond to this. This is used\n/// to set the attributes on the function when it is first created.\nllvm::Constant *CodeGenModule::GetOrCreateLLVMFunction(StringRef MangledName, llvm::Type *Ty, GlobalDecl GD, bool ForVTable, bool DontDefer, bool IsThunk, llvm::AttributeList ExtraAttrs, ForDefinition_t IsForDefinition) {\n // ...\n if (Entry) {\n // ...\n // If there are two attempts to define the same mangled name, issue an\n // error.\n if (IsForDefinition && !Entry->isDeclaration()) {\n // ...\n // Check that GD is not yet in DiagnosedConflictingDefinitions is required\n // to make sure that we issue an error only once.\n if (lookupRepresentativeDecl(MangledName, OtherGD) && (GD.getCanonicalDecl().getDecl() != OtherGD.getCanonicalDecl().getDecl()) && DiagnosedConflictingDefinitions.insert(GD).second) {\n getDiags().Report(D->getLocation(), diag::err_duplicate_mangled_name) << MangledName;"},{"clang/lib/CodeGen/CodeGenModule.cpp",4640,"/// GetOrCreateLLVMGlobal - If the specified mangled name is not in the module,\n/// create and return an llvm GlobalVariable with the specified type and address\n/// space. If there is something in the module with the specified name, return\n/// it potentially bitcasted to the right type.\n///\n/// If D is non-null, it specifies a decl that correspond to this. This is used\n/// to set the attributes on the global when it is first created.\n///\n/// If IsForDefinition is true, it is guaranteed that an actual global with\n/// type Ty will be returned, not conversion of a variable with the same\n/// mangled name but some other type.\nllvm::Constant *CodeGenModule::GetOrCreateLLVMGlobal(StringRef MangledName, llvm::Type *Ty, LangAS AddrSpace, const VarDecl *D, ForDefinition_t IsForDefinition) {\n // ...\n if (Entry) {\n // ...\n // If there are two attempts to define the same mangled name, issue an\n // error.\n if (IsForDefinition && !Entry->isDeclaration()) {\n // ...\n // Check that D is not yet in DiagnosedConflictingDefinitions is required\n // to make sure that we issue an error only once.\n if (D && lookupRepresentativeDecl(MangledName, OtherGD) && (D->getCanonicalDecl() != OtherGD.getCanonicalDecl().getDecl()) && (OtherD = dyn_cast<VarDecl>(OtherGD.getDecl())) && OtherD->hasInit() && DiagnosedConflictingDefinitions.insert(D).second) {\n getDiags().Report(D->getLocation(), diag::err_duplicate_mangled_name) << MangledName;"},{"clang/lib/CodeGen/CodeGenModule.cpp",5782,"void CodeGenModule::emitIFuncDefinition(GlobalDecl GD) {\n // ...\n if (Entry && !Entry->isDeclaration()) {\n // ...\n if (lookupRepresentativeDecl(MangledName, OtherGD) && DiagnosedConflictingDefinitions.insert(GD).second) {\n Diags.Report(D->getLocation(), diag::err_duplicate_mangled_name) << MangledName;"}}, [l]={ ["clang/test/CodeGen/attr-ifunc.c"]={"clang/test/CodeGen/attr-ifunc.c:43:6: error: definition with same mangled name \'f1\' as another definition"} } }, ["err_duplicate_member"]={ [d]="err_duplicate_member", [f]="duplicate member %0", [b]="duplicate member A", [i]=k, [h]="duplicate member (.*?)", [g]=a, [e]=m, [c]={U,1237025389,T,W}, [j]={{A,4580,"/// 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 // C++ [class.mem]p1:\n // A member shall not be declared twice in the member-specification [...]\n //\n // Here, we need only consider static data members.\n if (Old->isStaticDataMember() && !New->isOutOfLine()) {\n Diag(New->getLocation(), diag::err_duplicate_member) << New->getIdentifier();"},{A,18215,"/// Build a new FieldDecl and check its well-formedness.\n///\n/// This routine builds a new FieldDecl given the fields name, type,\n/// record, etc. \\p PrevDecl should refer to any previous declaration\n/// with the same name and in the same scope as the field to be\n/// created.\n///\n/// \\returns a new FieldDecl.\n///\n/// \\todo The Declarator argument is a hack. It will be removed once\nFieldDecl *Sema::CheckFieldDecl(DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D) {\n // ...\n if (PrevDecl && !isa<TagDecl>(PrevDecl)) {\n Diag(Loc, diag::err_duplicate_member) << II;"},{A,18429,"/// ActOnIvar - Each ivar field of an objective-c class is passed into this\n/// in order to create an IvarDecl object for it.\nDecl *Sema::ActOnIvar(Scope *S, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, tok::ObjCKeywordKind Visibility) {\n // ...\n if (II) {\n // ...\n if (PrevDecl && isDeclInScope(PrevDecl, EnclosingContext, S) && !isa<TagDecl>(PrevDecl)) {\n Diag(Loc, diag::err_duplicate_member) << II;"},{X,3777,"/// DiagnoseDuplicateIvars -\n/// Check for duplicate ivars in the entire class at the start of\n/// \\@implementation. This becomes necessary because class extension can\n/// add ivars to a class in random order which will not be known until\n/// class\'s \\@implementation is seen.\nvoid Sema::DiagnoseDuplicateIvars(ObjCInterfaceDecl *ID, ObjCInterfaceDecl *SID) {\n for (auto *Ivar : ID->ivars()) {\n // ...\n if (IdentifierInfo *II = Ivar->getIdentifier()) {\n // ...\n if (prevIvar) {\n Diag(Ivar->getLocation(), diag::err_duplicate_member) << II;"}}, [l]={ ["clang/test/Sema/anonymous-struct-union.c"]={"clang/test/Sema/anonymous-struct-union.c:50:7: error: duplicate member \'z\'","clang/test/Sema/anonymous-struct-union.c:51:8: error: duplicate member \'zz\'"} } }, ["err_duplicate_method_decl"]={ [d]="err_duplicate_method_decl", [f]="duplicate declaration of method %0", [b]="duplicate declaration of method A", [i]=k, [h]="duplicate declaration of method (.*?)", [g]=a, [e]=m, [c]={u,1236199783,v,w}, [j]={{X,1782,"/// DiagnoseClassExtensionDupMethods - Check for duplicate declaration of\n/// a class method in its extension.\n///\nvoid Sema::DiagnoseClassExtensionDupMethods(ObjCCategoryDecl *CAT, ObjCInterfaceDecl *ID) {\n // ...\n for (const auto *Method : CAT->methods()) {\n // ...\n if (PrevMethod && (PrevMethod->isInstanceMethod() == Method->isInstanceMethod()) && !MatchTwoMethodDeclarations(Method, PrevMethod)) {\n Diag(Method->getLocation(), diag::err_duplicate_method_decl) << Method->getDeclName();"},{X,4028,"// Note: For class/category implementations, allMethods is always null.\nDecl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods, ArrayRef<DeclGroupPtrTy> allTUVars) {\n // ...\n for (unsigned i = 0, e = allMethods.size(); i != e; i++) {\n // ...\n if (Method->isInstanceMethod()) {\n // ...\n if ((isInterfaceDeclKind && PrevMethod && !match) || (checkIdenticalMethods && match)) {\n Diag(Method->getLocation(), diag::err_duplicate_method_decl) << Method->getDeclName();"},{X,4052,"// Note: For class/category implementations, allMethods is always null.\nDecl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods, ArrayRef<DeclGroupPtrTy> allTUVars) {\n // ...\n for (unsigned i = 0, e = allMethods.size(); i != e; i++) {\n // ...\n if (Method->isInstanceMethod()) {\n // ...\n } else {\n // ...\n if ((isInterfaceDeclKind && PrevMethod && !match) || (checkIdenticalMethods && match)) {\n Diag(Method->getLocation(), diag::err_duplicate_method_decl) << Method->getDeclName();"},{X,4993,"Decl *Sema::ActOnMethodDeclaration(Scope *S, SourceLocation MethodLoc, SourceLocation EndLoc, tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType, ArrayRef<SourceLocation> SelectorLocs, Selector Sel,\n // ...\n if (PrevMethod) {\n // ...\n Diag(ObjCMethod->getLocation(), diag::err_duplicate_method_decl) << ObjCMethod->getDeclName();"}}, [l]={ ["clang/test/SemaObjC/class-extension-dup-methods.m"]={"clang/test/SemaObjC/class-extension-dup-methods.m:11:1: error: duplicate declaration of method \'garf\'","clang/test/SemaObjC/class-extension-dup-methods.m:12:1: error: duplicate declaration of method \'cgarf\'","clang/test/SemaObjC/class-extension-dup-methods.m:27:1: error: duplicate declaration of method \'someMethodWithArgument::\'"} } }, ["err_duplicate_property"]={ [d]="err_duplicate_property", [f]="property has a previous declaration", [b]="property has a previous declaration", [i]=k, [h]="property has a previous declaration", [g]=a, [e]=m, [c]={"057a17e4c518",1261010949,"Diagnose duplicate declaration of a property. Fixes","Diagnose duplicate declaration of a property. Fixes\nPR5809\n\nllvm-svn: 91575"}, [j]={{Mb,444,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // ...\n // If we found a property in an extension, complain.\n if (PIDecl && isa<ObjCCategoryDecl>(PIDecl->getDeclContext())) {\n Diag(AtLoc, diag::err_duplicate_property);"},{Mb,627,"ObjCPropertyDecl *Sema::CreatePropertyDecl(Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TInfo, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC) {\n // ...\n // Class property and instance property can have the same name.\n if (ObjCPropertyDecl *prevDecl = ObjCPropertyDecl::findPropertyDecl(DC, PropertyId, ObjCPropertyDecl::getQueryKind(isClassProperty))) {\n Diag(PDecl->getLocation(), diag::err_duplicate_property);"}}, [l]={ ["clang/test/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:62:15: error: property has a previous declaration"} } }, ["err_duplicate_virt_specifier"]={ [d]="err_duplicate_virt_specifier", [f]="class member already marked \'%0\'", [b]="class member already marked \'A\'", [i]=k, [h]="class member already marked \'(.*?)\'", [g]=a, [e]=n, [c]={"5610490cdfd7",1295233547,"Change ParseOptionalCXX0XVirtSpecifierSeq to take a VirtSpecifiers struct.","Change ParseOptionalCXX0XVirtSpecifierSeq to take a VirtSpecifiers struct.\n\nEnforce C++[class.mem]p8:\nA virt-specifier-seq shall contain at most one of each virt-specifier.\n\nllvm-svn: 123611"}, [j]={{r,2457,"/// ParseOptionalCXX11VirtSpecifierSeq - Parse a virt-specifier-seq.\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\nvoid Parser::ParseOptionalCXX11VirtSpecifierSeq(VirtSpecifiers &VS, bool IsInterface, SourceLocation FriendLoc) {\n while (true) {\n // ...\n if (VS.SetSpecifier(Specifier, Tok.getLocation(), PrevSpec))\n Diag(Tok.getLocation(), diag::err_duplicate_virt_specifier) << PrevSpec << FixItHint::CreateRemoval(Tok.getLocation());"},{r,3091,"/// ParseCXXClassMemberDeclaration - Parse a C++ class member declaration.\n///\n/// member-declaration:\n/// decl-specifier-seq[opt] member-declarator-list[opt] \';\'\n/// function-definition \';\'[opt]\n/// ::[opt] nested-name-specifier template[opt] unqualified-id \';\'[TODO]\n/// using-declaration [TODO]\n/// [C++0x] static_assert-declaration\n/// template-declaration\n/// [GNU] \'__extension__\' member-declaration\n///\n/// member-declarator-list:\n/// member-declarator\n/// member-declarator-list \',\' member-declarator\n///\n/// member-declarator:\n/// declarator virt-specifier-seq[opt] pure-specifier[opt]\n/// [C++2a] declarator requires-clause\n/// declarator constant-initializer[opt]\n/// [C++11] declarator brace-or-equal-initializer[opt]\n/// identifier[opt] \':\' constant-expression\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\n///\n/// virt-specifier:\n/// override\n/// final\n/// [MS] sealed\n///\n/// pure-specifier:\n/// \'= 0\'\n///\n/// constant-initializer:\n/// \'=\' constant-expression\n///\nParser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, ParsedAttributes &AccessAttrs, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject *TemplateDiags) {\n // ...\n while (true) {\n // ...\n if (PureSpecLoc.isValid() && VS.getAbstractLoc().isValid()) {\n Diag(PureSpecLoc, diag::err_duplicate_virt_specifier) << \"abstract\";"}}, [l]={ ["clang/test/CXX/class/class.mem/p8-0x.cpp"]={"clang/test/CXX/class/class.mem/p8-0x.cpp:8:29: error: class member already marked \'override\'","clang/test/CXX/class/class.mem/p8-0x.cpp:9:26: error: class member already marked \'final\'","clang/test/CXX/class/class.mem/p8-0x.cpp:36:31: error: class member already marked \'override\'","clang/test/CXX/class/class.mem/p8-0x.cpp:37:28: error: class member already marked \'final\'"} } }, ["err_dynamic_and_noexcept_specification"]={ [d]="err_dynamic_and_noexcept_specification", [f]="cannot have both throw() and noexcept() clause on the same function", [b]="cannot have both throw() and noexcept() clause on the same function", [i]=k, [h]="cannot have both throw\\(\\) and noexcept\\(\\) clause on the same function", [g]=a, [e]=n, [c]={"965b0e3106c1",1299336316,"Parser support for noexcept specifications.","Parser support for noexcept specifications.\n\nllvm-svn: 127086"}, [j]={{r,3994,"/// Parse a C++ exception-specification if present (C++0x [except.spec]).\n///\n/// exception-specification:\n/// dynamic-exception-specification\n/// noexcept-specification\n///\n/// noexcept-specification:\n/// \'noexcept\'\n/// \'noexcept\' \'(\' constant-expression \')\'\nExceptionSpecificationType Parser::tryParseExceptionSpecification(bool Delayed, SourceRange &SpecificationRange, SmallVectorImpl<ParsedType> &DynamicExceptions, SmallVectorImpl<SourceRange> &DynamicExceptionRanges, ExprResult &NoexceptExpr, CachedTokens *&ExceptionSpecTokens) {\n // ...\n if (Result == EST_None) {\n // ...\n // If there\'s a dynamic specification after a noexcept specification,\n // parse that and ignore the results.\n if (Tok.is(tok::kw_throw)) {\n Diag(Tok.getLocation(), diag::err_dynamic_and_noexcept_specification);"},{r,3999,"/// Parse a C++ exception-specification if present (C++0x [except.spec]).\n///\n/// exception-specification:\n/// dynamic-exception-specification\n/// noexcept-specification\n///\n/// noexcept-specification:\n/// \'noexcept\'\n/// \'noexcept\' \'(\' constant-expression \')\'\nExceptionSpecificationType Parser::tryParseExceptionSpecification(bool Delayed, SourceRange &SpecificationRange, SmallVectorImpl<ParsedType> &DynamicExceptions, SmallVectorImpl<SourceRange> &DynamicExceptionRanges, ExprResult &NoexceptExpr, CachedTokens *&ExceptionSpecTokens) {\n // ...\n if (Result == EST_None) {\n // ...\n } else {\n Diag(Tok.getLocation(), diag::err_dynamic_and_noexcept_specification);"}}, [l]={ ["clang/test/CXX/except/except.spec/p1.cpp"]={"clang/test/CXX/except/except.spec/p1.cpp:46:32: error: cannot have both throw() and noexcept() clause on the same function","clang/test/CXX/except/except.spec/p1.cpp:47:21: error: cannot have both throw() and noexcept() clause on the same function"} } }, ["err_dynamic_property_ivar_decl"]={ [d]="err_dynamic_property_ivar_decl", [f]="dynamic property cannot have instance variable specification", [b]="dynamic property cannot have instance variable specification", [i]=k, [h]="dynamic property cannot have instance variable specification", [g]=a, [e]=m, [c]={"f881267db9a9",1480718311,"Mass-rename the handful of error_* diagnostics to err_*.","Mass-rename the handful of error_* diagnostics to err_*.\n\nllvm-svn: 288545"}, [j]={{Mb,1420,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n // ...\n } else if (PropertyIvar)\n // ...\n Diag(PropertyDiagLoc, diag::err_dynamic_property_ivar_decl);"}} }, ["err_dynamic_var_init"]={ [d]="err_dynamic_var_init", [f]={{nil,D,"dynamic initialization is not supported for __device__, __constant__, __shared__, and __managed__ variables."},{jb,nil,"dynamic initialization is not supported for __device__, __constant__, and __shared__ variables."}}, [b]={{nil,D,"dynamic initialization is not supported for __device__, __constant__, __shared__, and __managed__ variables."},{jb,nil,"dynamic initialization is not supported for __device__, __constant__, and __shared__ variables."}}, [i]=k, [h]="dynamic initialization is not supported for __device__, __constant__, __shared__, and __managed__ variables\\.", [g]=a, [e]=m, [c]={"97c01c35f8da",1454452188,"[CUDA] Do not allow dynamic initialization of global device side variables.","[CUDA] Do not allow dynamic initialization of global device side variables.\n\nIn general CUDA does not allow dynamic initialization of\nglobal device-side variables. One exception is that CUDA allows\nrecords with empty constructors as described in section E2.2.1 of\nCUDA 7.5 Programming guide.\n\nThis patch applies initializer checks for all device-side variables.\nEmpty constructors are accepted, but no code is generated for them.\n\nDifferential Revision: http://reviews.llvm.org/D15305\n\nllvm-svn: 259592"}, [j]={{"clang/lib/Sema/SemaCUDA.cpp",624,"void Sema::checkAllowedCUDAInitializer(VarDecl *VD) {\n // ...\n if (IsDeviceOrConstantVar || IsSharedVar) {\n // ...\n Diag(VD->getLocation(), IsSharedVar ? diag::err_shared_var_init : diag::err_dynamic_var_init) << Init->getSourceRange();"}}, [l]={ ["clang/test/SemaCUDA/union-init.cu"]={"clang/test/SemaCUDA/union-init.cu:33:14: error: dynamic initialization is not supported for __device__, __constant__, __shared__, and __managed__ variables.","clang/test/SemaCUDA/union-init.cu:35:14: error: dynamic initialization is not supported for __device__, __constant__, __shared__, and __managed__ variables."} } }, ["err_early_catch_all"]={ [d]="err_early_catch_all", [f]="catch-all handler must come last", [b]="catch-all handler must come last", [i]=k, [h]="catch\\-all handler must come last", [g]=a, [e]=m, [c]={U,1237025389,T,W}, [j]={{V,4512,"/// ActOnCXXTryBlock - Takes a try compound-statement and a number of\n/// handlers and creates a try statement from them.\nStmtResult Sema::ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock, ArrayRef<Stmt *> Handlers) {\n // ...\n for (unsigned i = 0; i < NumHandlers; ++i) {\n // ...\n // Diagnose when the handler is a catch-all handler, but it isn\'t the last\n // handler for the try block. [except.handle]p5. Also, skip exception\n // declarations that are invalid, since we can\'t usefully report on them.\n if (!H->getExceptionDecl()) {\n if (i < NumHandlers - 1)\n return StmtError(Diag(H->getBeginLoc(), diag::err_early_catch_all));"}}, [l]={ ["clang/test/SemaCXX/exceptions.cpp"]={"clang/test/SemaCXX/exceptions.cpp:29:5: error: catch-all handler must come last"} } }, ["err_ellipsis_first_param"]={ [d]="err_ellipsis_first_param", [f]="ISO C requires a named parameter before \'...\'", [b]="ISO C requires a named parameter before \'...\'", [i]=k, [h]="ISO C requires a named parameter before \'\\.\\.\\.\'", [g]=a, [e]=m, [c]={"1b13dab60860",1399824371,"Parameter/argument terminology fixes","Parameter/argument terminology fixes\n\nllvm-svn: 208499"}, [j]={{"clang/lib/Sema/SemaType.cpp",5452,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // OpenCL disallows functions without a prototype, but it doesn\'t enforce\n // strict prototypes as in C2x because it allows a function definition to\n // have an identifier list. See OpenCL 3.0 6.11/g for more details.\n if (!FTI.NumParams && !FTI.isVariadic && !LangOpts.requiresStrictPrototypes() && !LangOpts.OpenCL) {\n // ...\n } else {\n // We allow a zero-parameter variadic function in C if the\n // function is marked with the \"overloadable\" attribute. Scan\n // for this attribute now. We also allow it in C2x per WG14 N2975.\n if (!FTI.NumParams && FTI.isVariadic && !LangOpts.CPlusPlus) {\n if (LangOpts.C2x)\n // ...\n else if (!D.getDeclarationAttributes().hasAttribute(ParsedAttr::AT_Overloadable) && !D.getAttributes().hasAttribute(ParsedAttr::AT_Overloadable) && !D.getDeclSpec().getAttributes().hasAttribute(ParsedAttr::AT_Overloadable))\n S.Diag(FTI.getEllipsisLoc(), diag::err_ellipsis_first_param);"}}, [l]={ ["clang/test/Sema/crash-invalid-builtin.c"]={"clang/test/Sema/crash-invalid-builtin.c:4:17: error: ISO C requires a named parameter before \'...\'"} } }, ["err_ellipsis_in_declarator_not_parameter"]={ [d]="err_ellipsis_in_declarator_not_parameter", [f]="only function and template parameters can be parameter packs", [b]="only function and template parameters can be parameter packs", [i]=k, [h]="only function and template parameters can be parameter packs", [g]=a, [e]=m, [c]={"27b4c16fefde",1293144282,"Implement parsing of function parameter packs and non-type template","Implement parsing of function parameter packs and non-type template\nparameter packs (C++0x [dcl.fct]p13), including disambiguation between\nunnamed function parameter packs and varargs (C++0x [dcl.fct]p14) for\ncases like \n\n void f(T...)\n\nwhere T may or may not contain unexpanded parameter packs.\n\nllvm-svn: 122520"}, [j]={{"clang/lib/Sema/SemaType.cpp",5976,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n // If there was an ellipsis in the declarator, the declaration declares a\n // parameter pack whose type may be a pack expansion type.\n if (D.hasEllipsis()) {\n // ...\n case DeclaratorContext::File:\n case DeclaratorContext::KNRTypeList:\n case DeclaratorContext::ObjCParameter: // FIXME: special diagnostic here?\n case DeclaratorContext::ObjCResult: // FIXME: special diagnostic here?\n case DeclaratorContext::TypeName:\n case DeclaratorContext::FunctionalCast:\n case DeclaratorContext::CXXNew:\n case DeclaratorContext::AliasDecl:\n case DeclaratorContext::AliasTemplate:\n case DeclaratorContext::Member:\n case DeclaratorContext::Block:\n case DeclaratorContext::ForInit:\n case DeclaratorContext::SelectionInit:\n case DeclaratorContext::Condition:\n case DeclaratorContext::CXXCatch:\n case DeclaratorContext::ObjCCatch:\n case DeclaratorContext::BlockLiteral:\n case DeclaratorContext::LambdaExpr:\n case DeclaratorContext::ConversionId:\n case DeclaratorContext::TrailingReturn:\n case DeclaratorContext::TrailingReturnVar:\n case DeclaratorContext::TemplateArg:\n case DeclaratorContext::TemplateTypeArg:\n case DeclaratorContext::Association:\n // ...\n S.Diag(D.getEllipsisLoc(), diag::err_ellipsis_in_declarator_not_parameter);"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp:24:6: error: only function and template parameters can be parameter packs","clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp:27:7: error: only function and template parameters can be parameter packs","clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp:28:11: error: only function and template parameters can be parameter packs","clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp:30:12: error: only function and template parameters can be parameter packs","clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp:33:16: error: only function and template parameters can be parameter packs","clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp:39:9: error: only function and template parameters can be parameter packs"} } }, ["err_embedded_directive"]={ [d]="err_embedded_directive", [f]="embedding a #%0 directive within macro arguments is not supported", [b]="embedding a #A directive within macro arguments is not supported", [i]=k, [h]="embedding a \\#(.*?) directive within macro arguments is not supported", [g]=a, [e]=mb, [c]={"f2d3bc047406",1419752569,"Lex: Don\'t let annotation tokens get into macro expansion","Lex: Don\'t let annotation tokens get into macro expansion\n\nWe\'d let annotation tokens from \'#pragma pack\' and the like get inside a\nfunction-like macro. This would lead to terror and mayhem; stop the\nmadness early.\n\nThis fixes PR22037.\n\nllvm-svn: 224896"}, [j]={{"clang/lib/Lex/PPDirectives.cpp",1176,"/// HandleDirective - This callback is invoked when the lexer sees a # token\n/// at the start of a line. This consumes the directive, modifies the\n/// lexer/preprocessor state, and advances the lexer(s) so that the next token\n/// read is the correct one.\nvoid Preprocessor::HandleDirective(Token &Result) {\n // ...\n // C99 6.10.3p11: Is this preprocessor directive in macro invocation? e.g.:\n // #define A(x) #x\n // A(abc\n // #warning blah\n // def)\n // If so, the user is relying on undefined behavior, emit a diagnostic. Do\n // not support this for #include-like directives, since that can result in\n // terrible diagnostics, and does not work in GCC.\n if (InMacroArgs) {\n if (IdentifierInfo *II = Result.getIdentifierInfo()) {\n // ...\n case tok::pp_include:\n case tok::pp_import:\n case tok::pp_include_next:\n case tok::pp___include_macros:\n case tok::pp_pragma:\n Diag(Result, diag::err_embedded_directive) << II->getName();"}}, [l]={ ["clang/test/Preprocessor/macro_arg_directive.c"]={"clang/test/Preprocessor/macro_arg_directive.c:12:2: error: embedding a #pragma directive within macro arguments is not supported","clang/test/Preprocessor/macro_arg_directive.c:28:2: error: embedding a #include directive within macro arguments is not supported"} } }, ["err_empty_enum"]={ [d]="err_empty_enum", [f]="use of empty enum", [b]="use of empty enum", [i]=k, [h]="use of empty enum", [g]=a, [e]=n, [c]={"f881267db9a9",1480718311,"Mass-rename the handful of error_* diagnostics to err_*.","Mass-rename the handful of error_* diagnostics to err_*.\n\nllvm-svn: 288545"}, [j]={{p,5175,"/// ParseEnumBody - Parse a {} enclosed enumerator-list.\n/// enumerator-list:\n/// enumerator\n/// enumerator-list \',\' enumerator\n/// enumerator:\n/// enumeration-constant attributes[opt]\n/// enumeration-constant attributes[opt] \'=\' constant-expression\n/// enumeration-constant:\n/// identifier\n///\nvoid Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl) {\n // ...\n // C does not allow an empty enumerator-list, C++ does [dcl.enum].\n if (Tok.is(tok::r_brace) && !getLangOpts().CPlusPlus)\n Diag(Tok, diag::err_empty_enum);"}}, [l]={ ["clang/test/Sema/enum.c"]={"clang/test/Sema/enum.c:54:16: error: use of empty enum"} } }, ["err_empty_requires_expr"]={ [d]={{nil,H,"err_empty_requires_expr"}}, [f]={{nil,H,"a requires expression must contain at least one requirement"}}, [b]={{nil,H,"a requires expression must contain at least one requirement"}}, [i]=k, [h]="a requires expression must contain at least one requirement", [g]=a, [e]={{nil,H,n}}, [c]={"739b410f1ff5",1570627358,"Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit","Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit\n\nSee\nhttps://docs.google.com/document/d/1xMkTZMKx9llnMPgso0jrx3ankI4cv60xeZ0y4ksf4wc/preview\nfor background discussion.\n\nThis adds a warning, flags and pragmas to limit the number of\npre-processor tokens either at a certain point in a translation unit, or\noverall.\n\nThe idea is that this would allow projects to limit the size of certain\nwidely included headers, or for translation units overall, as a way to\ninsert backstops for header bloat and prevent compile-time regressions.\n\nDifferential revision: https://reviews.llvm.org/D72703"}, [j]={{O,3545,"/// ParseRequiresExpression - Parse a C++2a requires-expression.\n/// C++2a [expr.prim.req]p1\n/// A requires-expression provides a concise way to express requirements on\n/// template arguments. A requirement is one that can be checked by name\n/// lookup (6.4) or by checking properties of types and expressions.\n///\n/// requires-expression:\n/// \'requires\' requirement-parameter-list[opt] requirement-body\n///\n/// requirement-parameter-list:\n/// \'(\' parameter-declaration-clause[opt] \')\'\n///\n/// requirement-body:\n/// \'{\' requirement-seq \'}\'\n///\n/// requirement-seq:\n/// requirement\n/// requirement-seq requirement\n///\n/// requirement:\n/// simple-requirement\n/// type-requirement\n/// compound-requirement\n/// nested-requirement\nExprResult Parser::ParseRequiresExpression() {\n // ...\n if (Tok.is(tok::r_brace)) {\n // ...\n Diag(Tok, diag::err_empty_requires_expr);"}}, [l]={ ["clang/test/Parser/cxx2a-concepts-requires-expr.cpp"]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:3:24: error: a requires expression must contain at least one requirement"} } }, ["err_empty_scalar_initializer"]={ [d]="err_empty_scalar_initializer", [f]="scalar initializer cannot be empty", [b]="scalar initializer cannot be empty", [i]=k, [h]="scalar initializer cannot be empty", [g]=a, [e]=m, [c]={U,1237025389,T,W}, [j]={{R,1639,"void InitListChecker::CheckScalarType(const InitializedEntity &Entity, InitListExpr *IList, QualType DeclType, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n if (Index >= IList->getNumInits()) {\n if (!VerifyOnly) {\n if (SemaRef.getLangOpts().CPlusPlus) {\n if (DeclType->isSizelessBuiltinType())\n // ...\n else\n SemaRef.Diag(IList->getBeginLoc(), SemaRef.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_empty_scalar_initializer : diag::err_empty_scalar_initializer) << IList->getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/sizeless-1.cpp"]={"clang/test/SemaCXX/sizeless-1.cpp:99:30: error: scalar initializer cannot be empty"} } }, ["err_empty_sizeless_initializer"]={ [d]={{nil,C,"err_empty_sizeless_initializer"}}, [f]={{nil,C,"initializer for sizeless type %0 cannot be empty"}}, [b]={{nil,C,"initializer for sizeless type A cannot be empty"}}, [i]=k, [h]="initializer for sizeless type (.*?) cannot be empty", [g]=a, [e]={{nil,C,m}}, [c]={"931fcd3ba011",1576908663,"[WebAssembly] Improve clang diagnostics for wasm attributes","[WebAssembly] Improve clang diagnostics for wasm attributes\n\nThis patch addresses the review comments on r352930:\n\n - Removes redundant diagnostic checking code\n - Removes errnoneous use of diag::err_alias_is_definition, which\n turned out to be ineffective anyway since functions can be defined later\n in the translation unit and avoid detection.\n - Adds a test for various invalid cases for import_name and import_module.\n\nDifferential Revision: https://reviews.llvm.org/D59520"}, [j]={{R,1633,"void InitListChecker::CheckScalarType(const InitializedEntity &Entity, InitListExpr *IList, QualType DeclType, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n if (Index >= IList->getNumInits()) {\n if (!VerifyOnly) {\n if (SemaRef.getLangOpts().CPlusPlus) {\n if (DeclType->isSizelessBuiltinType())\n SemaRef.Diag(IList->getBeginLoc(), SemaRef.getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_empty_sizeless_initializer : diag::err_empty_sizeless_initializer) << DeclType << IList->getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/sizeless-1.cpp"]={"clang/test/SemaCXX/sizeless-1.cpp:100:36: error: initializer for sizeless type \'svint8_t\' (aka \'__SVInt8_t\') cannot be empty"} } }, ["err_enum_invalid_underlying"]={ [d]="err_enum_invalid_underlying", [f]="non-integral type %0 is an invalid underlying type", [b]="non-integral type A is an invalid underlying type", [i]=k, [h]="non\\-integral type (.*?) is an invalid underlying type", [g]=a, [e]=m, [c]={Ab,1286581827,xb,Bb}, [j]={{A,16481,"/// Check that this is a valid underlying type for an enum declaration.\nbool Sema::CheckEnumUnderlyingType(TypeSourceInfo *TI) {\n // ...\n return Diag(UnderlyingLoc, diag::err_enum_invalid_underlying) << T;"}}, [l]={ ["clang/test/SemaCXX/enum-bitfield.cpp"]={"clang/test/SemaCXX/enum-bitfield.cpp:10:12: error: non-integral type \'Z\' is an invalid underlying type"} } }, ["err_enum_mode_vector_type"]={ [d]="err_enum_mode_vector_type", [f]="mode %0 is not supported for enumeration types", [b]="mode A is not supported for enumeration types", [i]=k, [h]="mode (.*?) is not supported for enumeration types", [g]=a, [e]=m, [c]={"d9e2dcdb424f",1454421039,"Fix for PR8901: attribute \"mode\" rejected for enums and dependent types.","Fix for PR8901: attribute \"mode\" rejected for enums and dependent types.\n\nAllow \"mode\" attribute for enum types, except for vector modes, for compatibility with GCC.\nSupport \"mode\" attribute with dependent types.\n\nDifferential Revision: http://reviews.llvm.org/D16219\n\nllvm-svn: 259497"}, [j]={{tb,4808,"void Sema::AddModeAttr(Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Name, bool InInstantiation) {\n // ...\n // GCC allows \'mode\' attribute on enumeration types (even incomplete), except\n // for vector modes. So, \'enum X __attribute__((mode(QI)));\' forms a complete\n // type, \'enum { A } __attribute__((mode(V4SI)))\' is rejected.\n if ((isa<EnumDecl>(D) || OldElemTy->getAs<EnumType>()) && VectorSize.getBoolValue()) {\n Diag(AttrLoc, diag::err_enum_mode_vector_type) << Name << CI.getRange();"}}, [l]={ ["clang/test/Sema/attr-mode-enums.c"]={"clang/test/Sema/attr-mode-enums.c:12:38: error: mode \'V4QI\' is not supported for enumeration types","clang/test/Sema/attr-mode-enums.c:14:31: error: mode \'V8HI\' is not supported for enumeration types","clang/test/Sema/attr-mode-enums.c:16:34: error: mode \'V2SI\' is not supported for enumeration types","clang/test/Sema/attr-mode-enums.c:18:35: error: mode \'V4DI\' is not supported for enumeration types","clang/test/Sema/attr-mode-enums.c:20:30: error: mode \'V4QI\' is not supported for enumeration types","clang/test/Sema/attr-mode-enums.c:22:23: error: mode \'V8HI\' is not supported for enumeration types"} } }, ["err_enum_redeclare_fixed_mismatch"]={ [d]="err_enum_redeclare_fixed_mismatch", [f]="enumeration previously declared with %select{non|}0fixed underlying type", [b]={{nil,nil,{"enumeration previously declared with ",{"non",a},"fixed underlying type"}}}, [i]=k, [h]="enumeration previously declared with (?:non|)fixed underlying type", [g]=a, [e]=m, [c]={Ab,1286581827,xb,Bb}, [j]={{A,16509,"/// Check whether this is a valid redeclaration of a previous enumeration.\n/// \\return true if the redeclaration was invalid.\nbool Sema::CheckEnumRedeclaration(SourceLocation EnumLoc, bool IsScoped, QualType EnumUnderlyingTy, bool IsFixed, const EnumDecl *Prev) {\n // ...\n if (IsFixed && Prev->isFixed()) {\n // ...\n } else if (IsFixed != Prev->isFixed()) {\n Diag(EnumLoc, diag::err_enum_redeclare_fixed_mismatch) << Prev->isFixed();"}}, [l]={ ["clang/test/SemaCXX/enum-scoped.cpp"]={"clang/test/SemaCXX/enum-scoped.cpp:99:6: error: enumeration previously declared with fixed underlying type","clang/test/SemaCXX/enum-scoped.cpp:100:6: error: enumeration previously declared with fixed underlying type","clang/test/SemaCXX/enum-scoped.cpp:215:35: error: enumeration previously declared with fixed underlying type"} } }, ["err_enum_redeclare_scoped_mismatch"]={ [d]="err_enum_redeclare_scoped_mismatch", [f]="enumeration previously declared as %select{un|}0scoped", [b]={{nil,nil,{"enumeration previously declared as ",{"un",a},"scoped"}}}, [i]=k, [h]="enumeration previously declared as (?:un|)scoped", [g]=a, [e]=m, [c]={Ab,1286581827,xb,Bb}, [j]={{A,16490,"/// Check whether this is a valid redeclaration of a previous enumeration.\n/// \\return true if the redeclaration was invalid.\nbool Sema::CheckEnumRedeclaration(SourceLocation EnumLoc, bool IsScoped, QualType EnumUnderlyingTy, bool IsFixed, const EnumDecl *Prev) {\n if (IsScoped != Prev->isScoped()) {\n Diag(EnumLoc, diag::err_enum_redeclare_scoped_mismatch) << Prev->isScoped();"}}, [l]={ ["clang/test/SemaCXX/enum-scoped.cpp"]={"clang/test/SemaCXX/enum-scoped.cpp:95:6: error: enumeration previously declared as scoped","clang/test/SemaCXX/enum-scoped.cpp:96:6: error: enumeration previously declared as scoped","clang/test/SemaCXX/enum-scoped.cpp:217:35: error: enumeration previously declared as scoped"} } }, ["err_enum_redeclare_type_mismatch"]={ [d]="err_enum_redeclare_type_mismatch", [f]="enumeration redeclared with different underlying type %0 (was %1)", [b]="enumeration redeclared with different underlying type A (was B)", [i]=k, [h]="enumeration redeclared with different underlying type (.*?) \\(was (.*?)\\)", [g]=a, [e]=m, [c]={Ab,1286581827,xb,Bb}, [j]={{A,16502,"/// Check whether this is a valid redeclaration of a previous enumeration.\n/// \\return true if the redeclaration was invalid.\nbool Sema::CheckEnumRedeclaration(SourceLocation EnumLoc, bool IsScoped, QualType EnumUnderlyingTy, bool IsFixed, const EnumDecl *Prev) {\n // ...\n if (IsFixed && Prev->isFixed()) {\n if (!EnumUnderlyingTy->isDependentType() && !Prev->getIntegerType()->isDependentType() && !Context.hasSameUnqualifiedType(EnumUnderlyingTy, Prev->getIntegerType())) {\n // ...\n Diag(EnumLoc, diag::err_enum_redeclare_type_mismatch) << EnumUnderlyingTy << Prev->getIntegerType();"}}, [l]={ ["clang/test/SemaCXX/enum-scoped.cpp"]={"clang/test/SemaCXX/enum-scoped.cpp:106:6: error: enumeration redeclared with different underlying type \'short\' (was \'int\')","clang/test/SemaCXX/enum-scoped.cpp:107:6: error: enumeration redeclared with different underlying type \'short\' (was \'int\')","clang/test/SemaCXX/enum-scoped.cpp:110:12: error: enumeration redeclared with different underlying type \'short\' (was \'int\')","clang/test/SemaCXX/enum-scoped.cpp:111:12: error: enumeration redeclared with different underlying type \'short\' (was \'int\')","clang/test/SemaCXX/enum-scoped.cpp:216:41: error: enumeration redeclared with different underlying type \'char\' (was \'int\')","clang/test/SemaCXX/enum-scoped.cpp:218:41: error: enumeration redeclared with different underlying type \'char\' (was \'int\')","clang/test/SemaCXX/enum-scoped.cpp:227:34: error: enumeration redeclared with different underlying type \'short\' (was \'char\')","clang/test/SemaCXX/enum-scoped.cpp:228:33: error: enumeration redeclared with different underlying type \'short\' (was \'int\')","clang/test/SemaCXX/enum-scoped.cpp:231:41: error: enumeration redeclared with different underlying type \'int\' (was \'short\')","clang/test/SemaCXX/enum-scoped.cpp:232:41: error: enumeration redeclared with different underlying type \'short\' (was \'int\')","clang/test/SemaCXX/enum-scoped.cpp:245:10: error: enumeration redeclared with different underlying type \'int\' (was \'short\')","clang/test/SemaCXX/enum-scoped.cpp:256:16: error: enumeration redeclared with different underlying type \'int\' (was \'short\')"} } }, ["err_enum_template"]={ [d]="err_enum_template", [f]="enumeration cannot be a template", [b]="enumeration cannot be a template", [i]=k, [h]="enumeration cannot be a template", [g]=a, [e]=n, [c]={"dc70c3abc081",1267552394,"Diagnose the declaration of enum templates. Also, be a bit more","Diagnose the declaration of enum templates. Also, be a bit more\ncareful about value-dependent enumerators. Fixes PR5786.\n\nllvm-svn: 97570"}, [j]={{p,5015,"/// ParseEnumSpecifier\n/// enum-specifier: [C99 6.7.2.2]\n/// \'enum\' identifier[opt] \'{\' enumerator-list \'}\'\n///[C99/C++]\'enum\' identifier[opt] \'{\' enumerator-list \',\' \'}\'\n/// [GNU] \'enum\' attributes[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\' attributes[opt]\n/// [MS] \'enum\' __declspec[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\'\n/// \'enum\' identifier\n/// [GNU] \'enum\' attributes[opt] identifier\n///\n/// [C++11] enum-head \'{\' enumerator-list[opt] \'}\'\n/// [C++11] enum-head \'{\' enumerator-list \',\' \'}\'\n///\n/// enum-head: [C++11]\n/// enum-key attribute-specifier-seq[opt] identifier[opt] enum-base[opt]\n/// enum-key attribute-specifier-seq[opt] nested-name-specifier\n/// identifier enum-base[opt]\n///\n/// enum-key: [C++11]\n/// \'enum\'\n/// \'enum\' \'class\'\n/// \'enum\' \'struct\'\n///\n/// enum-base: [C++11]\n/// \':\' type-specifier-seq\n///\n/// [C++] elaborated-type-specifier:\n/// [C++] \'enum\' nested-name-specifier[opt] identifier\n///\nvoid Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC) {\n // ...\n if (TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate && TUK != Sema::TUK_Reference) {\n if (!getLangOpts().CPlusPlus11 || !SS.isSet()) {\n // ...\n Diag(Tok, diag::err_enum_template);"},{A,16797,"/// 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 // We only need to do this matching if we have template parameters\n // or a scope specifier, which also conveniently avoids this work\n // for non-C++ cases.\n if (TemplateParameterLists.size() > 0 || (SS.isNotEmpty() && TUK != TUK_Reference)) {\n if (TemplateParameterList *TemplateParams = MatchTemplateParametersToScopeSpecifier(KWLoc, NameLoc, SS, nullptr, TemplateParameterLists, TUK == TUK_Friend, isMemberSpecialization, Invalid)) {\n if (Kind == TTK_Enum) {\n Diag(KWLoc, diag::err_enum_template);"}}, [l]={ ["clang/test/SemaTemplate/template-decl-fail.cpp"]={"clang/test/SemaTemplate/template-decl-fail.cpp:6:9: error: enumeration cannot be a template"} } }, ["err_enumerator_does_not_exist"]={ [d]="err_enumerator_does_not_exist", [f]="enumerator %0 does not exist in instantiation of %1", [b]="enumerator A does not exist in instantiation of B", [i]=k, [h]="enumerator (.*?) does not exist in instantiation of (.*?)", [g]=a, [e]=m, [c]={"169f2190013d",1332793696,"Add a special-case diagnostic for one of the more obnoxious special cases of","Add a special-case diagnostic for one of the more obnoxious special cases of\nunscoped enumeration members: an enumerator name which is visible in the\nout-of-class definition of a member of a templated class might not actually\nexist in the instantiation of that class, if the enumeration is also lexically\ndefined outside the class definition and is explicitly specialized.\n\nDepending on the result of a CWG discussion, we may have a different resolution\nfor a class of problems in this area, but this fixes the immediate issue of a\ncrash-on-invalid / accepts-invalid (depending on +Asserts). Thanks to Johannes\nSchaub for digging into the standard wording to find how this case is currently\nspecified to behave.\n\nllvm-svn: 153461"}, [j]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",6334,"/// Find the instantiation of the given declaration within the\n/// current instantiation.\n///\n/// This routine is intended to be used when \\p D is a declaration\n/// referenced from within a template, that needs to mapped into the\n/// corresponding declaration within an instantiation. For example,\n/// given:\n///\n/// \\code\n/// template<typename T>\n/// struct X {\n/// enum Kind {\n/// KnownValue = sizeof(T)\n/// };\n///\n/// bool getKind() const { return KnownValue; }\n/// };\n///\n/// template struct X<int>;\n/// \\endcode\n///\n/// In the instantiation of X<int>::getKind(), we need to map the \\p\n/// EnumConstantDecl for \\p KnownValue (which refers to\n/// X<T>::<Kind>::KnownValue) to its instantiation (X<int>::<Kind>::KnownValue).\n/// \\p FindInstantiatedDecl performs this mapping from within the instantiation\n/// of X<int>.\nNamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, bool FindingInstantiatedContext) {\n // ...\n if (ParentDC != D->getDeclContext()) {\n // ...\n if (!Result) {\n if (isa<UsingShadowDecl>(D)) {\n // ...\n } else if (hasUncompilableErrorOccurred()) {\n // ...\n } else if (IsBeingInstantiated) {\n // ...\n } else if (EnumConstantDecl *ED = dyn_cast<EnumConstantDecl>(D)) {\n // ...\n Diag(Loc, diag::err_enumerator_does_not_exist) << D->getDeclName() << Context.getTypeDeclType(cast<TypeDecl>(Spec->getDeclContext()));"}}, [l]={ ["clang/test/SemaCXX/enum-unscoped-nonexistent.cpp"]={"clang/test/SemaCXX/enum-unscoped-nonexistent.cpp:25:61: error: enumerator \'b\' does not exist in instantiation of \'S<char>\'"} } }, ["err_enumerator_list_missing_comma"]={ [d]="err_enumerator_list_missing_comma", [f]="missing \',\' between enumerators", [b]="missing \',\' between enumerators", [i]=k, [h]="missing \',\' between enumerators", [g]=a, [e]=n, [c]={"ce66d028771d",1283871068,"Improve recovery when a comma is missing between enumerators in an","Improve recovery when a comma is missing between enumerators in an\nenumeration definition. Fixes <rdar://problem/7159693>.\n\nllvm-svn: 113201"}, [j]={{p,5232,"/// ParseEnumBody - Parse a {} enclosed enumerator-list.\n/// enumerator-list:\n/// enumerator\n/// enumerator-list \',\' enumerator\n/// enumerator:\n/// enumeration-constant attributes[opt]\n/// enumeration-constant attributes[opt] \'=\' constant-expression\n/// enumeration-constant:\n/// identifier\n///\nvoid Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl) {\n // ...\n // Parse the enumerator-list.\n while (Tok.isNot(tok::r_brace)) {\n // ...\n if (Tok.is(tok::identifier)) {\n // ...\n Diag(Loc, diag::err_enumerator_list_missing_comma) << FixItHint::CreateInsertion(Loc, \", \");"}}, [l]={ ["clang/test/FixIt/fixit.c"]={"clang/test/FixIt/fixit.c:54:6: error: missing \',\' between enumerators","clang/test/FixIt/fixit.c:55:13: error: missing \',\' between enumerators"} } }, ["err_enumerator_too_large"]={ [d]="err_enumerator_too_large", [f]="enumerator value is not representable in the underlying type %0", [b]="enumerator value is not representable in the underlying type A", [i]=k, [h]="enumerator value is not representable in the underlying type (.*?)", [g]=a, [e]=m, [c]={Ab,1286581827,xb,Bb}, [j]={{A,19297,"EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *Val) {\n // ...\n if (Val) {\n if (Enum->isDependentType() || Val->isTypeDependent() || Val->containsErrors())\n // ...\n else {\n // FIXME: We don\'t allow folding in C++11 mode for an enum with a fixed\n // underlying type, but do allow it in all other contexts.\n if (getLangOpts().CPlusPlus11 && Enum->isFixed()) {\n // ...\n } else if (!Val->isValueDependent() && !(Val = VerifyIntegerConstantExpression(Val, &EnumVal, AllowFold).get())) {\n // ...\n } else {\n if (Enum->isComplete()) {\n // ...\n // In Obj-C and Microsoft mode, require the enumeration value to be\n // representable in the underlying type of the enumeration. In C++11,\n // we perform a non-narrowing conversion as part of converted constant\n // expression checking.\n if (!isRepresentableIntegerValue(Context, EnumVal, EltTy)) {\n if (Context.getTargetInfo().getTriple().isWindowsMSVCEnvironment()) {\n // ...\n } else {\n Diag(IdLoc, diag::err_enumerator_too_large) << EltTy;"}} }, ["err_enumerator_unnamed_no_def"]={ [d]="err_enumerator_unnamed_no_def", [f]="unnamed enumeration must be a definition", [b]="unnamed enumeration must be a definition", [i]=k, [h]="unnamed enumeration must be a definition", [g]=a, [e]=n, [c]={"6cd5ae4dfa75",1298343324,"Fix a little bug in the handling of enumeration types with a fixed","Fix a little bug in the handling of enumeration types with a fixed\nunderlying type: we weren\'t parsing unnamed enumeration types with a\nfixed underlying type.\n\nllvm-svn: 126184"}, [j]={{p,5034,"/// ParseEnumSpecifier\n/// enum-specifier: [C99 6.7.2.2]\n/// \'enum\' identifier[opt] \'{\' enumerator-list \'}\'\n///[C99/C++]\'enum\' identifier[opt] \'{\' enumerator-list \',\' \'}\'\n/// [GNU] \'enum\' attributes[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\' attributes[opt]\n/// [MS] \'enum\' __declspec[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\'\n/// \'enum\' identifier\n/// [GNU] \'enum\' attributes[opt] identifier\n///\n/// [C++11] enum-head \'{\' enumerator-list[opt] \'}\'\n/// [C++11] enum-head \'{\' enumerator-list \',\' \'}\'\n///\n/// enum-head: [C++11]\n/// enum-key attribute-specifier-seq[opt] identifier[opt] enum-base[opt]\n/// enum-key attribute-specifier-seq[opt] nested-name-specifier\n/// identifier enum-base[opt]\n///\n/// enum-key: [C++11]\n/// \'enum\'\n/// \'enum\' \'class\'\n/// \'enum\' \'struct\'\n///\n/// enum-base: [C++11]\n/// \':\' type-specifier-seq\n///\n/// [C++] elaborated-type-specifier:\n/// [C++] \'enum\' nested-name-specifier[opt] identifier\n///\nvoid Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC) {\n // ...\n if (!Name && TUK != Sema::TUK_Definition) {\n Diag(Tok, diag::err_enumerator_unnamed_no_def);"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p9-0x.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p9-0x.cpp:7:18: error: unnamed enumeration must be a definition"} } }, ["err_enumerator_wrapped"]={ [d]="err_enumerator_wrapped", [f]="enumerator value %0 is not representable in the underlying type %1", [b]="enumerator value A is not representable in the underlying type B", [i]=k, [h]="enumerator value (.*?) is not representable in the underlying type (.*?)", [g]=a, [e]=m, [c]={Ab,1286581827,xb,Bb}, [j]={{A,19379,"EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *Val) {\n // ...\n if (!Val) {\n if (Enum->isDependentType())\n // ...\n else if (!LastEnumConst) {\n // ...\n } else {\n // ...\n // Check for overflow on increment.\n if (EnumVal < LastEnumConst->getInitVal()) {\n // ...\n if (T.isNull() || Enum->isFixed()) {\n // ...\n if (Enum->isFixed())\n // ...\n Diag(IdLoc, diag::err_enumerator_wrapped) << toString(EnumVal, 10) << EltTy;"}}, [l]={ ["clang/test/SemaCXX/enum-scoped.cpp"]={"clang/test/SemaCXX/enum-scoped.cpp:60:3: error: enumerator value 2147483648 is not representable in the underlying type \'int\'","clang/test/SemaCXX/enum-scoped.cpp:65:5: error: enumerator value 2 is not representable in the underlying type \'bool\'","clang/test/SemaCXX/enum-scoped.cpp:70:5: error: enumerator value 2 is not representable in the underlying type \'bool\'","clang/test/SemaCXX/enum-scoped.cpp:77:5: error: enumerator value 2 is not representable in the underlying type \'bool\'"} } }, ["err_escape_too_large"]={ [d]="err_escape_too_large", [f]="%select{hex|octal}0 escape sequence out of range", [b]={{nil,nil,{{"hex","octal"}," escape sequence out of range"}}}, [i]=k, [h]="(?:hex|octal) escape sequence out of range", [g]=a, [e]=mb, [c]={"7f5ff2175f68",1447466995,"Use %select to merge similar diagnostics. NFC","Use %select to merge similar diagnostics. NFC\n\nllvm-svn: 253119"}, [j]={{"clang/lib/Lex/Lexer.cpp",3314,"std::optional<uint32_t> Lexer::tryReadNumericUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // ...\n while (Count != NumHexDigits || Delimited) {\n // ...\n if (CodePoint & 0xF000\'0000) {\n if (Diagnose)\n Diag(KindLoc, diag::err_escape_too_large) << 0;"},{lb,242,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n // ...\n case \'x\': { // Hex escape.\n // ...\n // Check for overflow.\n if (!HadError && Overflow) { // Too many digits to fit in\n // ...\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::err_escape_too_large) << 0;"},{lb,267,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n // ...\n case \'0\':\n case \'1\':\n case \'2\':\n case \'3\':\n case \'4\':\n case \'5\':\n case \'6\':\n case \'7\': {\n // ...\n // Check for overflow. Reject \'\\777\', but not L\'\\777\'.\n if (CharWidth != 32 && (ResultChar >> CharWidth) != 0) {\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::err_escape_too_large) << 1;"},{lb,320,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n // ...\n case \'o\': {\n // ...\n // Check for overflow. Reject \'\\777\', but not L\'\\777\'.\n if (!HadError && (Overflow || (CharWidth != 32 && (ResultChar >> CharWidth) != 0))) {\n // ...\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::err_escape_too_large) << 1;"},{lb,504,"static bool ProcessNumericUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, bool &Delimited, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features, bool in_char_string_literal = false) {\n // ...\n if (Overflow) {\n if (Diags)\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, diag::err_escape_too_large) << 0;"}}, [l]={ ["clang/test/SemaCXX/static-assert.cpp"]={"clang/test/SemaCXX/static-assert.cpp:32:24: error: hex escape sequence out of range","clang/test/SemaCXX/static-assert.cpp:43:24: error: hex escape sequence out of range"} } }, ["err_event_t_addr_space_qual"]={ [d]="err_event_t_addr_space_qual", [f]="the event_t type can only be used with __private address space qualifier", [b]="the event_t type can only be used with __private address space qualifier", [i]=k, [h]="the event_t type can only be used with __private address space qualifier", [g]=a, [e]=m, [c]={"1b4fb3e08b28",1358685071,"Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenC...","Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9)\n\nllvm-svn: 172973"}, [j]={{A,7372,"/// Returns true if there hasn\'t been any invalid type diagnosed.\nstatic bool diagnoseOpenCLTypes(Sema &Se, VarDecl *NewVD) {\n // ...\n // OpenCL v1.2 s6.9.r:\n // The event type cannot be used with the __local, __constant and __global\n // address space qualifiers.\n if (R->isEventT()) {\n if (R.getAddressSpace() != LangAS::opencl_private) {\n Se.Diag(NewVD->getBeginLoc(), diag::err_event_t_addr_space_qual);"}}, [l]={ ["clang/test/SemaOpenCLCXX/template-opencl-types.clcpp"]={"clang/test/SemaOpenCLCXX/template-opencl-types.clcpp:23:3: error: the event_t type can only be used with __private address space qualifier","clang/test/SemaOpenCLCXX/template-opencl-types.clcpp:10:3: error: the event_t type can only be used with __private address space qualifier"} } }, ["err_except_spec_unparsed"]={ [d]="err_except_spec_unparsed", [f]="unexpected end of exception specification", [b]="unexpected end of exception specification", [i]=k, [h]="unexpected end of exception specification", [g]=a, [e]=n, [c]={"433e05306fa0",1334600847,"Implement the last part of C++ [class.mem]p2, delaying the parsing of","Implement the last part of C++ [class.mem]p2, delaying the parsing of\nexception specifications on member functions until after the closing\n\'}\' for the containing class. This allows, for example, a member\nfunction to throw an instance of its own class. Fixes PR12564 and a\nfairly embarassing oversight in our C++98/03 support.\n\nllvm-svn: 154844"}, [j]={{bb,495,"void Parser::ParseLexedMethodDeclaration(LateParsedMethodDeclaration &LM) {\n // ...\n // Parse a delayed exception-specification, if there is one.\n if (CachedTokens *Toks = LM.ExceptionSpecTokens) {\n // ...\n if (Tok.isNot(tok::eof) || Tok.getEofData() != LM.Method)\n Diag(Tok.getLocation(), diag::err_except_spec_unparsed);"}} }, ["err_exception_spec_cycle"]={ [d]="err_exception_spec_cycle", [f]="exception specification of %0 uses itself", [b]="exception specification of A uses itself", [i]=k, [h]="exception specification of (.*?) uses itself", [g]=a, [e]=m, [c]={"54f18e8a8570",1472609721,"PR12298 et al: don\'t recursively instantiate a template specialization from","PR12298 et al: don\'t recursively instantiate a template specialization from\nwithin the instantiation of that same specialization. This could previously\nhappen for eagerly-instantiated function templates, variable templates,\nexception specifications, default arguments, and a handful of other cases.\n\nWe still have an issue here for default template arguments that recursively\nmake use of themselves and likewise for substitution into the type of a\nnon-type template parameter, but in those cases we\'re producing a different\nentity each time, so they should instead be caught by the instantiation depth\nlimit. However, currently we will typically run out of stack before we reach\nit. :(\n\nllvm-svn: 280190"}, [j]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",4630,"void Sema::InstantiateExceptionSpec(SourceLocation PointOfInstantiation, FunctionDecl *Decl) {\n // ...\n if (Inst.isAlreadyInstantiating()) {\n // ...\n Diag(PointOfInstantiation, diag::err_exception_spec_cycle) << Decl;"}}, [l]={ ["clang/test/SemaTemplate/instantiate-self.cpp"]={"clang/test/SemaTemplate/instantiate-self.cpp:103:32: error: exception specification of \'f\' uses itself"} } }, ["err_exception_spec_in_typedef"]={ [d]="err_exception_spec_in_typedef", [f]="exception specifications are not allowed in %select{typedefs|type aliases}0", [b]={{nil,nil,{"exception specifications are not allowed in ",{"typedefs","type aliases"}}}}, [i]=k, [h]="exception specifications are not allowed in (?:typedefs|type aliases)", [g]=a, [e]=m, [c]={"fb3f1794e112",1243770447,"Disallow exception specs on typedefs.","Disallow exception specs on typedefs.\n\nllvm-svn: 72664"}, [j]={{"clang/lib/Sema/SemaType.cpp",5419,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // Exception specs are not allowed in typedefs. Complain, but add it\n // anyway.\n if (IsTypedefName && FTI.getExceptionSpecType() && !LangOpts.CPlusPlus17)\n S.Diag(FTI.getExceptionSpecLocBeg(), diag::err_exception_spec_in_typedef) << (D.getContext() == DeclaratorContext::AliasDecl || D.getContext() == DeclaratorContext::AliasTemplate);"}}, [l]={ ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:17:25: error: exception specifications are not allowed in type aliases"} } }, ["err_exception_spec_incomplete_type"]={ [d]={{nil,J,"err_exception_spec_incomplete_type"}}, [f]={{nil,J,"exception specification needed for member of incomplete class %0"}}, [b]={{nil,J,"exception specification needed for member of incomplete class A"}}, [i]=k, [h]="exception specification needed for member of incomplete class (.*?)", [g]=a, [e]={{nil,J,m}}, [c]={"5159bbad8b2b",1536186637,"PR38627: Fix handling of exception specification adjustment for","PR38627: Fix handling of exception specification adjustment for\ndestructors.\n\nWe previously tried to patch up the exception specification after\ncompleting the class, which went wrong when the exception specification\nwas needed within the class body (in particular, by a friend\nredeclaration of the destructor in a nested class). We now mark the\ndestructor as having a not-yet-computed exception specification\nimmediately after creating it.\n\nThis requires delaying various checks against the exception\nspecification (where we\'d previously have just got the wrong exception\nspecification, and now find we have an exception specification that we\ncan\'t compute yet) when those checks fire while the class is being\ndefined.\n\nThis also exposed an issue that we were missing a CodeSynthesisContext\nfor computation of exception specifications (otherwise we\'d fail to make\nthe module containing the definition of the class visible when computing\nits members\' exception specs). Adding that incidentally also gives us a\ndiagnostic quality improvement.\n\nThis has also exposed an pre-existing problem: making the exception\nspecification evaluation context a non-SFINAE context (as it should be)\nresults in a bootstrap failure; PR38850 filed for this.\n\nllvm-svn: 341499"}, [j]={{Q,13582,"static Sema::ImplicitExceptionSpecification ComputeDefaultedSpecialMemberExceptionSpec(Sema &S, SourceLocation Loc, CXXMethodDecl *MD, Sema::CXXSpecialMember CSM, Sema::InheritedConstructorInfo *ICI) {\n // ...\n if (S.RequireCompleteType(MD->getLocation(), S.Context.getRecordType(ClassDecl), diag::err_exception_spec_incomplete_type))"}} }, ["err_exception_spec_not_parsed"]={ [d]="err_exception_spec_not_parsed", [f]="exception specification is not available until end of class definition", [b]="exception specification is not available until end of class definition", [i]=k, [h]="exception specification is not available until end of class definition", [g]=a, [e]=m, [c]={"0b3a46247edb",1415908917,"PR21437, final part of DR1330: delay-parsing of exception-specifications. This","PR21437, final part of DR1330: delay-parsing of exception-specifications. This\nis a re-commit of Doug\'s r154844 (modernized and updated to fit into current\nClang).\n\nllvm-svn: 221918"}, [j]={{"clang/lib/Sema/SemaExceptionSpec.cpp",219,"const FunctionProtoType *Sema::ResolveExceptionSpec(SourceLocation Loc, const FunctionProtoType *FPT) {\n if (FPT->getExceptionSpecType() == EST_Unparsed) {\n Diag(Loc, diag::err_exception_spec_not_parsed);"},{"clang/lib/Sema/SemaExceptionSpec.cpp",243,"const FunctionProtoType *Sema::ResolveExceptionSpec(SourceLocation Loc, const FunctionProtoType *FPT) {\n // ...\n if (Proto->getExceptionSpecType() == clang::EST_Unparsed) {\n Diag(Loc, diag::err_exception_spec_not_parsed);"}}, [l]={ ["clang/test/SemaCXX/implicit-exception-spec.cpp"]={"clang/test/SemaCXX/implicit-exception-spec.cpp:52:7: error: exception specification is not available until end of class definition"} } }, ["err_exceptions_disabled"]={ [d]="err_exceptions_disabled", [f]="cannot use \'%0\' with exceptions disabled", [b]="cannot use \'A\' with exceptions disabled", [i]=k, [h]="cannot use \'(.*?)\' with exceptions disabled", [g]=a, [e]=m, [c]={"68b36aff4676",1298143604,"Disallow try/catch/throw when exceptions are disabled.","Disallow try/catch/throw when exceptions are disabled.\n\nllvm-svn: 126039"}, [j]={{"clang/lib/Sema/SemaExprCXX.cpp",875,"ExprResult Sema::BuildCXXThrow(SourceLocation OpLoc, Expr *Ex, bool IsThrownVarInScope) {\n // Don\'t report an error if \'throw\' is used in system headers.\n if (!getLangOpts().CXXExceptions && !getSourceManager().isInSystemHeader(OpLoc) && !getLangOpts().CUDA) {\n // ...\n targetDiag(OpLoc, diag::err_exceptions_disabled) << \"throw\";"},{V,4479,"/// ActOnCXXTryBlock - Takes a try compound-statement and a number of\n/// handlers and creates a try statement from them.\nStmtResult Sema::ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock, ArrayRef<Stmt *> Handlers) {\n // Don\'t report an error if \'try\' is used in system headers.\n if (!getLangOpts().CXXExceptions && !getSourceManager().isInSystemHeader(TryLoc) && !getLangOpts().CUDA) {\n // ...\n targetDiag(TryLoc, diag::err_exceptions_disabled) << \"try\";"}}, [l]={ ["clang/test/SemaCXX/no-exceptions.cpp"]={"clang/test/SemaCXX/no-exceptions.cpp:25:3: error: cannot use \'throw\' with exceptions disabled","clang/test/SemaCXX/no-exceptions.cpp:29:3: error: cannot use \'try\' with exceptions disabled"} } }, ["err_excess_initializers"]={ [d]="err_excess_initializers", [f]="excess elements in %select{array|vector|scalar|union|struct}0 initializer", [b]={{nil,nil,{"excess elements in ",{"array","vector","scalar","union","struct"}," initializer"}}}, [i]=k, [h]="excess elements in (?:array|vector|scalar|union|struct) initializer", [g]=a, [e]=m, [c]={U,1237025389,T,W}, [j]={{R,1288,"/// Check whether the initializer \\p IList (that was written with explicit\n/// braces) can be used to initialize an object of type \\p T.\n///\n/// This also fills in \\p StructuredList with the fully-braced, desugared\n/// form of the initialization.\nvoid InitListChecker::CheckExplicitInitList(const InitializedEntity &Entity, InitListExpr *IList, QualType &T, InitListExpr *StructuredList, bool TopLevelObject) {\n // ...\n // Don\'t complain for incomplete types, since we\'ll get an error elsewhere.\n if (Index < IList->getNumInits() && !T->isIncompleteType()) {\n // ...\n if (VerifyOnly) {\n // ...\n } else if (StructuredIndex == 1 && IsStringInit(StructuredList->getInit(0), T, SemaRef.Context) == SIF_None) {\n // ...\n } else if (T->isSizelessBuiltinType()) {\n // ...\n } else {\n // ...\n unsigned DK = ExtraInitsIsError ? diag::err_excess_initializers : diag::ext_excess_initializers;"},{R,5638,"static void TryOrBuildParenListInitialization(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args, InitializationSequence &Sequence, bool VerifyOnly, ExprResult *Result = nullptr) {\n // ...\n // Not all of the args have been processed, so there must\'ve been more args\n // than were required to initialize the element.\n if (EntityIndexToProcess < Args.size()) {\n // ...\n if (!VerifyOnly) {\n // ...\n S.Diag(Kind.getLocation(), diag::err_excess_initializers) << InitKind << ExcessInitSR;"},{R,9817,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_TooManyInitsForScalar: {\n // ...\n if (Kind.isCStyleOrFunctionalCast())\n // ...\n else\n S.Diag(Kind.getLocation(), diag::err_excess_initializers) << /*scalar=*/2 << R;"}}, [l]={ ["clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl"]={"clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:12:39: error: excess elements in vector initializer","clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:13:42: error: excess elements in vector initializer","clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:15:52: error: excess elements in vector initializer"} } }, ["err_excess_initializers_for_sizeless_type"]={ [d]={{nil,C,"err_excess_initializers_for_sizeless_type"}}, [f]={{nil,C,"excess elements in initializer for indivisible sizeless type %0"}}, [b]={{nil,C,"excess elements in initializer for indivisible sizeless type A"}}, [i]=k, [h]="excess elements in initializer for indivisible sizeless type (.*?)", [g]=a, [e]={{nil,C,m}}, [c]={"931fcd3ba011",1576908663,"[WebAssembly] Improve clang diagnostics for wasm attributes","[WebAssembly] Improve clang diagnostics for wasm attributes\n\nThis patch addresses the review comments on r352930:\n\n - Removes redundant diagnostic checking code\n - Removes errnoneous use of diag::err_alias_is_definition, which\n turned out to be ineffective anyway since functions can be defined later\n in the translation unit and avoid detection.\n - Adds a test for various invalid cases for import_name and import_module.\n\nDifferential Revision: https://reviews.llvm.org/D59520"}, [j]={{R,1277,"/// Check whether the initializer \\p IList (that was written with explicit\n/// braces) can be used to initialize an object of type \\p T.\n///\n/// This also fills in \\p StructuredList with the fully-braced, desugared\n/// form of the initialization.\nvoid InitListChecker::CheckExplicitInitList(const InitializedEntity &Entity, InitListExpr *IList, QualType &T, InitListExpr *StructuredList, bool TopLevelObject) {\n // ...\n // Don\'t complain for incomplete types, since we\'ll get an error elsewhere.\n if (Index < IList->getNumInits() && !T->isIncompleteType()) {\n // ...\n if (VerifyOnly) {\n // ...\n } else if (StructuredIndex == 1 && IsStringInit(StructuredList->getInit(0), T, SemaRef.Context) == SIF_None) {\n // ...\n } else if (T->isSizelessBuiltinType()) {\n unsigned DK = ExtraInitsIsError ? diag::err_excess_initializers_for_sizeless_type : diag::ext_excess_initializers_for_sizeless_type;"}}, [l]={ ["clang/test/SemaCXX/sizeless-1.cpp"]={"clang/test/SemaCXX/sizeless-1.cpp:103:49: error: excess elements in initializer for indivisible sizeless type \'svint8_t\' (aka \'__SVInt8_t\')","clang/test/SemaCXX/sizeless-1.cpp:422:46: error: excess elements in initializer for indivisible sizeless type \'svint8_t\' (aka \'__SVInt8_t\')"} } }, ["err_excess_initializers_in_char_array_initializer"]={ [d]="err_excess_initializers_in_char_array_initializer", [f]="excess elements in char array initializer", [b]="excess elements in char array initializer", [i]=k, [h]="excess elements in char array initializer", [g]=a, [e]=m, [c]={U,1237025389,T,W}, [j]={{R,1271,"/// Check whether the initializer \\p IList (that was written with explicit\n/// braces) can be used to initialize an object of type \\p T.\n///\n/// This also fills in \\p StructuredList with the fully-braced, desugared\n/// form of the initialization.\nvoid InitListChecker::CheckExplicitInitList(const InitializedEntity &Entity, InitListExpr *IList, QualType &T, InitListExpr *StructuredList, bool TopLevelObject) {\n // ...\n // Don\'t complain for incomplete types, since we\'ll get an error elsewhere.\n if (Index < IList->getNumInits() && !T->isIncompleteType()) {\n // ...\n if (VerifyOnly) {\n // ...\n } else if (StructuredIndex == 1 && IsStringInit(StructuredList->getInit(0), T, SemaRef.Context) == SIF_None) {\n unsigned DK = ExtraInitsIsError ? diag::err_excess_initializers_in_char_array_initializer : diag::ext_excess_initializers_in_char_array_initializer;"}} }, ["err_expected"]={ [d]="err_expected", [f]="expected %0", [b]="expected A", [i]=k, [h]="expected (.*?)", [g]=a, [e]=n, [c]={"ec543279db99",1387878510,"Support and use token kinds as diagnostic arguments","Support and use token kinds as diagnostic arguments\n\nIntroduce proper facilities to render token spellings using the diagnostic\nformatter.\n\nReplaces most of the hard-coded diagnostic messages related to expected tokens,\nwhich all shared the same semantics but had to be multiply defined due to\nvariations in token order or quote marks.\n\nThe associated parser changes are largely mechanical but they expose\ncommonality in whole chunks of the parser that can now be factored away.\n\nThis commit uses C++11 typed enums along with a speculative legacy fallback\nuntil the transition is complete.\n\nRequires corresponding changes in LLVM r197895.\n\nllvm-svn: 197972"}, [j]={ [1]={lb,352,"/// ProcessCharEscape - Parse a standard C escape sequence, which can occur in\n/// either a character or a string literal.\nstatic unsigned ProcessCharEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, bool &HadError, FullSourceLoc Loc, unsigned CharWidth, DiagnosticsEngine *Diags, const LangOptions &Features, StringLiteralEvalMethod EvalMethod) {\n // ...\n if (Delimited && Diags) {\n if (!EndDelimiterFound)\n Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, diag::err_expected) << tok::r_brace;"}, [2]={lb,512,"static bool ProcessNumericUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, bool &Delimited, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features, bool in_char_string_literal = false) {\n // ...\n if (Delimited && !EndDelimiterFound) {\n if (Diags) {\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, diag::err_expected) << tok::r_brace;"}, [3]={"clang/lib/Lex/PPExpressions.cpp",815,"/// EvaluateDirectiveSubExpr - Evaluate the subexpression whose first token is\n/// PeekTok, and whose precedence is PeekPrec. This returns the result in LHS.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation, such as division by zero warnings.\nstatic bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, Token &PeekTok, bool ValueLive, bool &IncludedUndefinedIds, Preprocessor &PP) {\n // ...\n while (true) {\n // ...\n case tok::question: {\n // Parse the : part of the expression.\n if (PeekTok.isNot(tok::colon)) {\n PP.Diag(PeekTok.getLocation(), diag::err_expected) << tok::colon << LHS.getRange() << RHS.getRange();"}, [4]={nb,892,"void Preprocessor::HandlePragmaHdrstop(Token &Tok) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::err_expected) << tok::r_paren;"}, [5]={nb,2014,"/// This handles parsing pragmas that take a macro name and optional message\nstatic IdentifierInfo *HandleMacroAnnotationPragma(Preprocessor &PP, Token &Tok, const char *Pragma, std::string &MessageString) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok, diag::err_expected) << \"(\";"}, [6]={nb,2020,"/// This handles parsing pragmas that take a macro name and optional message\nstatic IdentifierInfo *HandleMacroAnnotationPragma(Preprocessor &PP, Token &Tok, const char *Pragma, std::string &MessageString) {\n // ...\n if (!Tok.is(tok::identifier)) {\n PP.Diag(Tok, diag::err_expected) << tok::identifier;"}, [7]={nb,2039,"/// This handles parsing pragmas that take a macro name and optional message\nstatic IdentifierInfo *HandleMacroAnnotationPragma(Preprocessor &PP, Token &Tok, const char *Pragma, std::string &MessageString) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok, diag::err_expected) << \")\";"}, [8]={nb,2102,"/// \"\\#pragma clang final(...)\"\n///\n/// The syntax is\n/// \\code\n/// #pragma clang final(MACRO_NAME)\n/// \\endcode\nstruct PragmaFinalHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok, diag::err_expected) << \"(\";"}, [9]={nb,2108,"/// \"\\#pragma clang final(...)\"\n///\n/// The syntax is\n/// \\code\n/// #pragma clang final(MACRO_NAME)\n/// \\endcode\nstruct PragmaFinalHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (!Tok.is(tok::identifier)) {\n PP.Diag(Tok, diag::err_expected) << tok::identifier;"}, [10]={nb,2120,"/// \"\\#pragma clang final(...)\"\n///\n/// The syntax is\n/// \\code\n/// #pragma clang final(MACRO_NAME)\n/// \\endcode\nstruct PragmaFinalHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok, diag::err_expected) << \")\";"}, [11]={"clang/lib/Lex/Preprocessor.cpp",1037,"/// Lex a header-name token (including one formed from header-name-tokens if\n/// \\p AllowConcatenation is \\c true).\n///\n/// \\param FilenameTok Filled in with the next token. On success, this will\n/// be either a header_name token. On failure, it will be whatever other\n/// token was found instead.\n/// \\param AllowMacroExpansion If \\c true, allow the header name to be formed\n/// by macro expansion (concatenating tokens as necessary if the first\n/// token is a \'<\').\n/// \\return \\c true if we reached EOD or EOF while looking for a > token in\n/// a concatenated header name and diagnosed it. \\c false otherwise.\nbool Preprocessor::LexHeaderName(Token &FilenameTok, bool AllowMacroExpansion) {\n // ...\n if (FilenameTok.is(tok::less) && AllowMacroExpansion) {\n // ...\n // Consume tokens until we find a \'>\'.\n // FIXME: A header-name could be formed starting or ending with an\n // alternative token. It\'s not clear whether that\'s ill-formed in all\n // cases.\n while (FilenameTok.isNot(tok::greater)) {\n // ...\n if (FilenameTok.isOneOf(tok::eod, tok::eof)) {\n Diag(FilenameTok.getLocation(), diag::err_expected) << tok::greater;"}, [12]={bb,925,"/// Consume tokens and store them in the passed token container until\n/// we\'ve passed the try keyword and constructor initializers and have consumed\n/// the opening brace of the function body. The opening brace will be consumed\n/// if and only if there was no error.\n///\n/// \\return True on error.\nbool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens &Toks) {\n // ...\n if (Tok.isNot(tok::colon)) {\n // ...\n if (Tok.isNot(tok::l_brace))\n return Diag(Tok.getLocation(), diag::err_expected) << tok::l_brace;"}, [13]={bb,958,"/// Consume tokens and store them in the passed token container until\n/// we\'ve passed the try keyword and constructor initializers and have consumed\n/// the opening brace of the function body. The opening brace will be consumed\n/// if and only if there was no error.\n///\n/// \\return True on error.\nbool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens &Toks) {\n // ...\n while (true) {\n // Skip over the mem-initializer-id, if possible.\n if (Tok.is(tok::kw_decltype)) {\n // ...\n if (!ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/true)) {\n Diag(Tok.getLocation(), diag::err_expected) << tok::r_paren;"}, [14]={bb,1014,"/// Consume tokens and store them in the passed token container until\n/// we\'ve passed the try keyword and constructor initializers and have consumed\n/// the opening brace of the function body. The opening brace will be consumed\n/// if and only if there was no error.\n///\n/// \\return True on error.\nbool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens &Toks) {\n // ...\n while (true) {\n // ...\n if (MightBeTemplateArgument) {\n // We may be inside a template argument list. Grab up to the start of the\n // next parenthesized initializer or braced-init-list. This *might* be the\n // initializer, or it might be a subexpression in the template argument\n // list.\n // FIXME: Count angle brackets, and clear MightBeTemplateArgument\n // if all angles are closed.\n if (!ConsumeAndStoreUntil(tok::l_paren, tok::l_brace, Toks,\n // ...\n return Diag(Tok.getLocation(), diag::err_expected) << tok::l_brace;"}, [15]={bb,1022,"/// Consume tokens and store them in the passed token container until\n/// we\'ve passed the try keyword and constructor initializers and have consumed\n/// the opening brace of the function body. The opening brace will be consumed\n/// if and only if there was no error.\n///\n/// \\return True on error.\nbool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens &Toks) {\n // ...\n while (true) {\n // ...\n if (MightBeTemplateArgument) {\n // ...\n } else if (Tok.isNot(tok::l_paren) && Tok.isNot(tok::l_brace)) {\n // We found something weird in a mem-initializer-id.\n if (getLangOpts().CPlusPlus11)\n // ...\n else\n return Diag(Tok.getLocation(), diag::err_expected) << tok::l_paren;"}, [16]={bb,1066,"/// Consume tokens and store them in the passed token container until\n/// we\'ve passed the try keyword and constructor initializers and have consumed\n/// the opening brace of the function body. The opening brace will be consumed\n/// if and only if there was no error.\n///\n/// \\return True on error.\nbool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens &Toks) {\n // ...\n while (true) {\n // ...\n if (!ConsumeAndStoreUntil(CloseKind, Toks, /*StopAtSemi=*/true)) {\n Diag(Tok, diag::err_expected) << CloseKind;"}, [17]={p,1140,"/// Parse the contents of the \"availability\" attribute.\n///\n/// availability-attribute:\n/// \'availability\' \'(\' platform \',\' opt-strict version-arg-list,\n/// opt-replacement, opt-message\')\'\n///\n/// platform:\n/// identifier\n///\n/// opt-strict:\n/// \'strict\' \',\'\n///\n/// version-arg-list:\n/// version-arg\n/// version-arg \',\' version-arg-list\n///\n/// version-arg:\n/// \'introduced\' \'=\' version\n/// \'deprecated\' \'=\' version\n/// \'obsoleted\' = version\n/// \'unavailable\'\n/// opt-replacement:\n/// \'replacement\' \'=\' <string>\n/// opt-message:\n/// \'message\' \'=\' <string>\nvoid Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, SourceLocation AvailabilityLoc, ParsedAttributes &attrs, SourceLocation *endLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n if (T.consumeOpen()) {\n Diag(Tok, diag::err_expected) << tok::l_paren;"}, [18]={p,1494,"/// Parse the contents of the \"objc_bridge_related\" attribute.\n/// objc_bridge_related \'(\' related_class \',\' opt-class_method \',\' opt-instance_method \')\'\n/// related_class:\n/// Identifier\n///\n/// opt-class_method:\n/// Identifier: | <empty>\n///\n/// opt-instance_method:\n/// Identifier | <empty>\n///\nvoid Parser::ParseObjCBridgeRelatedAttribute(IdentifierInfo &ObjCBridgeRelated, SourceLocation ObjCBridgeRelatedLoc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n if (T.consumeOpen()) {\n Diag(Tok, diag::err_expected) << tok::l_paren;"}, [19]={p,1526,"/// Parse the contents of the \"objc_bridge_related\" attribute.\n/// objc_bridge_related \'(\' related_class \',\' opt-class_method \',\' opt-instance_method \')\'\n/// related_class:\n/// Identifier\n///\n/// opt-class_method:\n/// Identifier: | <empty>\n///\n/// opt-instance_method:\n/// Identifier | <empty>\n///\nvoid Parser::ParseObjCBridgeRelatedAttribute(IdentifierInfo &ObjCBridgeRelated, SourceLocation ObjCBridgeRelatedLoc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n if (!TryConsumeToken(tok::comma)) {\n if (Tok.is(tok::colon))\n // ...\n else\n Diag(Tok, diag::err_expected) << tok::comma;"}, [20]={p,1537,"/// Parse the contents of the \"objc_bridge_related\" attribute.\n/// objc_bridge_related \'(\' related_class \',\' opt-class_method \',\' opt-instance_method \')\'\n/// related_class:\n/// Identifier\n///\n/// opt-class_method:\n/// Identifier: | <empty>\n///\n/// opt-instance_method:\n/// Identifier | <empty>\n///\nvoid Parser::ParseObjCBridgeRelatedAttribute(IdentifierInfo &ObjCBridgeRelated, SourceLocation ObjCBridgeRelatedLoc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n if (Tok.is(tok::identifier))\n // ...\n else if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::err_expected) << tok::r_paren;"}, [21]={p,1564,"void Parser::ParseSwiftNewTypeAttribute(IdentifierInfo &AttrName, SourceLocation AttrNameLoc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n // Opening \'(\'\n if (T.consumeOpen()) {\n Diag(Tok, diag::err_expected) << tok::l_paren;"}, [22]={p,1607,"void Parser::ParseTypeTagForDatatypeAttribute(IdentifierInfo &AttrName, SourceLocation AttrNameLoc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [23]={p,1629,"void Parser::ParseTypeTagForDatatypeAttribute(IdentifierInfo &AttrName, SourceLocation AttrNameLoc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n while (TryConsumeToken(tok::comma)) {\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [24]={p,3819,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::annot_template_id: {\n // ...\n if (TemplateId->Kind == TNK_Concept_template) {\n // ...\n if (TryConsumeToken(tok::kw_decltype)) {\n // ...\n if (Tracker.consumeOpen()) {\n // ...\n Diag(Tok, diag::err_expected) << tok::l_paren;"}, [25]={p,4701,"/// ParseStructUnionBody\n/// struct-contents:\n/// struct-declaration-list\n/// [EXT] empty\n/// [GNU] \"struct-declaration-list\" without terminating \';\'\n/// struct-declaration-list:\n/// struct-declaration\n/// struct-declaration-list struct-declaration\n/// [OBC] \'@\' \'defs\' \'(\' class-name \')\'\n///\nvoid Parser::ParseStructUnionBody(SourceLocation RecordLoc, DeclSpec::TST TagType, RecordDecl *TagDecl) {\n // ...\n // While we still have something to read, read the declarations in the struct.\n while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) {\n // ...\n if (!Tok.is(tok::at)) {\n // ...\n } else { // Handle @defs\n // ...\n if (!Tok.is(tok::identifier)) {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [26]={p,4838,"/// ParseEnumSpecifier\n/// enum-specifier: [C99 6.7.2.2]\n/// \'enum\' identifier[opt] \'{\' enumerator-list \'}\'\n///[C99/C++]\'enum\' identifier[opt] \'{\' enumerator-list \',\' \'}\'\n/// [GNU] \'enum\' attributes[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\' attributes[opt]\n/// [MS] \'enum\' __declspec[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\'\n/// \'enum\' identifier\n/// [GNU] \'enum\' attributes[opt] identifier\n///\n/// [C++11] enum-head \'{\' enumerator-list[opt] \'}\'\n/// [C++11] enum-head \'{\' enumerator-list \',\' \'}\'\n///\n/// enum-head: [C++11]\n/// enum-key attribute-specifier-seq[opt] identifier[opt] enum-base[opt]\n/// enum-key attribute-specifier-seq[opt] nested-name-specifier\n/// identifier enum-base[opt]\n///\n/// enum-key: [C++11]\n/// \'enum\'\n/// \'enum\' \'class\'\n/// \'enum\' \'struct\'\n///\n/// enum-base: [C++11]\n/// \':\' type-specifier-seq\n///\n/// [C++] elaborated-type-specifier:\n/// [C++] \'enum\' nested-name-specifier[opt] identifier\n///\nvoid Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n if (Spec.isSet() && Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [27]={p,5187,"/// ParseEnumBody - Parse a {} enclosed enumerator-list.\n/// enumerator-list:\n/// enumerator\n/// enumerator-list \',\' enumerator\n/// enumerator:\n/// enumeration-constant attributes[opt]\n/// enumeration-constant attributes[opt] \'=\' constant-expression\n/// enumeration-constant:\n/// identifier\n///\nvoid Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl) {\n // ...\n // Parse the enumerator-list.\n while (Tok.isNot(tok::r_brace)) {\n // Parse enumerator. If failed, try skipping till the start of the next\n // enumerator definition.\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok.getLocation(), diag::err_expected) << tok::identifier;"}, [28]={p,6752,"void Parser::ParseDecompositionDeclarator(Declarator &D) {\n // ...\n while (Tok.isNot(tok::r_square)) {\n if (!Bindings.empty()) {\n if (Tok.is(tok::comma))\n // ...\n else {\n if (Tok.is(tok::identifier)) {\n // ...\n Diag(EndLoc, diag::err_expected) << tok::comma << FixItHint::CreateInsertion(EndLoc, \",\");"}, [29]={p,6768,"void Parser::ParseDecompositionDeclarator(Declarator &D) {\n // ...\n while (Tok.isNot(tok::r_square)) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [30]={p,7226,"/// ParseFunctionDeclaratorIdentifierList - While parsing a function declarator\n/// we found a K&R-style identifier list instead of a typed parameter list.\n///\n/// After returning, ParamInfo will hold the parsed parameters.\n///\n/// identifier-list: [C99 6.7.5]\n/// identifier\n/// identifier-list \',\' identifier\n///\nvoid Parser::ParseFunctionDeclaratorIdentifierList(Declarator &D, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo) {\n // ...\n do {\n // If this isn\'t an identifier, report the error and skip until \')\'.\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [31]={r,138,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n // ...\n if (Tok.is(tok::equal)) {\n if (!Ident) {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [32]={r,155,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n // ...\n if (T.consumeOpen()) {\n if (Ident)\n Diag(Tok, diag::err_expected) << tok::l_brace;"}, [33]={r,988,"/// ParseStaticAssertDeclaration - Parse C++0x or C11 static_assert-declaration.\n///\n/// [C++0x] static_assert-declaration:\n/// static_assert ( constant-expression , string-literal ) ;\n///\n/// [C11] static_assert-declaration:\n/// _Static_assert ( constant-expression , string-literal ) ;\n///\nDecl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd) {\n // ...\n if (T.consumeOpen()) {\n Diag(Tok, diag::err_expected) << tok::l_paren;"}, [34]={r,1715,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n if (Spec.isSet())\n if (Tok.isNot(tok::identifier) && Tok.isNot(tok::annot_template_id)) {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [35]={r,3392,"Parser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclarationWithPragmas(AccessSpecifier &AS, ParsedAttributes &AccessAttrs, DeclSpec::TST TagType, Decl *TagDecl) {\n // ...\n case tok::kw_public:\n case tok::kw_protected: {\n // ...\n if (TryConsumeToken(tok::colon, EndLoc)) {\n } else if (TryConsumeToken(tok::semi, EndLoc)) {\n Diag(EndLoc, diag::err_expected) << tok::colon << FixItHint::CreateReplacement(EndLoc, \":\");"}, [36]={r,3396,"Parser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclarationWithPragmas(AccessSpecifier &AS, ParsedAttributes &AccessAttrs, DeclSpec::TST TagType, Decl *TagDecl) {\n // ...\n case tok::kw_public:\n case tok::kw_protected: {\n // ...\n if (TryConsumeToken(tok::colon, EndLoc)) {\n } else if (TryConsumeToken(tok::semi, EndLoc)) {\n // ...\n } else {\n // ...\n Diag(EndLoc, diag::err_expected) << tok::colon << FixItHint::CreateInsertion(EndLoc, \":\");"}, [37]={r,3891,"/// ParseMemInitializer - Parse a C++ member initializer, which is\n/// part of a constructor initializer that explicitly initializes one\n/// member or base class (C++ [class.base.init]). See\n/// ParseConstructorInitializer for an example.\n///\n/// [C++] mem-initializer:\n/// mem-initializer-id \'(\' expression-list[opt] \')\'\n/// [C++0x] mem-initializer-id braced-init-list\n///\n/// [C++] mem-initializer-id:\n/// \'::\'[opt] nested-name-specifier[opt] class-name\n/// identifier\nMemInitResult Parser::ParseMemInitializer(Decl *ConstructorDecl) {\n // ...\n if (getLangOpts().CPlusPlus11)\n // ...\n else\n return Diag(Tok, diag::err_expected) << tok::l_paren;"}, [38]={r,4297,"void Parser::ParseOpenMPAttributeArgs(IdentifierInfo *AttrName, CachedTokens &OpenMPTokens) {\n // ...\n if (T.consumeOpen()) {\n Diag(Tok, diag::err_expected) << tok::l_paren;"}, [39]={r,4546,"/// Parse a C++11 or C2x attribute-specifier.\n///\n/// [C++11] attribute-specifier:\n/// \'[\' \'[\' attribute-list \']\' \']\'\n/// alignment-specifier\n///\n/// [C++11] attribute-list:\n/// attribute[opt]\n/// attribute-list \',\' attribute[opt]\n/// attribute \'...\'\n/// attribute-list \',\' attribute \'...\'\n///\n/// [C++11] attribute:\n/// attribute-token attribute-argument-clause[opt]\n///\n/// [C++11] attribute-token:\n/// identifier\n/// attribute-scoped-token\n///\n/// [C++11] attribute-scoped-token:\n/// attribute-namespace \'::\' identifier\n///\n/// [C++11] attribute-namespace:\n/// identifier\nvoid Parser::ParseCXX11AttributeSpecifierInternal(ParsedAttributes &Attrs, CachedTokens &OpenMPTokens, SourceLocation *EndLoc) {\n // ...\n if (Tok.is(tok::kw_using)) {\n // ...\n if (!CommonScopeName) {\n Diag(Tok.getLocation(), diag::err_expected) << tok::identifier;"}, [40]={r,4550,"/// Parse a C++11 or C2x attribute-specifier.\n///\n/// [C++11] attribute-specifier:\n/// \'[\' \'[\' attribute-list \']\' \']\'\n/// alignment-specifier\n///\n/// [C++11] attribute-list:\n/// attribute[opt]\n/// attribute-list \',\' attribute[opt]\n/// attribute \'...\'\n/// attribute-list \',\' attribute \'...\'\n///\n/// [C++11] attribute:\n/// attribute-token attribute-argument-clause[opt]\n///\n/// [C++11] attribute-token:\n/// identifier\n/// attribute-scoped-token\n///\n/// [C++11] attribute-scoped-token:\n/// attribute-namespace \'::\' identifier\n///\n/// [C++11] attribute-namespace:\n/// identifier\nvoid Parser::ParseCXX11AttributeSpecifierInternal(ParsedAttributes &Attrs, CachedTokens &OpenMPTokens, SourceLocation *EndLoc) {\n // ...\n if (Tok.is(tok::kw_using)) {\n // ...\n if (!TryConsumeToken(tok::colon) && CommonScopeName)\n Diag(Tok.getLocation(), diag::err_expected) << tok::colon;"}, [41]={r,4586,"/// 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 while (!Tok.isOneOf(tok::r_square, tok::semi, tok::eof)) {\n // ...\n // scoped attribute\n if (TryConsumeToken(tok::coloncolon)) {\n // ...\n if (!AttrName) {\n Diag(Tok.getLocation(), diag::err_expected) << tok::identifier;"}, [42]={r,4709,"/// Parse uuid() attribute when it appears in a [] Microsoft attribute.\nvoid Parser::ParseMicrosoftUuidAttributeArgs(ParsedAttributes &Attrs) {\n // ...\n if (T.consumeOpen()) {\n Diag(Tok, diag::err_expected) << tok::l_paren;"}, [43]={r,4856,"void Parser::ParseMicrosoftIfExistsClassDeclaration(DeclSpec::TST TagType, ParsedAttributes &AccessAttrs, AccessSpecifier &CurAS) {\n // ...\n if (Braces.consumeOpen()) {\n Diag(Tok, diag::err_expected) << tok::l_brace;"}, [44]={r,4899,"void Parser::ParseMicrosoftIfExistsClassDeclaration(DeclSpec::TST TagType, ParsedAttributes &AccessAttrs, AccessSpecifier &CurAS) {\n // ...\n while (Tok.isNot(tok::r_brace) && !isEofOrEom()) {\n // ...\n if (AS != AS_none) {\n // ...\n if (Tok.is(tok::colon))\n // ...\n else\n Diag(Tok, diag::err_expected) << tok::colon;"}, [45]={F,522,"/// Parse a binary expression that starts with \\p LHS and has a\n/// precedence of at least \\p MinPrec.\nExprResult Parser::ParseRHSOfBinaryExpression(ExprResult LHS, prec::Level MinPrec) {\n // ...\n while (true) {\n // ...\n if (NextTokPrec == prec::Conditional) {\n // ...\n if (!TryConsumeToken(tok::colon, ColonLoc)) {\n // ...\n Diag(Tok, diag::err_expected) << tok::colon << FixItHint::CreateInsertion(FILoc, FIText);"}, [46]={F,1457,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::ampamp: { // unary-expression: \'&&\' identifier\n // ...\n if (Tok.isNot(tok::identifier))\n return ExprError(Diag(Tok, diag::err_expected) << tok::identifier);"}, [47]={F,2049,"/// Once the leading part of a postfix-expression is parsed, this\n/// method parses any suffixes that apply.\n///\n/// \\verbatim\n/// postfix-expression: [C99 6.5.2]\n/// primary-expression\n/// postfix-expression \'[\' expression \']\'\n/// postfix-expression \'[\' braced-init-list \']\'\n/// postfix-expression \'[\' expression-list [opt] \']\' [C++23 12.4.5]\n/// postfix-expression \'(\' argument-expression-list[opt] \')\'\n/// postfix-expression \'.\' identifier\n/// postfix-expression \'->\' identifier\n/// postfix-expression \'++\'\n/// postfix-expression \'--\'\n/// \'(\' type-name \')\' \'{\' initializer-list \'}\'\n/// \'(\' type-name \')\' \'{\' initializer-list \',\' \'}\'\n///\n/// argument-expression-list: [C99 6.5.2]\n/// argument-expression ...[opt]\n/// argument-expression-list \',\' assignment-expression ...[opt]\n/// \\endverbatim\nExprResult Parser::ParsePostfixExpressionSuffix(ExprResult LHS) {\n // ...\n while (true) {\n // ...\n case tok::l_paren: // p-e: p-e \'(\' argument-expression-list[opt] \')\'\n case tok::lesslessless: { // p-e: p-e \'<<<\' argument-expression-list \'>>>\'\n // ...\n if (OpKind == tok::lesslessless) {\n // ...\n if (TryConsumeToken(tok::greatergreatergreater, CloseLoc)) {\n } else if (LHS.isInvalid()) {\n // ...\n } else {\n // ...\n Diag(Tok, diag::err_expected) << tok::greatergreatergreater;"}, [48]={F,2594,"/// ParseBuiltinPrimaryExpression\n///\n/// \\verbatim\n/// primary-expression: [C99 6.5.1]\n/// [GNU] \'__builtin_va_arg\' \'(\' assignment-expression \',\' type-name \')\'\n/// [GNU] \'__builtin_offsetof\' \'(\' type-name \',\' offsetof-member-designator\')\'\n/// [GNU] \'__builtin_choose_expr\' \'(\' assign-expr \',\' assign-expr \',\'\n/// assign-expr \')\'\n/// [GNU] \'__builtin_types_compatible_p\' \'(\' type-name \',\' type-name \')\'\n/// [GNU] \'__builtin_FILE\' \'(\' \')\'\n/// [CLANG] \'__builtin_FILE_NAME\' \'(\' \')\'\n/// [GNU] \'__builtin_FUNCTION\' \'(\' \')\'\n/// [MS] \'__builtin_FUNCSIG\' \'(\' \')\'\n/// [GNU] \'__builtin_LINE\' \'(\' \')\'\n/// [CLANG] \'__builtin_COLUMN\' \'(\' \')\'\n/// [GNU] \'__builtin_source_location\' \'(\' \')\'\n/// [OCL] \'__builtin_astype\' \'(\' assignment-expression \',\' type-name \')\'\n///\n/// [GNU] offsetof-member-designator:\n/// [GNU] identifier\n/// [GNU] offsetof-member-designator \'.\' identifier\n/// [GNU] offsetof-member-designator \'[\' expression \']\'\n/// \\endverbatim\nExprResult Parser::ParseBuiltinPrimaryExpression() {\n // ...\n case tok::kw___builtin_va_arg: {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::err_expected) << tok::r_paren;"}, [49]={F,2630,"/// ParseBuiltinPrimaryExpression\n///\n/// \\verbatim\n/// primary-expression: [C99 6.5.1]\n/// [GNU] \'__builtin_va_arg\' \'(\' assignment-expression \',\' type-name \')\'\n/// [GNU] \'__builtin_offsetof\' \'(\' type-name \',\' offsetof-member-designator\')\'\n/// [GNU] \'__builtin_choose_expr\' \'(\' assign-expr \',\' assign-expr \',\'\n/// assign-expr \')\'\n/// [GNU] \'__builtin_types_compatible_p\' \'(\' type-name \',\' type-name \')\'\n/// [GNU] \'__builtin_FILE\' \'(\' \')\'\n/// [CLANG] \'__builtin_FILE_NAME\' \'(\' \')\'\n/// [GNU] \'__builtin_FUNCTION\' \'(\' \')\'\n/// [MS] \'__builtin_FUNCSIG\' \'(\' \')\'\n/// [GNU] \'__builtin_LINE\' \'(\' \')\'\n/// [CLANG] \'__builtin_COLUMN\' \'(\' \')\'\n/// [GNU] \'__builtin_source_location\' \'(\' \')\'\n/// [OCL] \'__builtin_astype\' \'(\' assignment-expression \',\' type-name \')\'\n///\n/// [GNU] offsetof-member-designator:\n/// [GNU] identifier\n/// [GNU] offsetof-member-designator \'.\' identifier\n/// [GNU] offsetof-member-designator \'[\' expression \']\'\n/// \\endverbatim\nExprResult Parser::ParseBuiltinPrimaryExpression() {\n // ...\n case tok::kw___builtin_offsetof: {\n // ...\n // We must have at least one identifier here.\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [50]={F,2652,"/// ParseBuiltinPrimaryExpression\n///\n/// \\verbatim\n/// primary-expression: [C99 6.5.1]\n/// [GNU] \'__builtin_va_arg\' \'(\' assignment-expression \',\' type-name \')\'\n/// [GNU] \'__builtin_offsetof\' \'(\' type-name \',\' offsetof-member-designator\')\'\n/// [GNU] \'__builtin_choose_expr\' \'(\' assign-expr \',\' assign-expr \',\'\n/// assign-expr \')\'\n/// [GNU] \'__builtin_types_compatible_p\' \'(\' type-name \',\' type-name \')\'\n/// [GNU] \'__builtin_FILE\' \'(\' \')\'\n/// [CLANG] \'__builtin_FILE_NAME\' \'(\' \')\'\n/// [GNU] \'__builtin_FUNCTION\' \'(\' \')\'\n/// [MS] \'__builtin_FUNCSIG\' \'(\' \')\'\n/// [GNU] \'__builtin_LINE\' \'(\' \')\'\n/// [CLANG] \'__builtin_COLUMN\' \'(\' \')\'\n/// [GNU] \'__builtin_source_location\' \'(\' \')\'\n/// [OCL] \'__builtin_astype\' \'(\' assignment-expression \',\' type-name \')\'\n///\n/// [GNU] offsetof-member-designator:\n/// [GNU] identifier\n/// [GNU] offsetof-member-designator \'.\' identifier\n/// [GNU] offsetof-member-designator \'[\' expression \']\'\n/// \\endverbatim\nExprResult Parser::ParseBuiltinPrimaryExpression() {\n // ...\n case tok::kw___builtin_offsetof: {\n // ...\n // FIXME: This loop leaks the index expressions on error.\n while (true) {\n if (Tok.is(tok::period)) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [51]={F,2721,"/// ParseBuiltinPrimaryExpression\n///\n/// \\verbatim\n/// primary-expression: [C99 6.5.1]\n/// [GNU] \'__builtin_va_arg\' \'(\' assignment-expression \',\' type-name \')\'\n/// [GNU] \'__builtin_offsetof\' \'(\' type-name \',\' offsetof-member-designator\')\'\n/// [GNU] \'__builtin_choose_expr\' \'(\' assign-expr \',\' assign-expr \',\'\n/// assign-expr \')\'\n/// [GNU] \'__builtin_types_compatible_p\' \'(\' type-name \',\' type-name \')\'\n/// [GNU] \'__builtin_FILE\' \'(\' \')\'\n/// [CLANG] \'__builtin_FILE_NAME\' \'(\' \')\'\n/// [GNU] \'__builtin_FUNCTION\' \'(\' \')\'\n/// [MS] \'__builtin_FUNCSIG\' \'(\' \')\'\n/// [GNU] \'__builtin_LINE\' \'(\' \')\'\n/// [CLANG] \'__builtin_COLUMN\' \'(\' \')\'\n/// [GNU] \'__builtin_source_location\' \'(\' \')\'\n/// [OCL] \'__builtin_astype\' \'(\' assignment-expression \',\' type-name \')\'\n///\n/// [GNU] offsetof-member-designator:\n/// [GNU] identifier\n/// [GNU] offsetof-member-designator \'.\' identifier\n/// [GNU] offsetof-member-designator \'[\' expression \']\'\n/// \\endverbatim\nExprResult Parser::ParseBuiltinPrimaryExpression() {\n // ...\n case tok::kw___builtin_choose_expr: {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::err_expected) << tok::r_paren;"}, [52]={F,2748,"/// ParseBuiltinPrimaryExpression\n///\n/// \\verbatim\n/// primary-expression: [C99 6.5.1]\n/// [GNU] \'__builtin_va_arg\' \'(\' assignment-expression \',\' type-name \')\'\n/// [GNU] \'__builtin_offsetof\' \'(\' type-name \',\' offsetof-member-designator\')\'\n/// [GNU] \'__builtin_choose_expr\' \'(\' assign-expr \',\' assign-expr \',\'\n/// assign-expr \')\'\n/// [GNU] \'__builtin_types_compatible_p\' \'(\' type-name \',\' type-name \')\'\n/// [GNU] \'__builtin_FILE\' \'(\' \')\'\n/// [CLANG] \'__builtin_FILE_NAME\' \'(\' \')\'\n/// [GNU] \'__builtin_FUNCTION\' \'(\' \')\'\n/// [MS] \'__builtin_FUNCSIG\' \'(\' \')\'\n/// [GNU] \'__builtin_LINE\' \'(\' \')\'\n/// [CLANG] \'__builtin_COLUMN\' \'(\' \')\'\n/// [GNU] \'__builtin_source_location\' \'(\' \')\'\n/// [OCL] \'__builtin_astype\' \'(\' assignment-expression \',\' type-name \')\'\n///\n/// [GNU] offsetof-member-designator:\n/// [GNU] identifier\n/// [GNU] offsetof-member-designator \'.\' identifier\n/// [GNU] offsetof-member-designator \'[\' expression \']\'\n/// \\endverbatim\nExprResult Parser::ParseBuiltinPrimaryExpression() {\n // ...\n case tok::kw___builtin_astype: {\n // ...\n // Attempt to consume the r-paren.\n if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::err_expected) << tok::r_paren;"}, [53]={F,2777,"/// ParseBuiltinPrimaryExpression\n///\n/// \\verbatim\n/// primary-expression: [C99 6.5.1]\n/// [GNU] \'__builtin_va_arg\' \'(\' assignment-expression \',\' type-name \')\'\n/// [GNU] \'__builtin_offsetof\' \'(\' type-name \',\' offsetof-member-designator\')\'\n/// [GNU] \'__builtin_choose_expr\' \'(\' assign-expr \',\' assign-expr \',\'\n/// assign-expr \')\'\n/// [GNU] \'__builtin_types_compatible_p\' \'(\' type-name \',\' type-name \')\'\n/// [GNU] \'__builtin_FILE\' \'(\' \')\'\n/// [CLANG] \'__builtin_FILE_NAME\' \'(\' \')\'\n/// [GNU] \'__builtin_FUNCTION\' \'(\' \')\'\n/// [MS] \'__builtin_FUNCSIG\' \'(\' \')\'\n/// [GNU] \'__builtin_LINE\' \'(\' \')\'\n/// [CLANG] \'__builtin_COLUMN\' \'(\' \')\'\n/// [GNU] \'__builtin_source_location\' \'(\' \')\'\n/// [OCL] \'__builtin_astype\' \'(\' assignment-expression \',\' type-name \')\'\n///\n/// [GNU] offsetof-member-designator:\n/// [GNU] identifier\n/// [GNU] offsetof-member-designator \'.\' identifier\n/// [GNU] offsetof-member-designator \'[\' expression \']\'\n/// \\endverbatim\nExprResult Parser::ParseBuiltinPrimaryExpression() {\n // ...\n case tok::kw___builtin_convertvector: {\n // ...\n // Attempt to consume the r-paren.\n if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::err_expected) << tok::r_paren;"}, [54]={F,2795,"/// ParseBuiltinPrimaryExpression\n///\n/// \\verbatim\n/// primary-expression: [C99 6.5.1]\n/// [GNU] \'__builtin_va_arg\' \'(\' assignment-expression \',\' type-name \')\'\n/// [GNU] \'__builtin_offsetof\' \'(\' type-name \',\' offsetof-member-designator\')\'\n/// [GNU] \'__builtin_choose_expr\' \'(\' assign-expr \',\' assign-expr \',\'\n/// assign-expr \')\'\n/// [GNU] \'__builtin_types_compatible_p\' \'(\' type-name \',\' type-name \')\'\n/// [GNU] \'__builtin_FILE\' \'(\' \')\'\n/// [CLANG] \'__builtin_FILE_NAME\' \'(\' \')\'\n/// [GNU] \'__builtin_FUNCTION\' \'(\' \')\'\n/// [MS] \'__builtin_FUNCSIG\' \'(\' \')\'\n/// [GNU] \'__builtin_LINE\' \'(\' \')\'\n/// [CLANG] \'__builtin_COLUMN\' \'(\' \')\'\n/// [GNU] \'__builtin_source_location\' \'(\' \')\'\n/// [OCL] \'__builtin_astype\' \'(\' assignment-expression \',\' type-name \')\'\n///\n/// [GNU] offsetof-member-designator:\n/// [GNU] identifier\n/// [GNU] offsetof-member-designator \'.\' identifier\n/// [GNU] offsetof-member-designator \'[\' expression \']\'\n/// \\endverbatim\nExprResult Parser::ParseBuiltinPrimaryExpression() {\n // ...\n case tok::kw___builtin_COLUMN:\n case tok::kw___builtin_FILE:\n case tok::kw___builtin_FILE_NAME:\n case tok::kw___builtin_FUNCTION:\n case tok::kw___builtin_FUNCSIG:\n case tok::kw___builtin_LINE:\n case tok::kw___builtin_source_location: {\n // Attempt to consume the r-paren.\n if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::err_expected) << tok::r_paren;"}, [55]={O,196,"/// Parse global scope or nested-name-specifier if present.\n///\n/// Parses a C++ global scope specifier (\'::\') or nested-name-specifier (which\n/// may be preceded by \'::\'). Note that this routine will not parse ::new or\n/// ::delete; it will just leave them in the token stream.\n///\n/// \'::\'[opt] nested-name-specifier\n/// \'::\'\n///\n/// nested-name-specifier:\n/// type-name \'::\'\n/// namespace-name \'::\'\n/// nested-name-specifier identifier \'::\'\n/// nested-name-specifier \'template\'[opt] simple-template-id \'::\'\n///\n///\n/// \\param SS the scope specifier that will be set to the parsed\n/// nested-name-specifier (or empty)\n///\n/// \\param ObjectType if this nested-name-specifier is being parsed following\n/// the \".\" or \"->\" of a member access expression, this parameter provides the\n/// type of the object whose members are being accessed.\n///\n/// \\param ObjectHadErrors if this unqualified-id occurs within a member access\n/// expression, indicates whether the original subexpressions had any errors.\n/// When true, diagnostics for missing \'template\' keyword will be supressed.\n///\n/// \\param EnteringContext whether we will be entering into the context of\n/// the nested-name-specifier after parsing it.\n///\n/// \\param MayBePseudoDestructor When non-NULL, points to a flag that\n/// indicates whether this nested-name-specifier may be part of a\n/// pseudo-destructor name. In this case, the flag will be set false\n/// if we don\'t actually end up parsing a destructor name. Moreover,\n/// if we do end up determining that we are parsing a destructor name,\n/// the last component of the nested-name-specifier is not parsed as\n/// part of the scope specifier.\n///\n/// \\param IsTypename If \\c true, this nested-name-specifier is known to be\n/// part of a type name. This is used to improve error recovery.\n///\n/// \\param LastII When non-NULL, points to an IdentifierInfo* that will be\n/// filled in with the leading identifier in the last component of the\n/// nested-name-specifier, if any.\n///\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n///\n/// \\returns true if there was an error parsing a scope specifier\nbool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS, ParsedType ObjectType, bool ObjectHadErrors, bool EnteringContext, bool *MayBePseudoDestructor, bool IsTypename, IdentifierInfo **LastII, bool OnlyNamespace, bool InUsingDeclaration) {\n // ...\n if (Tok.is(tok::coloncolon)) {\n // ...\n if (NextKind == tok::l_brace) {\n // ...\n Diag(ConsumeToken(), diag::err_expected) << tok::identifier;"}, [56]={O,418,"/// Parse global scope or nested-name-specifier if present.\n///\n/// Parses a C++ global scope specifier (\'::\') or nested-name-specifier (which\n/// may be preceded by \'::\'). Note that this routine will not parse ::new or\n/// ::delete; it will just leave them in the token stream.\n///\n/// \'::\'[opt] nested-name-specifier\n/// \'::\'\n///\n/// nested-name-specifier:\n/// type-name \'::\'\n/// namespace-name \'::\'\n/// nested-name-specifier identifier \'::\'\n/// nested-name-specifier \'template\'[opt] simple-template-id \'::\'\n///\n///\n/// \\param SS the scope specifier that will be set to the parsed\n/// nested-name-specifier (or empty)\n///\n/// \\param ObjectType if this nested-name-specifier is being parsed following\n/// the \".\" or \"->\" of a member access expression, this parameter provides the\n/// type of the object whose members are being accessed.\n///\n/// \\param ObjectHadErrors if this unqualified-id occurs within a member access\n/// expression, indicates whether the original subexpressions had any errors.\n/// When true, diagnostics for missing \'template\' keyword will be supressed.\n///\n/// \\param EnteringContext whether we will be entering into the context of\n/// the nested-name-specifier after parsing it.\n///\n/// \\param MayBePseudoDestructor When non-NULL, points to a flag that\n/// indicates whether this nested-name-specifier may be part of a\n/// pseudo-destructor name. In this case, the flag will be set false\n/// if we don\'t actually end up parsing a destructor name. Moreover,\n/// if we do end up determining that we are parsing a destructor name,\n/// the last component of the nested-name-specifier is not parsed as\n/// part of the scope specifier.\n///\n/// \\param IsTypename If \\c true, this nested-name-specifier is known to be\n/// part of a type name. This is used to improve error recovery.\n///\n/// \\param LastII When non-NULL, points to an IdentifierInfo* that will be\n/// filled in with the leading identifier in the last component of the\n/// nested-name-specifier, if any.\n///\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n///\n/// \\returns true if there was an error parsing a scope specifier\nbool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS, ParsedType ObjectType, bool ObjectHadErrors, bool EnteringContext, bool *MayBePseudoDestructor, bool IsTypename, IdentifierInfo **LastII, bool OnlyNamespace, bool InUsingDeclaration) {\n // ...\n while (true) {\n // ...\n if (Next.is(tok::coloncolon) && GetLookAheadToken(2).is(tok::l_brace)) {\n // ...\n Diag(PP.getLocForEndOfToken(ConsumeToken()), diag::err_expected) << tok::identifier;"}, [57]={O,2767,"#include \"clang/Basic/OperatorKinds.def\"\n // ...\n if (getLangOpts().CPlusPlus11 && isTokenStringLiteral()) {\n // ...\n if (IsUDSuffix) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n } else {\n Diag(Tok.getLocation(), diag::err_expected) << tok::identifier;"}, [58]={O,4103,"/// Parse a __builtin_bit_cast(T, E).\nExprResult Parser::ParseBuiltinBitCast() {\n // ...\n if (ExpectAndConsume(tok::comma)) {\n Diag(Tok.getLocation(), diag::err_expected) << tok::comma;"}, [59]={ob,58,"Decl *Parser::ParseHLSLBuffer(SourceLocation &DeclEnd) {\n // ...\n if (!Tok.is(tok::identifier)) {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [60]={ob,71,"Decl *Parser::ParseHLSLBuffer(SourceLocation &DeclEnd) {\n // ...\n if (T.consumeOpen()) {\n Diag(Tok, diag::err_expected) << tok::l_brace;"}, [61]={ob,154,"void Parser::ParseHLSLSemantics(ParsedAttributes &Attrs, SourceLocation *EndLoc) {\n // ...\n case ParsedAttr::AT_HLSLResourceBinding: {\n // ...\n if (!Tok.is(tok::identifier)) {\n Diag(Tok.getLocation(), diag::err_expected) << tok::identifier;"}, [62]={ob,170,"void Parser::ParseHLSLSemantics(ParsedAttributes &Attrs, SourceLocation *EndLoc) {\n // ...\n case ParsedAttr::AT_HLSLResourceBinding: {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n if (!Tok.is(tok::identifier)) {\n Diag(Tok.getLocation(), diag::err_expected) << tok::identifier;"}, [63]={ob,183,"void Parser::ParseHLSLSemantics(ParsedAttributes &Attrs, SourceLocation *EndLoc) {\n // ...\n case ParsedAttr::AT_HLSLResourceBinding: {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::err_expected)) {"}, [64]={"clang/lib/Parse/ParseInit.cpp",561,"// Return true if a comma (or closing brace) is necessary after the\n// __if_exists/if_not_exists statement.\nbool Parser::ParseMicrosoftIfExistsBraceInitializer(ExprVector &InitExprs, bool &InitExprsOk) {\n // ...\n if (Braces.consumeOpen()) {\n Diag(Tok, diag::err_expected) << tok::l_brace;"}, [65]={z,290,"///\n/// objc-interface:\n/// objc-class-interface-attributes[opt] objc-class-interface\n/// objc-category-interface\n///\n/// objc-class-interface:\n/// \'@\' \'interface\' identifier objc-type-parameter-list[opt]\n/// objc-superclass[opt] objc-protocol-refs[opt]\n/// objc-class-instance-variables[opt]\n/// objc-interface-decl-list\n/// @end\n///\n/// objc-category-interface:\n/// \'@\' \'interface\' identifier objc-type-parameter-list[opt]\n/// \'(\' identifier[opt] \')\' objc-protocol-refs[opt]\n/// objc-interface-decl-list\n/// @end\n///\n/// objc-superclass:\n/// \':\' identifier objc-type-arguments[opt]\n///\n/// objc-class-interface-attributes:\n/// __attribute__((visibility(\"default\")))\n/// __attribute__((visibility(\"hidden\")))\n/// __attribute__((deprecated))\n/// __attribute__((unavailable))\n/// __attribute__((objc_exception)) - used by NSException on 64-bit\n/// __attribute__((objc_root_class))\n///\nDecl *Parser::ParseObjCAtInterfaceDeclaration(SourceLocation AtLoc, ParsedAttributes &attrs) {\n // ...\n if (Tok.is(tok::l_paren) && !isKnownToBeTypeSpecifier(GetLookAheadToken(1))) { // we have a category.\n // ...\n // For ObjC2, the category name is optional (not an error).\n if (Tok.is(tok::identifier)) {\n // ...\n } else if (!getLangOpts().ObjC) {\n Diag(Tok, diag::err_expected) << tok::identifier; // missing category name."}, [66]={z,2216,"/// objc-implementation:\n/// objc-class-implementation-prologue\n/// objc-category-implementation-prologue\n///\n/// objc-class-implementation-prologue:\n/// @implementation identifier objc-superclass[opt]\n/// objc-class-instance-variables[opt]\n///\n/// objc-category-implementation-prologue:\n/// @implementation identifier ( identifier )\nParser::DeclGroupPtrTy Parser::ParseObjCAtImplementationDeclaration(SourceLocation AtLoc, ParsedAttributes &Attrs) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n if (Tok.is(tok::identifier)) {\n // ...\n } else {\n Diag(Tok, diag::err_expected) << tok::identifier; // missing category name."}, [67]={z,2221,"/// objc-implementation:\n/// objc-class-implementation-prologue\n/// objc-category-implementation-prologue\n///\n/// objc-class-implementation-prologue:\n/// @implementation identifier objc-superclass[opt]\n/// objc-class-instance-variables[opt]\n///\n/// objc-category-implementation-prologue:\n/// @implementation identifier ( identifier )\nParser::DeclGroupPtrTy Parser::ParseObjCAtImplementationDeclaration(SourceLocation AtLoc, ParsedAttributes &Attrs) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::err_expected) << tok::r_paren;"}, [68]={z,2444,"/// property-dynamic:\n/// @dynamic property-list\n///\n/// property-list:\n/// identifier\n/// property-list \',\' identifier\n///\nDecl *Parser::ParseObjCPropertyDynamic(SourceLocation atLoc) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n if (!II) {\n // ...\n } else {\n // ...\n if (II->isStr(\"class\")) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::err_expected) << tok::r_paren;"}, [69]={z,2520,"/// objc-synchronized-statement:\n/// @synchronized \'(\' expression \')\' compound-statement\n///\nStmtResult Parser::ParseObjCSynchronizedStmt(SourceLocation atLoc) {\n // ...\n if (Tok.is(tok::r_paren)) {\n // ...\n } else {\n if (!operand.isInvalid())\n Diag(Tok, diag::err_expected) << tok::r_paren;"}, [70]={z,2529,"/// objc-synchronized-statement:\n/// @synchronized \'(\' expression \')\' compound-statement\n///\nStmtResult Parser::ParseObjCSynchronizedStmt(SourceLocation atLoc) {\n // ...\n // Require a compound statement.\n if (Tok.isNot(tok::l_brace)) {\n if (!operand.isInvalid())\n Diag(Tok, diag::err_expected) << tok::l_brace;"}, [71]={z,2569,"/// objc-try-catch-statement:\n/// @try compound-statement objc-catch-list[opt]\n/// @try compound-statement objc-catch-list[opt] @finally compound-statement\n///\n/// objc-catch-list:\n/// @catch ( parameter-declaration ) compound-statement\n/// objc-catch-list @catch ( catch-parameter-declaration ) compound-statement\n/// catch-parameter-declaration:\n/// parameter-declaration\n/// \'...\' [OBJC2]\n///\nStmtResult Parser::ParseObjCTryStmt(SourceLocation atLoc) {\n // ...\n if (Tok.isNot(tok::l_brace)) {\n Diag(Tok, diag::err_expected) << tok::l_brace;"}, [72]={z,2622,"/// objc-try-catch-statement:\n/// @try compound-statement objc-catch-list[opt]\n/// @try compound-statement objc-catch-list[opt] @finally compound-statement\n///\n/// objc-catch-list:\n/// @catch ( parameter-declaration ) compound-statement\n/// objc-catch-list @catch ( catch-parameter-declaration ) compound-statement\n/// catch-parameter-declaration:\n/// parameter-declaration\n/// \'...\' [OBJC2]\n///\nStmtResult Parser::ParseObjCTryStmt(SourceLocation atLoc) {\n // ...\n while (Tok.is(tok::at)) {\n // ...\n if (Tok.isObjCAtKeyword(tok::objc_catch)) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n if (Tok.is(tok::l_brace))\n // ...\n else\n Diag(Tok, diag::err_expected) << tok::l_brace;"}, [73]={z,2655,"/// objc-try-catch-statement:\n/// @try compound-statement objc-catch-list[opt]\n/// @try compound-statement objc-catch-list[opt] @finally compound-statement\n///\n/// objc-catch-list:\n/// @catch ( parameter-declaration ) compound-statement\n/// objc-catch-list @catch ( catch-parameter-declaration ) compound-statement\n/// catch-parameter-declaration:\n/// parameter-declaration\n/// \'...\' [OBJC2]\n///\nStmtResult Parser::ParseObjCTryStmt(SourceLocation atLoc) {\n // ...\n while (Tok.is(tok::at)) {\n // ...\n if (Tok.isObjCAtKeyword(tok::objc_catch)) {\n // ...\n } else {\n // ...\n if (Tok.is(tok::l_brace))\n // ...\n else\n Diag(Tok, diag::err_expected) << tok::l_brace;"}, [74]={z,2688,"/// objc-autoreleasepool-statement:\n/// @autoreleasepool compound-statement\n///\nStmtResult Parser::ParseObjCAutoreleasePoolStmt(SourceLocation atLoc) {\n // ...\n if (Tok.isNot(tok::l_brace)) {\n Diag(Tok, diag::err_expected) << tok::l_brace;"}, [75]={z,3342,"/// Parse the remainder of an Objective-C message following the\n/// \'[\' objc-receiver.\n///\n/// This routine handles sends to super, class messages (sent to a\n/// class name), and instance messages (sent to an object), and the\n/// target is represented by \\p SuperLoc, \\p ReceiverType, or \\p\n/// ReceiverExpr, respectively. Only one of these parameters may have\n/// a valid value.\n///\n/// \\param LBracLoc The location of the opening \'[\'.\n///\n/// \\param SuperLoc If this is a send to \'super\', the location of the\n/// \'super\' keyword that indicates a send to the superclass.\n///\n/// \\param ReceiverType If this is a class message, the type of the\n/// class we are sending a message to.\n///\n/// \\param ReceiverExpr If this is an instance message, the expression\n/// used to compute the receiver object.\n///\n/// objc-message-args:\n/// objc-selector\n/// objc-keywordarg-list\n///\n/// objc-keywordarg-list:\n/// objc-keywordarg\n/// objc-keywordarg-list objc-keywordarg\n///\n/// objc-keywordarg:\n/// selector-name[opt] \':\' objc-keywordexpr\n///\n/// objc-keywordexpr:\n/// nonempty-expr-list\n///\n/// nonempty-expr-list:\n/// assignment-expression\n/// nonempty-expr-list , assignment-expression\n///\nExprResult Parser::ParseObjCMessageExpressionBody(SourceLocation LBracLoc, SourceLocation SuperLoc, ParsedType ReceiverType, Expr *ReceiverExpr) {\n // ...\n if (Tok.is(tok::colon)) {\n // ...\n } else if (!selIdent) {\n Diag(Tok, diag::err_expected) << tok::identifier; // missing selector name."}, [76]={z,3352,"/// Parse the remainder of an Objective-C message following the\n/// \'[\' objc-receiver.\n///\n/// This routine handles sends to super, class messages (sent to a\n/// class name), and instance messages (sent to an object), and the\n/// target is represented by \\p SuperLoc, \\p ReceiverType, or \\p\n/// ReceiverExpr, respectively. Only one of these parameters may have\n/// a valid value.\n///\n/// \\param LBracLoc The location of the opening \'[\'.\n///\n/// \\param SuperLoc If this is a send to \'super\', the location of the\n/// \'super\' keyword that indicates a send to the superclass.\n///\n/// \\param ReceiverType If this is a class message, the type of the\n/// class we are sending a message to.\n///\n/// \\param ReceiverExpr If this is an instance message, the expression\n/// used to compute the receiver object.\n///\n/// objc-message-args:\n/// objc-selector\n/// objc-keywordarg-list\n///\n/// objc-keywordarg-list:\n/// objc-keywordarg\n/// objc-keywordarg-list objc-keywordarg\n///\n/// objc-keywordarg:\n/// selector-name[opt] \':\' objc-keywordexpr\n///\n/// objc-keywordexpr:\n/// nonempty-expr-list\n///\n/// nonempty-expr-list:\n/// assignment-expression\n/// nonempty-expr-list , assignment-expression\n///\nExprResult Parser::ParseObjCMessageExpressionBody(SourceLocation LBracLoc, SourceLocation SuperLoc, ParsedType ReceiverType, Expr *ReceiverExpr) {\n // ...\n if (Tok.isNot(tok::r_square)) {\n Diag(Tok, diag::err_expected) << (Tok.is(tok::identifier) ? tok::colon : tok::r_square);"}, [77]={z,3656,"/// objc-selector-expression\n/// @selector \'(\' \'(\'[opt] objc-keyword-selector \')\'[opt] \')\'\nExprResult Parser::ParseObjCSelectorExpression(SourceLocation AtLoc) {\n // ...\n if (!SelIdent && // missing selector name.\n // ...\n return ExprError(Diag(Tok, diag::err_expected) << tok::identifier);"}, [78]={E,398,"/// Parse \'omp declare reduction\' construct.\n///\n/// declare-reduction-directive:\n/// annot_pragma_openmp \'declare\' \'reduction\'\n/// \'(\' <reduction_id> \':\' <type> {\',\' <type>} \':\' <expression> \')\'\n/// [\'initializer\' \'(\' (\'omp_priv\' \'=\' <expression>)|<function_call> \')\']\n/// annot_pragma_openmp_end\n/// <reduction_id> is either a base language identifier or one of the following\n/// operators: \'+\', \'-\', \'*\', \'&\', \'|\', \'^\', \'&&\' and \'||\'.\n///\nParser::DeclGroupPtrTy Parser::ParseOpenMPDeclareReductionDirective(AccessSpecifier AS) {\n // ...\n for (Decl *D : DRD.get()) {\n // ...\n if (Tok.isNot(tok::annot_pragma_openmp_end)) {\n // Parse <initializer> expression.\n if (Tok.is(tok::identifier) && Tok.getIdentifierInfo()->isStr(\"initializer\")) {\n // ...\n } else {\n Diag(Tok.getLocation(), diag::err_expected) << \"\'initializer\'\";"}, [79]={E,3046,"// Parses simple list:\n// simple-variable-list:\n// \'(\' id-expression {, id-expression} \')\'\n//\nbool Parser::ParseOpenMPSimpleVarList(OpenMPDirectiveKind Kind, const llvm::function_ref<void(CXXScopeSpec &, DeclarationNameInfo)> &Callback, bool AllowScopeSpecifier) {\n // ...\n // Read tokens while \')\' or annot_pragma_openmp_end is not found.\n while (Tok.isNot(tok::r_paren) && Tok.isNot(tok::annot_pragma_openmp_end)) {\n // ...\n if (AllowScopeSpecifier && getLangOpts().CPlusPlus &&\n // ...\n } else if (ParseUnqualifiedId(SS, /*ObjectType=*/nullptr,\n // ...\n } else if (Tok.isNot(tok::comma) && Tok.isNot(tok::r_paren) && Tok.isNot(tok::annot_pragma_openmp_end)) {\n // ...\n Diag(PrevTok.getLocation(), diag::err_expected) << tok::identifier << SourceRange(PrevTok.getLocation(), PrevTokLocation);"}, [80]={E,3059,"// Parses simple list:\n// simple-variable-list:\n// \'(\' id-expression {, id-expression} \')\'\n//\nbool Parser::ParseOpenMPSimpleVarList(OpenMPDirectiveKind Kind, const llvm::function_ref<void(CXXScopeSpec &, DeclarationNameInfo)> &Callback, bool AllowScopeSpecifier) {\n // ...\n if (NoIdentIsFound) {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [81]={E,3075,"OMPClause *Parser::ParseOpenMPSizesClause() {\n // ...\n if (T.consumeOpen()) {\n Diag(Tok, diag::err_expected) << tok::l_paren;"}, [82]={P,856,"StmtResult Parser::HandlePragmaCaptured() {\n // ...\n if (Tok.isNot(tok::l_brace)) {\n PP.Diag(Tok, diag::err_expected) << tok::l_brace;"}, [83]={P,1913,"void Parser::HandlePragmaAttribute() {\n // ...\n // Parse the subject-list.\n if (!TryConsumeToken(tok::comma)) {\n createExpectedAttributeSubjectRulesTokenDiagnostic(diag::err_expected, Attrs, MissingAttributeSubjectRulesRecoveryPoint::Comma, *this) << tok::comma;"}, [84]={P,1939,"void Parser::HandlePragmaAttribute() {\n // ...\n if (!TryConsumeToken(tok::equal)) {\n createExpectedAttributeSubjectRulesTokenDiagnostic(diag::err_expected, Attrs, MissingAttributeSubjectRulesRecoveryPoint::Equals, *this) << tok::equal;"}, [85]={P,2912,"/// 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::l_paren)) {\n PP.Diag(FloatControlLoc, diag::err_expected) << tok::l_paren;"}, [86]={P,3033,"/// Handle the Microsoft \\#pragma detect_mismatch extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma detect_mismatch(\"name\", \"value\")\n/// \\endcode\n/// Where \'name\' and \'value\' are quoted strings. The values are embedded in\n/// the object file and passed along to the linker. If the linker detects a\n/// mismatch in the object file\'s values for the given name, a LNK2038 error\n/// is emitted. See MSDN for more details.\nvoid PragmaDetectMismatchHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(DetectMismatchLoc, diag::err_expected) << tok::l_paren;"}, [87]={P,3056,"/// Handle the Microsoft \\#pragma detect_mismatch extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma detect_mismatch(\"name\", \"value\")\n/// \\endcode\n/// Where \'name\' and \'value\' are quoted strings. The values are embedded in\n/// the object file and passed along to the linker. If the linker detects a\n/// mismatch in the object file\'s values for the given name, a LNK2038 error\n/// is emitted. See MSDN for more details.\nvoid PragmaDetectMismatchHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_expected) << tok::r_paren;"}, [88]={P,3239,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n // Read \'(\'\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_expected) << tok::l_paren;"}, [89]={P,3311,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n // Read \')\'\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_expected) << tok::r_paren;"}, [90]={P,3437,"/// Parses loop or unroll pragma hint value and fills in Info.\nstatic bool ParseLoopHintValue(Preprocessor &PP, Token &Tok, Token PragmaName, Token Option, bool ValueInParens, PragmaLoopHintInfo &Info) {\n // ...\n if (ValueInParens) {\n // Read \')\'\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_expected) << tok::r_paren;"}, [91]={P,3545,"/// Handle the \\#pragma clang loop directive.\n/// #pragma clang \'loop\' loop-hints\n///\n/// loop-hints:\n/// loop-hint loop-hints[opt]\n///\n/// loop-hint:\n/// \'vectorize\' \'(\' loop-hint-keyword \')\'\n/// \'interleave\' \'(\' loop-hint-keyword \')\'\n/// \'unroll\' \'(\' unroll-hint-keyword \')\'\n/// \'vectorize_predicate\' \'(\' loop-hint-keyword \')\'\n/// \'vectorize_width\' \'(\' loop-hint-value \')\'\n/// \'interleave_count\' \'(\' loop-hint-value \')\'\n/// \'unroll_count\' \'(\' loop-hint-value \')\'\n/// \'pipeline\' \'(\' disable \')\'\n/// \'pipeline_initiation_interval\' \'(\' loop-hint-value \')\'\n///\n/// loop-hint-keyword:\n/// \'enable\'\n/// \'disable\'\n/// \'assume_safety\'\n///\n/// unroll-hint-keyword:\n/// \'enable\'\n/// \'disable\'\n/// \'full\'\n///\n/// loop-hint-value:\n/// constant-expression\n///\n/// Specifying vectorize(enable) or vectorize_width(_value_) instructs llvm to\n/// try vectorizing the instructions of the loop it precedes. Specifying\n/// interleave(enable) or interleave_count(_value_) instructs llvm to try\n/// interleaving multiple iterations of the loop it precedes. The width of the\n/// vector instructions is specified by vectorize_width() and the number of\n/// interleaved loop iterations is specified by interleave_count(). Specifying a\n/// value of 1 effectively disables vectorization/interleaving, even if it is\n/// possible and profitable, and 0 is invalid. The loop vectorizer currently\n/// only works on inner loops.\n///\n/// The unroll and unroll_count directives control the concatenation\n/// unroller. Specifying unroll(enable) instructs llvm to unroll the loop\n/// completely if the trip count is known at compile time and unroll partially\n/// if the trip count is not known. Specifying unroll(full) is similar to\n/// unroll(enable) but will unroll the loop only if the trip count is known at\n/// compile time. Specifying unroll(disable) disables unrolling for the\n/// loop. Specifying unroll_count(_value_) instructs llvm to try to unroll the\n/// loop the number of times indicated by the value.\nvoid PragmaLoopHintHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n // Read \'(\'\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_expected) << tok::l_paren;"}, [92]={P,3909,"/// Handle the #pragma clang attribute directive.\n///\n/// The syntax is:\n/// \\code\n/// #pragma clang attribute push (attribute, subject-set)\n/// #pragma clang attribute push\n/// #pragma clang attribute (attribute, subject-set)\n/// #pragma clang attribute pop\n/// \\endcode\n///\n/// There are also \'namespace\' variants of push and pop directives. The bare\n/// \'#pragma clang attribute (attribute, subject-set)\' version doesn\'t require a\n/// namespace, since it always applies attributes to the most recently pushed\n/// group, regardless of namespace.\n/// \\code\n/// #pragma clang attribute namespace.push (attribute, subject-set)\n/// #pragma clang attribute namespace.push\n/// #pragma clang attribute namespace.pop\n/// \\endcode\n///\n/// The subject-set clause defines the set of declarations which receive the\n/// attribute. Its exact syntax is described in the LanguageExtensions document\n/// in Clang\'s documentation.\n///\n/// This directive instructs the compiler to begin/finish applying the specified\n/// attribute to the set of attribute-specific declarations in the active range\n/// of the pragma.\nvoid PragmaAttributeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n // Parse the actual attribute.\n if ((Info->Action == PragmaAttributeInfo::Push && Tok.isNot(tok::eod)) || Info->Action == PragmaAttributeInfo::Attribute) {\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_expected) << tok::l_paren;"}, [93]={P,3935,"/// Handle the #pragma clang attribute directive.\n///\n/// The syntax is:\n/// \\code\n/// #pragma clang attribute push (attribute, subject-set)\n/// #pragma clang attribute push\n/// #pragma clang attribute (attribute, subject-set)\n/// #pragma clang attribute pop\n/// \\endcode\n///\n/// There are also \'namespace\' variants of push and pop directives. The bare\n/// \'#pragma clang attribute (attribute, subject-set)\' version doesn\'t require a\n/// namespace, since it always applies attributes to the most recently pushed\n/// group, regardless of namespace.\n/// \\code\n/// #pragma clang attribute namespace.push (attribute, subject-set)\n/// #pragma clang attribute namespace.push\n/// #pragma clang attribute namespace.pop\n/// \\endcode\n///\n/// The subject-set clause defines the set of declarations which receive the\n/// attribute. Its exact syntax is described in the LanguageExtensions document\n/// in Clang\'s documentation.\n///\n/// This directive instructs the compiler to begin/finish applying the specified\n/// attribute to the set of attribute-specific declarations in the active range\n/// of the pragma.\nvoid PragmaAttributeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n // Parse the actual attribute.\n if ((Info->Action == PragmaAttributeInfo::Push && Tok.isNot(tok::eod)) || Info->Action == PragmaAttributeInfo::Attribute) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_expected) << tok::r_paren;"}, [94]={M,126,"bool Parser::ExpectAndConsume(tok::TokenKind ExpectedTok, unsigned DiagID, StringRef Msg) {\n // ...\n // Detect common single-character typos and resume.\n if (IsCommonTypo(ExpectedTok, Tok)) {\n // ...\n {\n // ...\n if (DiagID == diag::err_expected)"}, [95]={M,148,"bool Parser::ExpectAndConsume(tok::TokenKind ExpectedTok, unsigned DiagID, StringRef Msg) {\n // ...\n if (DiagID == diag::err_expected)"}, [96]={M,228,"bool Parser::expectIdentifier() {\n // ...\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [97]={M,2351,"void Parser::ParseMicrosoftIfExistsExternalDeclaration() {\n // ...\n if (Braces.consumeOpen()) {\n Diag(Tok, diag::err_expected) << tok::l_brace;"}, [98]={M,2725,"bool BalancedDelimiterTracker::diagnoseMissingClose() {\n // ...\n if (P.Tok.is(tok::annot_module_end))\n // ...\n else\n P.Diag(P.Tok, diag::err_expected) << Close;"}, [99]={B,585,"/// ParseSEHTryBlockCommon\n///\n/// seh-try-block:\n/// \'__try\' compound-statement seh-handler\n///\n/// seh-handler:\n/// seh-except-block\n/// seh-finally-block\n///\nStmtResult Parser::ParseSEHTryBlock() {\n // ...\n if (Tok.isNot(tok::l_brace))\n return StmtError(Diag(Tok, diag::err_expected) << tok::l_brace);"}, [100]={B,656,"/// ParseSEHExceptBlock - Handle __except\n///\n/// seh-except-block:\n/// \'__except\' \'(\' seh-filter-expression \')\' compound-statement\n///\nStmtResult Parser::ParseSEHExceptBlock(SourceLocation ExceptLoc) {\n // ...\n if (Tok.isNot(tok::l_brace))\n return StmtError(Diag(Tok, diag::err_expected) << tok::l_brace);"}, [101]={B,677,"/// ParseSEHFinallyBlock - Handle __finally\n///\n/// seh-finally-block:\n/// \'__finally\' compound-statement\n///\nStmtResult Parser::ParseSEHFinallyBlock(SourceLocation FinallyLoc) {\n // ...\n if (Tok.isNot(tok::l_brace))\n return StmtError(Diag(Tok, diag::err_expected) << tok::l_brace);"}, [102]={B,1168,"/// 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 // \"__label__ X, Y, Z;\" is the GNU \"Local Label\" extension. These are\n // only allowed at the start of a compound stmt regardless of the language.\n while (Tok.is(tok::kw___label__)) {\n // ...\n while (true) {\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [103]={B,2340,"/// ParseGotoStatement\n/// jump-statement:\n/// \'goto\' identifier \';\'\n/// [GNU] \'goto\' \'*\' expression \';\'\n///\n/// Note: this lets the caller parse the end \';\'.\n///\nStmtResult Parser::ParseGotoStatement() {\n // ...\n if (Tok.is(tok::identifier)) {\n // ...\n } else if (Tok.is(tok::star)) {\n // ...\n } else {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [104]={B,2589,"/// ParseCXXTryBlockCommon - Parse the common part of try-block and\n/// function-try-block.\n///\n/// try-block:\n/// \'try\' compound-statement handler-seq\n///\n/// function-try-block:\n/// \'try\' ctor-initializer[opt] compound-statement handler-seq\n///\n/// handler-seq:\n/// handler handler-seq[opt]\n///\n/// [Borland] try-block:\n/// \'try\' compound-statement seh-except-block\n/// \'try\' compound-statement seh-finally-block\n///\nStmtResult Parser::ParseCXXTryBlockCommon(SourceLocation TryLoc, bool FnTry) {\n if (Tok.isNot(tok::l_brace))\n return StmtError(Diag(Tok, diag::err_expected) << tok::l_brace);"}, [105]={B,2693,"/// ParseCXXCatchBlock - Parse a C++ catch block, called handler in the standard\n///\n/// handler:\n/// \'catch\' \'(\' exception-declaration \')\' compound-statement\n///\n/// exception-declaration:\n/// attribute-specifier-seq[opt] type-specifier-seq declarator\n/// attribute-specifier-seq[opt] type-specifier-seq abstract-declarator[opt]\n/// \'...\'\n///\nStmtResult Parser::ParseCXXCatchBlock(bool FnCatch) {\n // ...\n if (Tok.isNot(tok::l_brace))\n return StmtError(Diag(Tok, diag::err_expected) << tok::l_brace);"}, [106]={B,2714,"void Parser::ParseMicrosoftIfExistsStatement(StmtVector &Stmts) {\n // ...\n // Handle dependent statements by parsing the braces as a compound statement.\n // This is not the same behavior as Visual C++, which don\'t treat this as a\n // compound statement, but for Clang\'s type checking we can\'t have anything\n // inside these braces escaping to the surrounding code.\n if (Result.Behavior == IEB_Dependent) {\n if (!Tok.is(tok::l_brace)) {\n Diag(Tok, diag::err_expected) << tok::l_brace;"}, [107]={B,2734,"void Parser::ParseMicrosoftIfExistsStatement(StmtVector &Stmts) {\n // ...\n if (Braces.consumeOpen()) {\n Diag(Tok, diag::err_expected) << tok::l_brace;"}, [108]={qb,517,"/// ParseMicrosoftAsmStatement. When -fms-extensions/-fasm-blocks is enabled,\n/// this routine is called to collect the tokens for an MS asm statement.\n///\n/// [MS] ms-asm-statement:\n/// ms-asm-block\n/// ms-asm-block ms-asm-statement\n///\n/// [MS] ms-asm-block:\n/// \'__asm\' ms-asm-line \'\\n\'\n/// \'__asm\' \'{\' ms-asm-instruction-block[opt] \'}\' \';\'[opt]\n///\n/// [MS] ms-asm-instruction-block\n/// ms-asm-line\n/// ms-asm-line \'\\n\' ms-asm-instruction-block\n///\nStmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) {\n // ...\n if (BraceNesting && BraceCount != savedBraceCount) {\n // __asm without closing brace (this can happen at EOF).\n for (unsigned i = 0; i < BraceNesting; ++i) {\n Diag(Tok, diag::err_expected) << tok::r_brace;"}, [109]={qb,524,"/// ParseMicrosoftAsmStatement. When -fms-extensions/-fasm-blocks is enabled,\n/// this routine is called to collect the tokens for an MS asm statement.\n///\n/// [MS] ms-asm-statement:\n/// ms-asm-block\n/// ms-asm-block ms-asm-statement\n///\n/// [MS] ms-asm-block:\n/// \'__asm\' ms-asm-line \'\\n\'\n/// \'__asm\' \'{\' ms-asm-instruction-block[opt] \'}\' \';\'[opt]\n///\n/// [MS] ms-asm-instruction-block\n/// ms-asm-line\n/// ms-asm-line \'\\n\' ms-asm-instruction-block\n///\nStmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) {\n // ...\n if (BraceNesting && BraceCount != savedBraceCount) {\n // ...\n } else if (NumTokensRead == 0) {\n // ...\n Diag(Tok, diag::err_expected) << tok::l_brace;"}, [110]={qb,828,"/// 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() && (Tok.isNot(tok::r_paren) || AteExtraColon)) {\n Diag(Tok, diag::err_expected) << tok::r_paren;"}, [111]={qb,841,"/// 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 (AteExtraColon || Tok.is(tok::colon)) {\n // ...\n while (true) {\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [112]={qb,861,"/// 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 (AteExtraColon || Tok.is(tok::colon)) {\n // ...\n } else if (GAQ.isGoto()) {\n Diag(Tok, diag::err_expected) << tok::colon;"}, [113]={qb,899,"/// ParseAsmOperands - Parse the asm-operands production as used by\n/// asm-statement, assuming the leading \':\' token was eaten.\n///\n/// [GNU] asm-operands:\n/// asm-operand\n/// asm-operands \',\' asm-operand\n///\n/// [GNU] asm-operand:\n/// asm-string-literal \'(\' expression \')\'\n/// \'[\' identifier \']\' asm-string-literal \'(\' expression \')\'\n///\n//\n// FIXME: Avoid unnecessary std::string trashing.\nbool Parser::ParseAsmOperandsOpt(SmallVectorImpl<IdentifierInfo *> &Names, SmallVectorImpl<Expr *> &Constraints, SmallVectorImpl<Expr *> &Exprs) {\n // ...\n while (true) {\n // Read the [id] if present.\n if (Tok.is(tok::l_square)) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_expected) << tok::identifier;"}, [114]={Y,442,"/// \\brief Parse a single declaration that declares a concept.\n///\n/// \\param DeclEnd will receive the source location of the last token\n/// within this declaration.\n///\n/// \\returns the new declaration.\nDecl *Parser::ParseConceptDefinition(const ParsedTemplateInfo &TemplateInfo, SourceLocation &DeclEnd) {\n // ...\n if (!TryConsumeToken(tok::equal)) {\n Diag(Tok.getLocation(), diag::err_expected) << tok::equal;"}, [115]={Y,499,"/// ParseTemplateParameters - Parses a template-parameter-list enclosed in\n/// angle brackets. Depth is the depth of this template-parameter-list, which\n/// is the number of template headers directly enclosing this template header.\n/// TemplateParams is the current list of template parameters we\'re building.\n/// The template parameter we parse will be added to this list. LAngleLoc and\n/// RAngleLoc will receive the positions of the \'<\' and \'>\', respectively,\n/// that enclose this template parameter list.\n///\n/// \\returns true if an error occurred, false otherwise.\nbool Parser::ParseTemplateParameters(MultiParseScope &TemplateScopes, unsigned Depth, SmallVectorImpl<NamedDecl *> &TemplateParams, SourceLocation &LAngleLoc, SourceLocation &RAngleLoc) {\n // ...\n if (Tok.is(tok::greatergreater)) {\n // ...\n } else if (!TryConsumeToken(tok::greater, RAngleLoc) && Failed) {\n Diag(Tok.getLocation(), diag::err_expected) << tok::greater;"}, [116]={Y,842,"/// ParseTypeParameter - Parse a template type parameter (C++ [temp.param]).\n/// Other kinds of template parameters are parsed in\n/// ParseTemplateTemplateParameter and ParseNonTypeTemplateParameter.\n///\n/// type-parameter: [C++ temp.param]\n/// \'class\' ...[opt][C++0x] identifier[opt]\n/// \'class\' identifier[opt] \'=\' type-id\n/// \'typename\' ...[opt][C++0x] identifier[opt]\n/// \'typename\' identifier[opt] \'=\' type-id\nNamedDecl *Parser::ParseTypeParameter(unsigned Depth, unsigned Position) {\n // ...\n if (Tok.is(tok::identifier)) {\n // ...\n } else if (Tok.isOneOf(tok::equal, tok::comma, tok::greater, tok::greatergreater)) {\n // ...\n } else {\n Diag(Tok.getLocation(), diag::err_expected) << tok::identifier;"}, [117]={Y,973,"/// ParseTemplateTemplateParameter - Handle the parsing of template\n/// template parameters.\n///\n/// type-parameter: [C++ temp.param]\n/// template-head type-parameter-key ...[opt] identifier[opt]\n/// template-head type-parameter-key identifier[opt] = id-expression\n/// type-parameter-key:\n/// \'class\'\n/// \'typename\' [C++1z]\n/// template-head: [C++2a]\n/// \'template\' \'<\' template-parameter-list \'>\'\n/// requires-clause[opt]\nNamedDecl *Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) {\n // ...\n if (Tok.is(tok::identifier)) {\n // ...\n } else if (Tok.isOneOf(tok::equal, tok::comma, tok::greater, tok::greatergreater)) {\n // ...\n } else {\n Diag(Tok.getLocation(), diag::err_expected) << tok::identifier;"}, [118]={Y,1123,"/// Parses a \'>\' at the end of a template list.\n///\n/// If this function encounters \'>>\', \'>>>\', \'>=\', or \'>>=\', it tries\n/// to determine if these tokens were supposed to be a \'>\' followed by\n/// \'>\', \'>>\', \'>=\', or \'>=\'. It emits an appropriate diagnostic if necessary.\n///\n/// \\param RAngleLoc the location of the consumed \'>\'.\n///\n/// \\param ConsumeLastToken if true, the \'>\' is consumed.\n///\n/// \\param ObjCGenericList if true, this is the \'>\' closing an Objective-C\n/// type parameter or type argument list, rather than a C++ template parameter\n/// or argument list.\n///\n/// \\returns true, if current token does not start with \'>\', false otherwise.\nbool Parser::ParseGreaterThanInTemplateList(SourceLocation LAngleLoc, SourceLocation &RAngleLoc, bool ConsumeLastToken, bool ObjCGenericList) {\n // ...\n default:\n Diag(getEndOfPreviousToken(), diag::err_expected) << tok::greater;"}, [119]={"clang/unittests/Frontend/CompilerInstanceTest.cpp",94,"TEST(CompilerInstance, AllowDiagnosticLogWithUnownedDiagnosticConsumer) {\n // ...\n Diags->Report(diag::err_expected) << \"no crash\";"} }, [l]={ ["clang/test/Parser/objc-messaging-neg-1.m"]={"clang/test/Parser/objc-messaging-neg-1.m:9:12: error: expected \']\'","clang/test/Parser/objc-messaging-neg-1.m:10:10: error: expected \':\'","clang/test/Parser/objc-messaging-neg-1.m:11:10: error: expected \':\'"} } }, ["err_expected_after"]={ [d]="err_expected_after", [f]="expected %1 after %0", [b]="expected B after A", [i]=k, [h]="expected (.*?) after (.*?)", [g]=a, [e]=n, [c]={"ec543279db99",1387878510,"Support and use token kinds as diagnostic arguments","Support and use token kinds as diagnostic arguments\n\nIntroduce proper facilities to render token spellings using the diagnostic\nformatter.\n\nReplaces most of the hard-coded diagnostic messages related to expected tokens,\nwhich all shared the same semantics but had to be multiply defined due to\nvariations in token order or quote marks.\n\nThe associated parser changes are largely mechanical but they expose\ncommonality in whole chunks of the parser that can now be factored away.\n\nThis commit uses C++11 typed enums along with a speculative legacy fallback\nuntil the transition is complete.\n\nRequires corresponding changes in LLVM r197895.\n\nllvm-svn: 197972"}, [j]={{bb,96,"/// ParseCXXInlineMethodDef - We parsed and verified that the specified\n/// Declarator is a well formed C++ inline method definition. Now lex its body\n/// and store its tokens for parsing after the C++ class is complete.\nNamedDecl *Parser::ParseCXXInlineMethodDef(AccessSpecifier AS, const ParsedAttributesView &AccessAttrs, ParsingDeclarator &D, const ParsedTemplateInfo &TemplateInfo, const VirtSpecifiers &VS, SourceLocation PureSpecLoc) {\n // ...\n if (TryConsumeToken(tok::equal)) {\n // ...\n } else if (ExpectAndConsume(tok::semi, diag::err_expected_after, Delete ? \"delete\" : \"default\")) {"},{p,1228,"/// Parse the contents of the \"availability\" attribute.\n///\n/// availability-attribute:\n/// \'availability\' \'(\' platform \',\' opt-strict version-arg-list,\n/// opt-replacement, opt-message\')\'\n///\n/// platform:\n/// identifier\n///\n/// opt-strict:\n/// \'strict\' \',\'\n///\n/// version-arg-list:\n/// version-arg\n/// version-arg \',\' version-arg-list\n///\n/// version-arg:\n/// \'introduced\' \'=\' version\n/// \'deprecated\' \'=\' version\n/// \'obsoleted\' = version\n/// \'unavailable\'\n/// opt-replacement:\n/// \'replacement\' \'=\' <string>\n/// opt-message:\n/// \'message\' \'=\' <string>\nvoid Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, SourceLocation AvailabilityLoc, ParsedAttributes &attrs, SourceLocation *endLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n do {\n // ...\n if (Tok.isNot(tok::equal)) {\n Diag(Tok, diag::err_expected_after) << Keyword << tok::equal;"},{p,1411,"/// Parse the contents of the \"external_source_symbol\" attribute.\n///\n/// external-source-symbol-attribute:\n/// \'external_source_symbol\' \'(\' keyword-arg-list \')\'\n///\n/// keyword-arg-list:\n/// keyword-arg\n/// keyword-arg \',\' keyword-arg-list\n///\n/// keyword-arg:\n/// \'language\' \'=\' <string>\n/// \'defined_in\' \'=\' <string>\n/// \'USR\' \'=\' <string>\n/// \'generated_declaration\'\nvoid Parser::ParseExternalSourceSymbolAttribute(IdentifierInfo &ExternalSourceSymbol, SourceLocation Loc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n // Parse the language/defined_in/generated_declaration keywords\n do {\n // ...\n if (ExpectAndConsume(tok::equal, diag::err_expected_after, Keyword->getName())) {"},{p,3198,"/// Determine whether we\'re looking at something that might be a declarator\n/// in a simple-declaration. If it can\'t possibly be a declarator, maybe\n/// diagnose a missing semicolon after a prior tag definition in the decl\n/// specifier.\n///\n/// \\return \\c true if an error occurred and this can\'t be any kind of\n/// declaration.\nbool Parser::DiagnoseMissingSemiAfterTagDefinition(DeclSpec &DS, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs) {\n // ...\n Diag(PP.getLocForEndOfToken(DS.getRepAsDecl()->getEndLoc()), diag::err_expected_after) << DeclSpec::getSpecifierName(DS.getTypeSpecType(), PPol) << tok::semi;"},{p,4993,"/// ParseEnumSpecifier\n/// enum-specifier: [C99 6.7.2.2]\n/// \'enum\' identifier[opt] \'{\' enumerator-list \'}\'\n///[C99/C++]\'enum\' identifier[opt] \'{\' enumerator-list \',\' \'}\'\n/// [GNU] \'enum\' attributes[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\' attributes[opt]\n/// [MS] \'enum\' __declspec[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\'\n/// \'enum\' identifier\n/// [GNU] \'enum\' attributes[opt] identifier\n///\n/// [C++11] enum-head \'{\' enumerator-list[opt] \'}\'\n/// [C++11] enum-head \'{\' enumerator-list \',\' \'}\'\n///\n/// enum-head: [C++11]\n/// enum-key attribute-specifier-seq[opt] identifier[opt] enum-base[opt]\n/// enum-key attribute-specifier-seq[opt] nested-name-specifier\n/// identifier enum-base[opt]\n///\n/// enum-key: [C++11]\n/// \'enum\'\n/// \'enum\' \'class\'\n/// \'enum\' \'struct\'\n///\n/// enum-base: [C++11]\n/// \':\' type-specifier-seq\n///\n/// [C++] elaborated-type-specifier:\n/// [C++] \'enum\' nested-name-specifier[opt] identifier\n///\nvoid Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC) {\n // ...\n if (AllowEnumSpecifier == AllowDefiningTypeSpec::No)\n // ...\n else if (Tok.is(tok::l_brace)) {\n // ...\n } else if (!isTypeSpecifier(DSC) && (Tok.is(tok::semi) || (Tok.isAtStartOfLine() && !isValidAfterTypeSpecifier(CanBeBitfield)))) {\n // ...\n if (Tok.isNot(tok::semi)) {\n // ...\n ExpectAndConsume(tok::semi, diag::err_expected_after, \"enum\");"},{p,5293,"/// ParseEnumBody - Parse a {} enclosed enumerator-list.\n/// enumerator-list:\n/// enumerator\n/// enumerator-list \',\' enumerator\n/// enumerator:\n/// enumeration-constant attributes[opt]\n/// enumeration-constant attributes[opt] \'=\' constant-expression\n/// enumeration-constant:\n/// identifier\n///\nvoid Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl) {\n // ...\n if (!isValidAfterTypeSpecifier(CanBeBitfield)) {\n ExpectAndConsume(tok::semi, diag::err_expected_after, \"enum\");"},{r,748,"/// ParseUsingDeclaration - Parse C++ using-declaration or alias-declaration.\n/// Assumes that \'using\' was already seen.\n///\n/// using-declaration: [C++ 7.3.p3: namespace.udecl]\n/// \'using\' using-declarator-list[opt] ;\n///\n/// using-declarator-list: [C++1z]\n/// using-declarator \'...\'[opt]\n/// using-declarator-list \',\' using-declarator \'...\'[opt]\n///\n/// using-declarator-list: [C++98-14]\n/// using-declarator\n///\n/// alias-declaration: C++11 [dcl.dcl]p1\n/// \'using\' identifier attribute-specifier-seq[opt] = type-id ;\n///\n/// using-enum-declaration: [C++20, dcl.enum]\n/// \'using\' elaborated-enum-specifier ;\n/// The terminal name of the elaborated-enum-specifier undergoes\n/// ordinary lookup\n///\n/// elaborated-enum-specifier:\n/// \'enum\' nested-name-specifier[opt] identifier\nParser::DeclGroupPtrTy Parser::ParseUsingDeclaration(DeclaratorContext Context, const ParsedTemplateInfo &TemplateInfo, SourceLocation UsingLoc, SourceLocation &DeclEnd, ParsedAttributes &PrefixAttrs, AccessSpecifier AS) {\n // ...\n if (TryConsumeToken(tok::kw_enum, UELoc) && !InInitStatement) {\n // ...\n if (ExpectAndConsume(tok::semi, diag::err_expected_after, \"using-enum declaration\"))"},{r,859,"/// ParseUsingDeclaration - Parse C++ using-declaration or alias-declaration.\n/// Assumes that \'using\' was already seen.\n///\n/// using-declaration: [C++ 7.3.p3: namespace.udecl]\n/// \'using\' using-declarator-list[opt] ;\n///\n/// using-declarator-list: [C++1z]\n/// using-declarator \'...\'[opt]\n/// using-declarator-list \',\' using-declarator \'...\'[opt]\n///\n/// using-declarator-list: [C++98-14]\n/// using-declarator\n///\n/// alias-declaration: C++11 [dcl.dcl]p1\n/// \'using\' identifier attribute-specifier-seq[opt] = type-id ;\n///\n/// using-enum-declaration: [C++20, dcl.enum]\n/// \'using\' elaborated-enum-specifier ;\n/// The terminal name of the elaborated-enum-specifier undergoes\n/// ordinary lookup\n///\n/// elaborated-enum-specifier:\n/// \'enum\' nested-name-specifier[opt] identifier\nParser::DeclGroupPtrTy Parser::ParseUsingDeclaration(DeclaratorContext Context, const ParsedTemplateInfo &TemplateInfo, SourceLocation UsingLoc, SourceLocation &DeclEnd, ParsedAttributes &PrefixAttrs, AccessSpecifier AS) {\n // ...\n if (ExpectAndConsume(tok::semi, diag::err_expected_after, !Attrs.empty() ? \"attributes list\" : UELoc.isValid() ? \"using-enum declaration\" : \"using declaration\"))"},{r,932,"Decl *Parser::ParseAliasDeclarationAfterDeclarator(const ParsedTemplateInfo &TemplateInfo, SourceLocation UsingLoc, UsingDeclarator &D, SourceLocation &DeclEnd, AccessSpecifier AS, ParsedAttributes &Attrs, Decl **OwnedType) {\n // ...\n if (ExpectAndConsume(tok::semi, diag::err_expected_after, !Attrs.empty() ? \"attributes list\" : \"alias declaration\"))"},{r,1910,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n if (isDefiningTypeSpecifierContext(DSC, getLangOpts().CPlusPlus) == AllowDefiningTypeSpec::No || (getLangOpts().OpenMP && OpenMPDirectiveParsing))\n // ...\n else if (Tok.is(tok::l_brace) || (DSC != DeclSpecContext::DSC_association && getLangOpts().CPlusPlus && Tok.is(tok::colon)) || (isClassCompatibleKeyword() && (NextToken().is(tok::l_brace) || NextToken().is(tok::colon)))) {\n // ...\n } else if (isClassCompatibleKeyword() && (NextToken().is(tok::l_square) || NextToken().is(tok::kw_alignas) || NextToken().isRegularKeywordAttribute() || isCXX11VirtSpecifier(NextToken()) != VirtSpecifiers::VS_None)) {\n // ...\n } else if (!isTypeSpecifier(DSC) && (Tok.is(tok::semi) || (Tok.isAtStartOfLine() && !isValidAfterTypeSpecifier(false)))) {\n // ...\n if (Tok.isNot(tok::semi)) {\n // ...\n ExpectAndConsume(tok::semi, diag::err_expected_after, DeclSpec::getSpecifierName(TagType, PPol));"},{r,2195,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n // At this point, we\'ve successfully parsed a class-specifier in \'definition\'\n // form (e.g. \"struct foo { int x; }\". While we could just return here, we\'re\n // going to look at what comes after it to improve error recovery. If an\n // impossible token occurs next, we assume that the programmer forgot a ; at\n // the end of the declaration and recover that way.\n //\n // Also enforce C++ [temp]p3:\n // In a template-declaration which defines a class, no declarator\n // is permitted.\n //\n // After a type-specifier, we don\'t expect a semicolon. This only happens in\n // C, since definitions are not permitted in this context in C++.\n if (TUK == Sema::TUK_Definition && (getLangOpts().CPlusPlus || !isTypeSpecifier(DSC)) && (TemplateInfo.Kind || !isValidAfterTypeSpecifier(false))) {\n if (Tok.isNot(tok::semi)) {\n // ...\n ExpectAndConsume(tok::semi, diag::err_expected_after, DeclSpec::getSpecifierName(TagType, PPol));"},{r,2737,"/// ParseCXXClassMemberDeclaration - Parse a C++ class member declaration.\n///\n/// member-declaration:\n/// decl-specifier-seq[opt] member-declarator-list[opt] \';\'\n/// function-definition \';\'[opt]\n/// ::[opt] nested-name-specifier template[opt] unqualified-id \';\'[TODO]\n/// using-declaration [TODO]\n/// [C++0x] static_assert-declaration\n/// template-declaration\n/// [GNU] \'__extension__\' member-declaration\n///\n/// member-declarator-list:\n/// member-declarator\n/// member-declarator-list \',\' member-declarator\n///\n/// member-declarator:\n/// declarator virt-specifier-seq[opt] pure-specifier[opt]\n/// [C++2a] declarator requires-clause\n/// declarator constant-initializer[opt]\n/// [C++11] declarator brace-or-equal-initializer[opt]\n/// identifier[opt] \':\' constant-expression\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\n///\n/// virt-specifier:\n/// override\n/// final\n/// [MS] sealed\n///\n/// pure-specifier:\n/// \'= 0\'\n///\n/// constant-initializer:\n/// \'=\' constant-expression\n///\nParser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, ParsedAttributes &AccessAttrs, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject *TemplateDiags) {\n // ...\n if (!TemplateInfo.Kind && Tok.isOneOf(tok::identifier, tok::coloncolon, tok::kw___super)) {\n // ...\n if (isAccessDecl) {\n // ...\n if (ExpectAndConsume(tok::semi, diag::err_expected_after, \"access declaration\")) {"},{F,2357,"/// ParseExprAfterUnaryExprOrTypeTrait - We parsed a typeof/sizeof/alignof/\n/// vec_step and we are at the start of an expression or a parenthesized\n/// type-id. OpTok is the operand token (typeof/sizeof/alignof). Returns the\n/// expression (isCastExpr == false) or the type (isCastExpr == true).\n///\n/// \\verbatim\n/// unary-expression: [C99 6.5.3]\n/// \'sizeof\' unary-expression\n/// \'sizeof\' \'(\' type-name \')\'\n/// [GNU] \'__alignof\' unary-expression\n/// [GNU] \'__alignof\' \'(\' type-name \')\'\n/// [C11] \'_Alignof\' \'(\' type-name \')\'\n/// [C++0x] \'alignof\' \'(\' type-id \')\'\n///\n/// [GNU] typeof-specifier:\n/// typeof ( expressions )\n/// typeof ( type-name )\n/// [GNU/C++] typeof unary-expression\n/// [C2x] typeof-specifier:\n/// typeof \'(\' typeof-specifier-argument \')\'\n/// typeof_unqual \'(\' typeof-specifier-argument \')\'\n///\n/// typeof-specifier-argument:\n/// expression\n/// type-name\n///\n/// [OpenCL 1.1 6.11.12] vec_step built-in function:\n/// vec_step ( expressions )\n/// vec_step ( type-name )\n/// \\endverbatim\nExprResult Parser::ParseExprAfterUnaryExprOrTypeTrait(const Token &OpTok, bool &isCastExpr, ParsedType &CastTy, SourceRange &CastRange) {\n // ...\n // If the operand doesn\'t start with an \'(\', it must be an expression.\n if (Tok.isNot(tok::l_paren)) {\n // ...\n if (OpTok.isOneOf(tok::kw_typeof, tok::kw_typeof_unqual) && !getLangOpts().CPlusPlus) {\n Diag(Tok, diag::err_expected_after) << OpTok.getIdentifierInfo() << tok::l_paren;"},{F,2573,"/// ParseBuiltinPrimaryExpression\n///\n/// \\verbatim\n/// primary-expression: [C99 6.5.1]\n/// [GNU] \'__builtin_va_arg\' \'(\' assignment-expression \',\' type-name \')\'\n/// [GNU] \'__builtin_offsetof\' \'(\' type-name \',\' offsetof-member-designator\')\'\n/// [GNU] \'__builtin_choose_expr\' \'(\' assign-expr \',\' assign-expr \',\'\n/// assign-expr \')\'\n/// [GNU] \'__builtin_types_compatible_p\' \'(\' type-name \',\' type-name \')\'\n/// [GNU] \'__builtin_FILE\' \'(\' \')\'\n/// [CLANG] \'__builtin_FILE_NAME\' \'(\' \')\'\n/// [GNU] \'__builtin_FUNCTION\' \'(\' \')\'\n/// [MS] \'__builtin_FUNCSIG\' \'(\' \')\'\n/// [GNU] \'__builtin_LINE\' \'(\' \')\'\n/// [CLANG] \'__builtin_COLUMN\' \'(\' \')\'\n/// [GNU] \'__builtin_source_location\' \'(\' \')\'\n/// [OCL] \'__builtin_astype\' \'(\' assignment-expression \',\' type-name \')\'\n///\n/// [GNU] offsetof-member-designator:\n/// [GNU] identifier\n/// [GNU] offsetof-member-designator \'.\' identifier\n/// [GNU] offsetof-member-designator \'[\' expression \']\'\n/// \\endverbatim\nExprResult Parser::ParseBuiltinPrimaryExpression() {\n // ...\n // All of these start with an open paren.\n if (Tok.isNot(tok::l_paren))\n return ExprError(Diag(Tok, diag::err_expected_after) << BuiltinII << tok::l_paren);"},{z,180,"///\n/// objc-class-declaration:\n/// \'@\' \'class\' objc-class-forward-decl (\',\' objc-class-forward-decl)* \';\'\n///\n/// objc-class-forward-decl:\n/// identifier objc-type-parameter-list[opt]\n///\nParser::DeclGroupPtrTy Parser::ParseObjCAtClassDeclaration(SourceLocation atLoc) {\n // ...\n if (ExpectAndConsume(tok::semi, diag::err_expected_after, \"@class\"))"},{z,2112,"/// objc-protocol-declaration:\n/// objc-protocol-definition\n/// objc-protocol-forward-reference\n///\n/// objc-protocol-definition:\n/// \\@protocol identifier\n/// objc-protocol-refs[opt]\n/// objc-interface-decl-list\n/// \\@end\n///\n/// objc-protocol-forward-reference:\n/// \\@protocol identifier-list \';\'\n///\n/// \"\\@protocol identifier ;\" should be resolved as \"\\@protocol\n/// identifier-list ;\": objc-interface-decl-list may not start with a\n/// semicolon in the first alternative if objc-protocol-refs are omitted.\nParser::DeclGroupPtrTy Parser::ParseObjCAtProtocolDeclaration(SourceLocation AtLoc, ParsedAttributes &attrs) {\n // ...\n if (Tok.is(tok::comma)) { // list of forward declarations.\n // ...\n if (ExpectAndConsume(tok::semi, diag::err_expected_after, \"@protocol\"))"},{z,2356,"/// compatibility-alias-decl:\n/// @compatibility_alias alias-name class-name \';\'\n///\nDecl *Parser::ParseObjCAtAliasDeclaration(SourceLocation atLoc) {\n // ...\n ExpectAndConsume(tok::semi, diag::err_expected_after, \"@compatibility_alias\");"},{z,2415,"/// property-synthesis:\n/// @synthesize property-ivar-list \';\'\n///\n/// property-ivar-list:\n/// property-ivar\n/// property-ivar-list \',\' property-ivar\n///\n/// property-ivar:\n/// identifier\n/// identifier \'=\' identifier\n///\nDecl *Parser::ParseObjCPropertySynthesize(SourceLocation atLoc) {\n // ...\n ExpectAndConsume(tok::semi, diag::err_expected_after, \"@synthesize\");"},{z,2479,"/// property-dynamic:\n/// @dynamic property-list\n///\n/// property-list:\n/// identifier\n/// property-list \',\' identifier\n///\nDecl *Parser::ParseObjCPropertyDynamic(SourceLocation atLoc) {\n // ...\n ExpectAndConsume(tok::semi, diag::err_expected_after, \"@dynamic\");"},{z,2497,"/// objc-throw-statement:\n/// throw expression[opt];\n///\nStmtResult Parser::ParseObjCThrowStmt(SourceLocation atLoc) {\n // ...\n ExpectAndConsume(tok::semi, diag::err_expected_after, \"@throw\");"},{M,128,"bool Parser::ExpectAndConsume(tok::TokenKind ExpectedTok, unsigned DiagID, StringRef Msg) {\n // ...\n // Detect common single-character typos and resume.\n if (IsCommonTypo(ExpectedTok, Tok)) {\n // ...\n {\n // ...\n else if (DiagID == diag::err_expected_after)"},{M,150,"bool Parser::ExpectAndConsume(tok::TokenKind ExpectedTok, unsigned DiagID, StringRef Msg) {\n // ...\n else if (DiagID == diag::err_expected_after)"},{M,900,"/// 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_asm: {\n // ...\n ExpectAndConsume(tok::semi, diag::err_expected_after, \"top-level asm block\");"},{M,1385,"/// ParseFunctionDefinition - We parsed and verified that the specified\n/// Declarator is well formed. If this is a K&R-style function, read the\n/// parameters declaration-list, then start the compound-statement.\n///\n/// function-definition: [C99 6.9.1]\n/// decl-specs declarator declaration-list[opt] compound-statement\n/// [C90] function-definition: [C99 6.7.1] - implicit int result\n/// [C90] decl-specs[opt] declarator declaration-list[opt] compound-statement\n/// [C++] function-definition: [C++ 8.4]\n/// decl-specifier-seq[opt] declarator ctor-initializer[opt]\n/// function-body\n/// [C++] function-definition: [C++ 8.4]\n/// decl-specifier-seq[opt] declarator function-try-block\n///\nDecl *Parser::ParseFunctionDefinition(ParsingDeclarator &D, const ParsedTemplateInfo &TemplateInfo, LateParsedAttrList *LateParsedAttrs) {\n // ...\n if (TryConsumeToken(tok::equal)) {\n // ...\n } else if (ExpectAndConsume(tok::semi, diag::err_expected_after, BodyKind == Sema::FnBodyKind::Delete ? \"delete\" : \"default\")) {"},{B,861,"/// ParseCaseStatement\n/// labeled-statement:\n/// \'case\' constant-expression \':\' statement\n/// [GNU] \'case\' constant-expression \'...\' constant-expression \':\' statement\n///\nStmtResult Parser::ParseCaseStatement(ParsedStmtContext StmtCtx, bool MissingCase, ExprResult Expr) {\n // ...\n do {\n // ...\n if (TryConsumeToken(tok::colon, ColonLoc)) {\n } else if (TryConsumeToken(tok::semi, ColonLoc) || TryConsumeToken(tok::coloncolon, ColonLoc)) {\n // ...\n Diag(ColonLoc, diag::err_expected_after) << \"\'case\'\" << tok::colon << FixItHint::CreateReplacement(ColonLoc, \":\");"},{B,866,"/// ParseCaseStatement\n/// labeled-statement:\n/// \'case\' constant-expression \':\' statement\n/// [GNU] \'case\' constant-expression \'...\' constant-expression \':\' statement\n///\nStmtResult Parser::ParseCaseStatement(ParsedStmtContext StmtCtx, bool MissingCase, ExprResult Expr) {\n // ...\n do {\n // ...\n if (TryConsumeToken(tok::colon, ColonLoc)) {\n } else if (TryConsumeToken(tok::semi, ColonLoc) || TryConsumeToken(tok::coloncolon, ColonLoc)) {\n // ...\n } else {\n // ...\n Diag(ExpectedLoc, diag::err_expected_after) << \"\'case\'\" << tok::colon << FixItHint::CreateInsertion(ExpectedLoc, \":\");"},{B,937,"/// ParseDefaultStatement\n/// labeled-statement:\n/// \'default\' \':\' statement\n/// Note that this does not parse the \'statement\' at the end.\n///\nStmtResult Parser::ParseDefaultStatement(ParsedStmtContext StmtCtx) {\n // ...\n if (TryConsumeToken(tok::colon, ColonLoc)) {\n } else if (TryConsumeToken(tok::semi, ColonLoc)) {\n // ...\n Diag(ColonLoc, diag::err_expected_after) << \"\'default\'\" << tok::colon << FixItHint::CreateReplacement(ColonLoc, \":\");"},{B,942,"/// ParseDefaultStatement\n/// labeled-statement:\n/// \'default\' \':\' statement\n/// Note that this does not parse the \'statement\' at the end.\n///\nStmtResult Parser::ParseDefaultStatement(ParsedStmtContext StmtCtx) {\n // ...\n if (TryConsumeToken(tok::colon, ColonLoc)) {\n } else if (TryConsumeToken(tok::semi, ColonLoc)) {\n // ...\n } else {\n // ...\n Diag(ExpectedLoc, diag::err_expected_after) << \"\'default\'\" << tok::colon << FixItHint::CreateInsertion(ExpectedLoc, \":\");"},{B,1646,"/// ParseIfStatement\n/// if-statement: [C99 6.8.4.1]\n/// \'if\' \'(\' expression \')\' statement\n/// \'if\' \'(\' expression \')\' statement \'else\' statement\n/// [C++] \'if\' \'(\' condition \')\' statement\n/// [C++] \'if\' \'(\' condition \')\' statement \'else\' statement\n/// [C++23] \'if\' \'!\' [opt] consteval compound-statement\n/// [C++23] \'if\' \'!\' [opt] consteval compound-statement \'else\' statement\n///\nStmtResult Parser::ParseIfStatement(SourceLocation *TrailingElseLoc) {\n // ...\n if (IsConsteval) {\n // ...\n if (!IsCompoundStatement(ThenStmt.get())) {\n Diag(ConstevalLoc, diag::err_expected_after) << \"consteval\""},{B,1651,"/// ParseIfStatement\n/// if-statement: [C99 6.8.4.1]\n/// \'if\' \'(\' expression \')\' statement\n/// \'if\' \'(\' expression \')\' statement \'else\' statement\n/// [C++] \'if\' \'(\' condition \')\' statement\n/// [C++] \'if\' \'(\' condition \')\' statement \'else\' statement\n/// [C++23] \'if\' \'!\' [opt] consteval compound-statement\n/// [C++23] \'if\' \'!\' [opt] consteval compound-statement \'else\' statement\n///\nStmtResult Parser::ParseIfStatement(SourceLocation *TrailingElseLoc) {\n // ...\n if (IsConsteval) {\n // ...\n if (!ElseStmt.isUnset() && !IsCompoundStatement(ElseStmt.get())) {\n Diag(ElseLoc, diag::err_expected_after) << \"else\""}}, [l]={ ["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:113:15: error: expected \';\' after enum","clang/test/Parser/declarators.c:116:22: error: expected \';\' after struct"} } }, ["err_expected_allocator_clause"]={ [d]={{nil,s,"err_expected_allocator_clause"}}, [f]={{nil,s,"expected an \'allocator\' clause inside of the target region; provide an \'allocator\' clause or use \'requires\' directive with the \'dynamic_allocators\' clause"}}, [b]={{nil,s,"expected an \'allocator\' clause inside of the target region; provide an \'allocator\' clause or use \'requires\' directive with the \'dynamic_allocators\' clause"}}, [i]=k, [h]="expected an \'allocator\' clause inside of the target region; provide an \'allocator\' clause or use \'requires\' directive with the \'dynamic_allocators\' clause", [g]=a, [e]={{nil,s,"OpenMP Issue"}}, [c]={"2213dd61d623",1553265699,"[OPENMP]Emit error message for allocate directive without allocator","[OPENMP]Emit error message for allocate directive without allocator\nclause in target region.\n\nAccording to the OpenMP 5.0, 2.11.3 allocate Directive, Restrictions,\nallocate directives that appear in a target region must specify an\nallocator clause unless a requires directive with the dynamic_allocators\nclause is present in the same compilation unit.\n\nllvm-svn: 356752"}, [j]={{"clang/lib/Sema/SemaOpenMP.cpp",3392,"Sema::DeclGroupPtrTy Sema::ActOnOpenMPAllocateDirective(SourceLocation Loc, ArrayRef<Expr *> VarList, ArrayRef<OMPClause *> Clauses, DeclContext *Owner) {\n // ...\n if (Clauses.empty()) {\n // OpenMP 5.0, 2.11.3 allocate Directive, Restrictions.\n // allocate directives that appear in a target region must specify an\n // allocator clause unless a requires directive with the dynamic_allocators\n // clause is present in the same compilation unit.\n if (LangOpts.OpenMPIsTargetDevice && !DSAStack->hasRequiresDeclWithClause<OMPDynamicAllocatorsClause>())\n targetDiag(Loc, diag::err_expected_allocator_clause);"}}, [l]={ ["clang/test/OpenMP/nvptx_allocate_messages.cpp"]={"clang/test/OpenMP/nvptx_allocate_messages.cpp:82:1: error: expected an \'allocator\' clause inside of the target region; provide an \'allocator\' clause or use \'requires\' directive with the \'dynamic_allocators\' clause","clang/test/OpenMP/nvptx_allocate_messages.cpp:20:1: error: expected an \'allocator\' clause inside of the target region; provide an \'allocator\' clause or use \'requires\' directive with the \'dynamic_allocators\' clause"} } }, ["err_expected_allocator_expression"]={ [d]={{nil,s,"err_expected_allocator_expression"}}, [f]={{nil,s,"expected an allocator expression inside of the target region; provide an allocator expression or use \'requires\' directive with the \'dynamic_allocators\' clause"}}, [b]={{nil,s,"expected an allocator expression inside of the target region; provide an allocator expression or use \'requires\' directive with the \'dynamic_allocators\' clause"}}, [i]=k, [h]="expected an allocator expression inside of the target region; provide an allocator expression or use \'requires\' directive with the \'dynamic_allocators\' clause", [g]=a, [e]={{nil,s,"OpenMP Issue"}}, [c]={"84c8baeef71e",1554137819,"[OPENMP]Allocate clause allocator in target region.","[OPENMP]Allocate clause allocator in target region.\n\nAccording to OpenMP 5.0, 2.11.4 allocate Clause, Restrictions, allocate\nclauses that appear on a target construct or on constructs in a target\nregion must specify an allocator expression unless a requires directive\nwith the dynamic_allocators clause is present in the same compilation\nunit. Patch adds a check for this restriction.\n\nllvm-svn: 357412"}, [j]={{"clang/lib/Sema/SemaOpenMP.cpp",23672,"OMPClause *Sema::ActOnOpenMPAllocateClause(Expr *Allocator, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation ColonLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n if (Allocator) {\n // ...\n } else {\n // OpenMP 5.0, 2.11.4 allocate Clause, Restrictions.\n // allocate clauses that appear on a target construct or on constructs in a\n // target region must specify an allocator expression unless a requires\n // directive with the dynamic_allocators clause is present in the same\n // compilation unit.\n if (LangOpts.OpenMPIsTargetDevice && !DSAStack->hasRequiresDeclWithClause<OMPDynamicAllocatorsClause>())\n targetDiag(StartLoc, diag::err_expected_allocator_expression);"}}, [l]={ ["clang/test/OpenMP/nvptx_allocate_messages.cpp"]={"clang/test/OpenMP/nvptx_allocate_messages.cpp:64:33: error: expected an allocator expression inside of the target region; provide an allocator expression or use \'requires\' directive with the \'dynamic_allocators\' clause"} } }, ["err_expected_begin_assumes"]={ [d]={{nil,D,"err_expected_begin_assumes"}}, [f]={{nil,D,"\'#pragma omp end assumes\' with no matching \'#pragma omp begin assumes\'"}}, [b]={{nil,D,"\'#pragma omp end assumes\' with no matching \'#pragma omp begin assumes\'"}}, [i]=k, [h]="\'\\#pragma omp end assumes\' with no matching \'\\#pragma omp begin assumes\'", [g]=a, [e]={{nil,D,n}}, [c]={"38d18d93534d",1601621202,"[SVE] Add support to vectorize_width loop pragma for scalable vectors","[SVE] Add support to vectorize_width loop pragma for scalable vectors\n\nThis patch adds support for two new variants of the vectorize_width\npragma:\n\n1. vectorize_width(X[, fixed|scalable]) where an optional second\nparameter is passed to the vectorize_width pragma, which indicates if\nthe user wishes to use fixed width or scalable vectorization. For\nexample the user can now write something like:\n\n #pragma clang loop vectorize_width(4, fixed)\nor\n #pragma clang loop vectorize_width(4, scalable)\n\nIn the absence of a second parameter it is assumed the user wants\nfixed width vectorization, in order to maintain compatibility with\nexisting code.\n2. vectorize_width(fixed|scalable) where the width is left unspecified,\nbut the user hints what type of vectorization they prefer, either\nfixed width or scalable.\n\nI have implemented this by making use of the LLVM loop hint attribute:\n\n llvm.loop.vectorize.scalable.enable\n\nTests were added to\n\n clang/test/CodeGenCXX/pragma-loop.cpp\n\nfor both the \'fixed\' and \'scalable\' optional parameter.\n\nSee this thread for context: http://lists.llvm.org/pipermail/cfe-dev/2020-November/067262.html\n\nDifferential Revision: https://reviews.llvm.org/D89031"}, [j]={{E,1761,"void Parser::ParseOpenMPEndAssumesDirective(SourceLocation Loc) {\n if (Actions.isInOpenMPAssumeScope())\n // ...\n else\n Diag(Loc, diag::err_expected_begin_assumes);"}}, [l]={ ["clang/test/OpenMP/assumes_messages_attr.c"]={"clang/test/OpenMP/assumes_messages_attr.c:53:22: error: \'#pragma omp end assumes\' with no matching \'#pragma omp begin assumes\'"} } }, ["err_expected_begin_declare_variant"]={ [d]={{nil,C,"err_expected_begin_declare_variant"}}, [f]={{nil,C,"\'#pragma omp end declare variant\' with no matching \'#pragma omp begin declare variant\'"}}, [b]={{nil,C,"\'#pragma omp end declare variant\' with no matching \'#pragma omp begin declare variant\'"}}, [i]=k, [h]="\'\\#pragma omp end declare variant\' with no matching \'\\#pragma omp begin declare variant\'", [g]=a, [e]={{nil,C,n}}, [c]={"f08df464ae89",1582039343,"[OPENMP50]Add initial support for OpenMP 5.0 iterator.","[OPENMP50]Add initial support for OpenMP 5.0 iterator.\n\nAdded basic parsing/semantic analysis/(de)serialization support for\niterator expression introduced in OpenMP 5.0."}, [j]={{E,2282,"/// 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_end_declare_variant: {\n if (Actions.isInOpenMPDeclareVariantScope())\n // ...\n else\n Diag(Loc, diag::err_expected_begin_declare_variant);"}}, [l]={ ["clang/test/OpenMP/begin_declare_variant_messages.c"]={"clang/test/OpenMP/begin_declare_variant_messages.c:11:1: error: \'#pragma omp end declare variant\' with no matching \'#pragma omp begin declare variant\'","clang/test/OpenMP/begin_declare_variant_messages.c:13:1: error: \'#pragma omp end declare variant\' with no matching \'#pragma omp begin declare variant\'","clang/test/OpenMP/begin_declare_variant_messages.c:15:1: error: \'#pragma omp end declare variant\' with no matching \'#pragma omp begin declare variant\'","clang/test/OpenMP/begin_declare_variant_messages.c:21:1: error: \'#pragma omp end declare variant\' with no matching \'#pragma omp begin declare variant\'","clang/test/OpenMP/begin_declare_variant_messages.c:22:1: error: \'#pragma omp end declare variant\' with no matching \'#pragma omp begin declare variant\'","clang/test/OpenMP/begin_declare_variant_messages.c:23:1: error: \'#pragma omp end declare variant\' with no matching \'#pragma omp begin declare variant\'","clang/test/OpenMP/begin_declare_variant_messages.c:24:1: error: \'#pragma omp end declare variant\' with no matching \'#pragma omp begin declare variant\'"} } }, ["err_expected_callable_argument"]={ [d]={{nil,x,"err_expected_callable_argument"}}, [f]={{nil,x,"expected a callable expression as %ordinal0 argument to %1, found %2"}}, [b]={{nil,x,"expected a callable expression as A argument to B, found C"}}, [i]=k, [h]="expected a callable expression as (.*?) argument to (.*?), found (.*?)", [g]=a, [e]={{nil,x,m}}, [c]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs","Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/classes (the\ntype information may be lost through a function pointer, a declaration\nor use of the underlying type without using the typedef, etc) but I\nthink there\'s still value in being able to attribute a typedef and have\nall return types written with that typedef pick up the\nwarn_unused_result behavior.\n\nSpecifically I\'d like to be able to annotate LLVMErrorRef (a wrapper for\nllvm::Error used in the C API - the underlying type is a raw pointer, so\nit can\'t be attributed itself) to reduce the chance of unhandled errors.\n\nDifferential Revision: https://reviews.llvm.org/D102122"}, [j]={{db,708,"static ExprResult SemaBuiltinDumpStruct(Sema &S, CallExpr *TheCall) {\n // ...\n if (!FnArgType->isFunctionType() && !FnArgType->isFunctionPointerType() && !FnArgType->isBlockPointerType() && !(S.getLangOpts().CPlusPlus && FnArgType->isRecordType())) {\n // ...\n default:\n S.Diag(TheCall->getArg(1)->getBeginLoc(), diag::err_expected_callable_argument) << 2 << TheCall->getDirectCallee() << FnArgType;"}}, [l]={ ["clang/test/Sema/builtin-dump-struct.c"]={"clang/test/Sema/builtin-dump-struct.c:16:29: error: expected a callable expression as 2nd argument to \'__builtin_dump_struct\', found \'int\'"} } }, ["err_expected_capture"]={ [d]="err_expected_capture", [f]="expected variable name or \'this\' in lambda capture list", [b]="expected variable name or \'this\' in lambda capture list", [i]=k, [h]="expected variable name or \'this\' in lambda capture list", [g]=a, [e]=n, [c]={"db0b9f126459",1312471847,"Parsing of C++0x lambda expressions, from John Freeman with help from","Parsing of C++0x lambda expressions, from John Freeman with help from\nDavid Blaikie!\n\nllvm-svn: 136876"}, [j]={{O,973,"/// Parse a lambda introducer.\n/// \\param Intro A LambdaIntroducer filled in with information about the\n/// contents of the lambda-introducer.\n/// \\param Tentative If non-null, we are disambiguating between a\n/// lambda-introducer and some other construct. In this mode, we do not\n/// produce any diagnostics or take any other irreversible action unless\n/// we\'re sure that this is a lambda-expression.\n/// \\return \\c true if parsing (or disambiguation) failed with a diagnostic and\n/// the caller should bail out / recover.\nbool Parser::ParseLambdaIntroducer(LambdaIntroducer &Intro, LambdaIntroducerTentativeParse *Tentative) {\n // ...\n while (Tok.isNot(tok::r_square)) {\n // ...\n if (Tok.is(tok::star)) {\n // ...\n } else if (Tok.is(tok::kw_this)) {\n // ...\n } else if (Tok.isOneOf(tok::amp, tok::equal) && NextToken().isOneOf(tok::comma, tok::r_square) && Intro.Default == LCD_None) {\n // ...\n } else {\n // ...\n if (Tok.is(tok::identifier)) {\n // ...\n } else if (Tok.is(tok::kw_this)) {\n // ...\n } else {\n return Invalid([&] { Diag(Tok.getLocation(), diag::err_expected_capture); });"}}, [l]={ ["clang/test/Parser/lambda-misplaced-capture-default.cpp"]={"clang/test/Parser/lambda-misplaced-capture-default.cpp:6:11: error: expected variable name or \'this\' in lambda capture list","clang/test/Parser/lambda-misplaced-capture-default.cpp:7:10: error: expected variable name or \'this\' in lambda capture list","clang/test/Parser/lambda-misplaced-capture-default.cpp:8:12: error: expected variable name or \'this\' in lambda capture list","clang/test/Parser/lambda-misplaced-capture-default.cpp:9:11: error: expected variable name or \'this\' in lambda capture list","clang/test/Parser/lambda-misplaced-capture-default.cpp:13:7: error: expected variable name or \'this\' in lambda capture list"} } }, ["err_expected_case_before_expression"]={ [d]="err_expected_case_before_expression", [f]="expected \'case\' keyword before expression", [b]="expected \'case\' keyword before expression", [i]=k, [h]="expected \'case\' keyword before expression", [g]=a, [e]=n, [c]={"2c850c09801b",1303422266,"Add a fixit suggest for missing case keywords inside a switch scope. For instance, in the following...","Add a fixit suggest for missing case keywords inside a switch scope. For instance, in the following code, \'case \' will be suggested before the \'1:\'\n\nswitch (x) {\n 1: return 0;\n default: return 1;\n}\n\nllvm-svn: 129943"}, [j]={{B,546,"/// Parse an expression statement.\nStmtResult Parser::ParseExprStatement(ParsedStmtContext StmtCtx) {\n // ...\n if (Tok.is(tok::colon) && getCurScope()->isSwitchScope() && Actions.CheckCaseExpression(Expr.get())) {\n // ...\n Diag(OldToken, diag::err_expected_case_before_expression) << FixItHint::CreateInsertion(OldToken.getLocation(), \"case \");"}}, [l]={ ["clang/test/Parser/switch-recovery.cpp"]={"clang/test/Parser/switch-recovery.cpp:38:7: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:46:5: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:54:5: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:54:7: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:54:9: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:54:11: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:72:5: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:80:5: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:101:5: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:103:5: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:103:7: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:103:9: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:104:5: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:139:7: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:146:5: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:148:7: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:150:9: error: expected \'case\' keyword before expression","clang/test/Parser/switch-recovery.cpp:152:11: error: expected \'case\' keyword before expression"} } }, ["err_expected_catch"]={ [d]="err_expected_catch", [f]="expected catch", [b]="expected catch", [i]=k, [h]="expected catch", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{B,2629,"/// ParseCXXTryBlockCommon - Parse the common part of try-block and\n/// function-try-block.\n///\n/// try-block:\n/// \'try\' compound-statement handler-seq\n///\n/// function-try-block:\n/// \'try\' ctor-initializer[opt] compound-statement handler-seq\n///\n/// handler-seq:\n/// handler handler-seq[opt]\n///\n/// [Borland] try-block:\n/// \'try\' compound-statement seh-except-block\n/// \'try\' compound-statement seh-finally-block\n///\nStmtResult Parser::ParseCXXTryBlockCommon(SourceLocation TryLoc, bool FnTry) {\n // ...\n if ((Tok.is(tok::identifier) && Tok.getIdentifierInfo() == getSEHExceptKeyword()) || Tok.is(tok::kw___finally)) {\n // ...\n } else {\n // ...\n if (Tok.isNot(tok::kw_catch))\n return StmtError(Diag(Tok, diag::err_expected_catch));"}} }, ["err_expected_class_name"]={ [d]="err_expected_class_name", [f]="expected class name", [b]="expected class name", [i]=k, [h]="expected class name", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{r,1314,"/// ParseBaseTypeSpecifier - Parse a C++ base-type-specifier which is either a\n/// class name or decltype-specifier. Note that we only check that the result\n/// names a type; semantic analysis will need to verify that the type names a\n/// class. The result is either a type or null, depending on whether a type\n/// name was found.\n///\n/// base-type-specifier: [C++11 class.derived]\n/// class-or-decltype\n/// class-or-decltype: [C++11 class.derived]\n/// nested-name-specifier[opt] class-name\n/// decltype-specifier\n/// class-name: [C++ class.name]\n/// identifier\n/// simple-template-id\n///\n/// In C++98, instead of base-type-specifier, we have:\n///\n/// ::[opt] nested-name-specifier[opt] class-name\nTypeResult Parser::ParseBaseTypeSpecifier(SourceLocation &BaseLoc, SourceLocation &EndLocation) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_expected_class_name);"},{r,1368,"/// ParseBaseTypeSpecifier - Parse a C++ base-type-specifier which is either a\n/// class name or decltype-specifier. Note that we only check that the result\n/// names a type; semantic analysis will need to verify that the type names a\n/// class. The result is either a type or null, depending on whether a type\n/// name was found.\n///\n/// base-type-specifier: [C++11 class.derived]\n/// class-or-decltype\n/// class-or-decltype: [C++11 class.derived]\n/// nested-name-specifier[opt] class-name\n/// decltype-specifier\n/// class-name: [C++ class.name]\n/// identifier\n/// simple-template-id\n///\n/// In C++98, instead of base-type-specifier, we have:\n///\n/// ::[opt] nested-name-specifier[opt] class-name\nTypeResult Parser::ParseBaseTypeSpecifier(SourceLocation &BaseLoc, SourceLocation &EndLocation) {\n // ...\n if (!Type) {\n Diag(IdLoc, diag::err_expected_class_name);"}}, [l]={ ["clang/test/Parser/recovery.cpp"]={"clang/test/Parser/recovery.cpp:137:5: error: expected class name","clang/test/Parser/recovery.cpp:138:13: error: expected class name","clang/test/Parser/recovery.cpp:216:12: error: expected class name"} } }, ["err_expected_class_name_not_template"]={ [d]="err_expected_class_name_not_template", [f]="\'typename\' is redundant; base classes are implicitly types", [b]="\'typename\' is redundant; base classes are implicitly types", [i]=k, [h]="\'typename\' is redundant; base classes are implicitly types", [g]=a, [e]=n, [c]={"dd58d4ca8fbc",1319568401,"Handle redundant \'typename\' on base class specifications.","Handle redundant \'typename\' on base class specifications.\n\nllvm-svn: 142937"}, [j]={{r,1265,"/// ParseBaseTypeSpecifier - Parse a C++ base-type-specifier which is either a\n/// class name or decltype-specifier. Note that we only check that the result\n/// names a type; semantic analysis will need to verify that the type names a\n/// class. The result is either a type or null, depending on whether a type\n/// name was found.\n///\n/// base-type-specifier: [C++11 class.derived]\n/// class-or-decltype\n/// class-or-decltype: [C++11 class.derived]\n/// nested-name-specifier[opt] class-name\n/// decltype-specifier\n/// class-name: [C++ class.name]\n/// identifier\n/// simple-template-id\n///\n/// In C++98, instead of base-type-specifier, we have:\n///\n/// ::[opt] nested-name-specifier[opt] class-name\nTypeResult Parser::ParseBaseTypeSpecifier(SourceLocation &BaseLoc, SourceLocation &EndLocation) {\n // Ignore attempts to use typename\n if (Tok.is(tok::kw_typename)) {\n Diag(Tok, diag::err_expected_class_name_not_template) << FixItHint::CreateRemoval(Tok.getLocation());"}}, [l]={ ["clang/test/CXX/class.derived/p1.cpp"]={"clang/test/CXX/class.derived/p1.cpp:39:21: error: \'typename\' is redundant; base classes are implicitly types"} } }, ["err_expected_class_or_namespace"]={ [d]="err_expected_class_or_namespace", [f]="%0 is not a class%select{ or namespace|, namespace, or enumeration}1", [b]={{nil,nil,{"A is not a class",{" or namespace",", namespace, or enumeration"}}}}, [i]=k, [h]="(.*?) is not a class(?: or namespace|, namespace, or enumeration)", [g]=a, [e]=m, [c]={U,1237025389,T,W}, [j]={{Pb,599,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (Found.empty() && !ErrorRecoveryLookup) {\n // ...\n if (!R.empty()) {\n // ...\n Diag(R.getNameLoc(), OnlyNamespace ? unsigned(diag::err_expected_namespace_name) : unsigned(diag::err_expected_class_or_namespace)) << IdInfo.Identifier << getLangOpts().CPlusPlus;"},{Pb,809,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (!Found.empty()) {\n if (TypeDecl *TD = Found.getAsSingle<TypeDecl>()) {\n Diag(IdInfo.IdentifierLoc, diag::err_expected_class_or_namespace) << Context.getTypeDeclType(TD) << getLangOpts().CPlusPlus;"},{Pb,816,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (!Found.empty()) {\n if (TypeDecl *TD = Found.getAsSingle<TypeDecl>()) {\n // ...\n } else if (Found.getAsSingle<TemplateDecl>()) {\n // ...\n } else {\n Diag(IdInfo.IdentifierLoc, diag::err_expected_class_or_namespace) << IdInfo.Identifier << getLangOpts().CPlusPlus;"},{Pb,857,"bool Sema::ActOnCXXNestedNameSpecifierDecltype(CXXScopeSpec &SS, const DeclSpec &DS, SourceLocation ColonColonLoc) {\n // ...\n if (!T->isDependentType() && !T->getAs<TagType>()) {\n Diag(DS.getTypeSpecTypeLoc(), diag::err_expected_class_or_namespace) << T << getLangOpts().CPlusPlus;"}}, [l]={ ["clang/test/CXX/expr/expr.prim/expr.prim.general/p8-0x.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.general/p8-0x.cpp:50:3: error: \'decltype(int())\' (aka \'int\') is not a class, namespace, or enumeration","clang/test/CXX/expr/expr.prim/expr.prim.general/p8-0x.cpp:51:3: error: \'decltype(int())\' (aka \'int\') is not a class, namespace, or enumeration"} } }, ["err_expected_colon_after_setter_name"]={ [d]="err_expected_colon_after_setter_name", [f]="method name referenced in property setter attribute must end with \':\'", [b]="method name referenced in property setter attribute must end with \':\'", [i]=k, [h]="method name referenced in property setter attribute must end with \'\\:\'", [g]=a, [e]=mb, [c]={"8efe0ec89928",1266272411,"Issue a bettter diagnostics for incorrect property setter name.","Issue a bettter diagnostics for incorrect property setter name.\n(radar 7647953).\n\nllvm-svn: 96284"}, [j]={{z,963,"/// Parse property attribute declarations.\n///\n/// property-attr-decl: \'(\' property-attrlist \')\'\n/// property-attrlist:\n/// property-attribute\n/// property-attrlist \',\' property-attribute\n/// property-attribute:\n/// getter \'=\' identifier\n/// setter \'=\' identifier \':\'\n/// direct\n/// readonly\n/// readwrite\n/// assign\n/// retain\n/// copy\n/// nonatomic\n/// atomic\n/// strong\n/// weak\n/// unsafe_unretained\n/// nonnull\n/// nullable\n/// null_unspecified\n/// null_resettable\n/// class\n///\nvoid Parser::ParseObjCPropertyAttribute(ObjCDeclSpec &DS) {\n // ...\n while (true) {\n // ...\n if (II->isStr(\"readonly\"))\n // ...\n else if (II->isStr(\"assign\"))\n // ...\n else if (II->isStr(\"unsafe_unretained\"))\n // ...\n else if (II->isStr(\"readwrite\"))\n // ...\n else if (II->isStr(\"retain\"))\n // ...\n else if (II->isStr(\"strong\"))\n // ...\n else if (II->isStr(\"copy\"))\n // ...\n else if (II->isStr(\"nonatomic\"))\n // ...\n else if (II->isStr(\"atomic\"))\n // ...\n else if (II->isStr(\"weak\"))\n // ...\n else if (II->isStr(\"getter\") || II->isStr(\"setter\")) {\n // ...\n if (IsSetter) {\n // ...\n if (ExpectAndConsume(tok::colon, diag::err_expected_colon_after_setter_name)) {"}}, [l]={ ["clang/test/Parser/objc-property-syntax.m"]={"clang/test/Parser/objc-property-syntax.m:8:62: error: method name referenced in property setter attribute must end with \':\'"} } }, ["err_expected_coloncolon_after_super"]={ [d]="err_expected_coloncolon_after_super", [f]="expected \'::\' after \'__super\'", [b]="expected \'::\' after \'__super\'", [i]=k, [h]="expected \'\\:\\:\' after \'__super\'", [g]=a, [e]=n, [c]={"67860249e064",1411691300,"-ms-extensions: Implement __super scope specifier (PR13236).","-ms-extensions: Implement __super scope specifier (PR13236).\n\nWe build a NestedNameSpecifier that records the CXXRecordDecl in which\n__super appeared. Name lookup is performed in all base classes of the\nrecorded CXXRecordDecl. Use of __super is allowed only inside class and\nmember function scope.\n\nllvm-svn: 218484"}, [j]={{O,209,"/// Parse global scope or nested-name-specifier if present.\n///\n/// Parses a C++ global scope specifier (\'::\') or nested-name-specifier (which\n/// may be preceded by \'::\'). Note that this routine will not parse ::new or\n/// ::delete; it will just leave them in the token stream.\n///\n/// \'::\'[opt] nested-name-specifier\n/// \'::\'\n///\n/// nested-name-specifier:\n/// type-name \'::\'\n/// namespace-name \'::\'\n/// nested-name-specifier identifier \'::\'\n/// nested-name-specifier \'template\'[opt] simple-template-id \'::\'\n///\n///\n/// \\param SS the scope specifier that will be set to the parsed\n/// nested-name-specifier (or empty)\n///\n/// \\param ObjectType if this nested-name-specifier is being parsed following\n/// the \".\" or \"->\" of a member access expression, this parameter provides the\n/// type of the object whose members are being accessed.\n///\n/// \\param ObjectHadErrors if this unqualified-id occurs within a member access\n/// expression, indicates whether the original subexpressions had any errors.\n/// When true, diagnostics for missing \'template\' keyword will be supressed.\n///\n/// \\param EnteringContext whether we will be entering into the context of\n/// the nested-name-specifier after parsing it.\n///\n/// \\param MayBePseudoDestructor When non-NULL, points to a flag that\n/// indicates whether this nested-name-specifier may be part of a\n/// pseudo-destructor name. In this case, the flag will be set false\n/// if we don\'t actually end up parsing a destructor name. Moreover,\n/// if we do end up determining that we are parsing a destructor name,\n/// the last component of the nested-name-specifier is not parsed as\n/// part of the scope specifier.\n///\n/// \\param IsTypename If \\c true, this nested-name-specifier is known to be\n/// part of a type name. This is used to improve error recovery.\n///\n/// \\param LastII When non-NULL, points to an IdentifierInfo* that will be\n/// filled in with the leading identifier in the last component of the\n/// nested-name-specifier, if any.\n///\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n///\n/// \\returns true if there was an error parsing a scope specifier\nbool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS, ParsedType ObjectType, bool ObjectHadErrors, bool EnteringContext, bool *MayBePseudoDestructor, bool IsTypename, IdentifierInfo **LastII, bool OnlyNamespace, bool InUsingDeclaration) {\n // ...\n if (Tok.is(tok::kw___super)) {\n // ...\n if (!Tok.is(tok::coloncolon)) {\n Diag(Tok.getLocation(), diag::err_expected_coloncolon_after_super);"}}, [l]={ ["clang/test/Parser/recovery.cpp"]={"clang/test/Parser/recovery.cpp:213:17: error: expected \'::\' after \'__super\'","clang/test/Parser/recovery.cpp:213:35: error: expected \'::\' after \'__super\'"} } }, ["err_expected_comma_greater"]={ [d]="err_expected_comma_greater", [f]="expected \',\' or \'>\' in template-parameter-list", [b]="expected \',\' or \'>\' in template-parameter-list", [i]=k, [h]="expected \',\' or \'\\>\' in template\\-parameter\\-list", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{Y,538,"/// ParseTemplateParameterList - Parse a template parameter list. If\n/// the parsing fails badly (i.e., closing bracket was left out), this\n/// will try to put the token stream in a reasonable position (closing\n/// a statement, etc.) and return false.\n///\n/// template-parameter-list: [C++ temp]\n/// template-parameter\n/// template-parameter-list \',\' template-parameter\nbool Parser::ParseTemplateParameterList(const unsigned Depth, SmallVectorImpl<NamedDecl *> &TemplateParams) {\n while (true) {\n // ...\n // Did we find a comma or the end of the template parameter list?\n if (Tok.is(tok::comma)) {\n // ...\n } else if (Tok.isOneOf(tok::greater, tok::greatergreater)) {\n // ...\n } else {\n // ...\n Diag(Tok.getLocation(), diag::err_expected_comma_greater);"}}, [l]={ ["clang/test/SemaCXX/PR16677.cpp"]={"clang/test/SemaCXX/PR16677.cpp:13:2: error: expected \',\' or \'>\' in template-parameter-list"} } }, ["err_expected_comma_or_rsquare"]={ [d]="err_expected_comma_or_rsquare", [f]="expected \',\' or \']\' in lambda capture list", [b]="expected \',\' or \']\' in lambda capture list", [i]=k, [h]="expected \',\' or \'\\]\' in lambda capture list", [g]=a, [e]=n, [c]={"db0b9f126459",1312471847,"Parsing of C++0x lambda expressions, from John Freeman with help from","Parsing of C++0x lambda expressions, from John Freeman with help from\nDavid Blaikie!\n\nllvm-svn: 136876"}, [j]={{p,6755,"void Parser::ParseDecompositionDeclarator(Declarator &D) {\n // ...\n while (Tok.isNot(tok::r_square)) {\n if (!Bindings.empty()) {\n if (Tok.is(tok::comma))\n // ...\n else {\n if (Tok.is(tok::identifier)) {\n // ...\n } else {\n Diag(Tok, diag::err_expected_comma_or_rsquare);"},{O,895,"/// Parse a lambda introducer.\n/// \\param Intro A LambdaIntroducer filled in with information about the\n/// contents of the lambda-introducer.\n/// \\param Tentative If non-null, we are disambiguating between a\n/// lambda-introducer and some other construct. In this mode, we do not\n/// produce any diagnostics or take any other irreversible action unless\n/// we\'re sure that this is a lambda-expression.\n/// \\return \\c true if parsing (or disambiguation) failed with a diagnostic and\n/// the caller should bail out / recover.\nbool Parser::ParseLambdaIntroducer(LambdaIntroducer &Intro, LambdaIntroducerTentativeParse *Tentative) {\n // ...\n while (Tok.isNot(tok::r_square)) {\n if (!First) {\n if (Tok.isNot(tok::comma)) {\n // ...\n return Invalid([&] { Diag(Tok.getLocation(), diag::err_expected_comma_or_rsquare); });"}}, [l]={ ["clang/test/Parser/objcxx0x-lambda-expressions.mm"]={"clang/test/Parser/objcxx0x-lambda-expressions.mm:13:11: error: expected \',\' or \']\' in lambda capture list"} } }, ["err_expected_either"]={ [d]="err_expected_either", [f]="expected %0 or %1", [b]="expected A or B", [i]=k, [h]="expected (.*?) or (.*?)", [g]=a, [e]=n, [c]={"ec543279db99",1387878510,"Support and use token kinds as diagnostic arguments","Support and use token kinds as diagnostic arguments\n\nIntroduce proper facilities to render token spellings using the diagnostic\nformatter.\n\nReplaces most of the hard-coded diagnostic messages related to expected tokens,\nwhich all shared the same semantics but had to be multiply defined due to\nvariations in token order or quote marks.\n\nThe associated parser changes are largely mechanical but they expose\ncommonality in whole chunks of the parser that can now be factored away.\n\nThis commit uses C++11 typed enums along with a speculative legacy fallback\nuntil the transition is complete.\n\nRequires corresponding changes in LLVM r197895.\n\nllvm-svn: 197972"}, [j]={{bb,1019,"/// Consume tokens and store them in the passed token container until\n/// we\'ve passed the try keyword and constructor initializers and have consumed\n/// the opening brace of the function body. The opening brace will be consumed\n/// if and only if there was no error.\n///\n/// \\return True on error.\nbool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens &Toks) {\n // ...\n while (true) {\n // ...\n if (MightBeTemplateArgument) {\n // ...\n } else if (Tok.isNot(tok::l_paren) && Tok.isNot(tok::l_brace)) {\n // We found something weird in a mem-initializer-id.\n if (getLangOpts().CPlusPlus11)\n return Diag(Tok.getLocation(), diag::err_expected_either) << tok::l_paren << tok::l_brace;"},{bb,1101,"/// Consume tokens and store them in the passed token container until\n/// we\'ve passed the try keyword and constructor initializers and have consumed\n/// the opening brace of the function body. The opening brace will be consumed\n/// if and only if there was no error.\n///\n/// \\return True on error.\nbool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens &Toks) {\n // ...\n while (true) {\n // ...\n // If we know we just consumed a mem-initializer, we must have \',\' or \'{\'\n // next.\n if (Tok.is(tok::comma)) {\n // ...\n } else if (Tok.is(tok::l_brace)) {\n // ...\n } else if (!MightBeTemplateArgument) {\n return Diag(Tok.getLocation(), diag::err_expected_either) << tok::l_brace << tok::comma;"},{p,4854,"/// ParseEnumSpecifier\n/// enum-specifier: [C99 6.7.2.2]\n/// \'enum\' identifier[opt] \'{\' enumerator-list \'}\'\n///[C99/C++]\'enum\' identifier[opt] \'{\' enumerator-list \',\' \'}\'\n/// [GNU] \'enum\' attributes[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\' attributes[opt]\n/// [MS] \'enum\' __declspec[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\'\n/// \'enum\' identifier\n/// [GNU] \'enum\' attributes[opt] identifier\n///\n/// [C++11] enum-head \'{\' enumerator-list[opt] \'}\'\n/// [C++11] enum-head \'{\' enumerator-list \',\' \'}\'\n///\n/// enum-head: [C++11]\n/// enum-key attribute-specifier-seq[opt] identifier[opt] enum-base[opt]\n/// enum-key attribute-specifier-seq[opt] nested-name-specifier\n/// identifier enum-base[opt]\n///\n/// enum-key: [C++11]\n/// \'enum\'\n/// \'enum\' \'class\'\n/// \'enum\' \'struct\'\n///\n/// enum-base: [C++11]\n/// \':\' type-specifier-seq\n///\n/// [C++] elaborated-type-specifier:\n/// [C++] \'enum\' nested-name-specifier[opt] identifier\n///\nvoid Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC) {\n // ...\n // Must have either \'enum name\' or \'enum {...}\' or (rarely) \'enum : T { ... }\'.\n if (Tok.isNot(tok::identifier) && Tok.isNot(tok::l_brace) && Tok.isNot(tok::colon)) {\n Diag(Tok, diag::err_expected_either) << tok::identifier << tok::l_brace;"},{p,5242,"/// ParseEnumBody - Parse a {} enclosed enumerator-list.\n/// enumerator-list:\n/// enumerator\n/// enumerator-list \',\' enumerator\n/// enumerator:\n/// enumeration-constant attributes[opt]\n/// enumeration-constant attributes[opt] \'=\' constant-expression\n/// enumeration-constant:\n/// identifier\n///\nvoid Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl) {\n // ...\n // Parse the enumerator-list.\n while (Tok.isNot(tok::r_brace)) {\n // ...\n if (Tok.isNot(tok::r_brace) && !TryConsumeToken(tok::comma, CommaLoc)) {\n if (EqualLoc.isValid())\n Diag(Tok.getLocation(), diag::err_expected_either) << tok::r_brace << tok::comma;"},{p,6634,"/// ParseDirectDeclarator\n/// direct-declarator: [C99 6.7.5]\n/// [C99] identifier\n/// \'(\' declarator \')\'\n/// [GNU] \'(\' attributes declarator \')\'\n/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\n/// direct-declarator \'(\' parameter-type-list \')\'\n/// direct-declarator \'(\' identifier-list[opt] \')\'\n/// [GNU] direct-declarator \'(\' parameter-forward-declarations\n/// parameter-type-list[opt] \')\'\n/// [C++] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// cv-qualifier-seq[opt] exception-specification[opt]\n/// [C++11] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// attribute-specifier-seq[opt] cv-qualifier-seq[opt]\n/// ref-qualifier[opt] exception-specification[opt]\n/// [C++] declarator-id\n/// [C++11] declarator-id attribute-specifier-seq[opt]\n///\n/// declarator-id: [C++ 8]\n/// \'...\'[opt] id-expression\n/// \'::\'[opt] nested-name-specifier[opt] type-name\n///\n/// id-expression: [C++ 5.1]\n/// unqualified-id\n/// qualified-id\n///\n/// unqualified-id: [C++ 5.1]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// \'~\' class-name\n/// template-id\n///\n/// C++17 adds the following, which we also handle here:\n///\n/// simple-declaration:\n/// <decl-spec> \'[\' identifier-list \']\' brace-or-equal-initializer \';\'\n///\n/// Note, any additional constructs added here may need corresponding changes\n/// in isConstructorDeclarator.\nvoid Parser::ParseDirectDeclarator(Declarator &D) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n } else if (D.mayOmitIdentifier()) {\n // ...\n } else {\n // ...\n if (D.getContext() == DeclaratorContext::Member) {\n // ...\n } else {\n if (Tok.getKind() == tok::TokenKind::kw_while) {\n // ...\n } else if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n Diag(getMissingDeclaratorIdLoc(D, Tok.getLocation()), diag::err_expected_either) << tok::identifier << tok::l_paren;"},{r,157,"/// ParseNamespace - We know that the current token is a namespace keyword. This\n/// may either be a top level namespace or a block-level namespace alias. If\n/// there was an inline keyword, it has already been parsed.\n///\n/// namespace-definition: [C++: namespace.def]\n/// named-namespace-definition\n/// unnamed-namespace-definition\n/// nested-namespace-definition\n///\n/// named-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] identifier \'{\'\n/// namespace-body \'}\'\n///\n/// unnamed-namespace-definition:\n/// \'inline\'[opt] \'namespace\' attributes[opt] \'{\' namespace-body \'}\'\n///\n/// nested-namespace-definition:\n/// \'namespace\' enclosing-namespace-specifier \'::\' \'inline\'[opt]\n/// identifier \'{\' namespace-body \'}\'\n///\n/// enclosing-namespace-specifier:\n/// identifier\n/// enclosing-namespace-specifier \'::\' \'inline\'[opt] identifier\n///\n/// namespace-alias-definition: [C++ 7.3.2: namespace.alias]\n/// \'namespace\' identifier \'=\' qualified-namespace-specifier \';\'\n///\nParser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SourceLocation &DeclEnd, SourceLocation InlineLoc) {\n // ...\n if (T.consumeOpen()) {\n if (Ident)\n // ...\n else\n Diag(Tok, diag::err_expected_either) << tok::identifier << tok::l_brace;"},{r,3765,"/// ParseConstructorInitializer - Parse a C++ constructor initializer,\n/// which explicitly initializes the members or base classes of a\n/// class (C++ [class.base.init]). For example, the three initializers\n/// after the \':\' in the Derived constructor below:\n///\n/// @code\n/// class Base { };\n/// class Derived : Base {\n/// int x;\n/// float f;\n/// public:\n/// Derived(float f) : Base(), x(17), f(f) { }\n/// };\n/// @endcode\n///\n/// [C++] ctor-initializer:\n/// \':\' mem-initializer-list\n///\n/// [C++] mem-initializer-list:\n/// mem-initializer ...[opt]\n/// mem-initializer ...[opt] , mem-initializer-list\nvoid Parser::ParseConstructorInitializer(Decl *ConstructorDecl) {\n // ...\n do {\n // ...\n if (Tok.is(tok::comma))\n // ...\n else if (Tok.is(tok::l_brace))\n // ...\n // If the previous initializer was valid and the next token looks like a\n // base or member initializer, assume that we\'re just missing a comma.\n else if (!MemInit.isInvalid() && Tok.isOneOf(tok::identifier, tok::coloncolon)) {\n // ...\n } else {\n // Skip over garbage, until we get to \'{\'. Don\'t eat the \'{\'.\n if (!MemInit.isInvalid())\n Diag(Tok.getLocation(), diag::err_expected_either) << tok::l_brace << tok::comma;"},{r,3889,"/// ParseMemInitializer - Parse a C++ member initializer, which is\n/// part of a constructor initializer that explicitly initializes one\n/// member or base class (C++ [class.base.init]). See\n/// ParseConstructorInitializer for an example.\n///\n/// [C++] mem-initializer:\n/// mem-initializer-id \'(\' expression-list[opt] \')\'\n/// [C++0x] mem-initializer-id braced-init-list\n///\n/// [C++] mem-initializer-id:\n/// \'::\'[opt] nested-name-specifier[opt] class-name\n/// identifier\nMemInitResult Parser::ParseMemInitializer(Decl *ConstructorDecl) {\n // ...\n if (getLangOpts().CPlusPlus11)\n return Diag(Tok, diag::err_expected_either) << tok::l_paren << tok::l_brace;"},{z,3502,"ExprResult Parser::ParseObjCArrayLiteral(SourceLocation AtLoc) {\n // ...\n while (Tok.isNot(tok::r_square)) {\n // ...\n if (Tok.is(tok::comma))\n // ...\n else if (Tok.isNot(tok::r_square))\n return ExprError(Diag(Tok, diag::err_expected_either) << tok::r_square << tok::comma);"},{z,3567,"ExprResult Parser::ParseObjCDictionaryLiteral(SourceLocation AtLoc) {\n // ...\n while (Tok.isNot(tok::r_brace)) {\n // ...\n if (!TryConsumeToken(tok::comma) && Tok.isNot(tok::r_brace))\n return ExprError(Diag(Tok, diag::err_expected_either) << tok::r_brace << tok::comma);"},{"clang/lib/Sema/SemaExprObjC.cpp",2200,"ExprResult Sema::ActOnClassPropertyRefExpr(IdentifierInfo &receiverName, IdentifierInfo &propertyName, SourceLocation receiverNameLoc, SourceLocation propertyNameLoc) {\n // ...\n if (!IFace) {\n // ...\n if (!IFace) {\n Diag(receiverNameLoc, diag::err_expected_either) << tok::identifier << tok::l_paren;"}}, [l]={ ["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:10:1: error: expected identifier or \'(\'","clang/test/Preprocessor/macro_fn.c:14:1: error: expected identifier or \'(\'"} } }, ["err_expected_end_declare_target_or_variant"]={ [d]={{nil,C,"err_expected_end_declare_target_or_variant"}}, [f]={{nil,C,"expected \'#pragma omp end declare %select{target|variant}0\'"}}, [b]={{nil,C,{"expected \'#pragma omp end declare ",{"target","variant"},"\'"}}}, [i]=k, [h]="expected \'\\#pragma omp end declare (?:target|variant)\'", [g]=a, [e]={{nil,C,n}}, [c]={"f08df464ae89",1582039343,"[OPENMP50]Add initial support for OpenMP 5.0 iterator.","[OPENMP50]Add initial support for OpenMP 5.0 iterator.\n\nAdded basic parsing/semantic analysis/(de)serialization support for\niterator expression introduced in OpenMP 5.0."}, [j]={{E,1988,"void Parser::parseOMPEndDirective(OpenMPDirectiveKind BeginKind, OpenMPDirectiveKind ExpectedKind, OpenMPDirectiveKind FoundKind, SourceLocation BeginLoc, SourceLocation FoundLoc, bool SkipUntilOpenMPEnd) {\n // ...\n Diag(FoundLoc, diag::err_expected_end_declare_target_or_variant) << DiagSelection;"}}, [l]={ ["clang/test/OpenMP/begin_declare_variant_no_end_for_matching_selector.c"]={"clang/test/OpenMP/begin_declare_variant_no_end_for_matching_selector.c:33:67: error: expected \'#pragma omp end declare variant\'"} } }, ["err_expected_end_of_enumerator"]={ [d]="err_expected_end_of_enumerator", [f]="expected \'= constant-expression\' or end of enumerator definition", [b]="expected \'= constant-expression\' or end of enumerator definition", [i]=k, [h]="expected \'\\= constant\\-expression\' or end of enumerator definition", [g]=a, [e]=n, [c]={"2e3ecb660ad8",1388471163,"Recover from errors in enum definition","Recover from errors in enum definition\n\nPreviously any error in enum definition body stopped parsing it. With this\nchange parser tries to recover from errors.\nThe patch fixes PR10982.\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2018\n\nllvm-svn: 198259"}, [j]={{p,5245,"/// ParseEnumBody - Parse a {} enclosed enumerator-list.\n/// enumerator-list:\n/// enumerator\n/// enumerator-list \',\' enumerator\n/// enumerator:\n/// enumeration-constant attributes[opt]\n/// enumeration-constant attributes[opt] \'=\' constant-expression\n/// enumeration-constant:\n/// identifier\n///\nvoid Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl) {\n // ...\n // Parse the enumerator-list.\n while (Tok.isNot(tok::r_brace)) {\n // ...\n if (Tok.isNot(tok::r_brace) && !TryConsumeToken(tok::comma, CommaLoc)) {\n if (EqualLoc.isValid())\n // ...\n else\n Diag(Tok.getLocation(), diag::err_expected_end_of_enumerator);"}}, [l]={ ["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:139:6: error: expected \'= constant-expression\' or end of enumerator definition","clang/test/Parser/declarators.c:151:5: error: expected \'= constant-expression\' or end of enumerator definition"} } }, ["err_expected_equal_designator"]={ [d]="err_expected_equal_designator", [f]="expected \'=\' or another designator", [b]="expected \'=\' or another designator", [i]=k, [h]="expected \'\\=\' or another designator", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{"clang/lib/Parse/ParseInit.cpp",118,"static void CheckArrayDesignatorSyntax(Parser &P, SourceLocation Loc, Designation &Desig) {\n // If we have exactly one array designator, this used the GNU\n // \'designation: array-designator\' extension, otherwise there should be no\n // designators at all!\n if (Desig.getNumDesignators() == 1 && (Desig.getDesignator(0).isArrayDesignator() || Desig.getDesignator(0).isArrayRangeDesignator()))\n // ...\n else if (Desig.getNumDesignators() > 0)\n P.Diag(Loc, diag::err_expected_equal_designator);"},{"clang/lib/Parse/ParseInit.cpp",425,"/// ParseInitializerWithPotentialDesignator - Parse the \'initializer\' production\n/// checking to see if the token stream starts with a designator.\n///\n/// C99:\n///\n/// designation:\n/// designator-list \'=\'\n/// [GNU] array-designator\n/// [GNU] identifier \':\'\n///\n/// designator-list:\n/// designator\n/// designator-list designator\n///\n/// designator:\n/// array-designator\n/// \'.\' identifier\n///\n/// array-designator:\n/// \'[\' constant-expression \']\'\n/// [GNU] \'[\' constant-expression \'...\' constant-expression \']\'\n///\n/// C++20:\n///\n/// designated-initializer-list:\n/// designated-initializer-clause\n/// designated-initializer-list \',\' designated-initializer-clause\n///\n/// designated-initializer-clause:\n/// designator brace-or-equal-initializer\n///\n/// designator:\n/// \'.\' identifier\n///\n/// We allow the C99 syntax extensions in C++20, but do not allow the C++20\n/// extension (a braced-init-list after the designator with no \'=\') in C99.\n///\n/// NOTE: [OBC] allows \'[ objc-receiver objc-message-args ]\' as an\n/// initializer (because it is an expression). We need to consider this case\n/// when parsing array designators.\n///\n/// \\p CodeCompleteCB is called with Designation parsed so far.\nExprResult Parser::ParseInitializerWithPotentialDesignator(DesignatorCompletionInfo DesignatorCompletion) {\n // ...\n Diag(Tok, diag::err_expected_equal_designator);"}}, [l]={ ["clang/test/Parser/designator.c"]={"clang/test/Parser/designator.c:16:16: error: expected \'=\' or another designator"} } }, ["err_expected_expression"]={ [d]="err_expected_expression", [f]="expected expression", [b]="expected expression", [i]=k, [h]="expected expression", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{F,691,"/// Parse a cast-expression, unary-expression or primary-expression, based\n/// on \\p ExprType.\n///\n/// \\p isAddressOfOperand exists because an id-expression that is the\n/// operand of address-of gets special treatment due to member pointers.\n///\nExprResult Parser::ParseCastExpression(CastParseKind ParseKind, bool isAddressOfOperand, TypeCastState isTypeCast, bool isVectorLiteral, bool *NotPrimaryExpression) {\n // ...\n if (NotCastExpr)\n Diag(Tok, diag::err_expected_expression);"},{F,1561,"#include \"clang/Basic/OpenCLImageTypes.def\"\n {\n if (!getLangOpts().CPlusPlus) {\n Diag(Tok, diag::err_expected_expression);"},{F,1681,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // ...\n case tok::coloncolon: {\n // ...\n Diag(CCLoc, diag::err_expected_expression);"},{F,3694,"/// ParseBlockLiteralExpression - Parse a block literal, which roughly looks\n/// like ^(int x){ return x+1; }\n///\n/// \\verbatim\n/// block-literal:\n/// [clang] \'^\' block-args[opt] compound-statement\n/// [clang] \'^\' block-id compound-statement\n/// [clang] block-args:\n/// [clang] \'(\' parameter-list \')\'\n/// \\endverbatim\nExprResult Parser::ParseBlockLiteralExpression() {\n // ...\n if (!Tok.is(tok::l_brace)) {\n // ...\n Diag(Tok, diag::err_expected_expression);"},{E,363,"/// Parse \'omp declare reduction\' construct.\n///\n/// declare-reduction-directive:\n/// annot_pragma_openmp \'declare\' \'reduction\'\n/// \'(\' <reduction_id> \':\' <type> {\',\' <type>} \':\' <expression> \')\'\n/// [\'initializer\' \'(\' (\'omp_priv\' \'=\' <expression>)|<function_call> \')\']\n/// annot_pragma_openmp_end\n/// <reduction_id> is either a base language identifier or one of the following\n/// operators: \'+\', \'-\', \'*\', \'&\', \'|\', \'^\', \'&&\' and \'||\'.\n///\nParser::DeclGroupPtrTy Parser::ParseOpenMPDeclareReductionDirective(AccessSpecifier AS) {\n // ...\n if (Tok.is(tok::annot_pragma_openmp_end)) {\n Diag(Tok.getLocation(), diag::err_expected_expression);"}}, [l]={ ["clang/test/Lexer/c2x_digit_separators.c"]={"clang/test/Lexer/c2x_digit_separators.c:23:12: error: expected expression"} } }, ["err_expected_external_declaration"]={ [d]="err_expected_external_declaration", [f]="expected external declaration", [b]="expected external declaration", [i]=k, [h]="expected external declaration", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{M,875,"/// 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::eof:\n Diag(Tok, diag::err_expected_external_declaration);"},{M,913,"/// 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::minus:\n case tok::plus:\n if (!getLangOpts().ObjC) {\n Diag(Tok, diag::err_expected_external_declaration);"}}, [l]={ ["clang/test/Parser/cxx-attributes.cpp"]={"clang/test/Parser/cxx-attributes.cpp:53:6: error: expected external declaration"} } }, ["err_expected_field_designator"]={ [d]="err_expected_field_designator", [f]="expected a field designator, such as \'.field = 4\'", [b]="expected a field designator, such as \'.field = 4\'", [i]=k, [h]="expected a field designator, such as \'\\.field \\= 4\'", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{"clang/lib/Parse/ParseInit.cpp",212,"/// ParseInitializerWithPotentialDesignator - Parse the \'initializer\' production\n/// checking to see if the token stream starts with a designator.\n///\n/// C99:\n///\n/// designation:\n/// designator-list \'=\'\n/// [GNU] array-designator\n/// [GNU] identifier \':\'\n///\n/// designator-list:\n/// designator\n/// designator-list designator\n///\n/// designator:\n/// array-designator\n/// \'.\' identifier\n///\n/// array-designator:\n/// \'[\' constant-expression \']\'\n/// [GNU] \'[\' constant-expression \'...\' constant-expression \']\'\n///\n/// C++20:\n///\n/// designated-initializer-list:\n/// designated-initializer-clause\n/// designated-initializer-list \',\' designated-initializer-clause\n///\n/// designated-initializer-clause:\n/// designator brace-or-equal-initializer\n///\n/// designator:\n/// \'.\' identifier\n///\n/// We allow the C99 syntax extensions in C++20, but do not allow the C++20\n/// extension (a braced-init-list after the designator with no \'=\') in C99.\n///\n/// NOTE: [OBC] allows \'[ objc-receiver objc-message-args ]\' as an\n/// initializer (because it is an expression). We need to consider this case\n/// when parsing array designators.\n///\n/// \\p CodeCompleteCB is called with Designation parsed so far.\nExprResult Parser::ParseInitializerWithPotentialDesignator(DesignatorCompletionInfo DesignatorCompletion) {\n // ...\n // Parse each designator in the designator list until we find an initializer.\n while (Tok.is(tok::period) || Tok.is(tok::l_square)) {\n if (Tok.is(tok::period)) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok.getLocation(), diag::err_expected_field_designator);"}} }, ["err_expected_fn_body"]={ [d]="err_expected_fn_body", [f]="expected function body after function declarator", [b]="expected function body after function declarator", [i]=k, [h]="expected function body after function declarator", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{p,2212,"/// ParseDeclGroup - Having concluded that this is either a function\n/// definition or a group of object declarations, actually parse the\n/// result.\nParser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec &DS, DeclaratorContext Context, ParsedAttributes &Attrs, SourceLocation *DeclEnd, ForRangeInit *FRI) {\n // ...\n if (D.isFunctionDeclarator()) {\n // ...\n // Look at the next token to make sure that this isn\'t a function\n // declaration. We have to check this because __attribute__ might be the\n // start of a function definition in GCC-extended K&R C.\n if (!isDeclarationAfterDeclarator()) {\n // Function definitions are only allowed at file scope and in C++ classes.\n // The C++ inline method definition case is handled elsewhere, so we only\n // need to handle the file scope definition case.\n if (Context == DeclaratorContext::File) {\n // ...\n if (isDeclarationSpecifier(ImplicitTypenameContext::No) || Tok.is(tok::kw_namespace)) {\n // ...\n } else {\n Diag(Tok, diag::err_expected_fn_body);"},{M,1280,"/// ParseFunctionDefinition - We parsed and verified that the specified\n/// Declarator is well formed. If this is a K&R-style function, read the\n/// parameters declaration-list, then start the compound-statement.\n///\n/// function-definition: [C99 6.9.1]\n/// decl-specs declarator declaration-list[opt] compound-statement\n/// [C90] function-definition: [C99 6.7.1] - implicit int result\n/// [C90] decl-specs[opt] declarator declaration-list[opt] compound-statement\n/// [C++] function-definition: [C++ 8.4]\n/// decl-specifier-seq[opt] declarator ctor-initializer[opt]\n/// function-body\n/// [C++] function-definition: [C++ 8.4]\n/// decl-specifier-seq[opt] declarator function-try-block\n///\nDecl *Parser::ParseFunctionDefinition(ParsingDeclarator &D, const ParsedTemplateInfo &TemplateInfo, LateParsedAttrList *LateParsedAttrs) {\n // ...\n // We should have either an opening brace or, in a C++ constructor,\n // we may have a colon.\n if (Tok.isNot(tok::l_brace) && (!getLangOpts().CPlusPlus || (Tok.isNot(tok::colon) && Tok.isNot(tok::kw_try) && Tok.isNot(tok::equal)))) {\n Diag(Tok, diag::err_expected_fn_body);"}}, [l]={ ["clang/test/SemaHLSL/group_shared.hlsl"]={"clang/test/SemaHLSL/group_shared.hlsl:77:13: error: expected function body after function declarator"} } }, ["err_expected_fold_operator"]={ [d]="err_expected_fold_operator", [f]="expected a foldable binary operator in fold expression", [b]="expected a foldable binary operator in fold expression", [i]=k, [h]="expected a foldable binary operator in fold expression", [g]=a, [e]=n, [c]={Fb,1415423236,Gb,Eb}, [j]={{F,3438,"/// Parse A C++1z fold-expression after the opening paren and optional\n/// left-hand-side expression.\n///\n/// \\verbatim\n/// fold-expression:\n/// ( cast-expression fold-operator ... )\n/// ( ... fold-operator cast-expression )\n/// ( cast-expression fold-operator ... fold-operator cast-expression )\nExprResult Parser::ParseFoldExpression(ExprResult LHS, BalancedDelimiterTracker &T) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n if (!isFoldOperator(Tok.getKind()))\n return Diag(Tok.getLocation(), diag::err_expected_fold_operator);"}}, [l]={ ["clang/test/Parser/cxx1z-fold-expressions.cpp"]={"clang/test/Parser/cxx1z-fold-expressions.cpp:35:50: error: expected a foldable binary operator in fold expression"} } }, ["err_expected_id_building_module"]={ [d]="err_expected_id_building_module", [f]="expected a module name in \'__building_module\' expression", [b]="expected a module name in \'__building_module\' expression", [i]=k, [h]="expected a module name in \'__building_module\' expression", [g]=a, [e]=mb, [c]={"c83de30addc1",1348587892,"Introduce builtin macros to determine whether we\'re building a","Introduce builtin macros to determine whether we\'re building a\nspecific module (__building_module(modulename)) and to get the name of\nthe current module as an identifier (__MODULE__). \n\nUsed to help headers behave differently when they\'re being included as\npart of building a module. Oh, the irony.\n\nllvm-svn: 164605"}, [j]={{S,1841,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n // ...\n } else if (II == Ident__is_identifier) {\n // ...\n } else if (II == Ident__has_attribute) {\n // ...\n } else if (II == Ident__has_declspec) {\n // ...\n } else if (II == Ident__has_cpp_attribute || II == Ident__has_c_attribute) {\n // ...\n } else if (II == Ident__has_include || II == Ident__has_include_next) {\n // ...\n } else if (II == Ident__has_warning) {\n // ...\n } else if (II == Ident__building_module) {\n // The argument to this builtin should be an identifier. The\n // builtin evaluates to 1 when that identifier names the module we are\n // currently building.\n EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, false, [this](Token &Tok, bool &HasLexedNextToken) -> int {\n IdentifierInfo *II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_expected_id_building_module);"}} }, ["err_expected_init_in_condition"]={ [d]="err_expected_init_in_condition", [f]="variable declaration in condition must have an initializer", [b]="variable declaration in condition must have an initializer", [i]=k, [h]="variable declaration in condition must have an initializer", [g]=a, [e]=n, [c]={"2a15b7460577",1329893349,"Accept braced-init-lists in conditions, and, in passing, dramatically improve","Accept braced-init-lists in conditions, and, in passing, dramatically improve\nthe diagnostic for using a parenthesized direct-initializer in a condition.\n\nllvm-svn: 151137"}, [j]={{O,2208,"/// ParseCXXCondition - if/switch/while condition expression.\n///\n/// condition:\n/// expression\n/// type-specifier-seq declarator \'=\' assignment-expression\n/// [C++11] type-specifier-seq declarator \'=\' initializer-clause\n/// [C++11] type-specifier-seq declarator braced-init-list\n/// [Clang] type-specifier-seq ref-qualifier[opt] \'[\' identifier-list \']\'\n/// brace-or-equal-initializer\n/// [GNU] type-specifier-seq declarator simple-asm-expr[opt] attributes[opt]\n/// \'=\' assignment-expression\n///\n/// In C++1z, a condition may in some contexts be preceded by an\n/// optional init-statement. This function will parse that too.\n///\n/// \\param InitStmt If non-null, an init-statement is permitted, and if present\n/// will be parsed and stored here.\n///\n/// \\param Loc The location of the start of the statement that requires this\n/// condition, e.g., the \"for\" in a for loop.\n///\n/// \\param MissingOK Whether an empty condition is acceptable here. Otherwise\n/// it is considered an error to be recovered from.\n///\n/// \\param FRI If non-null, a for range declaration is permitted, and if\n/// present will be parsed and stored here, and a null result will be returned.\n///\n/// \\param EnterForConditionScope If true, enter a continue/break scope at the\n/// appropriate moment for a \'for\' loop.\n///\n/// \\returns The parsed condition.\nSema::ConditionResult Parser::ParseCXXCondition(StmtResult *InitStmt, SourceLocation Loc, Sema::ConditionKind CK, bool MissingOK, ForRangeInfo *FRI, bool EnterForConditionScope) {\n // ...\n if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) {\n // ...\n } else if (CopyInitialization) {\n // ...\n } else if (Tok.is(tok::l_paren)) {\n // ...\n } else {\n Diag(DeclOut->getLocation(), diag::err_expected_init_in_condition);"}}, [l]={ ["clang/test/Parser/cxx-condition.cpp"]={"clang/test/Parser/cxx-condition.cpp:8:14: error: variable declaration in condition must have an initializer"} } }, ["err_expected_init_in_condition_lparen"]={ [d]="err_expected_init_in_condition_lparen", [f]="variable declaration in condition cannot have a parenthesized initializer", [b]="variable declaration in condition cannot have a parenthesized initializer", [i]=k, [h]="variable declaration in condition cannot have a parenthesized initializer", [g]=a, [e]=n, [c]={"2a15b7460577",1329893349,"Accept braced-init-lists in conditions, and, in passing, dramatically improve","Accept braced-init-lists in conditions, and, in passing, dramatically improve\nthe diagnostic for using a parenthesized direct-initializer in a condition.\n\nllvm-svn: 151137"}, [j]={{O,2205,"/// ParseCXXCondition - if/switch/while condition expression.\n///\n/// condition:\n/// expression\n/// type-specifier-seq declarator \'=\' assignment-expression\n/// [C++11] type-specifier-seq declarator \'=\' initializer-clause\n/// [C++11] type-specifier-seq declarator braced-init-list\n/// [Clang] type-specifier-seq ref-qualifier[opt] \'[\' identifier-list \']\'\n/// brace-or-equal-initializer\n/// [GNU] type-specifier-seq declarator simple-asm-expr[opt] attributes[opt]\n/// \'=\' assignment-expression\n///\n/// In C++1z, a condition may in some contexts be preceded by an\n/// optional init-statement. This function will parse that too.\n///\n/// \\param InitStmt If non-null, an init-statement is permitted, and if present\n/// will be parsed and stored here.\n///\n/// \\param Loc The location of the start of the statement that requires this\n/// condition, e.g., the \"for\" in a for loop.\n///\n/// \\param MissingOK Whether an empty condition is acceptable here. Otherwise\n/// it is considered an error to be recovered from.\n///\n/// \\param FRI If non-null, a for range declaration is permitted, and if\n/// present will be parsed and stored here, and a null result will be returned.\n///\n/// \\param EnterForConditionScope If true, enter a continue/break scope at the\n/// appropriate moment for a \'for\' loop.\n///\n/// \\returns The parsed condition.\nSema::ConditionResult Parser::ParseCXXCondition(StmtResult *InitStmt, SourceLocation Loc, Sema::ConditionKind CK, bool MissingOK, ForRangeInfo *FRI, bool EnterForConditionScope) {\n // ...\n if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) {\n // ...\n } else if (CopyInitialization) {\n // ...\n } else if (Tok.is(tok::l_paren)) {\n // ...\n Diag(DeclOut->getLocation(), diag::err_expected_init_in_condition_lparen) << SourceRange(LParen, RParen);"}}, [l]={ ["clang/test/Parser/cxx-condition.cpp"]={"clang/test/Parser/cxx-condition.cpp:14:9: error: variable declaration in condition cannot have a parenthesized initializer"} } }, ["err_expected_kernel_void_return_type"]={ [d]="err_expected_kernel_void_return_type", [f]="kernel must have void return type", [b]="kernel must have void return type", [i]=k, [h]="kernel must have void return type", [g]=a, [e]=m, [c]={"0f86433efbaa",1359575332,"Add OpenCL error that a kernel function must have void return type. Includes a test case.","Add OpenCL error that a kernel function must have void return type. Includes a test case.\n\nllvm-svn: 173963"}, [j]={{A,10698,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (getLangOpts().OpenCL && NewFD->hasAttr<OpenCLKernelAttr>()) {\n // ...\n // OpenCL v1.2, s6.9 -- Kernels can only have return type void.\n if (!NewFD->getReturnType()->isVoidType()) {\n // ...\n Diag(D.getIdentifierLoc(), diag::err_expected_kernel_void_return_type) << (RTRange.isValid() ? FixItHint::CreateReplacement(RTRange, \"void\") : FixItHint());"}}, [l]={ ["clang/test/SemaOpenCL/invalid-kernel.cl"]={"clang/test/SemaOpenCL/invalid-kernel.cl:4:12: error: kernel must have void return type"} } }, ["err_expected_lambda_body"]={ [d]="err_expected_lambda_body", [f]="expected body of lambda expression", [b]="expected body of lambda expression", [i]=k, [h]="expected body of lambda expression", [g]=a, [e]=n, [c]={"db0b9f126459",1312471847,"Parsing of C++0x lambda expressions, from John Freeman with help from","Parsing of C++0x lambda expressions, from John Freeman with help from\nDavid Blaikie!\n\nllvm-svn: 136876"}, [j]={{O,1540,"/// ParseLambdaExpressionAfterIntroducer - Parse the rest of a lambda\n/// expression.\nExprResult Parser::ParseLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro) {\n // ...\n // Parse compound-statement.\n if (!Tok.is(tok::l_brace)) {\n Diag(Tok, diag::err_expected_lambda_body);"}}, [l]={ ["clang/test/Parser/cxx2b-lambdas.cpp"]={"clang/test/Parser/cxx2b-lambdas.cpp:28:14: error: expected body of lambda expression","clang/test/Parser/cxx2b-lambdas.cpp:29:46: error: expected body of lambda expression","clang/test/Parser/cxx2b-lambdas.cpp:38:15: error: expected body of lambda expression","clang/test/Parser/cxx2b-lambdas.cpp:39:35: error: expected body of lambda expression","clang/test/Parser/cxx2b-lambdas.cpp:40:44: error: expected body of lambda expression","clang/test/Parser/cxx2b-lambdas.cpp:49:25: error: expected body of lambda expression","clang/test/Parser/cxx2b-lambdas.cpp:50:18: error: expected body of lambda expression"} } }, ["err_expected_lbrace_after_base_specifiers"]={ [d]="err_expected_lbrace_after_base_specifiers", [f]="expected \'{\' after base class list", [b]="expected \'{\' after base class list", [i]=k, [h]="expected \'\\{\' after base class list", [g]=a, [e]=n, [c]={"2d814c305e24",1261259338,"Parse base specifiers within the scope of the class. This is possibly not","Parse base specifiers within the scope of the class. This is possibly not\nquite right; I\'ll come back to it later. It does fix PR 5741.\n\nllvm-svn: 91789"}, [j]={{r,3307,"void Parser::SkipCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AttrFixitLoc, unsigned TagType, Decl *TagDecl) {\n // ...\n // Skip the base clauses. This requires actually parsing them, because\n // otherwise we can\'t be sure where they end (a left brace may appear\n // within a template argument).\n if (Tok.is(tok::colon)) {\n // ...\n if (!Tok.is(tok::l_brace)) {\n Diag(PP.getLocForEndOfToken(PrevTokLocation), diag::err_expected_lbrace_after_base_specifiers);"},{r,3592,"/// ParseCXXMemberSpecification - Parse the class definition.\n///\n/// member-specification:\n/// member-declaration member-specification[opt]\n/// access-specifier \':\' member-specification[opt]\n///\nvoid Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AttrFixitLoc, ParsedAttributes &Attrs, unsigned TagType, Decl *TagDecl) {\n // ...\n if (Tok.is(tok::colon)) {\n // ...\n if (!Tok.is(tok::l_brace)) {\n // ...\n DiagnosticBuilder LBraceDiag = Diag(BraceLoc, diag::err_expected_lbrace_after_base_specifiers);"}}, [l]={ ["clang/test/SemaCXX/injected-class-name-crash.cpp"]={"clang/test/SemaCXX/injected-class-name-crash.cpp:6:2: error: expected \'{\' after base class list"} } }, ["err_expected_lbrace_in_compound_literal"]={ [d]="err_expected_lbrace_in_compound_literal", [f]="expected \'{\' in compound literal", [b]="expected \'{\' in compound literal", [i]=k, [h]="expected \'\\{\' in compound literal", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{F,3138,"/// ParseParenExpression - This parses the unit that starts with a \'(\' token,\n/// based on what is allowed by ExprType. The actual thing parsed is returned\n/// in ExprType. If stopIfCastExpr is true, it will only return the parsed type,\n/// not the parsed cast-expression.\n///\n/// \\verbatim\n/// primary-expression: [C99 6.5.1]\n/// \'(\' expression \')\'\n/// [GNU] \'(\' compound-statement \')\' (if !ParenExprOnly)\n/// postfix-expression: [C99 6.5.2]\n/// \'(\' type-name \')\' \'{\' initializer-list \'}\'\n/// \'(\' type-name \')\' \'{\' initializer-list \',\' \'}\'\n/// cast-expression: [C99 6.5.4]\n/// \'(\' type-name \')\' cast-expression\n/// [ARC] bridged-cast-expression\n/// [ARC] bridged-cast-expression:\n/// (__bridge type-name) cast-expression\n/// (__bridge_transfer type-name) cast-expression\n/// (__bridge_retained type-name) cast-expression\n/// fold-expression: [C++1z]\n/// \'(\' cast-expression fold-operator \'...\' \')\'\n/// \'(\' \'...\' fold-operator cast-expression \')\'\n/// \'(\' cast-expression fold-operator \'...\'\n/// fold-operator cast-expression \')\'\n/// [OPENMP] Array shaping operation\n/// \'(\' \'[\' expression \']\' { \'[\' expression \']\' } cast-expression\n/// \\endverbatim\nExprResult Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr, bool isTypeCast, ParsedType &CastTy, SourceLocation &RParenLoc) {\n // ...\n // None of these cases should fall through with an invalid Result\n // unless they\'ve already reported an error.\n if (ExprType >= CompoundStmt && Tok.is(tok::l_brace)) {\n // ...\n } else if (ExprType >= CompoundLiteral && BridgeCast) {\n // ...\n } else if (ExprType >= CompoundLiteral && isTypeIdInParens(isAmbiguousTypeId)) {\n // ...\n // If our type is followed by an identifier and either \':\' or \']\', then\n // this is probably an Objective-C message send where the leading \'[\' is\n // missing. Recover as if that were the case.\n if (!DeclaratorInfo.isInvalidType() && Tok.is(tok::identifier) && !InMessageExpression && getLangOpts().ObjC && (NextToken().is(tok::colon) || NextToken().is(tok::r_square))) {\n // ...\n } else {\n // ...\n Diag(Tok, diag::err_expected_lbrace_in_compound_literal);"}} }, ["err_expected_less_after"]={ [d]="err_expected_less_after", [f]="expected \'<\' after \'%0\'", [b]="expected \'<\' after \'A\'", [i]=k, [h]="expected \'\\<\' after \'(.*?)\'", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{O,1592,"/// ParseCXXCasts - This handles the various ways to cast expressions to another\n/// type.\n///\n/// postfix-expression: [C++ 5.2p1]\n/// \'dynamic_cast\' \'<\' type-name \'>\' \'(\' expression \')\'\n/// \'static_cast\' \'<\' type-name \'>\' \'(\' expression \')\'\n/// \'reinterpret_cast\' \'<\' type-name \'>\' \'(\' expression \')\'\n/// \'const_cast\' \'<\' type-name \'>\' \'(\' expression \')\'\n///\n/// C++ for OpenCL s2.3.1 adds:\n/// \'addrspace_cast\' \'<\' type-name \'>\' \'(\' expression \')\'\nExprResult Parser::ParseCXXCasts() {\n // ...\n if (ExpectAndConsume(tok::less, diag::err_expected_less_after, CastName))"},{Y,477,"/// ParseTemplateParameters - Parses a template-parameter-list enclosed in\n/// angle brackets. Depth is the depth of this template-parameter-list, which\n/// is the number of template headers directly enclosing this template header.\n/// TemplateParams is the current list of template parameters we\'re building.\n/// The template parameter we parse will be added to this list. LAngleLoc and\n/// RAngleLoc will receive the positions of the \'<\' and \'>\', respectively,\n/// that enclose this template parameter list.\n///\n/// \\returns true if an error occurred, false otherwise.\nbool Parser::ParseTemplateParameters(MultiParseScope &TemplateScopes, unsigned Depth, SmallVectorImpl<NamedDecl *> &TemplateParams, SourceLocation &LAngleLoc, SourceLocation &RAngleLoc) {\n // Get the template parameter list.\n if (!TryConsumeToken(tok::less, LAngleLoc)) {\n Diag(Tok.getLocation(), diag::err_expected_less_after) << \"template\";"}}, [l]={ ["clang/test/SemaTemplate/explicit-instantiation.cpp"]={"clang/test/SemaTemplate/explicit-instantiation.cpp:106:5: error: expected \'<\' after \'template\'"} } }, ["err_expected_lparen_after"]={ [d]="err_expected_lparen_after", [f]="expected \'(\' after \'%0\'", [b]="expected \'(\' after \'A\'", [i]=k, [h]="expected \'\\(\' after \'(.*?)\'", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={ [1]={bb,953,"/// Consume tokens and store them in the passed token container until\n/// we\'ve passed the try keyword and constructor initializers and have consumed\n/// the opening brace of the function body. The opening brace will be consumed\n/// if and only if there was no error.\n///\n/// \\return True on error.\nbool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens &Toks) {\n // ...\n while (true) {\n // Skip over the mem-initializer-id, if possible.\n if (Tok.is(tok::kw_decltype)) {\n // ...\n if (Tok.isNot(tok::l_paren))\n return Diag(Tok.getLocation(), diag::err_expected_lparen_after) << \"decltype\";"}, [2]={p,188,"/// ParseGNUAttributes - Parse a non-empty attributes list.\n///\n/// [GNU] attributes:\n/// attribute\n/// attributes attribute\n///\n/// [GNU] attribute:\n/// \'__attribute__\' \'(\' \'(\' attribute-list \')\' \')\'\n///\n/// [GNU] attribute-list:\n/// attrib\n/// attribute_list \',\' attrib\n///\n/// [GNU] attrib:\n/// empty\n/// attrib-name\n/// attrib-name \'(\' identifier \')\'\n/// attrib-name \'(\' identifier \',\' nonempty-expr-list \')\'\n/// attrib-name \'(\' argument-expression-list [C99 6.5.2] \')\'\n///\n/// [GNU] attrib-name:\n/// identifier\n/// typespec\n/// typequal\n/// storageclass\n///\n/// Whether an attribute takes an \'identifier\' is determined by the\n/// attrib-name. GCC\'s behavior here is not worth imitating:\n///\n/// * In C mode, if the attribute argument list starts with an identifier\n/// followed by a \',\' or an \')\', and the identifier doesn\'t resolve to\n/// a type, it is parsed as an identifier. If the attribute actually\n/// wanted an expression, it\'s out of luck (but it turns out that no\n/// attributes work that way, because C constant expressions are very\n/// limited).\n/// * In C++ mode, if the attribute argument list starts with an identifier,\n/// and the attribute *wants* an identifier, it is parsed as an identifier.\n/// At block scope, any additional tokens between the identifier and the\n/// \',\' or \')\' are ignored, otherwise they produce a parse error.\n///\n/// We follow the C++ model, but don\'t allow junk after the identifier.\nvoid Parser::ParseGNUAttributes(ParsedAttributes &Attrs, LateParsedAttrList *LateAttrs, Declarator *D) {\n // ...\n while (Tok.is(tok::kw___attribute)) {\n // ...\n if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, \"attribute\")) {"}, [3]={p,193,"/// ParseGNUAttributes - Parse a non-empty attributes list.\n///\n/// [GNU] attributes:\n/// attribute\n/// attributes attribute\n///\n/// [GNU] attribute:\n/// \'__attribute__\' \'(\' \'(\' attribute-list \')\' \')\'\n///\n/// [GNU] attribute-list:\n/// attrib\n/// attribute_list \',\' attrib\n///\n/// [GNU] attrib:\n/// empty\n/// attrib-name\n/// attrib-name \'(\' identifier \')\'\n/// attrib-name \'(\' identifier \',\' nonempty-expr-list \')\'\n/// attrib-name \'(\' argument-expression-list [C99 6.5.2] \')\'\n///\n/// [GNU] attrib-name:\n/// identifier\n/// typespec\n/// typequal\n/// storageclass\n///\n/// Whether an attribute takes an \'identifier\' is determined by the\n/// attrib-name. GCC\'s behavior here is not worth imitating:\n///\n/// * In C mode, if the attribute argument list starts with an identifier\n/// followed by a \',\' or an \')\', and the identifier doesn\'t resolve to\n/// a type, it is parsed as an identifier. If the attribute actually\n/// wanted an expression, it\'s out of luck (but it turns out that no\n/// attributes work that way, because C constant expressions are very\n/// limited).\n/// * In C++ mode, if the attribute argument list starts with an identifier,\n/// and the attribute *wants* an identifier, it is parsed as an identifier.\n/// At block scope, any additional tokens between the identifier and the\n/// \',\' or \')\' are ignored, otherwise they produce a parse error.\n///\n/// We follow the C++ model, but don\'t allow junk after the identifier.\nvoid Parser::ParseGNUAttributes(ParsedAttributes &Attrs, LateParsedAttrList *LateAttrs, Declarator *D) {\n // ...\n while (Tok.is(tok::kw___attribute)) {\n // ...\n if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, \"(\")) {"}, [4]={p,628,"bool Parser::ParseMicrosoftDeclSpecArgs(IdentifierInfo *AttrName, SourceLocation AttrNameLoc, ParsedAttributes &Attrs) {\n // ...\n if (AttrName->getName() == \"property\") {\n // ...\n T.expectAndConsume(diag::err_expected_lparen_after, AttrName->getNameStart(), tok::r_paren);"}, [5]={p,765,"/// [MS] decl-specifier:\n/// __declspec ( extended-decl-modifier-seq )\n///\n/// [MS] extended-decl-modifier-seq:\n/// extended-decl-modifier[opt]\n/// extended-decl-modifier extended-decl-modifier-seq\nvoid Parser::ParseMicrosoftDeclSpecs(ParsedAttributes &Attrs) {\n // ...\n while (Tok.is(tok::kw___declspec)) {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, \"__declspec\", tok::r_paren))"}, [6]={p,816,"/// [MS] decl-specifier:\n/// __declspec ( extended-decl-modifier-seq )\n///\n/// [MS] extended-decl-modifier-seq:\n/// extended-decl-modifier[opt]\n/// extended-decl-modifier extended-decl-modifier-seq\nvoid Parser::ParseMicrosoftDeclSpecs(ParsedAttributes &Attrs) {\n // ...\n while (Tok.is(tok::kw___declspec)) {\n // ...\n // An empty declspec is perfectly legal and should not warn. Additionally,\n // you can specify multiple attributes per declspec.\n while (Tok.isNot(tok::r_paren)) {\n // ...\n // Parse attribute arguments.\n if (Tok.is(tok::l_paren))\n // ...\n else if (AttrName->getName() == \"property\")\n // ...\n Diag(Tok.getLocation(), diag::err_expected_lparen_after) << AttrName->getName();"}, [7]={r,1091,"/// ParseDecltypeSpecifier - Parse a C++11 decltype specifier.\n///\n/// \'decltype\' ( expression )\n/// \'decltype\' ( \'auto\' ) [C++1y]\n///\nSourceLocation Parser::ParseDecltypeSpecifier(DeclSpec &DS) {\n // ...\n if (Tok.is(tok::annot_decltype)) {\n // ...\n } else {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, \"decltype\", tok::r_paren)) {"}, [8]={r,1219,"bool Parser::MaybeParseTypeTransformTypeSpecifier(DeclSpec &DS) {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, Tok.getName(), tok::r_paren))"}, [9]={r,3930,"/// Parse a C++ exception-specification if present (C++0x [except.spec]).\n///\n/// exception-specification:\n/// dynamic-exception-specification\n/// noexcept-specification\n///\n/// noexcept-specification:\n/// \'noexcept\'\n/// \'noexcept\' \'(\' constant-expression \')\'\nExceptionSpecificationType Parser::tryParseExceptionSpecification(bool Delayed, SourceRange &SpecificationRange, SmallVectorImpl<ParsedType> &DynamicExceptions, SmallVectorImpl<SourceRange> &DynamicExceptionRanges, ExprResult &NoexceptExpr, CachedTokens *&ExceptionSpecTokens) {\n // ...\n // Handle delayed parsing of exception-specifications.\n if (Delayed) {\n // ...\n // Check for a \'(\'.\n if (!Tok.is(tok::l_paren)) {\n // ...\n Diag(Tok, diag::err_expected_lparen_after) << \"throw\";"}, [10]={r,4037,"/// ParseDynamicExceptionSpecification - Parse a C++\n/// dynamic-exception-specification (C++ [except.spec]).\n///\n/// dynamic-exception-specification:\n/// \'throw\' \'(\' type-id-list [opt] \')\'\n/// [MS] \'throw\' \'(\' \'...\' \')\'\n///\n/// type-id-list:\n/// type-id ... [opt]\n/// type-id-list \',\' type-id ... [opt]\n///\nExceptionSpecificationType Parser::ParseDynamicExceptionSpecification(SourceRange &SpecificationRange, SmallVectorImpl<ParsedType> &Exceptions, SmallVectorImpl<SourceRange> &Ranges) {\n // ...\n if (T.consumeOpen()) {\n Diag(Tok, diag::err_expected_lparen_after) << \"throw\";"}, [11]={F,1711,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // ...\n case tok::kw_noexcept: { // [C++0x] \'noexcept\' \'(\' expression \')\'\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, \"noexcept\"))"}, [12]={F,2408,"/// Parse a __builtin_sycl_unique_stable_name expression. Accepts a type-id as\n/// a parameter.\nExprResult Parser::ParseSYCLUniqueStableNameExpression() {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, \"__builtin_sycl_unique_stable_name\"))"}, [13]={O,1612,"/// ParseCXXCasts - This handles the various ways to cast expressions to another\n/// type.\n///\n/// postfix-expression: [C++ 5.2p1]\n/// \'dynamic_cast\' \'<\' type-name \'>\' \'(\' expression \')\'\n/// \'static_cast\' \'<\' type-name \'>\' \'(\' expression \')\'\n/// \'reinterpret_cast\' \'<\' type-name \'>\' \'(\' expression \')\'\n/// \'const_cast\' \'<\' type-name \'>\' \'(\' expression \')\'\n///\n/// C++ for OpenCL s2.3.1 adds:\n/// \'addrspace_cast\' \'<\' type-name \'>\' \'(\' expression \')\'\nExprResult Parser::ParseCXXCasts() {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, CastName))"}, [14]={O,1644,"/// ParseCXXTypeid - This handles the C++ typeid expression.\n///\n/// postfix-expression: [C++ 5.2p1]\n/// \'typeid\' \'(\' expression \')\'\n/// \'typeid\' \'(\' type-id \')\'\n///\nExprResult Parser::ParseCXXTypeid() {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, \"typeid\"))"}, [15]={O,1710,"/// ParseCXXUuidof - This handles the Microsoft C++ __uuidof expression.\n///\n/// \'__uuidof\' \'(\' expression \')\'\n/// \'__uuidof\' \'(\' type-id \')\'\n///\nExprResult Parser::ParseCXXUuidof() {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, \"__uuidof\"))"}, [16]={O,4090,"/// Parse a __builtin_bit_cast(T, E).\nExprResult Parser::ParseBuiltinBitCast() {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, \"__builtin_bit_cast\"))"}, [17]={ob,149,"void Parser::ParseHLSLSemantics(ParsedAttributes &Attrs, SourceLocation *EndLoc) {\n // ...\n case ParsedAttr::AT_HLSLResourceBinding: {\n if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after)) {"}, [18]={z,2508,"/// objc-synchronized-statement:\n/// @synchronized \'(\' expression \')\' compound-statement\n///\nStmtResult Parser::ParseObjCSynchronizedStmt(SourceLocation atLoc) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n Diag(Tok, diag::err_expected_lparen_after) << \"@synchronized\";"}, [19]={z,2634,"/// objc-try-catch-statement:\n/// @try compound-statement objc-catch-list[opt]\n/// @try compound-statement objc-catch-list[opt] @finally compound-statement\n///\n/// objc-catch-list:\n/// @catch ( parameter-declaration ) compound-statement\n/// objc-catch-list @catch ( catch-parameter-declaration ) compound-statement\n/// catch-parameter-declaration:\n/// parameter-declaration\n/// \'...\' [OBJC2]\n///\nStmtResult Parser::ParseObjCTryStmt(SourceLocation atLoc) {\n // ...\n while (Tok.is(tok::at)) {\n // ...\n if (Tok.isObjCAtKeyword(tok::objc_catch)) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n } else {\n Diag(AtCatchFinallyLoc, diag::err_expected_lparen_after) << \"@catch clause\";"}, [20]={z,3452,"/// ParseObjCBoxedExpr -\n/// objc-box-expression:\n/// @( assignment-expression )\nExprResult Parser::ParseObjCBoxedExpr(SourceLocation AtLoc) {\n if (Tok.isNot(tok::l_paren))\n return ExprError(Diag(Tok, diag::err_expected_lparen_after) << \"@\");"}, [21]={z,3589,"/// objc-encode-expression:\n/// \\@encode ( type-name )\nExprResult Parser::ParseObjCEncodeExpression(SourceLocation AtLoc) {\n // ...\n if (Tok.isNot(tok::l_paren))\n return ExprError(Diag(Tok, diag::err_expected_lparen_after) << \"@encode\");"}, [22]={z,3612,"/// objc-protocol-expression\n/// \\@protocol ( protocol-name )\nExprResult Parser::ParseObjCProtocolExpression(SourceLocation AtLoc) {\n // ...\n if (Tok.isNot(tok::l_paren))\n return ExprError(Diag(Tok, diag::err_expected_lparen_after) << \"@protocol\");"}, [23]={z,3636,"/// objc-selector-expression\n/// @selector \'(\' \'(\'[opt] objc-keyword-selector \')\'[opt] \')\'\nExprResult Parser::ParseObjCSelectorExpression(SourceLocation AtLoc) {\n // ...\n if (Tok.isNot(tok::l_paren))\n return ExprError(Diag(Tok, diag::err_expected_lparen_after) << \"@selector\");"}, [24]={E,293,"/// Parse \'omp declare reduction\' construct.\n///\n/// declare-reduction-directive:\n/// annot_pragma_openmp \'declare\' \'reduction\'\n/// \'(\' <reduction_id> \':\' <type> {\',\' <type>} \':\' <expression> \')\'\n/// [\'initializer\' \'(\' (\'omp_priv\' \'=\' <expression>)|<function_call> \')\']\n/// annot_pragma_openmp_end\n/// <reduction_id> is either a base language identifier or one of the following\n/// operators: \'+\', \'-\', \'*\', \'&\', \'|\', \'^\', \'&&\' and \'||\'.\n///\nParser::DeclGroupPtrTy Parser::ParseOpenMPDeclareReductionDirective(AccessSpecifier AS) {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, getOpenMPDirectiveName(OMPD_declare_reduction).data())) {"}, [25]={E,407,"/// Parse \'omp declare reduction\' construct.\n///\n/// declare-reduction-directive:\n/// annot_pragma_openmp \'declare\' \'reduction\'\n/// \'(\' <reduction_id> \':\' <type> {\',\' <type>} \':\' <expression> \')\'\n/// [\'initializer\' \'(\' (\'omp_priv\' \'=\' <expression>)|<function_call> \')\']\n/// annot_pragma_openmp_end\n/// <reduction_id> is either a base language identifier or one of the following\n/// operators: \'+\', \'-\', \'*\', \'&\', \'|\', \'^\', \'&&\' and \'||\'.\n///\nParser::DeclGroupPtrTy Parser::ParseOpenMPDeclareReductionDirective(AccessSpecifier AS) {\n // ...\n for (Decl *D : DRD.get()) {\n // ...\n if (Tok.isNot(tok::annot_pragma_openmp_end)) {\n // ...\n IsCorrect = !T.expectAndConsume(diag::err_expected_lparen_after, \"initializer\") && IsCorrect;"}, [26]={E,539,"/// Parses \'omp declare mapper\' directive.\n///\n/// declare-mapper-directive:\n/// annot_pragma_openmp \'declare\' \'mapper\' \'(\' [<mapper-identifier> \':\']\n/// <type> <var> \')\' [<clause>[[,] <clause>] ... ]\n/// annot_pragma_openmp_end\n/// <mapper-identifier> and <var> are base language identifiers.\n///\nParser::DeclGroupPtrTy Parser::ParseOpenMPDeclareMapperDirective(AccessSpecifier AS) {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, getOpenMPDirectiveName(OMPD_declare_mapper).data())) {"}, [27]={E,1509,"bool Parser::parseOpenMPAppendArgs(SmallVectorImpl<OMPInteropInfo> &InteropInfos) {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, getOpenMPClauseName(OMPC_append_args).data()))"}, [28]={E,1519,"bool Parser::parseOpenMPAppendArgs(SmallVectorImpl<OMPInteropInfo> &InteropInfos) {\n // ...\n // Parse the list of append-ops, each is;\n // interop(interop-type[,interop-type]...)\n while (Tok.is(tok::identifier) && Tok.getIdentifierInfo()->isStr(\"interop\")) {\n // ...\n if (IT.expectAndConsume(diag::err_expected_lparen_after, \"interop\"))"}, [29]={E,1557,"bool Parser::parseOMPDeclareVariantMatchClause(SourceLocation Loc, OMPTraitInfo &TI, OMPTraitInfo *ParentTI) {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, getOpenMPClauseName(OMPC_match).data()))"}, [30]={E,1685,"/// `omp assumes` or `omp begin/end assumes` <clause> [[,]<clause>]...\n/// where\n///\n/// clause:\n/// \'ext_IMPL_DEFINED\'\n/// \'absent\' \'(\' directive-name [, directive-name]* \')\'\n/// \'contains\' \'(\' directive-name [, directive-name]* \')\'\n/// \'holds\' \'(\' scalar-expression \')\'\n/// \'no_openmp\'\n/// \'no_openmp_routines\'\n/// \'no_parallelism\'\n///\nvoid Parser::ParseOpenMPAssumesDirective(OpenMPDirectiveKind DKind, SourceLocation Loc) {\n // ...\n auto SkipBraces = [&](llvm::StringRef Spelling, bool IssueNote) {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, Spelling.data()))"}, [31]={E,1794,"static std::optional<SimpleClauseData> parseOpenMPSimpleClause(Parser &P, OpenMPClauseKind Kind) {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, getOpenMPClauseName(Kind).data()))"}, [32]={E,2549,"/// 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 while (Tok.isNot(tok::annot_pragma_openmp_end)) {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, getOpenMPClauseName(CKind).data()))"}, [33]={E,3015,"// Parses simple list:\n// simple-variable-list:\n// \'(\' id-expression {, id-expression} \')\'\n//\nbool Parser::ParseOpenMPSimpleVarList(OpenMPDirectiveKind Kind, const llvm::function_ref<void(CXXScopeSpec &, DeclarationNameInfo)> &Callback, bool AllowScopeSpecifier) {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, getOpenMPDirectiveName(Kind).data()))"}, [34]={E,3106,"OMPClause *Parser::ParseOpenMPUsesAllocatorClause(OpenMPDirectiveKind DKind) {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, \"uses_allocator\"))"}, [35]={E,3428,"/// Parses simple expression in parens for single-expression clauses of OpenMP\n/// constructs.\n/// \\param RLoc Returned location of right paren.\nExprResult Parser::ParseOpenMPParensExpr(StringRef ClauseName, SourceLocation &RLoc, bool IsAddressOfOperand) {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, ClauseName.data()))"}, [36]={E,3575,"/// 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 // ...\n } else if (Tok.getIdentifierInfo()->isStr(\"prefer_type\") && PreferTypeAllowed) {\n // ...\n if (PT.expectAndConsume(diag::err_expected_lparen_after, \"prefer_type\"))"}, [37]={E,3655,"/// Parsing of OpenMP clauses that use an interop-var.\n///\n/// init-clause:\n/// init([interop-modifier, ]interop-type[[, interop-type] ... ]:interop-var)\n///\n/// destroy-clause:\n/// destroy(interop-var)\n///\n/// use-clause:\n/// use(interop-var)\n///\n/// interop-modifier:\n/// prefer_type(preference-list)\n///\n/// preference-list:\n/// foreign-runtime-id [, foreign-runtime-id]...\n///\n/// foreign-runtime-id:\n/// <string-literal> | <constant-integral-expression>\n///\n/// interop-type:\n/// target | targetsync\n///\nOMPClause *Parser::ParseOpenMPInteropClause(OpenMPClauseKind Kind, bool ParseOnly) {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, getOpenMPClauseName(Kind).data()))"}, [38]={E,3790,"/// 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 (T.expectAndConsume(diag::err_expected_lparen_after, getOpenMPClauseName(Kind).data()))"}, [39]={E,4091,"/// Parse the mapper modifier in map, to, and from clauses.\nbool Parser::parseMapperModifier(Sema::OpenMPVarListDataTy &Data) {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, \"mapper\")) {"}, [40]={E,4197,"/// Parses simple expression in parens for single-expression clauses of OpenMP\n/// constructs.\nExprResult Parser::ParseOpenMPIteratorsExpr() {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, \"iterator\"))"}, [41]={E,4334,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n if (T.expectAndConsume(diag::err_expected_lparen_after, getOpenMPClauseName(Kind).data()))"}, [42]={P,1829,"void Parser::HandlePragmaAttribute() {\n // ...\n if ((Tok.is(tok::l_square) && NextToken().is(tok::l_square)) || Tok.isRegularKeywordAttribute()) {\n // ...\n } else if (Tok.is(tok::kw___attribute)) {\n // ...\n if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, \"attribute\"))"}, [43]={P,1832,"void Parser::HandlePragmaAttribute() {\n // ...\n if ((Tok.is(tok::l_square) && NextToken().is(tok::l_square)) || Tok.isRegularKeywordAttribute()) {\n // ...\n } else if (Tok.is(tok::kw___attribute)) {\n // ...\n if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, \"(\"))"}, [44]={M,1667,"/// ParseSimpleAsm\n///\n/// [GNU] simple-asm-expr:\n/// \'asm\' \'(\' asm-string-literal \')\'\n///\nExprResult Parser::ParseSimpleAsm(bool ForAsmLabel, SourceLocation *EndLoc) {\n // ...\n if (T.consumeOpen()) {\n Diag(Tok, diag::err_expected_lparen_after) << \"asm\";"}, [45]={M,2289,"bool Parser::ParseMicrosoftIfExistsCondition(IfExistsCondition &Result) {\n // ...\n if (T.consumeOpen()) {\n Diag(Tok, diag::err_expected_lparen_after) << (Result.IsIfExists ? \"__if_exists\" : \"__if_not_exists\");"}, [46]={B,1486,"/// ParseIfStatement\n/// if-statement: [C99 6.8.4.1]\n/// \'if\' \'(\' expression \')\' statement\n/// \'if\' \'(\' expression \')\' statement \'else\' statement\n/// [C++] \'if\' \'(\' condition \')\' statement\n/// [C++] \'if\' \'(\' condition \')\' statement \'else\' statement\n/// [C++23] \'if\' \'!\' [opt] consteval compound-statement\n/// [C++23] \'if\' \'!\' [opt] consteval compound-statement \'else\' statement\n///\nStmtResult Parser::ParseIfStatement(SourceLocation *TrailingElseLoc) {\n // ...\n if (!IsConsteval && (NotLocation.isValid() || Tok.isNot(tok::l_paren))) {\n Diag(Tok, diag::err_expected_lparen_after) << \"if\";"}, [47]={B,1683,"/// ParseSwitchStatement\n/// switch-statement:\n/// \'switch\' \'(\' expression \')\' statement\n/// [C++] \'switch\' \'(\' condition \')\' statement\nStmtResult Parser::ParseSwitchStatement(SourceLocation *TrailingElseLoc) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n Diag(Tok, diag::err_expected_lparen_after) << \"switch\";"}, [48]={B,1771,"/// ParseWhileStatement\n/// while-statement: [C99 6.8.5.1]\n/// \'while\' \'(\' expression \')\' statement\n/// [C++] \'while\' \'(\' condition \')\' statement\nStmtResult Parser::ParseWhileStatement(SourceLocation *TrailingElseLoc) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n Diag(Tok, diag::err_expected_lparen_after) << \"while\";"}, [49]={B,1882,"/// ParseDoStatement\n/// do-statement: [C99 6.8.5.2]\n/// \'do\' statement \'while\' \'(\' expression \')\' \';\'\n/// Note: this lets the caller parse the end \';\'.\nStmtResult Parser::ParseDoStatement() {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n Diag(Tok, diag::err_expected_lparen_after) << \"do/while\";"}, [50]={B,1967,"/// ParseForStatement\n/// for-statement: [C99 6.8.5.3]\n/// \'for\' \'(\' expr[opt] \';\' expr[opt] \';\' expr[opt] \')\' statement\n/// \'for\' \'(\' declaration expr[opt] \';\' expr[opt] \')\' statement\n/// [C++] \'for\' \'(\' for-init-statement condition[opt] \';\' expression[opt] \')\'\n/// [C++] statement\n/// [C++0x] \'for\'\n/// \'co_await\'[opt] [Coroutines]\n/// \'(\' for-range-declaration \':\' for-range-initializer \')\'\n/// statement\n/// [OBJC2] \'for\' \'(\' declaration \'in\' expr \')\' statement\n/// [OBJC2] \'for\' \'(\' expr \'in\' expr \')\' statement\n///\n/// [C++] for-init-statement:\n/// [C++] expression-statement\n/// [C++] simple-declaration\n/// [C++23] alias-declaration\n///\n/// [C++0x] for-range-declaration:\n/// [C++0x] attribute-specifier-seq[opt] type-specifier-seq declarator\n/// [C++0x] for-range-initializer:\n/// [C++0x] expression\n/// [C++0x] braced-init-list [TODO]\nStmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n Diag(Tok, diag::err_expected_lparen_after) << \"for\";"}, [51]={qb,920,"/// ParseAsmOperands - Parse the asm-operands production as used by\n/// asm-statement, assuming the leading \':\' token was eaten.\n///\n/// [GNU] asm-operands:\n/// asm-operand\n/// asm-operands \',\' asm-operand\n///\n/// [GNU] asm-operand:\n/// asm-string-literal \'(\' expression \')\'\n/// \'[\' identifier \']\' asm-string-literal \'(\' expression \')\'\n///\n//\n// FIXME: Avoid unnecessary std::string trashing.\nbool Parser::ParseAsmOperandsOpt(SmallVectorImpl<IdentifierInfo *> &Names, SmallVectorImpl<Expr *> &Constraints, SmallVectorImpl<Expr *> &Exprs) {\n // ...\n while (true) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n Diag(Tok, diag::err_expected_lparen_after) << \"asm operand\";"} }, [l]={ ["clang/test/Parser/asm.c"]={"clang/test/Parser/asm.c:26:7: error: expected \'(\' after \'asm\'"} } }, ["err_expected_lparen_after_type"]={ [d]="err_expected_lparen_after_type", [f]="expected \'(\' for function-style cast or type construction", [b]="expected \'(\' for function-style cast or type construction", [i]=k, [h]="expected \'\\(\' for function\\-style cast or type construction", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{F,1589,"#include \"clang/Basic/OpenCLImageTypes.def\"\n {\n // ...\n if (Tok.isNot(tok::l_paren) && (!getLangOpts().CPlusPlus11 || Tok.isNot(tok::l_brace)))\n return ExprError(Diag(Tok, diag::err_expected_lparen_after_type) << DS.getSourceRange());"}}, [l]={ ["clang/test/SemaCXX/crash-auto-36064.cpp"]={"clang/test/SemaCXX/crash-auto-36064.cpp:8:31: error: expected \'(\' for function-style cast or type construction"} } }, ["err_expected_member_name_or_semi"]={ [d]="err_expected_member_name_or_semi", [f]="expected member name or \';\' after declaration specifiers", [b]="expected member name or \';\' after declaration specifiers", [i]=k, [h]="expected member name or \';\' after declaration specifiers", [g]=a, [e]=n, [c]={U,1237025389,T,W}, [j]={{p,6613,"/// ParseDirectDeclarator\n/// direct-declarator: [C99 6.7.5]\n/// [C99] identifier\n/// \'(\' declarator \')\'\n/// [GNU] \'(\' attributes declarator \')\'\n/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\n/// direct-declarator \'(\' parameter-type-list \')\'\n/// direct-declarator \'(\' identifier-list[opt] \')\'\n/// [GNU] direct-declarator \'(\' parameter-forward-declarations\n/// parameter-type-list[opt] \')\'\n/// [C++] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// cv-qualifier-seq[opt] exception-specification[opt]\n/// [C++11] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// attribute-specifier-seq[opt] cv-qualifier-seq[opt]\n/// ref-qualifier[opt] exception-specification[opt]\n/// [C++] declarator-id\n/// [C++11] declarator-id attribute-specifier-seq[opt]\n///\n/// declarator-id: [C++ 8]\n/// \'...\'[opt] id-expression\n/// \'::\'[opt] nested-name-specifier[opt] type-name\n///\n/// id-expression: [C++ 5.1]\n/// unqualified-id\n/// qualified-id\n///\n/// unqualified-id: [C++ 5.1]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// \'~\' class-name\n/// template-id\n///\n/// C++17 adds the following, which we also handle here:\n///\n/// simple-declaration:\n/// <decl-spec> \'[\' identifier-list \']\' brace-or-equal-initializer \';\'\n///\n/// Note, any additional constructs added here may need corresponding changes\n/// in isConstructorDeclarator.\nvoid Parser::ParseDirectDeclarator(Declarator &D) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n } else if (D.mayOmitIdentifier()) {\n // ...\n } else {\n // ...\n if (D.getContext() == DeclaratorContext::Member) {\n // ...\n Diag(getMissingDeclaratorIdLoc(D, Tok.getLocation()), diag::err_expected_member_name_or_semi) << (D.getDeclSpec().isEmpty() ? SourceRange() : D.getDeclSpec().getSourceRange());"}}, [l]={ ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:113:5: error: expected member name or \';\' after declaration specifiers"} } }, ["err_expected_member_name_or_semi_objcxx_keyword"]={ [d]={{nil,I,"err_expected_member_name_or_semi_objcxx_keyword"}}, [f]={{nil,I,"expected member name or \';\' after declaration specifiers; %0 is a keyword in Objective-C++"}}, [b]={{nil,I,"expected member name or \';\' after declaration specifiers; A is a keyword in Objective-C++"}}, [i]=k, [h]="expected member name or \';\' after declaration specifiers; (.*?) is a keyword in Objective\\-C\\+\\+", [g]=a, [e]={{nil,I,n}}, [c]={"f127821140b1",1491922913,"[Parser][ObjC++] Improve diagnostics and recovery when C++ keywords are used","[Parser][ObjC++] Improve diagnostics and recovery when C++ keywords are used\nas identifiers in Objective-C++\n\nThis commit improves the \'expected identifier\' errors that are presented when a\nC++ keyword is used as an identifier in Objective-C++ by mentioning that this is\na C++ keyword in the diagnostic message. It also improves the error recovery:\nthe parser will now treat the C++ keywords as identifiers to prevent unrelated\nparsing errors.\n\nrdar://20626062\n\nDifferential Revision: https://reviews.llvm.org/D26503\n\nllvm-svn: 299950"}, [j]={{p,6603,"/// ParseDirectDeclarator\n/// direct-declarator: [C99 6.7.5]\n/// [C99] identifier\n/// \'(\' declarator \')\'\n/// [GNU] \'(\' attributes declarator \')\'\n/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\n/// direct-declarator \'(\' parameter-type-list \')\'\n/// direct-declarator \'(\' identifier-list[opt] \')\'\n/// [GNU] direct-declarator \'(\' parameter-forward-declarations\n/// parameter-type-list[opt] \')\'\n/// [C++] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// cv-qualifier-seq[opt] exception-specification[opt]\n/// [C++11] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// attribute-specifier-seq[opt] cv-qualifier-seq[opt]\n/// ref-qualifier[opt] exception-specification[opt]\n/// [C++] declarator-id\n/// [C++11] declarator-id attribute-specifier-seq[opt]\n///\n/// declarator-id: [C++ 8]\n/// \'...\'[opt] id-expression\n/// \'::\'[opt] nested-name-specifier[opt] type-name\n///\n/// id-expression: [C++ 5.1]\n/// unqualified-id\n/// qualified-id\n///\n/// unqualified-id: [C++ 5.1]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// \'~\' class-name\n/// template-id\n///\n/// C++17 adds the following, which we also handle here:\n///\n/// simple-declaration:\n/// <decl-spec> \'[\' identifier-list \']\' brace-or-equal-initializer \';\'\n///\n/// Note, any additional constructs added here may need corresponding changes\n/// in isConstructorDeclarator.\nvoid Parser::ParseDirectDeclarator(Declarator &D) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n } else if (D.mayOmitIdentifier()) {\n // ...\n } else {\n // ...\n if (D.getContext() == DeclaratorContext::Member) {\n // Objective-C++: Detect C++ keywords and try to prevent further errors by\n // treating these keyword as valid member names.\n if (getLangOpts().ObjC && getLangOpts().CPlusPlus && Tok.getIdentifierInfo() && Tok.getIdentifierInfo()->isCPlusPlusKeyword(getLangOpts())) {\n Diag(getMissingDeclaratorIdLoc(D, Tok.getLocation()), diag::err_expected_member_name_or_semi_objcxx_keyword) << Tok.getIdentifierInfo() << (D.getDeclSpec().isEmpty() ? SourceRange() : D.getDeclSpec().getSourceRange());"}}, [l]={ ["clang/test/Parser/objc-cxx-keyword-identifiers.mm"]={"clang/test/Parser/objc-cxx-keyword-identifiers.mm:6:7: error: expected member name or \';\' after declaration specifiers; \'throw\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:29:44: error: expected member name or \';\' after declaration specifiers; \'throw\' is a keyword in Objective-C++"} } }, ["err_expected_member_or_base_name"]={ [d]="err_expected_member_or_base_name", [f]="expected class member or base class name", [b]="expected class member or base class name", [i]=k, [h]="expected class member or base class name", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{r,3826,"/// ParseMemInitializer - Parse a C++ member initializer, which is\n/// part of a constructor initializer that explicitly initializes one\n/// member or base class (C++ [class.base.init]). See\n/// ParseConstructorInitializer for an example.\n///\n/// [C++] mem-initializer:\n/// mem-initializer-id \'(\' expression-list[opt] \')\'\n/// [C++0x] mem-initializer-id braced-init-list\n///\n/// [C++] mem-initializer-id:\n/// \'::\'[opt] nested-name-specifier[opt] class-name\n/// identifier\nMemInitResult Parser::ParseMemInitializer(Decl *ConstructorDecl) {\n // ...\n if (Tok.is(tok::identifier)) {\n // ...\n } else if (Tok.is(tok::annot_decltype)) {\n // ...\n } else {\n // ...\n if (TemplateId && TemplateId->mightBeType()) {\n // ...\n } else {\n Diag(Tok, diag::err_expected_member_or_base_name);"}}, [l]={ ["clang/test/Parser/cxx-invalid-function-decl.cpp"]={"clang/test/Parser/cxx-invalid-function-decl.cpp:10:13: error: expected class member or base class name","clang/test/Parser/cxx-invalid-function-decl.cpp:14:15: error: expected class member or base class name","clang/test/Parser/cxx-invalid-function-decl.cpp:14:17: error: expected class member or base class name","clang/test/Parser/cxx-invalid-function-decl.cpp:33:25: error: expected class member or base class name","clang/test/Parser/cxx-invalid-function-decl.cpp:37:52: error: expected class member or base class name","clang/test/Parser/cxx-invalid-function-decl.cpp:38:14: error: expected class member or base class name"} } }, ["err_expected_method_body"]={ [d]="err_expected_method_body", [f]="expected method body", [b]="expected method body", [i]=k, [h]="expected method body", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{z,2767,"/// objc-method-def: objc-method-proto \';\'[opt] \'{\' body \'}\'\n///\nDecl *Parser::ParseObjCMethodDefinition() {\n // ...\n // We should have an opening brace now.\n if (Tok.isNot(tok::l_brace)) {\n Diag(Tok, diag::err_expected_method_body);"}}, [l]={ ["clang/test/SemaObjC/missing-method-context.m"]={"clang/test/SemaObjC/missing-method-context.m:4:1: error: expected method body"} } }, ["err_expected_minus_or_plus"]={ [d]="err_expected_minus_or_plus", [f]="method type specifier must start with \'-\' or \'+\'", [b]="method type specifier must start with \'-\' or \'+\'", [i]=k, [h]="method type specifier must start with \'\\-\' or \'\\+\'", [g]=a, [e]=n, [c]={"d077f719be76",1270250140,"Improve diagnosing when a method type does not start with \'-\'|\'+\'","Improve diagnosing when a method type does not start with \'-\'|\'+\'\nwhen parsing. Fixes radar 7822196.\n\nllvm-svn: 100248"}, [j]={{z,654,"/// objc-interface-decl-list:\n/// empty\n/// objc-interface-decl-list objc-property-decl [OBJC2]\n/// objc-interface-decl-list objc-method-requirement [OBJC2]\n/// objc-interface-decl-list objc-method-proto \';\'\n/// objc-interface-decl-list declaration\n/// objc-interface-decl-list \';\'\n///\n/// objc-method-requirement: [OBJC2]\n/// @required\n/// @optional\n///\nvoid Parser::ParseObjCInterfaceDeclList(tok::ObjCKeywordKind contextKey, Decl *CDecl) {\n // ...\n while (true) {\n // ...\n if (Tok.is(tok::l_paren)) {\n Diag(Tok, diag::err_expected_minus_or_plus);"}}, [l]={ ["clang/test/Parser/check-syntax-1.m"]={"clang/test/Parser/check-syntax-1.m:14:1: error: method type specifier must start with \'-\' or \'+\'","clang/test/Parser/check-syntax-1.m:15:1: error: method type specifier must start with \'-\' or \'+\'"} } }, ["err_expected_namespace_name"]={ [d]="err_expected_namespace_name", [f]="expected namespace name", [b]="expected namespace name", [i]=k, [h]="expected namespace name", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{r,319,"/// ParseNamespaceAlias - Parse the part after the \'=\' in a namespace\n/// alias definition.\n///\nDecl *Parser::ParseNamespaceAlias(SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, SourceLocation &DeclEnd) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_expected_namespace_name);"},{r,556,"/// ParseUsingDirective - Parse C++ using-directive, assumes\n/// that current token is \'namespace\' and \'using\' was already parsed.\n///\n/// using-directive: [C++ 7.3.p4: namespace.udir]\n/// \'using\' \'namespace\' ::[opt] nested-name-specifier[opt]\n/// namespace-name ;\n/// [GNU] using-directive:\n/// \'using\' \'namespace\' ::[opt] nested-name-specifier[opt]\n/// namespace-name attributes[opt] ;\n///\nDecl *Parser::ParseUsingDirective(DeclaratorContext Context, SourceLocation UsingLoc, SourceLocation &DeclEnd, ParsedAttributes &attrs) {\n // ...\n // Parse namespace-name.\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_expected_namespace_name);"},{Pb,598,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (Found.empty() && !ErrorRecoveryLookup) {\n // ...\n if (!R.empty()) {\n // ...\n Diag(R.getNameLoc(), OnlyNamespace ? unsigned(diag::err_expected_namespace_name) : unsigned(diag::err_expected_class_or_namespace)) << IdInfo.Identifier << getLangOpts().CPlusPlus;"},{Q,11991,"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 } else {\n Diag(IdentLoc, diag::err_expected_namespace_name) << SS.getRange();"},{Q,13403,"Decl *Sema::ActOnNamespaceAliasDef(Scope *S, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n // ...\n if (R.empty()) {\n if (!TryNamespaceTypoCorrection(*this, R, S, SS, IdentLoc, Ident)) {\n Diag(IdentLoc, diag::err_expected_namespace_name) << SS.getRange();"}}, [l]={ ["clang/test/Parser/cxx-namespace-alias.cpp"]={"clang/test/Parser/cxx-namespace-alias.cpp:3:15: error: expected namespace name","clang/test/Parser/cxx-namespace-alias.cpp:5:15: error: expected namespace name","clang/test/Parser/cxx-namespace-alias.cpp:6:18: error: expected namespace name"} } }, ["err_expected_objc_container"]={ [d]="err_expected_objc_container", [f]="\'@end\' must appear in an Objective-C context", [b]="\'@end\' must appear in an Objective-C context", [i]=k, [h]="\'@end\' must appear in an Objective\\-C context", [g]=a, [e]=n, [c]={"c6c8d9356dc0",1323163523,"Extend warnings for missing \'@end\'.","Extend warnings for missing \'@end\'.\nFixes PR2709.\n\nllvm-svn: 145928"}, [j]={{z,2299,"Parser::DeclGroupPtrTy Parser::ParseObjCAtEndDeclaration(SourceRange atEnd) {\n // ...\n if (CurParsedObjCImpl)\n // ...\n else\n // ...\n Diag(atEnd.getBegin(), diag::err_expected_objc_container);"}}, [l]={ ["clang/test/Parser/objc-missing-impl.m"]={"clang/test/Parser/objc-missing-impl.m:2:1: error: \'@end\' must appear in an Objective-C context"} } }, ["err_expected_parameter_pack"]={ [d]="err_expected_parameter_pack", [f]="expected the name of a parameter pack", [b]="expected the name of a parameter pack", [i]=k, [h]="expected the name of a parameter pack", [g]=a, [e]=n, [c]={"820ba7ba43a2",1294162438,"Implement the sizeof...(pack) expression to compute the length of a","Implement the sizeof...(pack) expression to compute the length of a\nparameter pack.\n\nNote that we\'re missing proper libclang support for the new\nSizeOfPackExpr expression node.\n\nllvm-svn: 122813"}, [j]={{F,2464,"/// Parse a sizeof or alignof expression.\n///\n/// \\verbatim\n/// unary-expression: [C99 6.5.3]\n/// \'sizeof\' unary-expression\n/// \'sizeof\' \'(\' type-name \')\'\n/// [C++11] \'sizeof\' \'...\' \'(\' identifier \')\'\n/// [GNU] \'__alignof\' unary-expression\n/// [GNU] \'__alignof\' \'(\' type-name \')\'\n/// [C11] \'_Alignof\' \'(\' type-name \')\'\n/// [C++11] \'alignof\' \'(\' type-id \')\'\n/// \\endverbatim\nExprResult Parser::ParseUnaryExprOrTypeTraitExpression() {\n // ...\n // [C++11] \'sizeof\' \'...\' \'(\' identifier \')\'\n if (Tok.is(tok::ellipsis) && OpTok.is(tok::kw_sizeof)) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n if (Tok.is(tok::identifier)) {\n // ...\n } else {\n Diag(Tok, diag::err_expected_parameter_pack);"}} }, ["err_expected_parentheses_around_typename"]={ [d]="err_expected_parentheses_around_typename", [f]="expected parentheses around type name in %0 expression", [b]="expected parentheses around type name in A expression", [i]=k, [h]="expected parentheses around type name in (.*?) expression", [g]=a, [e]=n, [c]={"767c1f84283a",1381278143,"Make wording for certain invalid unary expressions more consistent.","Make wording for certain invalid unary expressions more consistent.\n\nAn invalid decltype expression like \'decltype int\' gives:\nerror: expected \'(\' after \'decltype\'\n\nThis makes it so \'sizeof int\' gives a similar one:\nerror: expected parentheses around type name in sizeof expression\n\nllvm-svn: 192258"}, [j]={{F,2342,"/// ParseExprAfterUnaryExprOrTypeTrait - We parsed a typeof/sizeof/alignof/\n/// vec_step and we are at the start of an expression or a parenthesized\n/// type-id. OpTok is the operand token (typeof/sizeof/alignof). Returns the\n/// expression (isCastExpr == false) or the type (isCastExpr == true).\n///\n/// \\verbatim\n/// unary-expression: [C99 6.5.3]\n/// \'sizeof\' unary-expression\n/// \'sizeof\' \'(\' type-name \')\'\n/// [GNU] \'__alignof\' unary-expression\n/// [GNU] \'__alignof\' \'(\' type-name \')\'\n/// [C11] \'_Alignof\' \'(\' type-name \')\'\n/// [C++0x] \'alignof\' \'(\' type-id \')\'\n///\n/// [GNU] typeof-specifier:\n/// typeof ( expressions )\n/// typeof ( type-name )\n/// [GNU/C++] typeof unary-expression\n/// [C2x] typeof-specifier:\n/// typeof \'(\' typeof-specifier-argument \')\'\n/// typeof_unqual \'(\' typeof-specifier-argument \')\'\n///\n/// typeof-specifier-argument:\n/// expression\n/// type-name\n///\n/// [OpenCL 1.1 6.11.12] vec_step built-in function:\n/// vec_step ( expressions )\n/// vec_step ( type-name )\n/// \\endverbatim\nExprResult Parser::ParseExprAfterUnaryExprOrTypeTrait(const Token &OpTok, bool &isCastExpr, ParsedType &CastTy, SourceRange &CastRange) {\n // ...\n // If the operand doesn\'t start with an \'(\', it must be an expression.\n if (Tok.isNot(tok::l_paren)) {\n // If construct allows a form without parenthesis, user may forget to put\n // pathenthesis around type name.\n if (OpTok.isOneOf(tok::kw_sizeof, tok::kw___alignof, tok::kw_alignof, tok::kw__Alignof)) {\n if (isTypeIdUnambiguously()) {\n // ...\n if (LParenLoc.isInvalid() || RParenLoc.isInvalid()) {\n Diag(OpTok.getLocation(), diag::err_expected_parentheses_around_typename) << OpTok.getName();"},{F,2345,"/// ParseExprAfterUnaryExprOrTypeTrait - We parsed a typeof/sizeof/alignof/\n/// vec_step and we are at the start of an expression or a parenthesized\n/// type-id. OpTok is the operand token (typeof/sizeof/alignof). Returns the\n/// expression (isCastExpr == false) or the type (isCastExpr == true).\n///\n/// \\verbatim\n/// unary-expression: [C99 6.5.3]\n/// \'sizeof\' unary-expression\n/// \'sizeof\' \'(\' type-name \')\'\n/// [GNU] \'__alignof\' unary-expression\n/// [GNU] \'__alignof\' \'(\' type-name \')\'\n/// [C11] \'_Alignof\' \'(\' type-name \')\'\n/// [C++0x] \'alignof\' \'(\' type-id \')\'\n///\n/// [GNU] typeof-specifier:\n/// typeof ( expressions )\n/// typeof ( type-name )\n/// [GNU/C++] typeof unary-expression\n/// [C2x] typeof-specifier:\n/// typeof \'(\' typeof-specifier-argument \')\'\n/// typeof_unqual \'(\' typeof-specifier-argument \')\'\n///\n/// typeof-specifier-argument:\n/// expression\n/// type-name\n///\n/// [OpenCL 1.1 6.11.12] vec_step built-in function:\n/// vec_step ( expressions )\n/// vec_step ( type-name )\n/// \\endverbatim\nExprResult Parser::ParseExprAfterUnaryExprOrTypeTrait(const Token &OpTok, bool &isCastExpr, ParsedType &CastTy, SourceRange &CastRange) {\n // ...\n // If the operand doesn\'t start with an \'(\', it must be an expression.\n if (Tok.isNot(tok::l_paren)) {\n // If construct allows a form without parenthesis, user may forget to put\n // pathenthesis around type name.\n if (OpTok.isOneOf(tok::kw_sizeof, tok::kw___alignof, tok::kw_alignof, tok::kw__Alignof)) {\n if (isTypeIdUnambiguously()) {\n // ...\n if (LParenLoc.isInvalid() || RParenLoc.isInvalid()) {\n // ...\n } else {\n Diag(LParenLoc, diag::err_expected_parentheses_around_typename) << OpTok.getName() << FixItHint::CreateInsertion(LParenLoc, \"(\") << FixItHint::CreateInsertion(RParenLoc, \")\");"}}, [l]={ ["clang/test/Parser/sizeof-missing-parens.c"]={"clang/test/Parser/sizeof-missing-parens.c:8:13: error: expected parentheses around type name in sizeof expression","clang/test/Parser/sizeof-missing-parens.c:9:7: error: expected parentheses around type name in sizeof expression"} } }, ["err_expected_property_name"]={ [d]="err_expected_property_name", [f]="expected property name", [b]="expected property name", [i]=k, [h]="expected property name", [g]=a, [e]=n, [c]={"5566290b341e",1256490288,"In objc mode, every identifier in a cast expression was using doing a","In objc mode, every identifier in a cast expression was using doing a\ntype looking using getTypeName() and every property access was using\nNextToken() to do lookahead to see if the identifier is followed by\na \'.\'. Rearrange this code to not need lookahead and only do the\ntype lookup if we have \"identifier.\" in the token stream. Also\nimprove a diagnostic a bit.\n\nllvm-svn: 85056"}, [j]={{F,1186,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n // Support \'Class.property\' and \'super.property\' notation.\n if (getLangOpts().ObjC && Tok.is(tok::period) &&\n // ...\n // Allow either an identifier or the keyword \'class\' (in C++).\n if (Tok.isNot(tok::identifier) && !(getLangOpts().CPlusPlus && Tok.is(tok::kw_class))) {\n Diag(Tok, diag::err_expected_property_name);"}} }, ["err_expected_punc"]={ [d]="err_expected_punc", [f]="expected \')\' or \',\' after \'%0\'", [b]="expected \')\' or \',\' after \'A\'", [i]=k, [h]="expected \'\\)\' or \',\' after \'(.*?)\'", [g]=a, [e]=n, [c]={"4bb0980d9628",1392061815,"MS ABI: Add support for #pragma pointers_to_members","MS ABI: Add support for #pragma pointers_to_members\n\nIntroduce a notion of a \'current representation method\' for\npointers-to-members.\n\nWhen starting out, this is set to \'best case\' (representation method is\nchosen by examining the class, selecting the smallest representation\nthat would work given the class definition or lack thereof).\n\nThis pragma allows the translation unit to dictate exactly what\nrepresentation to use, similar to how the inheritance model keywords\noperate.\n\nN.B. PCH support is forthcoming.\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2723\n\nllvm-svn: 201105"}, [j]={{P,2716,"/// Handle \'#pragma pointers_to_members\'\n// The grammar for this pragma is as follows:\n//\n// <inheritance model> ::= (\'single\' | \'multiple\' | \'virtual\') \'_inheritance\'\n//\n// #pragma pointers_to_members \'(\' \'best_case\' \')\'\n// #pragma pointers_to_members \'(\' \'full_generality\' [\',\' inheritance-model] \')\'\n// #pragma pointers_to_members \'(\' inheritance-model \')\'\nvoid PragmaMSPointersToMembers::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Arg->isStr(\"best_case\")) {\n // ...\n } else {\n if (Arg->isStr(\"full_generality\")) {\n if (Tok.is(tok::comma)) {\n // ...\n } else if (Tok.is(tok::r_paren)) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::err_expected_punc) << \"full_generality\";"}} }, ["err_expected_qualified_after_typename"]={ [d]="err_expected_qualified_after_typename", [f]="expected a qualified name after \'typename\'", [b]="expected a qualified name after \'typename\'", [i]=k, [h]="expected a qualified name after \'typename\'", [g]=a, [e]=n, [c]={"333489bba35d",1238195448,"Initial implementation of parsing, semantic analysis, and template","Initial implementation of parsing, semantic analysis, and template\ninstantiation for C++ typename-specifiers such as\n\n typename T::type\n\nThe parsing of typename-specifiers is relatively easy thanks to\nannotation tokens. When we see the \"typename\", we parse the\ntypename-specifier and produce a typename annotation token. There are\nonly a few places where we need to handle this. We currently parse the\ntypename-specifier form that terminates in an identifier, but not the\nsimple-template-id form, e.g.,\n\n typename T::template apply<U, V>\n\nParsing of nested-name-specifiers has a similar problem, since at this\npoint we don\'t have any representation of a class template\nspecialization whose template-name is unknown.\n\nSemantic analysis is only partially complete, with some support for\ntemplate instantiation that works for simple examples. \n\nllvm-svn: 67875"}, [j]={{M,1992,"/// TryAnnotateTypeOrScopeToken - If the current token position is on a\n/// typename (possibly qualified in C++) or a C++ scope specifier not followed\n/// by a typename, TryAnnotateTypeOrScopeToken will replace one or more tokens\n/// with a single annotation token representing the typename or C++ scope\n/// respectively.\n/// This simplifies handling of C++ scope specifiers and allows efficient\n/// backtracking without the need to re-parse and resolve nested-names and\n/// typenames.\n/// It will mainly be called when we expect to treat identifiers as typenames\n/// (if they are typenames). For example, in C we do not expect identifiers\n/// inside expressions to be treated as typenames so it will not be called\n/// for expressions in C.\n/// The benefit for C/ObjC is that a typename will be annotated and\n/// Actions.getTypeName will not be needed to be called again (e.g. getTypeName\n/// will not be called twice, once to check whether we have a declaration\n/// specifier, and another one to get the actual type inside\n/// ParseDeclarationSpecifiers).\n///\n/// This returns true if an error occurred.\n///\n/// Note that this routine emits an error if you call it with ::new or ::delete\n/// as the current tokens, so only call it in contexts where these are invalid.\nbool Parser::TryAnnotateTypeOrScopeToken(ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n if (Tok.is(tok::kw_typename)) {\n // ...\n if (SS.isEmpty()) {\n if (Tok.is(tok::identifier) || Tok.is(tok::annot_template_id) || Tok.is(tok::annot_decltype)) {\n // Attempt to recover by skipping the invalid \'typename\'\n if (Tok.is(tok::annot_decltype) || (!TryAnnotateTypeOrScopeToken(AllowImplicitTypename) && Tok.isAnnotation())) {\n unsigned DiagID = diag::err_expected_qualified_after_typename;"},{M,2004,"/// TryAnnotateTypeOrScopeToken - If the current token position is on a\n/// typename (possibly qualified in C++) or a C++ scope specifier not followed\n/// by a typename, TryAnnotateTypeOrScopeToken will replace one or more tokens\n/// with a single annotation token representing the typename or C++ scope\n/// respectively.\n/// This simplifies handling of C++ scope specifiers and allows efficient\n/// backtracking without the need to re-parse and resolve nested-names and\n/// typenames.\n/// It will mainly be called when we expect to treat identifiers as typenames\n/// (if they are typenames). For example, in C we do not expect identifiers\n/// inside expressions to be treated as typenames so it will not be called\n/// for expressions in C.\n/// The benefit for C/ObjC is that a typename will be annotated and\n/// Actions.getTypeName will not be needed to be called again (e.g. getTypeName\n/// will not be called twice, once to check whether we have a declaration\n/// specifier, and another one to get the actual type inside\n/// ParseDeclarationSpecifiers).\n///\n/// This returns true if an error occurred.\n///\n/// Note that this routine emits an error if you call it with ::new or ::delete\n/// as the current tokens, so only call it in contexts where these are invalid.\nbool Parser::TryAnnotateTypeOrScopeToken(ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n if (Tok.is(tok::kw_typename)) {\n // ...\n if (SS.isEmpty()) {\n // ...\n Diag(Tok.getLocation(), diag::err_expected_qualified_after_typename);"}}, [l]={ ["clang/test/Parser/cxx2a-concepts-requires-expr.cpp"]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:149:32: error: expected a qualified name after \'typename\'","clang/test/Parser/cxx2a-concepts-requires-expr.cpp:153:11: error: expected a qualified name after \'typename\'"} } }, ["err_expected_rparen_after"]={ [d]="err_expected_rparen_after", [f]="expected \')\' after \'%0\'", [b]="expected \')\' after \'A\'", [i]=k, [h]="expected \'\\)\' after \'(.*?)\'", [g]=a, [e]=n, [c]={"4bb0980d9628",1392061815,"MS ABI: Add support for #pragma pointers_to_members","MS ABI: Add support for #pragma pointers_to_members\n\nIntroduce a notion of a \'current representation method\' for\npointers-to-members.\n\nWhen starting out, this is set to \'best case\' (representation method is\nchosen by examining the class, selecting the smallest representation\nthat would work given the class definition or lack thereof).\n\nThis pragma allows the translation unit to dictate exactly what\nrepresentation to use, similar to how the inheritance model keywords\noperate.\n\nN.B. PCH support is forthcoming.\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2723\n\nllvm-svn: 201105"}, [j]={{P,2742,"/// 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::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_expected_rparen_after) << (Arg ? Arg->getName() : \"full_generality\");"}} }, ["err_expected_selector_for_method"]={ [d]="err_expected_selector_for_method", [f]="expected selector for Objective-C method", [b]="expected selector for Objective-C method", [i]=k, [h]="expected selector for Objective\\-C method", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{z,1419,"/// objc-method-decl:\n/// objc-selector\n/// objc-keyword-selector objc-parmlist[opt]\n/// objc-type-name objc-selector\n/// objc-type-name objc-keyword-selector objc-parmlist[opt]\n///\n/// objc-keyword-selector:\n/// objc-keyword-decl\n/// objc-keyword-selector objc-keyword-decl\n///\n/// objc-keyword-decl:\n/// objc-selector \':\' objc-type-name objc-keyword-attributes[opt] identifier\n/// objc-selector \':\' objc-keyword-attributes[opt] identifier\n/// \':\' objc-type-name objc-keyword-attributes[opt] identifier\n/// \':\' objc-keyword-attributes[opt] identifier\n///\n/// objc-parmlist:\n/// objc-parms objc-ellipsis[opt]\n///\n/// objc-parms:\n/// objc-parms , parameter-declaration\n///\n/// objc-ellipsis:\n/// , ...\n///\n/// objc-keyword-attributes: [OBJC2]\n/// __attribute__((unused))\n///\nDecl *Parser::ParseObjCMethodDecl(SourceLocation mLoc, tok::TokenKind mType, tok::ObjCKeywordKind MethodImplKind, bool MethodDefinition) {\n // ...\n // An unnamed colon is valid.\n if (!SelIdent && Tok.isNot(tok::colon)) { // missing selector name.\n Diag(Tok, diag::err_expected_selector_for_method) << SourceRange(mLoc, Tok.getLocation());"}}, [l]={ ["clang/test/SemaObjC/method-def-1.m"]={"clang/test/SemaObjC/method-def-1.m:13:2: error: expected selector for Objective-C method"} } }, ["err_expected_semantic_identifier"]={ [d]={{nil,x,"err_expected_semantic_identifier"}}, [f]={{nil,x,"expected HLSL Semantic identifier"}}, [b]={{nil,x,"expected HLSL Semantic identifier"}}, [i]=k, [h]="expected HLSL Semantic identifier", [g]=a, [e]={{nil,x,o}}, [c]={"1fdf952deeb9",1648668015,"[HLSL] Add Semantic syntax, and SV_GroupIndex","[HLSL] Add Semantic syntax, and SV_GroupIndex\n\nHLSL has a language feature called Semantics which get attached to\ndeclarations like attributes and are used in a variety of ways.\n\nOne example of semantic use is here with the `SV_GroupIndex` semantic\nwhich, when applied to an input for a compute shader is pre-populated\nby the driver with a flattened thread index.\n\nDifferential Revision: https://reviews.llvm.org/D122699\n\n# Conflicts:\n# clang/include/clang/Basic/Attr.td\n# clang/include/clang/Basic/AttrDocs.td"}, [j]={{ob,136,"void Parser::ParseHLSLSemantics(ParsedAttributes &Attrs, SourceLocation *EndLoc) {\n // ...\n if (!II) {\n Diag(Tok.getLocation(), diag::err_expected_semantic_identifier);"}}, [l]={ ["clang/test/ParserHLSL/semantic_parsing.hlsl"]={"clang/test/ParserHLSL/semantic_parsing.hlsl:4:21: error: expected HLSL Semantic identifier"} } }, ["err_expected_semi_after_attribute_list"]={ [d]="err_expected_semi_after_attribute_list", [f]="expected \';\' after attribute list", [b]="expected \';\' after attribute list", [i]=k, [h]="expected \';\' after attribute list", [g]=a, [e]=n, [c]={"34a9566c8c3b",1244938068,"improve localizability by not passing english phrases into ","improve localizability by not passing english phrases into \ndiagnostics in some cases.\n\nllvm-svn: 73314"}, [j]={{r,584,"/// ParseUsingDirective - Parse C++ using-directive, assumes\n/// that current token is \'namespace\' and \'using\' was already parsed.\n///\n/// using-directive: [C++ 7.3.p4: namespace.udir]\n/// \'using\' \'namespace\' ::[opt] nested-name-specifier[opt]\n/// namespace-name ;\n/// [GNU] using-directive:\n/// \'using\' \'namespace\' ::[opt] nested-name-specifier[opt]\n/// namespace-name attributes[opt] ;\n///\nDecl *Parser::ParseUsingDirective(DeclaratorContext Context, SourceLocation UsingLoc, SourceLocation &DeclEnd, ParsedAttributes &attrs) {\n // ...\n if (ExpectAndConsume(tok::semi, GNUAttr ? diag::err_expected_semi_after_attribute_list : diag::err_expected_semi_after_namespace_name))"}} }, ["err_expected_semi_after_expr"]={ [d]="err_expected_semi_after_expr", [f]="expected \';\' after expression", [b]="expected \';\' after expression", [i]=k, [h]="expected \';\' after expression", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{z,2829,"StmtResult Parser::ParseObjCAtStatement(SourceLocation AtLoc, ParsedStmtContext StmtCtx) {\n // ...\n ExpectAndConsumeSemi(diag::err_expected_semi_after_expr);"},{B,562,"/// Parse an expression statement.\nStmtResult Parser::ParseExprStatement(ParsedStmtContext StmtCtx) {\n // ...\n // If the semicolon is missing at the end of REPL input, consider if\n // we want to do value printing. Note this is only enabled in C++ mode\n // since part of the implementation requires C++ language features.\n // Note we shouldn\'t eat the token since the callback needs it.\n if (Tok.is(tok::annot_repl_input_end) && Actions.getLangOpts().CPlusPlus)\n // ...\n else\n // ...\n ExpectAndConsumeSemi(diag::err_expected_semi_after_expr);"},{B,1241,"/// 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 while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) {\n // ...\n if (Tok.isNot(tok::kw___extension__)) {\n // ...\n } else {\n // ...\n // If this is the start of a declaration, parse it as such.\n if (isDeclarationStatement()) {\n // ...\n } else {\n // ...\n ExpectAndConsumeSemi(diag::err_expected_semi_after_expr);"}}, [l]={ ["clang/test/Parser/recovery.c"]={"clang/test/Parser/recovery.c:75:8: error: expected \';\' after expression","clang/test/Parser/recovery.c:81:12: error: expected \';\' after expression","clang/test/Parser/recovery.c:98:13: error: expected \';\' after expression","clang/test/Parser/recovery.c:99:13: error: expected \';\' after expression","clang/test/Parser/recovery.c:100:16: error: expected \';\' after expression"} } }, ["err_expected_semi_after_method_proto"]={ [d]="err_expected_semi_after_method_proto", [f]="expected \';\' after method prototype", [b]="expected \';\' after method prototype", [i]=k, [h]="expected \';\' after method prototype", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{z,645,"/// objc-interface-decl-list:\n/// empty\n/// objc-interface-decl-list objc-property-decl [OBJC2]\n/// objc-interface-decl-list objc-method-requirement [OBJC2]\n/// objc-interface-decl-list objc-method-proto \';\'\n/// objc-interface-decl-list declaration\n/// objc-interface-decl-list \';\'\n///\n/// objc-method-requirement: [OBJC2]\n/// @required\n/// @optional\n///\nvoid Parser::ParseObjCInterfaceDeclList(tok::ObjCKeywordKind contextKey, Decl *CDecl) {\n // ...\n while (true) {\n // If this is a method prototype, parse it.\n if (Tok.isOneOf(tok::minus, tok::plus)) {\n // ...\n if (ExpectAndConsumeSemi(diag::err_expected_semi_after_method_proto)) {"}}, [l]={ ["clang/test/Parser/check-syntax-1.m"]={"clang/test/Parser/check-syntax-1.m:8:47: error: expected \';\' after method prototype"} } }, ["err_expected_semi_after_namespace_name"]={ [d]="err_expected_semi_after_namespace_name", [f]="expected \';\' after namespace name", [b]="expected \';\' after namespace name", [i]=k, [h]="expected \';\' after namespace name", [g]=a, [e]=n, [c]={"34a9566c8c3b",1244938068,"improve localizability by not passing english phrases into ","improve localizability by not passing english phrases into \ndiagnostics in some cases.\n\nllvm-svn: 73314"}, [j]={{r,338,"/// ParseNamespaceAlias - Parse the part after the \'=\' in a namespace\n/// alias definition.\n///\nDecl *Parser::ParseNamespaceAlias(SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, SourceLocation &DeclEnd) {\n // ...\n if (ExpectAndConsume(tok::semi, diag::err_expected_semi_after_namespace_name))"},{r,585,"/// ParseUsingDirective - Parse C++ using-directive, assumes\n/// that current token is \'namespace\' and \'using\' was already parsed.\n///\n/// using-directive: [C++ 7.3.p4: namespace.udir]\n/// \'using\' \'namespace\' ::[opt] nested-name-specifier[opt]\n/// namespace-name ;\n/// [GNU] using-directive:\n/// \'using\' \'namespace\' ::[opt] nested-name-specifier[opt]\n/// namespace-name attributes[opt] ;\n///\nDecl *Parser::ParseUsingDirective(DeclaratorContext Context, SourceLocation UsingLoc, SourceLocation &DeclEnd, ParsedAttributes &attrs) {\n // ...\n if (ExpectAndConsume(tok::semi, GNUAttr ? diag::err_expected_semi_after_attribute_list : diag::err_expected_semi_after_namespace_name))"}}, [l]={ ["clang/test/Parser/cxx-using-directive.cpp"]={"clang/test/Parser/cxx-using-directive.cpp:31:20: error: expected \';\' after namespace name"} } }, ["err_expected_semi_after_static_assert"]={ [d]="err_expected_semi_after_static_assert", [f]={{nil,x,"expected \';\' after \'%0\'"},{y,nil,"expected \';\' after static_assert"}}, [b]={{nil,x,"expected \';\' after \'A\'"},{y,nil,"expected \';\' after static_assert"}}, [i]=k, [h]="expected \';\' after \'(.*?)\'", [g]=a, [e]=n, [c]={U,1237025389,T,W}, [j]={{r,1053,"/// ParseStaticAssertDeclaration - Parse C++0x or C11 static_assert-declaration.\n///\n/// [C++0x] static_assert-declaration:\n/// static_assert ( constant-expression , string-literal ) ;\n///\n/// [C11] static_assert-declaration:\n/// _Static_assert ( constant-expression , string-literal ) ;\n///\nDecl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd) {\n // ...\n ExpectAndConsumeSemi(diag::err_expected_semi_after_static_assert, TokName);"}}, [l]={ ["clang/test/SemaCXX/static-assert.cpp"]={"clang/test/SemaCXX/static-assert.cpp:236:22: error: expected \';\' after \'static_assert\'"} } }, ["err_expected_semi_after_stmt"]={ [d]="err_expected_semi_after_stmt", [f]="expected \';\' after %0 statement", [b]="expected \';\' after A statement", [i]=k, [h]="expected \';\' after (.*?) statement", [g]=a, [e]=n, [c]={"34a9566c8c3b",1244938068,"improve localizability by not passing english phrases into ","improve localizability by not passing english phrases into \ndiagnostics in some cases.\n\nllvm-svn: 73314"}, [j]={{B,515,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n // If we reached this code, the statement must end in a semicolon.\n if (!TryConsumeToken(tok::semi) && !Res.isInvalid()) {\n // ...\n ExpectAndConsume(tok::semi, diag::err_expected_semi_after_stmt, SemiError);"}}, [l]={ ["clang/test/Parser/cxx0x-attributes.cpp"]={"clang/test/Parser/cxx0x-attributes.cpp:155:23: error: expected \';\' after do/while statement"} } }, ["err_expected_semi_decl_list"]={ [d]="err_expected_semi_decl_list", [f]="expected \';\' at end of declaration list", [b]="expected \';\' at end of declaration list", [i]=k, [h]="expected \';\' at end of declaration list", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{bb,672,"void Parser::ParseLexedMemberInitializer(LateParsedMemberInitializer &MI) {\n // ...\n // The next token should be our artificial terminating EOF token.\n if (Tok.isNot(tok::eof)) {\n if (!Init.isInvalid()) {\n // ...\n Diag(EndLoc, diag::err_expected_semi_decl_list);"},{p,4720,"/// ParseStructUnionBody\n/// struct-contents:\n/// struct-declaration-list\n/// [EXT] empty\n/// [GNU] \"struct-declaration-list\" without terminating \';\'\n/// struct-declaration-list:\n/// struct-declaration\n/// struct-declaration-list struct-declaration\n/// [OBC] \'@\' \'defs\' \'(\' class-name \')\'\n///\nvoid Parser::ParseStructUnionBody(SourceLocation RecordLoc, DeclSpec::TST TagType, RecordDecl *TagDecl) {\n // ...\n // While we still have something to read, read the declarations in the struct.\n while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) {\n // ...\n ExpectAndConsume(tok::semi, diag::err_expected_semi_decl_list);"},{r,3193,"/// ParseCXXClassMemberDeclaration - Parse a C++ class member declaration.\n///\n/// member-declaration:\n/// decl-specifier-seq[opt] member-declarator-list[opt] \';\'\n/// function-definition \';\'[opt]\n/// ::[opt] nested-name-specifier template[opt] unqualified-id \';\'[TODO]\n/// using-declaration [TODO]\n/// [C++0x] static_assert-declaration\n/// template-declaration\n/// [GNU] \'__extension__\' member-declaration\n///\n/// member-declarator-list:\n/// member-declarator\n/// member-declarator-list \',\' member-declarator\n///\n/// member-declarator:\n/// declarator virt-specifier-seq[opt] pure-specifier[opt]\n/// [C++2a] declarator requires-clause\n/// declarator constant-initializer[opt]\n/// [C++11] declarator brace-or-equal-initializer[opt]\n/// identifier[opt] \':\' constant-expression\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\n///\n/// virt-specifier:\n/// override\n/// final\n/// [MS] sealed\n///\n/// pure-specifier:\n/// \'= 0\'\n///\n/// constant-initializer:\n/// \'=\' constant-expression\n///\nParser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, ParsedAttributes &AccessAttrs, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject *TemplateDiags) {\n // ...\n if (ExpectSemi && ExpectAndConsume(tok::semi, diag::err_expected_semi_decl_list)) {"},{z,815,"/// objc-interface-decl-list:\n/// empty\n/// objc-interface-decl-list objc-property-decl [OBJC2]\n/// objc-interface-decl-list objc-method-requirement [OBJC2]\n/// objc-interface-decl-list objc-method-proto \';\'\n/// objc-interface-decl-list declaration\n/// objc-interface-decl-list \';\'\n///\n/// objc-method-requirement: [OBJC2]\n/// @required\n/// @optional\n///\nvoid Parser::ParseObjCInterfaceDeclList(tok::ObjCKeywordKind contextKey, Decl *CDecl) {\n // ...\n while (true) {\n // ...\n case tok::objc_property:\n // ...\n ExpectAndConsume(tok::semi, diag::err_expected_semi_decl_list);"},{z,2040,"/// objc-class-instance-variables:\n/// \'{\' objc-instance-variable-decl-list[opt] \'}\'\n///\n/// objc-instance-variable-decl-list:\n/// objc-visibility-spec\n/// objc-instance-variable-decl \';\'\n/// \';\'\n/// objc-instance-variable-decl-list objc-visibility-spec\n/// objc-instance-variable-decl-list objc-instance-variable-decl \';\'\n/// objc-instance-variable-decl-list static_assert-declaration\n/// objc-instance-variable-decl-list \';\'\n///\n/// objc-visibility-spec:\n/// @private\n/// @protected\n/// @public\n/// @package [OBJC2]\n///\n/// objc-instance-variable-decl:\n/// struct-declaration\n///\nvoid Parser::ParseObjCClassInstanceVariables(ObjCContainerDecl *interfaceDecl, tok::ObjCKeywordKind visibility, SourceLocation atLoc) {\n // ...\n // While we still have something to read, read the instance variables.\n while (Tok.isNot(tok::r_brace) && !isEofOrEom()) {\n // ...\n if (Tok.is(tok::semi)) {\n // ...\n } else {\n Diag(Tok, diag::err_expected_semi_decl_list);"}}, [l]={ ["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:74:8: error: expected \';\' at end of declaration list"} } }, ["err_expected_semi_declaration"]={ [d]="err_expected_semi_declaration", [f]="expected \';\' at end of declaration", [b]="expected \';\' at end of declaration", [i]=k, [h]="expected \';\' at end of declaration", [g]=a, [e]=n, [c]={"ef50e9978389",1249006835,"sp.","sp.\n\nllvm-svn: 77656"}, [j]={{p,2279,"/// ParseDeclGroup - Having concluded that this is either a function\n/// definition or a group of object declarations, actually parse the\n/// result.\nParser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec &DS, DeclaratorContext Context, ParsedAttributes &Attrs, SourceLocation *DeclEnd, ForRangeInit *FRI) {\n // ...\n while (TryConsumeToken(tok::comma, CommaLoc)) {\n if (Tok.isAtStartOfLine() && ExpectSemi && !MightBeDeclarator(Context)) {\n // ...\n Diag(CommaLoc, diag::err_expected_semi_declaration) << FixItHint::CreateReplacement(CommaLoc, \";\");"},{p,2327,"/// ParseDeclGroup - Having concluded that this is either a function\n/// definition or a group of object declarations, actually parse the\n/// result.\nParser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec &DS, DeclaratorContext Context, ParsedAttributes &Attrs, SourceLocation *DeclEnd, ForRangeInit *FRI) {\n // ...\n if (ExpectSemi && ExpectAndConsumeSemi(Context == DeclaratorContext::File ? diag::err_invalid_token_after_toplevel_declarator : diag::err_expected_semi_declaration)) {"},{r,3167,"/// ParseCXXClassMemberDeclaration - Parse a C++ class member declaration.\n///\n/// member-declaration:\n/// decl-specifier-seq[opt] member-declarator-list[opt] \';\'\n/// function-definition \';\'[opt]\n/// ::[opt] nested-name-specifier template[opt] unqualified-id \';\'[TODO]\n/// using-declaration [TODO]\n/// [C++0x] static_assert-declaration\n/// template-declaration\n/// [GNU] \'__extension__\' member-declaration\n///\n/// member-declarator-list:\n/// member-declarator\n/// member-declarator-list \',\' member-declarator\n///\n/// member-declarator:\n/// declarator virt-specifier-seq[opt] pure-specifier[opt]\n/// [C++2a] declarator requires-clause\n/// declarator constant-initializer[opt]\n/// [C++11] declarator brace-or-equal-initializer[opt]\n/// identifier[opt] \':\' constant-expression\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\n///\n/// virt-specifier:\n/// override\n/// final\n/// [MS] sealed\n///\n/// pure-specifier:\n/// \'= 0\'\n///\n/// constant-initializer:\n/// \'=\' constant-expression\n///\nParser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, ParsedAttributes &AccessAttrs, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject *TemplateDiags) {\n // ...\n while (true) {\n // ...\n if (Tok.isAtStartOfLine() && !MightBeDeclarator(DeclaratorContext::Member)) {\n // ...\n Diag(CommaLoc, diag::err_expected_semi_declaration) << FixItHint::CreateReplacement(CommaLoc, \";\");"},{M,1598,"/// ParseKNRParamDeclarations - Parse \'declaration-list[opt]\' which provides\n/// types for a function with a K&R-style identifier list for arguments.\nvoid Parser::ParseKNRParamDeclarations(Declarator &D) {\n // ...\n // Read all the argument declarations.\n while (isDeclarationSpecifier(ImplicitTypenameContext::No)) {\n // ...\n if (!ExpectAndConsumeSemi(diag::err_expected_semi_declaration))"},{B,1185,"/// 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 // \"__label__ X, Y, Z;\" is the GNU \"Local Label\" extension. These are\n // only allowed at the start of a compound stmt regardless of the language.\n while (Tok.is(tok::kw___label__)) {\n // ...\n ExpectAndConsumeSemi(diag::err_expected_semi_declaration);"},{Y,374,"/// Parse a single declaration that declares a template,\n/// template specialization, or explicit instantiation of a template.\n///\n/// \\param DeclEnd will receive the source location of the last token\n/// within this declaration.\n///\n/// \\param AS the access specifier associated with this\n/// declaration. Will be AS_none for namespace-scope declarations.\n///\n/// \\returns the new declaration.\nDecl *Parser::ParseSingleDeclarationAfterTemplate(DeclaratorContext Context, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject &DiagsFromTParams, SourceLocation &DeclEnd, ParsedAttributes &AccessAttrs, AccessSpecifier AS) {\n // ...\n ExpectAndConsumeSemi(diag::err_expected_semi_declaration);"},{Y,455,"/// \\brief Parse a single declaration that declares a concept.\n///\n/// \\param DeclEnd will receive the source location of the last token\n/// within this declaration.\n///\n/// \\returns the new declaration.\nDecl *Parser::ParseConceptDefinition(const ParsedTemplateInfo &TemplateInfo, SourceLocation &DeclEnd) {\n // ...\n ExpectAndConsumeSemi(diag::err_expected_semi_declaration);"}}, [l]={ ["clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp"]={"clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp:12:21: error: expected \';\' at end of declaration","clang/test/CXX/lex/lex.literal/lex.ext/p10.cpp:13:33: error: expected \';\' at end of declaration"} } }, ["err_expected_semi_for"]={ [d]="err_expected_semi_for", [f]="expected \';\' in \'for\' statement specifier", [b]="expected \';\' in \'for\' statement specifier", [i]=k, [h]="expected \';\' in \'for\' statement specifier", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{B,2092,"/// ParseForStatement\n/// for-statement: [C99 6.8.5.3]\n/// \'for\' \'(\' expr[opt] \';\' expr[opt] \';\' expr[opt] \')\' statement\n/// \'for\' \'(\' declaration expr[opt] \';\' expr[opt] \')\' statement\n/// [C++] \'for\' \'(\' for-init-statement condition[opt] \';\' expression[opt] \')\'\n/// [C++] statement\n/// [C++0x] \'for\'\n/// \'co_await\'[opt] [Coroutines]\n/// \'(\' for-range-declaration \':\' for-range-initializer \')\'\n/// statement\n/// [OBJC2] \'for\' \'(\' declaration \'in\' expr \')\' statement\n/// [OBJC2] \'for\' \'(\' expr \'in\' expr \')\' statement\n///\n/// [C++] for-init-statement:\n/// [C++] expression-statement\n/// [C++] simple-declaration\n/// [C++23] alias-declaration\n///\n/// [C++0x] for-range-declaration:\n/// [C++0x] attribute-specifier-seq[opt] type-specifier-seq declarator\n/// [C++0x] for-range-initializer:\n/// [C++0x] expression\n/// [C++0x] braced-init-list [TODO]\nStmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {\n // ...\n // Parse the first part of the for specifier.\n if (Tok.is(tok::semi)) { // for (;\n // ...\n } else if (getLangOpts().CPlusPlus && Tok.is(tok::identifier) && isForRangeIdentifier()) {\n // ...\n } else if (isForInitDeclaration()) { // for (int X = 4;\n // ...\n if (Tok.is(tok::kw_using)) {\n // ...\n } else {\n // ...\n if (ForRangeInfo.ParsedForRangeDecl()) {\n // ...\n } else if (Tok.is(tok::semi)) { // for (int x = 4;\n // ...\n } else if ((ForEach = isTokIdentifier_in())) {\n // ...\n } else {\n Diag(Tok, diag::err_expected_semi_for);"},{B,2137,"/// ParseForStatement\n/// for-statement: [C99 6.8.5.3]\n/// \'for\' \'(\' expr[opt] \';\' expr[opt] \';\' expr[opt] \')\' statement\n/// \'for\' \'(\' declaration expr[opt] \';\' expr[opt] \')\' statement\n/// [C++] \'for\' \'(\' for-init-statement condition[opt] \';\' expression[opt] \')\'\n/// [C++] statement\n/// [C++0x] \'for\'\n/// \'co_await\'[opt] [Coroutines]\n/// \'(\' for-range-declaration \':\' for-range-initializer \')\'\n/// statement\n/// [OBJC2] \'for\' \'(\' declaration \'in\' expr \')\' statement\n/// [OBJC2] \'for\' \'(\' expr \'in\' expr \')\' statement\n///\n/// [C++] for-init-statement:\n/// [C++] expression-statement\n/// [C++] simple-declaration\n/// [C++23] alias-declaration\n///\n/// [C++0x] for-range-declaration:\n/// [C++0x] attribute-specifier-seq[opt] type-specifier-seq declarator\n/// [C++0x] for-range-initializer:\n/// [C++0x] expression\n/// [C++0x] braced-init-list [TODO]\nStmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {\n // ...\n // Parse the first part of the for specifier.\n if (Tok.is(tok::semi)) { // for (;\n // ...\n } else if (getLangOpts().CPlusPlus && Tok.is(tok::identifier) && isForRangeIdentifier()) {\n // ...\n } else if (isForInitDeclaration()) { // for (int X = 4;\n // ...\n } else {\n // ...\n if (Tok.is(tok::semi)) {\n // ...\n } else if (ForEach) {\n // ...\n } else if (getLangOpts().CPlusPlus11 && Tok.is(tok::colon) && FirstPart.get()) {\n // ...\n } else {\n if (!Value.isInvalid()) {\n Diag(Tok, diag::err_expected_semi_for);"},{B,2205,"/// ParseForStatement\n/// for-statement: [C99 6.8.5.3]\n/// \'for\' \'(\' expr[opt] \';\' expr[opt] \';\' expr[opt] \')\' statement\n/// \'for\' \'(\' declaration expr[opt] \';\' expr[opt] \')\' statement\n/// [C++] \'for\' \'(\' for-init-statement condition[opt] \';\' expression[opt] \')\'\n/// [C++] statement\n/// [C++0x] \'for\'\n/// \'co_await\'[opt] [Coroutines]\n/// \'(\' for-range-declaration \':\' for-range-initializer \')\'\n/// statement\n/// [OBJC2] \'for\' \'(\' declaration \'in\' expr \')\' statement\n/// [OBJC2] \'for\' \'(\' expr \'in\' expr \')\' statement\n///\n/// [C++] for-init-statement:\n/// [C++] expression-statement\n/// [C++] simple-declaration\n/// [C++23] alias-declaration\n///\n/// [C++0x] for-range-declaration:\n/// [C++0x] attribute-specifier-seq[opt] type-specifier-seq declarator\n/// [C++0x] for-range-initializer:\n/// [C++0x] expression\n/// [C++0x] braced-init-list [TODO]\nStmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {\n // ...\n // Parse the third part of the for statement.\n if (!ForEach && !ForRangeInfo.ParsedForRangeDecl()) {\n if (Tok.isNot(tok::semi)) {\n if (!SecondPart.isInvalid())\n Diag(Tok, diag::err_expected_semi_for);"}}, [l]={ ["clang/test/Parser/objc-foreach-syntax.m"]={"clang/test/Parser/objc-foreach-syntax.m:24:19: error: expected \';\' in \'for\' statement specifier"} } }, ["err_expected_semi_requirement"]={ [d]={{nil,H,"err_expected_semi_requirement"}}, [f]={{nil,H,"expected \';\' at end of requirement"}}, [b]={{nil,H,"expected \';\' at end of requirement"}}, [i]=k, [h]="expected \';\' at end of requirement", [g]=a, [e]={{nil,H,n}}, [c]={"739b410f1ff5",1570627358,"Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit","Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit\n\nSee\nhttps://docs.google.com/document/d/1xMkTZMKx9llnMPgso0jrx3ankI4cv60xeZ0y4ksf4wc/preview\nfor background discussion.\n\nThis adds a warning, flags and pragmas to limit the number of\npre-processor tokens either at a certain point in a translation unit, or\noverall.\n\nThe idea is that this would allow projects to limit the size of certain\nwidely included headers, or for translation units overall, as a way to\ninsert backstops for header bloat and prevent compile-time regressions.\n\nDifferential revision: https://reviews.llvm.org/D72703"}, [j]={{O,3755,"/// ParseRequiresExpression - Parse a C++2a requires-expression.\n/// C++2a [expr.prim.req]p1\n/// A requires-expression provides a concise way to express requirements on\n/// template arguments. A requirement is one that can be checked by name\n/// lookup (6.4) or by checking properties of types and expressions.\n///\n/// requires-expression:\n/// \'requires\' requirement-parameter-list[opt] requirement-body\n///\n/// requirement-parameter-list:\n/// \'(\' parameter-declaration-clause[opt] \')\'\n///\n/// requirement-body:\n/// \'{\' requirement-seq \'}\'\n///\n/// requirement-seq:\n/// requirement\n/// requirement-seq requirement\n///\n/// requirement:\n/// simple-requirement\n/// type-requirement\n/// compound-requirement\n/// nested-requirement\nExprResult Parser::ParseRequiresExpression() {\n // ...\n if (Tok.is(tok::r_brace)) {\n // ...\n } else {\n while (!Tok.is(tok::r_brace)) {\n // ...\n if (ExpectAndConsumeSemi(diag::err_expected_semi_requirement)) {"}}, [l]={ ["clang/test/Parser/cxx2a-concepts-requires-expr.cpp"]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:119:37: error: expected \';\' at end of requirement","clang/test/Parser/cxx2a-concepts-requires-expr.cpp:125:24: error: expected \';\' at end of requirement","clang/test/Parser/cxx2a-concepts-requires-expr.cpp:128:36: error: expected \';\' at end of requirement","clang/test/Parser/cxx2a-concepts-requires-expr.cpp:134:39: error: expected \';\' at end of requirement"} } }, ["err_expected_sequence_or_directive"]={ [d]={{nil,L,"err_expected_sequence_or_directive"}}, [f]={{nil,L,"expected an OpenMP \'directive\' or \'sequence\' attribute argument"}}, [b]={{nil,L,"expected an OpenMP \'directive\' or \'sequence\' attribute argument"}}, [i]=k, [h]="expected an OpenMP \'directive\' or \'sequence\' attribute argument", [g]=a, [e]={{nil,L,n}}, [c]={"69350e569dc4",1612659633,"[C++20][Modules][3/8] Initial handling for module partitions.","[C++20][Modules][3/8] Initial handling for module partitions.\n\nThis implements the parsing and recognition of module partition CMIs\nand removes the FIXMEs in the parser.\n\nModule partitions are recognised in the base computation of visibility,\nhowever additional amendments to visibility follow in subsequent patches.\n\nDifferential Revision: https://reviews.llvm.org/D118586"}, [j]={{r,4339,"void Parser::ParseOpenMPAttributeArgs(IdentifierInfo *AttrName, CachedTokens &OpenMPTokens) {\n // ...\n if (AttrName->isStr(\"directive\")) {\n // ...\n } else {\n // ...\n // If the attribute is named \'sequence\', its argument is a list of one or\n // more OpenMP attributes (either \'omp::directive\' or \'omp::sequence\',\n // where the \'omp::\' is optional).\n do {\n // ...\n // If we failed to find an identifier (scoped or otherwise), or we found\n // an unexpected identifier, diagnose.\n if (!Ident || (!Ident->isStr(\"directive\") && !Ident->isStr(\"sequence\"))) {\n Diag(Tok.getLocation(), diag::err_expected_sequence_or_directive);"}}, [l]={ ["clang/test/OpenMP/openmp_attribute_parsing.cpp"]={"clang/test/OpenMP/openmp_attribute_parsing.cpp:18:17: error: expected an OpenMP \'directive\' or \'sequence\' attribute argument","clang/test/OpenMP/openmp_attribute_parsing.cpp:30:39: error: expected an OpenMP \'directive\' or \'sequence\' attribute argument","clang/test/OpenMP/openmp_attribute_parsing.cpp:31:44: error: expected an OpenMP \'directive\' or \'sequence\' attribute argument","clang/test/OpenMP/openmp_attribute_parsing.cpp:32:44: error: expected an OpenMP \'directive\' or \'sequence\' attribute argument","clang/test/OpenMP/openmp_attribute_parsing.cpp:33:49: error: expected an OpenMP \'directive\' or \'sequence\' attribute argument","clang/test/OpenMP/openmp_attribute_parsing.cpp:42:1: error: expected an OpenMP \'directive\' or \'sequence\' attribute argument","clang/test/OpenMP/openmp_attribute_parsing.cpp:46:23: error: expected an OpenMP \'directive\' or \'sequence\' attribute argument","clang/test/OpenMP/openmp_attribute_parsing.cpp:57:24: error: expected an OpenMP \'directive\' or \'sequence\' attribute argument","clang/test/OpenMP/openmp_attribute_parsing.cpp:58:33: error: expected an OpenMP \'directive\' or \'sequence\' attribute argument","clang/test/OpenMP/openmp_attribute_parsing.cpp:59:29: error: expected an OpenMP \'directive\' or \'sequence\' attribute argument","clang/test/OpenMP/openmp_attribute_parsing.cpp:60:38: error: expected an OpenMP \'directive\' or \'sequence\' attribute argument"} } }, ["err_expected_star_this_capture"]={ [d]="err_expected_star_this_capture", [f]="expected \'this\' following \'*\' in lambda capture list", [b]="expected \'this\' following \'*\' in lambda capture list", [i]=k, [h]="expected \'this\' following \'\\*\' in lambda capture list", [g]=a, [e]=n, [c]={"dc6b596ebbd3",1458552337,"[Cxx1z] Implement Lambda Capture of *this by Value as [=,*this] (P0018R3)","[Cxx1z] Implement Lambda Capture of *this by Value as [=,*this] (P0018R3)\n\nImplement lambda capture of *this by copy.\nFor e.g.:\nstruct A {\n\n int d = 10;\n auto foo() { return [*this] (auto a) mutable { d+=a; return d; }; }\n\n};\n\nauto L = A{}.foo(); // A{}\'s lifetime is gone.\n\n// Below is still ok, because *this was captured by value.\nassert(L(10) == 20);\nassert(L(100) == 120);\n\nIf the capture was implicit, or [this] (i.e. *this was captured by reference), this code would be otherwise undefined.\n\nImplementation Strategy:\n - amend the parser to accept *this in the lambda introducer\n - add a new king of capture LCK_StarThis\n - teach Sema::CheckCXXThisCapture to handle by copy captures of the\n enclosing object (i.e. *this)\n - when CheckCXXThisCapture does capture by copy, the corresponding \n initializer expression for the closure\'s data member \n direct-initializes it thus making a copy of \'*this\'.\n - in codegen, when assigning to CXXThisValue, if *this was captured by \n copy, make sure it points to the corresponding field member, and\n not, unlike when captured by reference, what the field member points\n to.\n - mark feature as implemented in svn\n\nMuch gratitude to Richard Smith for his carefully illuminating reviews! \n\nllvm-svn: 263921"}, [j]={{O,931,"/// Parse a lambda introducer.\n/// \\param Intro A LambdaIntroducer filled in with information about the\n/// contents of the lambda-introducer.\n/// \\param Tentative If non-null, we are disambiguating between a\n/// lambda-introducer and some other construct. In this mode, we do not\n/// produce any diagnostics or take any other irreversible action unless\n/// we\'re sure that this is a lambda-expression.\n/// \\return \\c true if parsing (or disambiguation) failed with a diagnostic and\n/// the caller should bail out / recover.\nbool Parser::ParseLambdaIntroducer(LambdaIntroducer &Intro, LambdaIntroducerTentativeParse *Tentative) {\n // ...\n while (Tok.isNot(tok::r_square)) {\n // ...\n if (Tok.is(tok::star)) {\n // ...\n if (Tok.is(tok::kw_this)) {\n // ...\n } else {\n return Invalid([&] { Diag(Tok.getLocation(), diag::err_expected_star_this_capture); });"}} }, ["err_expected_statement"]={ [d]="err_expected_statement", [f]="expected statement", [b]="expected statement", [i]=k, [h]="expected statement", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{B,265,"Retry:\n // ...\n default: {\n // ...\n if (Tok.is(tok::r_brace)) {\n Diag(Tok, diag::err_expected_statement);"}}, [l]={ ["clang/test/Sema/pragma-pipeline.cpp"]={"clang/test/Sema/pragma-pipeline.cpp:33:45: error: expected statement"} } }, ["err_expected_string_literal"]={ [d]="err_expected_string_literal", [f]="expected string literal %select{in %1|for diagnostic message in static_assert|for optional message in \'availability\' attribute|for %select{language name|source container name|USR}1 in \'external_source_symbol\' attribute}0", [b]={{nil,nil,{"expected string literal ",{"in B","for diagnostic message in static_assert","for optional message in \'availability\' attribute",{"for ",{"language name","source container name","USR"}," in \'external_source_symbol\' attribute"}}}},{t,I,{"expected string literal ",{"in B","for diagnostic message in static_assert","for optional message in \'availability\' attribute",{"for ",{"language","source container"}," name in \'external_source_symbol\' attribute"}}}},{nil,nil,{"expected string literal ",{"in B","for diagnostic message in static_assert","for optional message in \'availability\' attribute"}}}}, [i]=k, [h]="expected string literal (?:in (.*?)|for diagnostic message in static_assert|for optional message in \'availability\' attribute|for (?:language name|source container name|USR) in \'external_source_symbol\' attribute)", [g]=a, [e]=mb, [c]={u,1236199783,v,w}, [j]={{"clang/lib/Lex/Preprocessor.cpp",1364,"bool Preprocessor::FinishLexStringLiteral(Token &Result, std::string &String, const char *DiagnosticTag, bool AllowMacroExpansion) {\n // We need at least one string literal.\n if (Result.isNot(tok::string_literal)) {\n Diag(Result, diag::err_expected_string_literal) << /*Source=\'in...\'*/ 0 << DiagnosticTag;"},{"clang/lib/Lex/Preprocessor.cpp",1391,"bool Preprocessor::FinishLexStringLiteral(Token &Result, std::string &String, const char *DiagnosticTag, bool AllowMacroExpansion) {\n // ...\n if (Literal.Pascal) {\n Diag(StrToks[0].getLocation(), diag::err_expected_string_literal) << /*Source=\'in...\'*/ 0 << DiagnosticTag;"},{p,1235,"/// Parse the contents of the \"availability\" attribute.\n///\n/// availability-attribute:\n/// \'availability\' \'(\' platform \',\' opt-strict version-arg-list,\n/// opt-replacement, opt-message\')\'\n///\n/// platform:\n/// identifier\n///\n/// opt-strict:\n/// \'strict\' \',\'\n///\n/// version-arg-list:\n/// version-arg\n/// version-arg \',\' version-arg-list\n///\n/// version-arg:\n/// \'introduced\' \'=\' version\n/// \'deprecated\' \'=\' version\n/// \'obsoleted\' = version\n/// \'unavailable\'\n/// opt-replacement:\n/// \'replacement\' \'=\' <string>\n/// opt-message:\n/// \'message\' \'=\' <string>\nvoid Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, SourceLocation AvailabilityLoc, ParsedAttributes &attrs, SourceLocation *endLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n do {\n // ...\n if (Keyword == Ident_message || Keyword == Ident_replacement) {\n if (Tok.isNot(tok::string_literal)) {\n Diag(Tok, diag::err_expected_string_literal) << /*Source=\'availability attribute\'*/ 2;"},{p,1249,"/// Parse the contents of the \"availability\" attribute.\n///\n/// availability-attribute:\n/// \'availability\' \'(\' platform \',\' opt-strict version-arg-list,\n/// opt-replacement, opt-message\')\'\n///\n/// platform:\n/// identifier\n///\n/// opt-strict:\n/// \'strict\' \',\'\n///\n/// version-arg-list:\n/// version-arg\n/// version-arg \',\' version-arg-list\n///\n/// version-arg:\n/// \'introduced\' \'=\' version\n/// \'deprecated\' \'=\' version\n/// \'obsoleted\' = version\n/// \'unavailable\'\n/// opt-replacement:\n/// \'replacement\' \'=\' <string>\n/// opt-message:\n/// \'message\' \'=\' <string>\nvoid Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, SourceLocation AvailabilityLoc, ParsedAttributes &attrs, SourceLocation *endLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n do {\n // ...\n if (Keyword == Ident_message || Keyword == Ident_replacement) {\n // ...\n // Also reject wide string literals.\n if (StringLiteral *MessageStringLiteral = cast_or_null<StringLiteral>(MessageExpr.get())) {\n if (!MessageStringLiteral->isOrdinary()) {\n Diag(MessageStringLiteral->getSourceRange().getBegin(), diag::err_expected_string_literal) << /*Source=\'availability attribute\'*/ 2;"},{p,1427,"/// Parse the contents of the \"external_source_symbol\" attribute.\n///\n/// external-source-symbol-attribute:\n/// \'external_source_symbol\' \'(\' keyword-arg-list \')\'\n///\n/// keyword-arg-list:\n/// keyword-arg\n/// keyword-arg \',\' keyword-arg-list\n///\n/// keyword-arg:\n/// \'language\' \'=\' <string>\n/// \'defined_in\' \'=\' <string>\n/// \'USR\' \'=\' <string>\n/// \'generated_declaration\'\nvoid Parser::ParseExternalSourceSymbolAttribute(IdentifierInfo &ExternalSourceSymbol, SourceLocation Loc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n // Parse the language/defined_in/generated_declaration keywords\n do {\n // ...\n if (Tok.isNot(tok::string_literal)) {\n Diag(Tok, diag::err_expected_string_literal) << /*Source=\'external_source_symbol attribute\'*/ 3 << /*language | source container | USR*/ (Keyword == Ident_language ? 0 : (Keyword == Ident_defined_in ? 1 : 2));"},{r,1038,"/// ParseStaticAssertDeclaration - Parse C++0x or C11 static_assert-declaration.\n///\n/// [C++0x] static_assert-declaration:\n/// static_assert ( constant-expression , string-literal ) ;\n///\n/// [C11] static_assert-declaration:\n/// _Static_assert ( constant-expression , string-literal ) ;\n///\nDecl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd) {\n // ...\n if (Tok.is(tok::r_paren)) {\n // ...\n } else {\n // ...\n if (ParseAsExpression)\n // ...\n else if (tok::isStringLiteral(Tok.getKind()))\n // ...\n else {\n Diag(Tok, diag::err_expected_string_literal) << /*Source=\'static_assert\'*/ 1;"},{M,1623,"/// ParseAsmStringLiteral - This is just a normal string-literal, but is not\n/// allowed to be a wide string, and is not subject to character translation.\n/// Unlike GCC, we also diagnose an empty string literal when parsing for an\n/// asm label as opposed to an asm statement, because such a construct does not\n/// behave well.\n///\n/// [GNU] asm-string-literal:\n/// string-literal\n///\nExprResult Parser::ParseAsmStringLiteral(bool ForAsmLabel) {\n if (!isTokenStringLiteral()) {\n Diag(Tok, diag::err_expected_string_literal) << /*Source=\'in...\'*/ 0 << \"\'asm\'\";"}}, [l]={ ["clang/test/Parser/attr-availability-xcore.c"]={"clang/test/Parser/attr-availability-xcore.c:9:54: error: expected string literal for optional message in \'availability\' attribute","clang/test/Parser/attr-availability-xcore.c:11:54: error: expected string literal for optional message in \'availability\' attribute"} } }, ["err_expected_struct_pointer_argument"]={ [d]={{nil,x,"err_expected_struct_pointer_argument"}}, [f]={{nil,x,"expected pointer to struct as %ordinal0 argument to %1, found %2"}}, [b]={{nil,x,"expected pointer to struct as A argument to B, found C"}}, [i]=k, [h]="expected pointer to struct as (.*?) argument to (.*?), found (.*?)", [g]=a, [e]={{nil,x,m}}, [c]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs","Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/classes (the\ntype information may be lost through a function pointer, a declaration\nor use of the underlying type without using the typedef, etc) but I\nthink there\'s still value in being able to attribute a typedef and have\nall return types written with that typedef pick up the\nwarn_unused_result behavior.\n\nSpecifically I\'d like to be able to annotate LLVMErrorRef (a wrapper for\nllvm::Error used in the C API - the underlying type is a raw pointer, so\nit can\'t be attributed itself) to reduce the chance of unhandled errors.\n\nDifferential Revision: https://reviews.llvm.org/D102122"}, [j]={{db,683,"static ExprResult SemaBuiltinDumpStruct(Sema &S, CallExpr *TheCall) {\n // ...\n if (!PtrArgType->isPointerType() || !PtrArgType->getPointeeType()->isRecordType()) {\n S.Diag(PtrArgResult.get()->getBeginLoc(), diag::err_expected_struct_pointer_argument) << 1 << TheCall->getDirectCallee() << PtrArgType;"}}, [l]={ ["clang/test/Sema/builtin-dump-struct.c"]={"clang/test/Sema/builtin-dump-struct.c:15:25: error: expected pointer to struct as 1st argument to \'__builtin_dump_struct\', found \'int\'","clang/test/Sema/builtin-dump-struct.c:17:25: error: expected pointer to struct as 1st argument to \'__builtin_dump_struct\', found \'void *\'","clang/test/Sema/builtin-dump-struct.c:22:25: error: expected pointer to struct as 1st argument to \'__builtin_dump_struct\', found \'struct A\'"} } }, ["err_expected_template"]={ [d]="err_expected_template", [f]="expected template", [b]="expected template", [i]=k, [h]="expected template", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{Y,124,"/// Parse a template declaration or an explicit specialization.\n///\n/// Template declarations include one or more template parameter lists\n/// and either the function or class template declaration. Explicit\n/// specializations contain one or more \'template < >\' prefixes\n/// followed by a (possibly templated) declaration. Since the\n/// syntactic form of both features is nearly identical, we parse all\n/// of the template headers together and let semantic analysis sort\n/// the declarations from the explicit specializations.\n///\n/// template-declaration: [C++ temp]\n/// \'export\'[opt] \'template\' \'<\' template-parameter-list \'>\' declaration\n///\n/// template-declaration: [C++2a]\n/// template-head declaration\n/// template-head concept-definition\n///\n/// TODO: requires-clause\n/// template-head: [C++2a]\n/// \'template\' \'<\' template-parameter-list \'>\'\n/// requires-clause[opt]\n///\n/// explicit-specialization: [ C++ temp.expl.spec]\n/// \'template\' \'<\' \'>\' declaration\nDecl *Parser::ParseTemplateDeclarationOrSpecialization(DeclaratorContext Context, SourceLocation &DeclEnd, ParsedAttributes &AccessAttrs, AccessSpecifier AS) {\n // ...\n do {\n // ...\n if (!TryConsumeToken(tok::kw_template, TemplateLoc)) {\n Diag(Tok.getLocation(), diag::err_expected_template);"}}, [l]={ ["clang/test/Modules/cxx20-disable.cpp"]={"clang/test/Modules/cxx20-disable.cpp:9:8: error: expected template"} } }, ["err_expected_template_parameter"]={ [d]="err_expected_template_parameter", [f]="expected template parameter", [b]="expected template parameter", [i]=k, [h]="expected template parameter", [g]=a, [e]=n, [c]={"89f13cb5bfde",1333755239,"Remove \"parse error\" in favor of more descriptive diagnostics.","Remove \"parse error\" in favor of more descriptive diagnostics.\n\nIn a few cases clang emitted a rather content-free diagnostic: \'parse error\'.\nThis change replaces two actual cases (template parameter parsing and K&R\nparameter declaration parsing) with more specific diagnostics and removes a\nthird dead case of this in the BalancedDelimiterTracker (the ctor already\nchecked the invariant necessary to ensure that the diag::parse_error was never\nactually used).\n\nllvm-svn: 154224"}, [j]={{Y,657,"/// ParseTemplateParameter - Parse a template-parameter (C++ [temp.param]).\n///\n/// template-parameter: [C++ temp.param]\n/// type-parameter\n/// parameter-declaration\n///\n/// type-parameter: (See below)\n/// type-parameter-key ...[opt] identifier[opt]\n/// type-parameter-key identifier[opt] = type-id\n/// (C++2a) type-constraint ...[opt] identifier[opt]\n/// (C++2a) type-constraint identifier[opt] = type-id\n/// \'template\' \'<\' template-parameter-list \'>\' type-parameter-key\n/// ...[opt] identifier[opt]\n/// \'template\' \'<\' template-parameter-list \'>\' type-parameter-key\n/// identifier[opt] \'=\' id-expression\n///\n/// type-parameter-key:\n/// class\n/// typename\n///\nNamedDecl *Parser::ParseTemplateParameter(unsigned Depth, unsigned Position) {\n // ...\n case TPResult::True:\n // Is there just a typo in the input code? (\'typedef\' instead of\n // \'typename\')\n if (Tok.is(tok::kw_typedef)) {\n Diag(Tok.getLocation(), diag::err_expected_template_parameter);"},{Y,1027,"/// ParseNonTypeTemplateParameter - Handle the parsing of non-type\n/// template parameters (e.g., in \"template<int Size> class array;\").\n///\n/// template-parameter:\n/// ...\n/// parameter-declaration\nNamedDecl *Parser::ParseNonTypeTemplateParameter(unsigned Depth, unsigned Position) {\n // ...\n if (DS.getTypeSpecType() == DeclSpec::TST_unspecified) {\n Diag(Tok.getLocation(), diag::err_expected_template_parameter);"}}, [l]={ ["clang/test/Parser/cxx2a-concept-declaration.cpp"]={"clang/test/Parser/cxx2a-concept-declaration.cpp:8:10: error: expected template parameter"} } }, ["err_expected_token_instead_of_objcxx_keyword"]={ [d]={{nil,I,"err_expected_token_instead_of_objcxx_keyword"}}, [f]={{nil,I,"expected %0; %1 is a keyword in Objective-C++"}}, [b]={{nil,I,"expected A; B is a keyword in Objective-C++"}}, [i]=k, [h]="expected (.*?); (.*?) is a keyword in Objective\\-C\\+\\+", [g]=a, [e]={{nil,I,n}}, [c]={"f127821140b1",1491922913,"[Parser][ObjC++] Improve diagnostics and recovery when C++ keywords are used","[Parser][ObjC++] Improve diagnostics and recovery when C++ keywords are used\nas identifiers in Objective-C++\n\nThis commit improves the \'expected identifier\' errors that are presented when a\nC++ keyword is used as an identifier in Objective-C++ by mentioning that this is\na C++ keyword in the diagnostic message. It also improves the error recovery:\nthe parser will now treat the C++ keywords as identifiers to prevent unrelated\nparsing errors.\n\nrdar://20626062\n\nDifferential Revision: https://reviews.llvm.org/D26503\n\nllvm-svn: 299950"}, [j]={{M,222,"bool Parser::expectIdentifier() {\n // ...\n if (const auto *II = Tok.getIdentifierInfo()) {\n if (II->isCPlusPlusKeyword(getLangOpts())) {\n Diag(Tok, diag::err_expected_token_instead_of_objcxx_keyword) << tok::identifier << Tok.getIdentifierInfo();"}}, [l]={ ["clang/test/Parser/objc-cxx-keyword-identifiers.mm"]={"clang/test/Parser/objc-cxx-keyword-identifiers.mm:9:12: error: expected identifier; \'class\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:12:17: error: expected identifier; \'class\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:18:11: error: expected identifier; \'new\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:22:11: error: expected identifier; \'delete\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:25:13: error: expected identifier; \'try\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:31:11: error: expected identifier; \'class\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:32:11: error: expected identifier; \'constexpr\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:36:23: error: expected identifier; \'new\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:42:17: error: expected identifier; \'virtual\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:44:10: error: expected identifier; \'throw\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:46:11: error: expected identifier; \'class\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:51:17: error: expected identifier; \'class\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:54:22: error: expected identifier; \'class\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:58:22: error: expected identifier; \'const_cast\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:59:25: error: expected identifier; \'class\' is a keyword in Objective-C++","clang/test/Parser/objc-cxx-keyword-identifiers.mm:63:19: error: expected identifier; \'delete\' is a keyword in Objective-C++"} } }, ["err_expected_type"]={ [d]="err_expected_type", [f]="expected a type", [b]="expected a type", [i]=k, [h]="expected a type", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{p,2655,"/// ParseSpecifierQualifierList\n/// specifier-qualifier-list:\n/// type-specifier specifier-qualifier-list[opt]\n/// type-qualifier specifier-qualifier-list[opt]\n/// [GNU] attributes specifier-qualifier-list[opt]\n///\nvoid Parser::ParseSpecifierQualifierList(DeclSpec &DS, ImplicitTypenameContext AllowImplicitTypename, AccessSpecifier AS, DeclSpecContext DSC) {\n // ...\n if (isTypeSpecifier(DSC) && !DS.hasTypeSpecifier()) {\n Diag(Tok, diag::err_expected_type);"},{z,1343,"/// objc-type-name:\n/// \'(\' objc-type-qualifiers[opt] type-name \')\'\n/// \'(\' objc-type-qualifiers[opt] \')\'\n///\nParsedType Parser::ParseObjCTypeName(ObjCDeclSpec &DS, DeclaratorContext context, ParsedAttributes *paramAttrs) {\n // ...\n if (Tok.is(tok::r_paren))\n // ...\n else if (Tok.getLocation() == TypeStartLoc) {\n // ...\n Diag(Tok, diag::err_expected_type);"},{E,312,"/// Parse \'omp declare reduction\' construct.\n///\n/// declare-reduction-directive:\n/// annot_pragma_openmp \'declare\' \'reduction\'\n/// \'(\' <reduction_id> \':\' <type> {\',\' <type>} \':\' <expression> \')\'\n/// [\'initializer\' \'(\' (\'omp_priv\' \'=\' <expression>)|<function_call> \')\']\n/// annot_pragma_openmp_end\n/// <reduction_id> is either a base language identifier or one of the following\n/// operators: \'+\', \'-\', \'*\', \'&\', \'|\', \'^\', \'&&\' and \'||\'.\n///\nParser::DeclGroupPtrTy Parser::ParseOpenMPDeclareReductionDirective(AccessSpecifier AS) {\n // ...\n if (Tok.is(tok::colon) || Tok.is(tok::annot_pragma_openmp_end)) {\n Diag(Tok.getLocation(), diag::err_expected_type);"},{E,344,"/// Parse \'omp declare reduction\' construct.\n///\n/// declare-reduction-directive:\n/// annot_pragma_openmp \'declare\' \'reduction\'\n/// \'(\' <reduction_id> \':\' <type> {\',\' <type>} \':\' <expression> \')\'\n/// [\'initializer\' \'(\' (\'omp_priv\' \'=\' <expression>)|<function_call> \')\']\n/// annot_pragma_openmp_end\n/// <reduction_id> is either a base language identifier or one of the following\n/// operators: \'+\', \'-\', \'*\', \'&\', \'|\', \'^\', \'&&\' and \'||\'.\n///\nParser::DeclGroupPtrTy Parser::ParseOpenMPDeclareReductionDirective(AccessSpecifier AS) {\n // ...\n // Parse list of types until \':\' token.\n do {\n // ...\n // Consume \',\'.\n if (ExpectAndConsume(tok::comma)) {\n // ...\n if (Tok.is(tok::annot_pragma_openmp_end)) {\n Diag(Tok.getLocation(), diag::err_expected_type);"}}, [l]={ ["clang/test/SemaObjC/crash-label.m"]={"clang/test/SemaObjC/crash-label.m:3:6: error: expected a type","clang/test/SemaObjC/crash-label.m:3:37: error: expected a type","clang/test/SemaObjC/crash-label.m:7:4: error: expected a type","clang/test/SemaObjC/crash-label.m:7:46: error: expected a type"} } }, ["err_expected_type_name_after_typename"]={ [d]="err_expected_type_name_after_typename", [f]="expected an identifier or template-id after \'::\'", [b]="expected an identifier or template-id after \'::\'", [i]=k, [h]="expected an identifier or template\\-id after \'\\:\\:\'", [g]=a, [e]=n, [c]={"dce2b62b7006",1238545739,"Parsing, semantic analysis, and template instantiation for typename","Parsing, semantic analysis, and template instantiation for typename\nspecifiers that terminate in a simple-template-id, e.g.,\n\n typename MetaFun::template apply<T1, T2>\n\nAlso, implement template instantiation for dependent\nnested-name-specifiers that involve unresolved identifiers, e.g.,\n\n typename T::type::type\n\nllvm-svn: 68166"}, [j]={{p,5106,"/// ParseEnumSpecifier\n/// enum-specifier: [C99 6.7.2.2]\n/// \'enum\' identifier[opt] \'{\' enumerator-list \'}\'\n///[C99/C++]\'enum\' identifier[opt] \'{\' enumerator-list \',\' \'}\'\n/// [GNU] \'enum\' attributes[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\' attributes[opt]\n/// [MS] \'enum\' __declspec[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\'\n/// \'enum\' identifier\n/// [GNU] \'enum\' attributes[opt] identifier\n///\n/// [C++11] enum-head \'{\' enumerator-list[opt] \'}\'\n/// [C++11] enum-head \'{\' enumerator-list \',\' \'}\'\n///\n/// enum-head: [C++11]\n/// enum-key attribute-specifier-seq[opt] identifier[opt] enum-base[opt]\n/// enum-key attribute-specifier-seq[opt] nested-name-specifier\n/// identifier enum-base[opt]\n///\n/// enum-key: [C++11]\n/// \'enum\'\n/// \'enum\' \'class\'\n/// \'enum\' \'struct\'\n///\n/// enum-base: [C++11]\n/// \':\' type-specifier-seq\n///\n/// [C++] elaborated-type-specifier:\n/// [C++] \'enum\' nested-name-specifier[opt] identifier\n///\nvoid Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC) {\n // ...\n if (IsDependent) {\n // This enum has a dependent nested-name-specifier. Handle it as a\n // dependent tag.\n if (!Name) {\n // ...\n Diag(Tok, diag::err_expected_type_name_after_typename);"},{M,2033,"/// TryAnnotateTypeOrScopeToken - If the current token position is on a\n/// typename (possibly qualified in C++) or a C++ scope specifier not followed\n/// by a typename, TryAnnotateTypeOrScopeToken will replace one or more tokens\n/// with a single annotation token representing the typename or C++ scope\n/// respectively.\n/// This simplifies handling of C++ scope specifiers and allows efficient\n/// backtracking without the need to re-parse and resolve nested-names and\n/// typenames.\n/// It will mainly be called when we expect to treat identifiers as typenames\n/// (if they are typenames). For example, in C we do not expect identifiers\n/// inside expressions to be treated as typenames so it will not be called\n/// for expressions in C.\n/// The benefit for C/ObjC is that a typename will be annotated and\n/// Actions.getTypeName will not be needed to be called again (e.g. getTypeName\n/// will not be called twice, once to check whether we have a declaration\n/// specifier, and another one to get the actual type inside\n/// ParseDeclarationSpecifiers).\n///\n/// This returns true if an error occurred.\n///\n/// Note that this routine emits an error if you call it with ::new or ::delete\n/// as the current tokens, so only call it in contexts where these are invalid.\nbool Parser::TryAnnotateTypeOrScopeToken(ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n if (Tok.is(tok::kw_typename)) {\n // ...\n if (Tok.is(tok::identifier)) {\n // ...\n } else if (Tok.is(tok::annot_template_id)) {\n // ...\n } else {\n Diag(Tok, diag::err_expected_type_name_after_typename) << SS.getRange();"}}, [l]={ ["clang/test/Parser/cxx2a-concepts-requires-expr.cpp"]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:73:35: error: expected an identifier or template-id after \'::\'","clang/test/Parser/cxx2a-concepts-requires-expr.cpp:76:35: error: expected an identifier or template-id after \'::\'","clang/test/Parser/cxx2a-concepts-requires-expr.cpp:86:27: error: expected an identifier or template-id after \'::\'"} } }, ["err_expected_unqualified_id"]={ [d]="err_expected_unqualified_id", [f]="expected %select{identifier|unqualified-id}0", [b]={{nil,nil,{"expected ",{"identifier","unqualified-id"}}}}, [i]=k, [h]="expected (?:identifier|unqualified\\-id)", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{p,6505,"/// ParseDirectDeclarator\n/// direct-declarator: [C99 6.7.5]\n/// [C99] identifier\n/// \'(\' declarator \')\'\n/// [GNU] \'(\' attributes declarator \')\'\n/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\n/// direct-declarator \'(\' parameter-type-list \')\'\n/// direct-declarator \'(\' identifier-list[opt] \')\'\n/// [GNU] direct-declarator \'(\' parameter-forward-declarations\n/// parameter-type-list[opt] \')\'\n/// [C++] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// cv-qualifier-seq[opt] exception-specification[opt]\n/// [C++11] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// attribute-specifier-seq[opt] cv-qualifier-seq[opt]\n/// ref-qualifier[opt] exception-specification[opt]\n/// [C++] declarator-id\n/// [C++11] declarator-id attribute-specifier-seq[opt]\n///\n/// declarator-id: [C++ 8]\n/// \'...\'[opt] id-expression\n/// \'::\'[opt] nested-name-specifier[opt] type-name\n///\n/// id-expression: [C++ 5.1]\n/// unqualified-id\n/// qualified-id\n///\n/// unqualified-id: [C++ 5.1]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// \'~\' class-name\n/// template-id\n///\n/// C++17 adds the following, which we also handle here:\n///\n/// simple-declaration:\n/// <decl-spec> \'[\' identifier-list \']\' brace-or-equal-initializer \';\'\n///\n/// Note, any additional constructs added here may need corresponding changes\n/// in isConstructorDeclarator.\nvoid Parser::ParseDirectDeclarator(Declarator &D) {\n // ...\n if (getLangOpts().CPlusPlus && D.mayHaveIdentifier()) {\n // ...\n if (D.getCXXScopeSpec().isNotEmpty()) {\n // ...\n Diag(PP.getLocForEndOfToken(D.getCXXScopeSpec().getEndLoc()), diag::err_expected_unqualified_id) << /*C++*/ 1;"},{p,6625,"/// ParseDirectDeclarator\n/// direct-declarator: [C99 6.7.5]\n/// [C99] identifier\n/// \'(\' declarator \')\'\n/// [GNU] \'(\' attributes declarator \')\'\n/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\n/// direct-declarator \'(\' parameter-type-list \')\'\n/// direct-declarator \'(\' identifier-list[opt] \')\'\n/// [GNU] direct-declarator \'(\' parameter-forward-declarations\n/// parameter-type-list[opt] \')\'\n/// [C++] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// cv-qualifier-seq[opt] exception-specification[opt]\n/// [C++11] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// attribute-specifier-seq[opt] cv-qualifier-seq[opt]\n/// ref-qualifier[opt] exception-specification[opt]\n/// [C++] declarator-id\n/// [C++11] declarator-id attribute-specifier-seq[opt]\n///\n/// declarator-id: [C++ 8]\n/// \'...\'[opt] id-expression\n/// \'::\'[opt] nested-name-specifier[opt] type-name\n///\n/// id-expression: [C++ 5.1]\n/// unqualified-id\n/// qualified-id\n///\n/// unqualified-id: [C++ 5.1]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// \'~\' class-name\n/// template-id\n///\n/// C++17 adds the following, which we also handle here:\n///\n/// simple-declaration:\n/// <decl-spec> \'[\' identifier-list \']\' brace-or-equal-initializer \';\'\n///\n/// Note, any additional constructs added here may need corresponding changes\n/// in isConstructorDeclarator.\nvoid Parser::ParseDirectDeclarator(Declarator &D) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n } else if (D.mayOmitIdentifier()) {\n // ...\n } else {\n // ...\n if (D.getContext() == DeclaratorContext::Member) {\n // ...\n } else {\n if (Tok.getKind() == tok::TokenKind::kw_while) {\n // ...\n } else if (getLangOpts().CPlusPlus) {\n if (Tok.isOneOf(tok::period, tok::arrow))\n // ...\n else {\n // ...\n if (Tok.isAtStartOfLine() && Loc.isValid())\n Diag(PP.getLocForEndOfToken(Loc), diag::err_expected_unqualified_id) << getLangOpts().CPlusPlus;"},{p,6629,"/// ParseDirectDeclarator\n/// direct-declarator: [C99 6.7.5]\n/// [C99] identifier\n/// \'(\' declarator \')\'\n/// [GNU] \'(\' attributes declarator \')\'\n/// [C90] direct-declarator \'[\' constant-expression[opt] \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] assignment-expr[opt] \']\'\n/// [C99] direct-declarator \'[\' \'static\' type-qual-list[opt] assign-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list \'static\' assignment-expr \']\'\n/// [C99] direct-declarator \'[\' type-qual-list[opt] \'*\' \']\'\n/// [C++11] direct-declarator \'[\' constant-expression[opt] \']\'\n/// attribute-specifier-seq[opt]\n/// direct-declarator \'(\' parameter-type-list \')\'\n/// direct-declarator \'(\' identifier-list[opt] \')\'\n/// [GNU] direct-declarator \'(\' parameter-forward-declarations\n/// parameter-type-list[opt] \')\'\n/// [C++] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// cv-qualifier-seq[opt] exception-specification[opt]\n/// [C++11] direct-declarator \'(\' parameter-declaration-clause \')\'\n/// attribute-specifier-seq[opt] cv-qualifier-seq[opt]\n/// ref-qualifier[opt] exception-specification[opt]\n/// [C++] declarator-id\n/// [C++11] declarator-id attribute-specifier-seq[opt]\n///\n/// declarator-id: [C++ 8]\n/// \'...\'[opt] id-expression\n/// \'::\'[opt] nested-name-specifier[opt] type-name\n///\n/// id-expression: [C++ 5.1]\n/// unqualified-id\n/// qualified-id\n///\n/// unqualified-id: [C++ 5.1]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// \'~\' class-name\n/// template-id\n///\n/// C++17 adds the following, which we also handle here:\n///\n/// simple-declaration:\n/// <decl-spec> \'[\' identifier-list \']\' brace-or-equal-initializer \';\'\n///\n/// Note, any additional constructs added here may need corresponding changes\n/// in isConstructorDeclarator.\nvoid Parser::ParseDirectDeclarator(Declarator &D) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n } else if (D.mayOmitIdentifier()) {\n // ...\n } else {\n // ...\n if (D.getContext() == DeclaratorContext::Member) {\n // ...\n } else {\n if (Tok.getKind() == tok::TokenKind::kw_while) {\n // ...\n } else if (getLangOpts().CPlusPlus) {\n if (Tok.isOneOf(tok::period, tok::arrow))\n // ...\n else {\n // ...\n if (Tok.isAtStartOfLine() && Loc.isValid())\n // ...\n else\n Diag(getMissingDeclaratorIdLoc(D, Tok.getLocation()), diag::err_expected_unqualified_id) << getLangOpts().CPlusPlus;"},{O,3140,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n default:\n Diag(Tok, diag::err_expected_unqualified_id) << getLangOpts().CPlusPlus;"},{E,4222,"/// Parses simple expression in parens for single-expression clauses of OpenMP\n/// constructs.\nExprResult Parser::ParseOpenMPIteratorsExpr() {\n // ...\n while (Tok.isNot(tok::r_paren) && Tok.isNot(tok::annot_pragma_openmp_end)) {\n // ...\n if (Tok.is(tok::identifier)) {\n // ...\n } else {\n Diag(Tok, diag::err_expected_unqualified_id) << 0;"}}, [l]={ ["clang/test/Preprocessor/pragma_poison.c"]={"clang/test/Preprocessor/pragma_poison.c:4:21: error: expected identifier"} } }, ["err_expected_version"]={ [d]="err_expected_version", [f]="expected a version of the form \'major[.minor[.subminor]]\'", [b]="expected a version of the form \'major[.minor[.subminor]]\'", [i]=k, [h]="expected a version of the form \'major\\[\\.minor\\[\\.subminor\\]\\]\'", [g]=a, [e]=n, [c]={"20b2ebd78586",1300841403,"Implement a new \'availability\' attribute, that allows one to specify","Implement a new \'availability\' attribute, that allows one to specify\nwhich versions of an OS provide a certain facility. For example,\n\n void foo()\n __attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));\n\nsays that the function \"foo\" was introduced in 10.2, deprecated in\n10.4, and completely obsoleted in 10.6. This attribute ties in with\nthe deployment targets (e.g., -mmacosx-version-min=10.1 specifies that\nwe want to deploy back to Mac OS X 10.1). There are several concrete\nbehaviors that this attribute enables, as illustrated with the\nfunction foo() above:\n\n - If we choose a deployment target >= Mac OS X 10.4, uses of \"foo\"\n will result in a deprecation warning, as if we had placed\n attribute((deprecated)) on it (but with a better diagnostic)\n - If we choose a deployment target >= Mac OS X 10.6, uses of \"foo\"\n will result in an \"unavailable\" warning (in C)/error (in C++), as\n if we had placed attribute((unavailable)) on it\n - If we choose a deployment target prior to 10.2, foo() is\n weak-imported (if it is a kind of entity that can be weak\n imported), as if we had placed the weak_import attribute on it.\n\nNaturally, there can be multiple availability attributes on a\ndeclaration, for different platforms; only the current platform\nmatters when checking availability attributes.\n\nThe only platforms this attribute currently works for are \"ios\" and\n\"macosx\", since we already have -mxxxx-version-min flags for them and we\nhave experience there with macro tricks translating down to the\ndeprecated/unavailable/weak_import attributes. The end goal is to open\nthis up to other platforms, and even extension to other \"platforms\"\nthat are really libraries (say, through a #pragma clang\ndefine_system), but that hasn\'t yet been designed and we may want to\nshake out more issues with this narrower problem first.\n\nAddresses <rdar://problem/6690412>.\n\nAs a drive-by bug-fix, if an entity is both deprecated and\nunavailable, we only emit the \"unavailable\" diagnostic.\n\nllvm-svn: 128127"}, [j]={{p,997,"/// Parse a version number.\n///\n/// version:\n/// simple-integer\n/// simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer\n/// simple-integer \'.\' simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer \'_\' simple-integer\nVersionTuple Parser::ParseVersionTuple(SourceRange &Range) {\n // ...\n if (!Tok.is(tok::numeric_constant)) {\n Diag(Tok, diag::err_expected_version);"},{p,1026,"/// Parse a version number.\n///\n/// version:\n/// simple-integer\n/// simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer\n/// simple-integer \'.\' simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer \'_\' simple-integer\nVersionTuple Parser::ParseVersionTuple(SourceRange &Range) {\n // ...\n if (AfterMajor == 0) {\n Diag(Tok, diag::err_expected_version);"},{p,1047,"/// Parse a version number.\n///\n/// version:\n/// simple-integer\n/// simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer\n/// simple-integer \'.\' simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer \'_\' simple-integer\nVersionTuple Parser::ParseVersionTuple(SourceRange &Range) {\n // ...\n if (!VersionNumberSeparator(AfterMajorSeparator) || (AfterMajor + 1 == ActualLength)) {\n Diag(Tok, diag::err_expected_version);"},{p,1076,"/// Parse a version number.\n///\n/// version:\n/// simple-integer\n/// simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer\n/// simple-integer \'.\' simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer \'_\' simple-integer\nVersionTuple Parser::ParseVersionTuple(SourceRange &Range) {\n // ...\n // If what follows is not a \'.\' or \'_\', we have a problem.\n if (!VersionNumberSeparator(AfterMinorSeparator)) {\n Diag(Tok, diag::err_expected_version);"},{p,1095,"/// Parse a version number.\n///\n/// version:\n/// simple-integer\n/// simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer\n/// simple-integer \'.\' simple-integer \'.\' simple-integer\n/// simple-integer \'_\' simple-integer \'_\' simple-integer\nVersionTuple Parser::ParseVersionTuple(SourceRange &Range) {\n // ...\n if (AfterSubminor != ActualLength) {\n Diag(Tok, diag::err_expected_version);"}}, [l]={ ["clang/test/Parser/objc-available.m"]={"clang/test/Parser/objc-available.m:20:25: error: expected a version of the form \'major[.minor[.subminor]]\'"} } }, ["err_expected_while"]={ [d]="err_expected_while", [f]="expected \'while\' in do/while loop", [b]="expected \'while\' in do/while loop", [i]=k, [h]="expected \'while\' in do\\/while loop", [g]=a, [e]=n, [c]={u,1236199783,v,w}, [j]={{B,1873,"/// ParseDoStatement\n/// do-statement: [C99 6.8.5.2]\n/// \'do\' statement \'while\' \'(\' expression \')\' \';\'\n/// Note: this lets the caller parse the end \';\'.\nStmtResult Parser::ParseDoStatement() {\n // ...\n if (Tok.isNot(tok::kw_while)) {\n if (!Body.isInvalid()) {\n Diag(Tok, diag::err_expected_while);"}}, [l]={ ["clang/test/SemaCXX/warn-empty-body.cpp"]={"clang/test/SemaCXX/warn-empty-body.cpp:75:7: error: expected \'while\' in do/while loop","clang/test/SemaCXX/warn-empty-body.cpp:80:7: error: expected \'while\' in do/while loop"} } }, ["err_experimental_clang_interp_failed"]={ [d]={{nil,H,"err_experimental_clang_interp_failed"}}, [f]={{nil,H,"the experimental clang interpreter failed to evaluate an expression"}}, [b]={{nil,H,"the experimental clang interpreter failed to evaluate an expression"}}, [i]=k, [h]="the experimental clang interpreter failed to evaluate an expression", [g]=a, [e]={{nil,H,o}}, [c]={"a55909505497",1567177329,"[Clang Interpreter] Initial patch for the constexpr interpreter","[Clang Interpreter] Initial patch for the constexpr interpreter\n\nSummary:\nThis patch introduces the skeleton of the constexpr interpreter,\ncapable of evaluating a simple constexpr functions consisting of\nif statements. The interpreter is described in more detail in the\nRFC. Further patches will add more features.\n\nReviewers: Bigcheese, jfb, rsmith\n\nSubscribers: bruno, uenoku, ldionne, Tyker, thegameg, tschuett, dexonsmith, mgorny, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D64146\n\nllvm-svn: 370476"}, [j]={{"clang/lib/AST/Interp/Context.cpp",39,"bool Context::isPotentialConstantExpr(State &Parent, const FunctionDecl *FD) {\n // ...\n if (!Func || !Func->hasBody()) {\n if (auto R = ByteCodeStmtGen<ByteCodeEmitter>(*this, *P).compileFunc(FD)) {\n // ...\n } else {\n handleAllErrors(R.takeError(), [&Parent](ByteCodeGenError &Err) { Parent.FFDiag(Err.getRange().getBegin(), diag::err_experimental_clang_interp_failed) << Err.getRange(); });"},{"clang/lib/AST/Interp/Context.cpp",167,"bool Context::Check(State &Parent, llvm::Expected<bool> &&Flag) {\n // ...\n handleAllErrors(Flag.takeError(), [&Parent](ByteCodeGenError &Err) { Parent.FFDiag(Err.getRange().getBegin(), diag::err_experimental_clang_interp_failed) << Err.getRange(); });"}}, [l]={ ["clang/test/AST/Interp/literals.cpp"]={"clang/test/AST/Interp/literals.cpp:157:3: error: the experimental clang interpreter failed to evaluate an expression"} } }, ["err_explicit_instantiation_ambiguous"]={ [d]="err_explicit_instantiation_ambiguous", [f]="partial ordering for explicit instantiation of %0 is ambiguous", [b]="partial ordering for explicit instantiation of A is ambiguous", [i]=k, [h]="partial ordering for explicit instantiation of (.*?) is ambiguous", [g]=a, [e]=m, [c]={yb,1253904180,vb,ub}, [j]={{G,10648,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (!Specialization) {\n // ...\n UnresolvedSetIterator Result = getMostSpecialized(TemplateMatches.begin(), TemplateMatches.end(), FailedCandidates, D.getIdentifierLoc(), PDiag(diag::err_explicit_instantiation_not_known) << Name, PDiag(diag::err_explicit_instantiation_ambiguous) << Name, PDiag(diag::note_explicit_instantiation_candidate));"}}, [l]={ ["clang/test/SemaCXX/template-ambiguous-overload.cpp"]={"clang/test/SemaCXX/template-ambiguous-overload.cpp:15:15: error: partial ordering for explicit instantiation of \'f\' is ambiguous"} } }, ["err_explicit_instantiation_constexpr"]={ [d]="err_explicit_instantiation_constexpr", [f]="explicit instantiation cannot be \'constexpr\'", [b]="explicit instantiation cannot be \'constexpr\'", [i]=k, [h]="explicit instantiation cannot be \'constexpr\'", [g]=a, [e]=m, [c]={"465841e48c92",1318622282,"[temp.explicit]p1: constexpr cannot be specified in explicit instantiations.","[temp.explicit]p1: constexpr cannot be specified in explicit instantiations.\n\nllvm-svn: 141982"}, [j]={{G,10417,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (D.getDeclSpec().hasConstexprSpecifier() && R->isFunctionType())\n // ...\n Diag(D.getDeclSpec().getConstexprSpecLoc(), diag::err_explicit_instantiation_constexpr);"}}, [l]={ ["clang/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp:15:10: error: explicit instantiation cannot be \'constexpr\'"} } }, ["err_explicit_instantiation_data_member_not_instantiated"]={ [d]="err_explicit_instantiation_data_member_not_instantiated", [f]="explicit instantiation refers to static data member %q0 that is not an instantiation", [b]="explicit instantiation refers to static data member A that is not an instantiation", [i]=k, [h]="explicit instantiation refers to static data member (.*?) that is not an instantiation", [g]=a, [e]=m, [c]={yb,1253904180,vb,ub}, [j]={{G,10466,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (!R->isFunctionType()) {\n // ...\n if (!PrevTemplate) {\n // ...\n if (!Prev->getInstantiatedFromStaticDataMember()) {\n // ...\n Diag(D.getIdentifierLoc(), diag::err_explicit_instantiation_data_member_not_instantiated) << Prev;"}} }, ["err_explicit_instantiation_declaration_after_definition"]={ [d]="err_explicit_instantiation_declaration_after_definition", [f]="explicit instantiation declaration (with \'extern\') follows explicit instantiation definition (without \'extern\')", [b]="explicit instantiation declaration (with \'extern\') follows explicit instantiation definition (without \'extern\')", [i]=k, [h]="explicit instantiation declaration \\(with \'extern\'\\) follows explicit instantiation definition \\(without \'extern\'\\)", [g]=a, [e]=m, [c]={"d6ba93dc6eb6",1255622045,"Check the interactions between explicit instantiations and template","Check the interactions between explicit instantiations and template\nspecializations. Work in progress; there\'s more cleanup required to\nactually use the new CheckSpecializationInstantiationRedecl checker\nuniformly.\n\nllvm-svn: 84185"}, [j]={{G,9237,"/// Diagnose cases where we have an explicit template specialization\n/// before/after an explicit template instantiation, producing diagnostics\n/// for those cases where they are required and determining whether the\n/// new specialization/instantiation will have any effect.\n///\n/// \\param NewLoc the location of the new explicit specialization or\n/// instantiation.\n///\n/// \\param NewTSK the kind of the new explicit specialization or instantiation.\n///\n/// \\param PrevDecl the previous declaration of the entity.\n///\n/// \\param PrevTSK the kind of the old explicit specialization or instantiatin.\n///\n/// \\param PrevPointOfInstantiation if valid, indicates where the previous\n/// declaration was instantiated (either implicitly or explicitly).\n///\n/// \\param HasNoEffect will be set to true to indicate that the new\n/// specialization or instantiation has no effect and should be ignored.\n///\n/// \\returns true if there was an error that should prevent the introduction of\n/// the new declaration into the AST, false otherwise.\nbool Sema::CheckSpecializationInstantiationRedecl(SourceLocation NewLoc, TemplateSpecializationKind NewTSK, NamedDecl *PrevDecl, TemplateSpecializationKind PrevTSK, SourceLocation PrevPointOfInstantiation, bool &HasNoEffect) {\n // ...\n case TSK_ExplicitInstantiationDeclaration:\n // ...\n case TSK_ExplicitInstantiationDefinition:\n // ...\n Diag(NewLoc, diag::err_explicit_instantiation_declaration_after_definition);"}}, [l]={ ["clang/test/CXX/temp/temp.spec/temp.explicit/p10.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p10.cpp:30:31: error: explicit instantiation declaration (with \'extern\') follows explicit instantiation definition (without \'extern\')","clang/test/CXX/temp/temp.spec/temp.explicit/p10.cpp:31:8: error: explicit instantiation declaration (with \'extern\') follows explicit instantiation definition (without \'extern\')","clang/test/CXX/temp/temp.spec/temp.explicit/p10.cpp:32:30: error: explicit instantiation declaration (with \'extern\') follows explicit instantiation definition (without \'extern\')","clang/test/CXX/temp/temp.spec/temp.explicit/p10.cpp:33:24: error: explicit instantiation declaration (with \'extern\') follows explicit instantiation definition (without \'extern\')"} } }, ["err_explicit_instantiation_dependent"]={ [d]={{nil,D,"err_explicit_instantiation_dependent"}}, [f]={{nil,D,"explicit instantiation has dependent template arguments"}}, [b]={{nil,D,"explicit instantiation has dependent template arguments"}}, [i]=k, [h]="explicit instantiation has dependent template arguments", [g]=a, [e]={{nil,D,m}}, [c]={"14f6bfcb52e7",1582847864,"[clang] Implement objc_non_runtime_protocol to remove protocol metadata","[clang] Implement objc_non_runtime_protocol to remove protocol metadata\n\nSummary:\nMotivated by the new objc_direct attribute, this change adds a new\nattribute that remotes metadata from Protocols that the programmer knows\nisn\'t going to be used at runtime. We simply have the frontend skip\ngenerating any protocol metadata entries (e.g. OBJC_CLASS_NAME,\n_OBJC_$_PROTOCOL_INSTANCE_METHDOS, _OBJC_PROTOCOL, etc) for a protocol\nmarked with `__attribute__((objc_non_runtime_protocol))`.\n\nThere are a few APIs used to retrieve a protocol at runtime.\n`@protocol(SomeProtocol)` will now error out of the requested protocol\nis marked with attribute. `objc_getProtocol` will return `NULL` which\nis consistent with the behavior of a non-existing protocol.\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D75574"}, [j]={{G,10511,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (!R->isFunctionType()) {\n // ...\n if (!PrevTemplate) {\n // ...\n } else {\n // ...\n if (!Res.isUsable()) {\n // ...\n Diag(D.getIdentifierLoc(), diag::err_explicit_instantiation_dependent);"}} }, ["err_explicit_instantiation_duplicate"]={ [d]="err_explicit_instantiation_duplicate", [f]="duplicate explicit instantiation of %0", [b]="duplicate explicit instantiation of A", [i]=k, [h]="duplicate explicit instantiation of (.*?)", [g]=a, [e]=m, [c]={"f61eca93c05f",1242239300,"Improve the semantic checking for explicit instantiations of","Improve the semantic checking for explicit instantiations of\ntemplates. In particular:\n - An explicit instantiation can follow an implicit instantiation (we\n were improperly diagnosing this as an error, previously).\n - In C++0x, an explicit instantiation that follows an explicit\n specialization of the same template specialization is ignored. In\n C++98, we just emit an extension warning.\n - In C++0x, an explicit instantiation must be in a namespace\n enclosing the original template. C++98 has no such requirement.\n\nAlso, fixed a longstanding FIXME regarding the integral type that is\nused for the size of a constant array type when it is being instantiated.\n\nllvm-svn: 71689"}, [j]={{G,9298,"/// Diagnose cases where we have an explicit template specialization\n/// before/after an explicit template instantiation, producing diagnostics\n/// for those cases where they are required and determining whether the\n/// new specialization/instantiation will have any effect.\n///\n/// \\param NewLoc the location of the new explicit specialization or\n/// instantiation.\n///\n/// \\param NewTSK the kind of the new explicit specialization or instantiation.\n///\n/// \\param PrevDecl the previous declaration of the entity.\n///\n/// \\param PrevTSK the kind of the old explicit specialization or instantiatin.\n///\n/// \\param PrevPointOfInstantiation if valid, indicates where the previous\n/// declaration was instantiated (either implicitly or explicitly).\n///\n/// \\param HasNoEffect will be set to true to indicate that the new\n/// specialization or instantiation has no effect and should be ignored.\n///\n/// \\returns true if there was an error that should prevent the introduction of\n/// the new declaration into the AST, false otherwise.\nbool Sema::CheckSpecializationInstantiationRedecl(SourceLocation NewLoc, TemplateSpecializationKind NewTSK, NamedDecl *PrevDecl, TemplateSpecializationKind PrevTSK, SourceLocation PrevPointOfInstantiation, bool &HasNoEffect) {\n // ...\n case TSK_ExplicitInstantiationDefinition:\n // ...\n case TSK_ExplicitInstantiationDefinition:\n // ...\n Diag(NewLoc, (getLangOpts().MSVCCompat) ? diag::ext_explicit_instantiation_duplicate : diag::err_explicit_instantiation_duplicate) << PrevDecl;"}}, [l]={ ["clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp:309:20: error: duplicate explicit instantiation of \'BasicStringPiece<int>\'"} } }, ["err_explicit_instantiation_enum"]={ [d]="err_explicit_instantiation_enum", [f]="enumerations cannot be explicitly instantiated", [b]="enumerations cannot be explicitly instantiated", [i]=k, [h]="enumerations cannot be explicitly instantiated", [g]=a, [e]=n, [c]={"2ec748cd5a66",1242260891,"Implement explicit instantiations of member classes of class templates, e.g.,","Implement explicit instantiations of member classes of class templates, e.g.,\n\n template<typename T>\n struct X {\n struct Inner;\n };\n\n template struct X<int>::Inner;\n\nThis change is larger than it looks because it also fixes some\na problem with nested-name-specifiers and tags. We weren\'t requiring\nthe DeclContext associated with the scope specifier of a tag to be\ncomplete. Therefore, when looking for something like \"struct\nX<int>::Inner\", we weren\'t instantiating X<int>. \n\nThis, naturally, uncovered a problem with member pointers, where we\nwere requiring the left-hand side of a member pointer access\nexpression (e.g., x->*) to be a complete type. However, this is wrong:\nthe semantics of this expression does not require a complete type (EDG\nagrees).\n\nStuart vouched for me. Blame him.\n\nllvm-svn: 71756"}, [j]={{p,5023,"/// ParseEnumSpecifier\n/// enum-specifier: [C99 6.7.2.2]\n/// \'enum\' identifier[opt] \'{\' enumerator-list \'}\'\n///[C99/C++]\'enum\' identifier[opt] \'{\' enumerator-list \',\' \'}\'\n/// [GNU] \'enum\' attributes[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\' attributes[opt]\n/// [MS] \'enum\' __declspec[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\'\n/// \'enum\' identifier\n/// [GNU] \'enum\' attributes[opt] identifier\n///\n/// [C++11] enum-head \'{\' enumerator-list[opt] \'}\'\n/// [C++11] enum-head \'{\' enumerator-list \',\' \'}\'\n///\n/// enum-head: [C++11]\n/// enum-key attribute-specifier-seq[opt] identifier[opt] enum-base[opt]\n/// enum-key attribute-specifier-seq[opt] nested-name-specifier\n/// identifier enum-base[opt]\n///\n/// enum-key: [C++11]\n/// \'enum\'\n/// \'enum\' \'class\'\n/// \'enum\' \'struct\'\n///\n/// enum-base: [C++11]\n/// \':\' type-specifier-seq\n///\n/// [C++] elaborated-type-specifier:\n/// [C++] \'enum\' nested-name-specifier[opt] identifier\n///\nvoid Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC) {\n // ...\n if (TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate && TUK != Sema::TUK_Reference) {\n // ...\n if (TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation) {\n // ...\n Diag(StartLoc, diag::err_explicit_instantiation_enum);"}}, [l]={ ["clang/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp:23:10: error: enumerations cannot be explicitly instantiated"} } }, ["err_explicit_instantiation_in_class"]={ [d]="err_explicit_instantiation_in_class", [f]="explicit instantiation of %0 in class scope", [b]="explicit instantiation of A in class scope", [i]=k, [h]="explicit instantiation of (.*?) in class scope", [g]=a, [e]=m, [c]={"6cc1df5d3d52",1278979804,"Provide a special diagnostic for attempts to explicitly specialize","Provide a special diagnostic for attempts to explicitly specialize\nclass templates within class scope (which is ill-formed), and recover\nby dropping the explicit specialization entirely. Fixes the infinite\nloop in PR7622.\n\nllvm-svn: 108217"}, [j]={{G,9831,"/// Check the scope of an explicit instantiation.\n///\n/// \\returns true if a serious error occurs, false otherwise.\nstatic bool CheckExplicitInstantiationScope(Sema &S, NamedDecl *D, SourceLocation InstLoc, bool WasQualifiedName) {\n // ...\n if (CurContext->isRecord()) {\n S.Diag(InstLoc, diag::err_explicit_instantiation_in_class) << D;"}} }, ["err_explicit_instantiation_inline"]={ [d]="err_explicit_instantiation_inline", [f]="explicit instantiation cannot be \'inline\'", [b]="explicit instantiation cannot be \'inline\'", [i]=k, [h]="explicit instantiation cannot be \'inline\'", [g]=a, [e]=m, [c]={"3c74d41d2711",1255551273,"Testing and some minor fixes for explicit template instantiation.","Testing and some minor fixes for explicit template instantiation.\n\nllvm-svn: 84129"}, [j]={{G,10410,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n // C++0x [temp.explicit]p1:\n // [...] An explicit instantiation of a function template shall not use the\n // inline or constexpr specifiers.\n // Presumably, this also applies to member functions of class templates as\n // well.\n if (D.getDeclSpec().isInlineSpecified())\n Diag(D.getDeclSpec().getInlineSpecLoc(), getLangOpts().CPlusPlus11 ? diag::err_explicit_instantiation_inline : diag::warn_explicit_instantiation_inline_0x) << FixItHint::CreateRemoval(D.getDeclSpec().getInlineSpecLoc());"}}, [l]={ ["clang/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp:8:10: error: explicit instantiation cannot be \'inline\'"} } }, ["err_explicit_instantiation_internal_linkage"]={ [d]={{nil,s,"err_explicit_instantiation_internal_linkage"}}, [f]={{nil,s,"explicit instantiation declaration of %0 with internal linkage"}}, [b]={{nil,s,"explicit instantiation declaration of A with internal linkage"}}, [i]=k, [h]="explicit instantiation declaration of (.*?) with internal linkage", [g]=a, [e]={{nil,s,m}}, [c]={"eeab4518e1d7",1556063280,"C++ DR2387: a variable template declared wtih (or instantiated with) a","C++ DR2387: a variable template declared wtih (or instantiated with) a\nconst-qualified type is not implicitly given internal linkage. But a\nvariable template declared \'static\' is.\n\nllvm-svn: 359048"}, [j]={{G,9885,"/// Common checks for whether an explicit instantiation of \\p D is valid.\nstatic bool CheckExplicitInstantiation(Sema &S, NamedDecl *D, SourceLocation InstLoc, bool WasQualifiedName, TemplateSpecializationKind TSK) {\n // C++ [temp.explicit]p13:\n // An explicit instantiation declaration shall not name a specialization of\n // a template with internal linkage.\n if (TSK == TSK_ExplicitInstantiationDeclaration && D->getFormalLinkage() == InternalLinkage) {\n S.Diag(InstLoc, diag::err_explicit_instantiation_internal_linkage) << D;"}}, [l]={ ["clang/test/SemaCXX/libcxx_valarray_hack.cpp"]={"clang/test/SemaCXX/libcxx_valarray_hack.cpp:30:32: error: explicit instantiation declaration of \'x\' with internal linkage"} } }, ["err_explicit_instantiation_member_function_not_instantiated"]={ [d]="err_explicit_instantiation_member_function_not_instantiated", [f]="explicit instantiation refers to member function %q0 that is not an instantiation", [b]="explicit instantiation refers to member function A that is not an instantiation", [i]=k, [h]="explicit instantiation refers to member function (.*?) that is not an instantiation", [g]=a, [e]=m, [c]={yb,1253904180,vb,ub}, [j]={{G,10683,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (Specialization->getTemplateSpecializationKind() == TSK_Undeclared) {\n Diag(D.getIdentifierLoc(), diag::err_explicit_instantiation_member_function_not_instantiated) << Specialization << (Specialization->getTemplateSpecializationKind() == TSK_ExplicitSpecialization);"}}, [l]={ ["clang/test/CXX/temp/temp.spec/temp.explicit/p3.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p3.cpp:47:19: error: explicit instantiation refers to member function \'X2<int>::X2\' that is not an instantiation","clang/test/CXX/temp/temp.spec/temp.explicit/p3.cpp:48:19: error: explicit instantiation refers to member function \'X2<int>::X2\' that is not an instantiation","clang/test/CXX/temp/temp.spec/temp.explicit/p3.cpp:49:19: error: explicit instantiation refers to member function \'X2<int>::~X2\' that is not an instantiation","clang/test/CXX/temp/temp.spec/temp.explicit/p3.cpp:50:28: error: explicit instantiation refers to member function \'X2<int>::operator=\' that is not an instantiation"} } }, ["err_explicit_instantiation_must_be_global"]={ [d]="err_explicit_instantiation_must_be_global", [f]="explicit instantiation of %0 must occur at global scope", [b]="explicit instantiation of A must occur at global scope", [i]=k, [h]="explicit instantiation of (.*?) must occur at global scope", [g]=a, [e]=m, [c]={"e47f5a76ccd7",1255563694,"Additional semantic checking for explicit template instantiations,","Additional semantic checking for explicit template instantiations,\nfocusing on the scope- and qualifier-related semantic requirements in\nC++ [temp.explicit]p2.\n\nllvm-svn: 84154"}, [j]={{G,9868,"/// Check the scope of an explicit instantiation.\n///\n/// \\returns true if a serious error occurs, false otherwise.\nstatic bool CheckExplicitInstantiationScope(Sema &S, NamedDecl *D, SourceLocation InstLoc, bool WasQualifiedName) {\n // ...\n if (NamespaceDecl *NS = dyn_cast<NamespaceDecl>(OrigContext)) {\n // ...\n } else\n S.Diag(InstLoc, S.getLangOpts().CPlusPlus11 ? diag::err_explicit_instantiation_must_be_global : diag::warn_explicit_instantiation_must_be_global_0x) << D;"}}, [l]={ ["clang/test/SemaTemplate/temp_explicit_cxx0x.cpp"]={"clang/test/SemaTemplate/temp_explicit_cxx0x.cpp:23:19: error: explicit instantiation of \'X2\' must occur at global scope"} } }, ["err_explicit_instantiation_nontemplate_type"]={ [d]="err_explicit_instantiation_nontemplate_type", [f]="explicit instantiation of non-templated type %0", [b]="explicit instantiation of non-templated type A", [i]=k, [h]="explicit instantiation of non\\-templated type (.*?)", [g]=a, [e]=m, [c]={"2ec748cd5a66",1242260891,"Implement explicit instantiations of member classes of class templates, e.g.,","Implement explicit instantiations of member classes of class templates, e.g.,\n\n template<typename T>\n struct X {\n struct Inner;\n };\n\n template struct X<int>::Inner;\n\nThis change is larger than it looks because it also fixes some\na problem with nested-name-specifiers and tags. We weren\'t requiring\nthe DeclContext associated with the scope specifier of a tag to be\ncomplete. Therefore, when looking for something like \"struct\nX<int>::Inner\", we weren\'t instantiating X<int>. \n\nThis, naturally, uncovered a problem with member pointers, where we\nwere requiring the left-hand side of a member pointer access\nexpression (e.g., x->*) to be a complete type. However, this is wrong:\nthe semantics of this expression does not require a complete type (EDG\nagrees).\n\nStuart vouched for me. Blame him.\n\nllvm-svn: 71756"}, [j]={{G,10272,"// Explicit instantiation of a member class of a class template.\nDeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr) {\n // ...\n if (!Pattern) {\n Diag(TemplateLoc, diag::err_explicit_instantiation_nontemplate_type) << Context.getTypeDeclType(Record);"}}, [l]={ ["clang/test/SemaTemplate/temp_explicit.cpp"]={"clang/test/SemaTemplate/temp_explicit.cpp:117:1: error: explicit instantiation of non-templated type \'X6::Inner\'"} } }, ["err_explicit_instantiation_not_known"]={ [d]="err_explicit_instantiation_not_known", [f]="explicit instantiation of %0 does not refer to a function template, variable template, member function, member class, or static data member", [b]="explicit instantiation of A does not refer to a function template, variable template, member function, member class, or static data member", [i]=k, [h]="explicit instantiation of (.*?) does not refer to a function template, variable template, member function, member class, or static data member", [g]=a, [e]=m, [c]={yb,1253904180,vb,ub}, [j]={{G,10455,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (!R->isFunctionType()) {\n // ...\n if (!PrevTemplate) {\n if (!Prev || !Prev->isStaticDataMember()) {\n // ...\n Diag(D.getIdentifierLoc(), diag::err_explicit_instantiation_not_known) << Name;"},{G,10647,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (!Specialization) {\n // ...\n UnresolvedSetIterator Result = getMostSpecialized(TemplateMatches.begin(), TemplateMatches.end(), FailedCandidates, D.getIdentifierLoc(), PDiag(diag::err_explicit_instantiation_not_known) << Name, PDiag(diag::err_explicit_instantiation_ambiguous) << Name, PDiag(diag::note_explicit_instantiation_candidate));"}}, [l]={ ["clang/test/SemaTemplate/address_space-dependent.cpp"]={"clang/test/SemaTemplate/address_space-dependent.cpp:37:15: error: explicit instantiation of \'foo\' does not refer to a function template, variable template, member function, member class, or static data member"} } }, ["err_explicit_instantiation_of_typedef"]={ [d]="err_explicit_instantiation_of_typedef", [f]="explicit instantiation of typedef %0", [b]="explicit instantiation of typedef A", [i]=k, [h]="explicit instantiation of typedef (.*?)", [g]=a, [e]=m, [c]={yb,1253904180,vb,ub}, [j]={{G,10390,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n // C++ [dcl.stc]p1:\n // A storage-class-specifier shall not be specified in [...] an explicit\n // instantiation (14.7.2) directive.\n if (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_typedef) {\n Diag(D.getIdentifierLoc(), diag::err_explicit_instantiation_of_typedef) << Name;"}}, [l]={ ["clang/test/SemaTemplate/explicit-instantiation.cpp"]={"clang/test/SemaTemplate/explicit-instantiation.cpp:5:23: error: explicit instantiation of typedef \'f0\'"} } }, ["err_explicit_instantiation_out_of_scope"]={ [d]="err_explicit_instantiation_out_of_scope", [f]="explicit instantiation of %0 not in a namespace enclosing %1", [b]="explicit instantiation of A not in a namespace enclosing B", [i]=k, [h]="explicit instantiation of (.*?) not in a namespace enclosing (.*?)", [g]=a, [e]=m, [c]={"2ec748cd5a66",1242260891,"Implement explicit instantiations of member classes of class templates, e.g.,","Implement explicit instantiations of member classes of class templates, e.g.,\n\n template<typename T>\n struct X {\n struct Inner;\n };\n\n template struct X<int>::Inner;\n\nThis change is larger than it looks because it also fixes some\na problem with nested-name-specifiers and tags. We weren\'t requiring\nthe DeclContext associated with the scope specifier of a tag to be\ncomplete. Therefore, when looking for something like \"struct\nX<int>::Inner\", we weren\'t instantiating X<int>. \n\nThis, naturally, uncovered a problem with member pointers, where we\nwere requiring the left-hand side of a member pointer access\nexpression (e.g., x->*) to be a complete type. However, this is wrong:\nthe semantics of this expression does not require a complete type (EDG\nagrees).\n\nStuart vouched for me. Blame him.\n\nllvm-svn: 71756"}, [j]={{G,9856,"/// Check the scope of an explicit instantiation.\n///\n/// \\returns true if a serious error occurs, false otherwise.\nstatic bool CheckExplicitInstantiationScope(Sema &S, NamedDecl *D, SourceLocation InstLoc, bool WasQualifiedName) {\n // ...\n if (NamespaceDecl *NS = dyn_cast<NamespaceDecl>(OrigContext)) {\n if (WasQualifiedName)\n S.Diag(InstLoc, S.getLangOpts().CPlusPlus11 ? diag::err_explicit_instantiation_out_of_scope : diag::warn_explicit_instantiation_out_of_scope_0x) << D << NS;"}}, [l]={ ["clang/test/SemaTemplate/temp_explicit.cpp"]={"clang/test/SemaTemplate/temp_explicit.cpp:103:32: error: explicit instantiation of \'Inner2\' not in a namespace enclosing \'N2\'"} } }, ["err_explicit_instantiation_requires_name"]={ [d]="err_explicit_instantiation_requires_name", [f]="explicit instantiation declaration requires a name", [b]="explicit instantiation declaration requires a name", [i]=k, [h]="explicit instantiation declaration requires a name", [g]=a, [e]=m, [c]={yb,1253904180,vb,ub}, [j]={{G,10368,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (!Name) {\n if (!D.isInvalidType())\n Diag(D.getDeclSpec().getBeginLoc(), diag::err_explicit_instantiation_requires_name) << D.getDeclSpec().getSourceRange() << D.getSourceRange();"}} }, ["err_explicit_instantiation_storage_class"]={ [d]="err_explicit_instantiation_storage_class", [f]="explicit instantiation cannot have a storage class", [b]="explicit instantiation cannot have a storage class", [i]=k, [h]="explicit instantiation cannot have a storage class", [g]=a, [e]=m, [c]={"781ba6e4071e",1306004010,"Diagnose the presence of storage-class-specifiers on explicit","Diagnose the presence of storage-class-specifiers on explicit\ninstantiations and specializations. Fixes <rdar://problem/9126453> and PR8700.\n\nllvm-svn: 131802"}, [j]={{G,10396,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n // C++ [dcl.stc]p1:\n // A storage-class-specifier shall not be specified in [...] an explicit\n // instantiation (14.7.2) directive.\n if (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_typedef) {\n // ...\n } else if (D.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_unspecified) {\n // ...\n Diag(D.getIdentifierLoc(), diag::err_explicit_instantiation_storage_class) << FixItHint::CreateRemoval(D.getDeclSpec().getStorageClassSpecLoc());"}}, [l]={ ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p1.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p1.cpp:11:22: error: explicit instantiation cannot have a storage class","clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p1.cpp:17:22: error: explicit instantiation cannot have a storage class","clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p1.cpp:30:29: error: explicit instantiation cannot have a storage class"} } }, ["err_explicit_instantiation_undefined_func_template"]={ [d]="err_explicit_instantiation_undefined_func_template", [f]="explicit instantiation of undefined function template %0", [b]="explicit instantiation of undefined function template A", [i]=k, [h]="explicit instantiation of undefined function template (.*?)", [g]=a, [e]=m, [c]={"a8b89d26224a",1255615549,"Diagnose explicit instantiations of function templates and member","Diagnose explicit instantiations of function templates and member\nfunctions/static data members of class template specializations that\ndo not have definitions. This is the latter part of [temp.explicit]p4;\nthe former part still needs more testing.\n\nllvm-svn: 84182"}, [j]={{G,850,"/// Determine whether we would be unable to instantiate this template (because\n/// it either has no definition, or is in the process of being instantiated).\nbool Sema::DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation, NamedDecl *Instantiation, bool InstantiatedFromMember, const NamedDecl *Pattern, const NamedDecl *PatternDef, TemplateSpecializationKind TSK, bool Complain /*= true*/) {\n // ...\n if (PatternDef) {\n // ...\n } else if (InstantiatedFromMember) {\n // ...\n } else {\n if (isa<FunctionDecl>(Instantiation)) {\n Diag(PointOfInstantiation, diag::err_explicit_instantiation_undefined_func_template) << Pattern;"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:66:19: error: explicit instantiation of undefined function template \'ft\'","clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:93:20: error: explicit instantiation of undefined function template \'gt\'"} } }, ["err_explicit_instantiation_undefined_member"]={ [d]="err_explicit_instantiation_undefined_member", [f]="explicit instantiation of undefined %select{member class|member function|static data member}0 %1 of class template %2", [b]={{nil,nil,{"explicit instantiation of undefined ",{"member class","member function","static data member"}," B of class template C"}}}, [i]=k, [h]="explicit instantiation of undefined (?:member class|member function|static data member) (.*?) of class template (.*?)", [g]=a, [e]=m, [c]={"a8b89d26224a",1255615549,"Diagnose explicit instantiations of function templates and member","Diagnose explicit instantiations of function templates and member\nfunctions/static data members of class template specializations that\ndo not have definitions. This is the latter part of [temp.explicit]p4;\nthe former part still needs more testing.\n\nllvm-svn: 84182"}, [j]={{G,836,"/// Determine whether we would be unable to instantiate this template (because\n/// it either has no definition, or is in the process of being instantiated).\nbool Sema::DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation, NamedDecl *Instantiation, bool InstantiatedFromMember, const NamedDecl *Pattern, const NamedDecl *PatternDef, TemplateSpecializationKind TSK, bool Complain /*= true*/) {\n // ...\n if (PatternDef) {\n // ...\n } else if (InstantiatedFromMember) {\n if (isa<FunctionDecl>(Instantiation)) {\n Diag(PointOfInstantiation, diag::err_explicit_instantiation_undefined_member) << /*member function*/ 1 << Instantiation->getDeclName() << Instantiation->getDeclContext();"},{G,867,"/// Determine whether we would be unable to instantiate this template (because\n/// it either has no definition, or is in the process of being instantiated).\nbool Sema::DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation, NamedDecl *Instantiation, bool InstantiatedFromMember, const NamedDecl *Pattern, const NamedDecl *PatternDef, TemplateSpecializationKind TSK, bool Complain /*= true*/) {\n // ...\n if (PatternDef) {\n // ...\n } else if (InstantiatedFromMember) {\n // ...\n } else {\n if (isa<FunctionDecl>(Instantiation)) {\n // ...\n } else if (isa<TagDecl>(Instantiation)) {\n // ...\n } else {\n // ...\n if (isa<VarTemplateSpecializationDecl>(Instantiation)) {\n // ...\n } else\n Diag(PointOfInstantiation, diag::err_explicit_instantiation_undefined_member) << /*static data member*/ 2 << Instantiation->getDeclName() << Instantiation->getDeclContext();"},{G,10326,"// Explicit instantiation of a member class of a class template.\nDeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr) {\n // ...\n if (!RecordDef) {\n // ...\n if (!Def) {\n Diag(TemplateLoc, diag::err_explicit_instantiation_undefined_member) << 0 << Record->getDeclName() << Record->getDeclContext();"}}, [l]={ ["clang/test/CXX/temp/temp.spec/temp.explicit/p3.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p3.cpp:43:1: error: explicit instantiation of undefined member class \'InnerClass\' of class template \'X2<float>\'"} } }, ["err_explicit_instantiation_undefined_var_template"]={ [d]="err_explicit_instantiation_undefined_var_template", [f]="explicit instantiation of undefined variable template %q0", [b]="explicit instantiation of undefined variable template A", [i]=k, [h]="explicit instantiation of undefined variable template (.*?)", [g]=a, [e]=m, [c]={"39a1e507ff0b",1375750985,"Started implementing variable templates. Top level declarations should be fully supported, up to som...","Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...\n\nllvm-svn: 187762"}, [j]={{G,862,"/// Determine whether we would be unable to instantiate this template (because\n/// it either has no definition, or is in the process of being instantiated).\nbool Sema::DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation, NamedDecl *Instantiation, bool InstantiatedFromMember, const NamedDecl *Pattern, const NamedDecl *PatternDef, TemplateSpecializationKind TSK, bool Complain /*= true*/) {\n // ...\n if (PatternDef) {\n // ...\n } else if (InstantiatedFromMember) {\n // ...\n } else {\n if (isa<FunctionDecl>(Instantiation)) {\n // ...\n } else if (isa<TagDecl>(Instantiation)) {\n // ...\n } else {\n // ...\n if (isa<VarTemplateSpecializationDecl>(Instantiation)) {\n Diag(PointOfInstantiation, diag::err_explicit_instantiation_undefined_var_template) << Instantiation;"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:71:18: error: explicit instantiation of undefined variable template \'inline_namespaces::N::mt<char>\'","clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:98:19: error: explicit instantiation of undefined variable template \'inline_namespaces::N::nt<char>\'"} } }, ["err_explicit_instantiation_unqualified_wrong_namespace"]={ [d]="err_explicit_instantiation_unqualified_wrong_namespace", [f]="explicit instantiation of %q0 must occur in namespace %1", [b]="explicit instantiation of A must occur in namespace B", [i]=k, [h]="explicit instantiation of (.*?) must occur in namespace (.*?)", [g]=a, [e]=m, [c]={"e47f5a76ccd7",1255563694,"Additional semantic checking for explicit template instantiations,","Additional semantic checking for explicit template instantiations,\nfocusing on the scope- and qualifier-related semantic requirements in\nC++ [temp.explicit]p2.\n\nllvm-svn: 84154"}, [j]={{G,9862,"/// Check the scope of an explicit instantiation.\n///\n/// \\returns true if a serious error occurs, false otherwise.\nstatic bool CheckExplicitInstantiationScope(Sema &S, NamedDecl *D, SourceLocation InstLoc, bool WasQualifiedName) {\n // ...\n if (NamespaceDecl *NS = dyn_cast<NamespaceDecl>(OrigContext)) {\n if (WasQualifiedName)\n // ...\n else\n S.Diag(InstLoc, S.getLangOpts().CPlusPlus11 ? diag::err_explicit_instantiation_unqualified_wrong_namespace : diag::warn_explicit_instantiation_unqualified_wrong_namespace_0x) << D << NS;"}}, [l]={ ["clang/test/SemaTemplate/temp_explicit_cxx0x.cpp"]={"clang/test/SemaTemplate/temp_explicit_cxx0x.cpp:21:19: error: explicit instantiation of \'N1::X0\' must occur in namespace \'N1\'"} } }, ["err_explicit_instantiation_with_definition"]={ [d]="err_explicit_instantiation_with_definition", [f]="explicit template instantiation cannot have a definition; if this definition is meant to be an explicit specialization, add \'<>\' after the \'template\' keyword", [b]="explicit template instantiation cannot have a definition; if this definition is meant to be an explicit specialization, add \'<>\' after the \'template\' keyword", [i]=k, [h]="explicit template instantiation cannot have a definition; if this definition is meant to be an explicit specialization, add \'\\<\\>\' after the \'template\' keyword", [g]=a, [e]=n, [c]={"1b57ff32a828",1242170750,"Implement parsing for explicit instantiations of class templates, e.g.,","Implement parsing for explicit instantiations of class templates, e.g.,\n\n template class X<int>;\n\nThis also cleans up the propagation of template information through\ndeclaration parsing, which is used to improve some diagnostics.\n\nllvm-svn: 71608"}, [j]={{p,2480,"Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(Declarator &D, const ParsedTemplateInfo &TemplateInfo, ForRangeInit *FRI) {\n // ...\n case ParsedTemplateInfo::ExplicitInstantiation: {\n if (Tok.is(tok::semi)) {\n // ...\n } else {\n // ...\n // Check that this is a valid instantiation\n if (D.getName().getKind() != UnqualifiedIdKind::IK_TemplateId) {\n // ...\n } else {\n // ...\n Diag(D.getIdentifierLoc(), diag::err_explicit_instantiation_with_definition) << SourceRange(TemplateInfo.TemplateLoc) << FixItHint::CreateInsertion(LAngleLoc, \"<>\");"},{r,2029,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n if (TemplateId) {\n // ...\n if (TemplateId->isInvalid()) {\n // ...\n } else if (TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation && TUK == Sema::TUK_Declaration) {\n // ...\n } else if (TUK == Sema::TUK_Reference || (TUK == Sema::TUK_Friend && TemplateInfo.Kind == ParsedTemplateInfo::NonTemplate)) {\n // ...\n } else {\n // ...\n if (TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation) {\n // ...\n if (TUK == Sema::TUK_Friend) {\n // ...\n } else {\n // ...\n Diag(TemplateId->TemplateNameLoc, diag::err_explicit_instantiation_with_definition) << SourceRange(TemplateInfo.TemplateLoc) << FixItHint::CreateInsertion(LAngleLoc, \"<>\");"},{Y,341,"/// Parse a single declaration that declares a template,\n/// template specialization, or explicit instantiation of a template.\n///\n/// \\param DeclEnd will receive the source location of the last token\n/// within this declaration.\n///\n/// \\param AS the access specifier associated with this\n/// declaration. Will be AS_none for namespace-scope declarations.\n///\n/// \\returns the new declaration.\nDecl *Parser::ParseSingleDeclarationAfterTemplate(DeclaratorContext Context, const ParsedTemplateInfo &TemplateInfo, ParsingDeclRAIIObject &DiagsFromTParams, SourceLocation &DeclEnd, ParsedAttributes &AccessAttrs, AccessSpecifier AS) {\n // ...\n if (DeclaratorInfo.isFunctionDeclarator() && isStartOfFunctionDefinition(DeclaratorInfo)) {\n // ...\n if (TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation) {\n if (DeclaratorInfo.getName().getKind() != UnqualifiedIdKind::IK_TemplateId) {\n // ...\n } else {\n // ...\n Diag(DeclaratorInfo.getIdentifierLoc(), diag::err_explicit_instantiation_with_definition) << SourceRange(TemplateInfo.TemplateLoc) << FixItHint::CreateInsertion(LAngleLoc, \"<>\");"}}, [l]={ ["clang/test/SemaTemplate/temp_explicit.cpp"]={"clang/test/SemaTemplate/temp_explicit.cpp:24:16: error: explicit template instantiation cannot have a definition; if this definition is meant to be an explicit specialization, add \'<>\' after the \'template\' keyword"} } }, ["err_explicit_instantiation_without_template_id"]={ [d]="err_explicit_instantiation_without_template_id", [f]="explicit instantiation of %q0 must specify a template argument list", [b]="explicit instantiation of A must specify a template argument list", [i]=k, [h]="explicit instantiation of (.*?) must specify a template argument list", [g]=a, [e]=m, [c]={"ef985ac91c07",1379470212,"Fix accepts-invalid if a variable template explicit instantiation is missing an","Fix accepts-invalid if a variable template explicit instantiation is missing an\nargument list, but could be instantiated with argument list of <>.\n\nllvm-svn: 190913"}, [j]={{G,10491,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (!R->isFunctionType()) {\n // ...\n if (!PrevTemplate) {\n // ...\n } else {\n // ...\n if (D.getName().getKind() != UnqualifiedIdKind::IK_TemplateId) {\n // ...\n Diag(D.getIdentifierLoc(), diag::err_explicit_instantiation_without_template_id) << PrevTemplate;"}}, [l]={ ["clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp"]={"clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp:169:16: error: explicit instantiation of \'explicit_instantiation::missing_args\' must specify a template argument list"} } }, ["err_explicit_non_ctor_or_conv_function"]={ [d]="err_explicit_non_ctor_or_conv_function", [f]="\'explicit\' can only be applied to a constructor or conversion function", [b]="\'explicit\' can only be applied to a constructor or conversion function", [i]=k, [h]="\'explicit\' can only be applied to a constructor or conversion function", [g]=a, [e]=m, [c]={"77babdb99a99",1264351786,"Implement [dcl.fct.spec]p6.","Implement [dcl.fct.spec]p6.\n\nllvm-svn: 94365"}, [j]={{A,9946,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n // C++ [dcl.fct.spec]p6:\n // The explicit specifier shall be used only in the declaration of a\n // constructor or conversion function within its class definition;\n // see 12.3.1 and 12.3.2.\n if (hasExplicit && !NewFD->isInvalidDecl() && !isa<CXXDeductionGuideDecl>(NewFD)) {\n if (!CurContext->isRecord()) {\n // ...\n } else if (!isa<CXXConstructorDecl>(NewFD) && !isa<CXXConversionDecl>(NewFD)) {\n // ...\n Diag(D.getDeclSpec().getExplicitSpecLoc(), diag::err_explicit_non_ctor_or_conv_function) << FixItHint::CreateRemoval(D.getDeclSpec().getExplicitSpecRange());"}}, [l]={ ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp:14:3: error: \'explicit\' can only be applied to a constructor or conversion function"} } }, ["err_explicit_non_function"]={ [d]="err_explicit_non_function", [f]="\'explicit\' can only appear on non-static member functions", [b]="\'explicit\' can only appear on non-static member functions", [i]=k, [h]="\'explicit\' can only appear on non\\-static member functions", [g]=a, [e]=m, [c]={"574c74537027",1239133077,"Diagnose uses of function specifiers on declarations which don\'t declare","Diagnose uses of function specifiers on declarations which don\'t declare\nfunctions. Fixes PR3941.\n\nllvm-svn: 68541"}, [j]={{A,6649,"/// Diagnose function specifiers on a declaration of an identifier that\n/// does not identify a function.\nvoid Sema::DiagnoseFunctionSpecifiers(const DeclSpec &DS) {\n // ...\n if (DS.hasExplicitSpecifier())\n Diag(DS.getExplicitSpecLoc(), diag::err_explicit_non_function);"}}, [l]={ ["clang/test/Misc/explicit.cpp"]={"clang/test/Misc/explicit.cpp:5:3: error: \'explicit\' can only appear on non-static member functions"} } }, ["err_explicit_out_of_class"]={ [d]="err_explicit_out_of_class", [f]="\'explicit\' can only be specified inside the class definition", [b]="\'explicit\' can only be specified inside the class definition", [i]=k, [h]="\'explicit\' can only be specified inside the class definition", [g]=a, [e]=m, [c]={"77babdb99a99",1264351786,"Implement [dcl.fct.spec]p6.","Implement [dcl.fct.spec]p6.\n\nllvm-svn: 94365"}, [j]={{A,9939,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n // C++ [dcl.fct.spec]p6:\n // The explicit specifier shall be used only in the declaration of a\n // constructor or conversion function within its class definition;\n // see 12.3.1 and 12.3.2.\n if (hasExplicit && !NewFD->isInvalidDecl() && !isa<CXXDeductionGuideDecl>(NewFD)) {\n if (!CurContext->isRecord()) {\n // ...\n Diag(D.getDeclSpec().getExplicitSpecLoc(), diag::err_explicit_out_of_class) << FixItHint::CreateRemoval(D.getDeclSpec().getExplicitSpecRange());"}}, [l]={ ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp:19:1: error: \'explicit\' can only be specified inside the class definition","clang/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp:20:1: error: \'explicit\' can only be specified inside the class definition"} } }, ["err_explicit_spec_non_template"]={ [d]="err_explicit_spec_non_template", [f]={{nil,s,"explicit %select{specialization|instantiation}0 of %select{non-|undeclared }3template %1 %2"},{J,nil,"explicit %select{specialization|instantiation}0 of non-template %1 %2"}}, [b]={{nil,s,{"explicit ",{"specialization","instantiation"}," of ",{"non-","undeclared "},"template B C"}},{J,nil,{"explicit ",{"specialization","instantiation"}," of non-template B C"}}}, [i]=k, [h]="explicit (?:specialization|instantiation) of (?:non\\-|undeclared )template (.*?) (.*?)", [g]=a, [e]=n, [c]={"916462b2f7b2",1256939218,"Improve diagnostics when parsing something like","Improve diagnostics when parsing something like\n\n template<> struct foo<int> { ... };\n\nwhere \"foo\" does not refer to a template. Fixes PR3844.\n\nllvm-svn: 85616"}, [j]={{r,1728,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n auto RecoverFromUndeclaredTemplateName = [&](IdentifierInfo *Name, SourceLocation NameLoc, SourceRange TemplateArgRange, bool KnownUndeclared) {\n Diag(NameLoc, diag::err_explicit_spec_non_template) << (TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation) << TagTokKind << Name << TemplateArgRange << KnownUndeclared;"}}, [l]={ ["clang/test/SemaCXX/cxx2a-adl-only-template-id.cpp"]={"clang/test/SemaCXX/cxx2a-adl-only-template-id.cpp:54:8: error: explicit specialization of undeclared template struct \'W\'"} } }, ["err_explicit_specialization_inconsistent_storage_class"]={ [d]="err_explicit_specialization_inconsistent_storage_class", [f]="explicit specialization has extraneous, inconsistent storage class \'%select{none|extern|static|__private_extern__|auto|register}0\'", [b]={{nil,nil,{"explicit specialization has extraneous, inconsistent storage class \'",{"none","extern","static","__private_extern__","auto","register"},"\'"}}}, [i]=k, [h]="explicit specialization has extraneous, inconsistent storage class \'(?:none|extern|static|__private_extern__|auto|register)\'", [g]=a, [e]=m, [c]={"84265a09d625",1308287348,"When an explicit specialization has a storage specifier, error if that","When an explicit specialization has a storage specifier, error if that\nstorage specifier is different from the storage specifier on the\ntemplate. If that storage specifier is the same, then we only warn.\n\nThanks to John for the prodding.\n\nllvm-svn: 133236"}, [j]={{A,10427,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else {\n // ...\n // If it\'s a friend (and only if it\'s a friend), it\'s possible\n // that either the specialized function type or the specialized\n // template is dependent, and therefore matching will fail. In\n // this case, don\'t check the specialization yet.\n if (isFunctionTemplateSpecialization && isFriend && (NewFD->getType()->isDependentType() || DC->isDependentContext() || TemplateSpecializationType::anyInstantiationDependentTemplateArguments(TemplateArgs.arguments()))) {\n // ...\n } else if (isFunctionTemplateSpecialization) {\n // ...\n if (Info && SC != SC_None) {\n if (SC != Info->getTemplate()->getTemplatedDecl()->getStorageClass())\n Diag(NewFD->getLocation(), diag::err_explicit_specialization_inconsistent_storage_class) << SC << FixItHint::CreateRemoval(D.getDeclSpec().getStorageClassSpecLoc());"}}, [l]={ ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p1.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p1.cpp:10:24: error: explicit specialization has extraneous, inconsistent storage class \'static\'"} } }, ["err_exponent_has_no_digits"]={ [d]="err_exponent_has_no_digits", [f]="exponent has no digits", [b]="exponent has no digits", [i]=k, [h]="exponent has no digits", [g]=a, [e]=mb, [c]={u,1236199783,v,w}, [j]={{lb,1211,"/// ParseDecimalOrOctalCommon - This method is called for decimal or octal\n/// numbers. It issues an error for illegal digits, and handles floating point\n/// parsing. If it detects a floating point number, the radix is set to 10.\nvoid NumericLiteralParser::ParseDecimalOrOctalCommon(SourceLocation TokLoc) {\n // ...\n if (*s == \'e\' || *s == \'E\') { // exponent\n // ...\n if (containsDigits(s, first_non_digit)) {\n // ...\n } else {\n if (!hadError) {\n Diags.Report(Lexer::AdvanceToTokenCharacter(TokLoc, Exponent - ThisTokBegin, SM, LangOpts), diag::err_exponent_has_no_digits);"},{lb,1319,"/// ParseNumberStartingWithZero - This method is called when the first character\n/// of the number is found to be a zero. This means it is either an octal\n/// number (like \'04\') or a hex number (\'0x123a\') a binary number (\'0b1010\') or\n/// a floating point number (01239.123e4). Eat the prefix, determining the\n/// radix etc.\nvoid NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) {\n // ...\n // Handle a hex number like 0x1234.\n if ((c1 == \'x\' || c1 == \'X\') && (isHexDigit(s[1]) || s[1] == \'.\')) {\n // ...\n // A binary exponent can appear with or with a \'.\'. If dotted, the\n // binary exponent is required.\n if (*s == \'p\' || *s == \'P\') {\n // ...\n if (!containsDigits(s, first_non_digit)) {\n if (!hadError) {\n Diags.Report(Lexer::AdvanceToTokenCharacter(TokLoc, Exponent - ThisTokBegin, SM, LangOpts), diag::err_exponent_has_no_digits);"}}, [l]={ ["clang/test/Lexer/c2x_digit_separators.c"]={"clang/test/Lexer/c2x_digit_separators.c:36:13: error: exponent has no digits","clang/test/Lexer/c2x_digit_separators.c:37:15: error: exponent has no digits"} } }, ["err_export_anon_ns_internal"]={ [d]="err_export_anon_ns_internal", [f]="anonymous namespaces cannot be exported", [b]="anonymous namespaces cannot be exported", [i]=k, [h]="anonymous namespaces cannot be exported", [g]=a, [e]=cb, [c]={"95f50964fbf5",1625925174,"Implement P2361 Unevaluated string literals","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"}, [j]={{fb,873,"/// Check that it\'s valid to export \\p D.\nstatic bool checkExportedDecl(Sema &S, Decl *D, SourceLocation BlockStart) {\n // ...\n // Recurse into namespace-scope DeclContexts. (Only namespace-scope\n // declarations are exported).\n if (auto *DC = dyn_cast<DeclContext>(D)) {\n // ...\n if (auto *ND = dyn_cast<NamedDecl>(D)) {\n if (!ND->getDeclName()) {\n S.Diag(ND->getLocation(), diag::err_export_anon_ns_internal);"}}, [l]={ ["clang/test/CXX/module/module.interface/p3.cpp"]={"clang/test/CXX/module/module.interface/p3.cpp:48:18: error: anonymous namespaces cannot be exported","clang/test/CXX/module/module.interface/p3.cpp:49:18: error: anonymous namespaces cannot be exported"} } }, ["err_export_empty"]={ [d]="err_export_empty", [f]="export declaration cannot be empty", [b]="export declaration cannot be empty", [i]=k, [h]="export declaration cannot be empty", [g]=a, [e]=cb, [c]={"8df390f9ebc8",1473376494,"C++ Modules TS: Add parsing and some semantic analysis support for","C++ Modules TS: Add parsing and some semantic analysis support for\nexport-declarations. These don\'t yet have an effect on name visibility;\nwe still export everything by default.\n\nllvm-svn: 280999"} }, ["err_export_in_private_module_fragment"]={ [d]={{nil,s,"err_export_in_private_module_fragment"}}, [f]={{nil,s,"export declaration cannot be used in a private module fragment"}}, [b]={{nil,s,"export declaration cannot be used in a private module fragment"}}, [i]=k, [h]="export declaration cannot be used in a private module fragment", [g]=a, [e]={{nil,s,cb}}, [c]={"a5bbbfef156c",1555621974,"[c++2a] Add semantic support for private module fragments.","[c++2a] Add semantic support for private module fragments.\n\nllvm-svn: 358713"}, [j]={{fb,778,"/// We have parsed the start of an export declaration, including the \'{\'\n/// (if present).\nDecl *Sema::ActOnStartExportDecl(Scope *S, SourceLocation ExportLoc, SourceLocation LBraceLoc) {\n // ...\n // C++2a [module.interface]p1:\n // An export-declaration shall appear only [...] in the purview of a module\n // interface unit. An export-declaration shall not appear directly or\n // indirectly within [...] a private-module-fragment.\n if (!isCurrentModulePurview()) {\n // ...\n } else if (!ModuleScopes.back().ModuleInterface) {\n // ...\n } else if (ModuleScopes.back().Module->Kind == Module::PrivateModuleFragment) {\n Diag(ExportLoc, diag::err_export_in_private_module_fragment);"}}, [l]={ ["clang/test/CXX/module/module.interface/p1.cpp"]={"clang/test/CXX/module/module.interface/p1.cpp:37:1: error: export declaration cannot be used in a private module fragment"} } }, ["err_export_inline_not_defined"]={ [d]={{nil,t,"err_export_inline_not_defined"}}, [f]={{nil,t,"inline function not defined%select{| before the private module fragment}0"}}, [b]={{nil,t,{"inline function not defined",{a," before the private module fragment"}}}}, [i]=k, [h]="inline function not defined(?:| before the private module fragment)", [g]=a, [e]={{nil,t,cb}}, [c]={"95f50964fbf5",1625925174,"Implement P2361 Unevaluated string literals","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"}, [j]={{"clang/lib/Sema/Sema.cpp",1268,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n // C++ standard modules. Diagnose cases where a function is declared inline\n // in the module purview but has no definition before the end of the TU or\n // the start of a Private Module Fragment (if one is present).\n if (!PendingInlineFuncDecls.empty()) {\n for (auto *D : PendingInlineFuncDecls) {\n if (auto *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n Diag(FD->getLocation(), diag::err_export_inline_not_defined) << DefInPMF;"}} }, ["err_export_internal"]={ [d]={{nil,s,"err_export_internal"}}, [f]={{nil,s,"declaration of %0 with internal linkage cannot be exported"}}, [b]={{nil,s,"declaration of A with internal linkage cannot be exported"}}, [i]=k, [h]="declaration of (.*?) with internal linkage cannot be exported", [g]=a, [e]={{nil,s,cb}}, [c]={"e181de7f4fe9",1555973411,"[c++2a] Implement semantic restrictions for \'export\' declarations.","[c++2a] Implement semantic restrictions for \'export\' declarations.\n\nllvm-svn: 358932"}, [j]={{fb,842,"/// Check that it\'s valid to export \\p D.\nstatic bool checkExportedDecl(Sema &S, Decl *D, SourceLocation BlockStart) {\n // ...\n if (auto *ND = dyn_cast<NamedDecl>(D)) {\n // ...\n if (HasName && ND->getFormalLinkage() == InternalLinkage) {\n S.Diag(ND->getLocation(), diag::err_export_internal) << ND;"}}, [l]={ ["clang/test/CXX/module/module.interface/p3.cpp"]={"clang/test/CXX/module/module.interface/p3.cpp:46:19: error: declaration of \'a\' with internal linkage cannot be exported","clang/test/CXX/module/module.interface/p3.cpp:47:19: error: declaration of \'b\' with internal linkage cannot be exported","clang/test/CXX/module/module.interface/p3.cpp:53:38: error: declaration of \'e\' with internal linkage cannot be exported","clang/test/CXX/module/module.interface/p3.cpp:54:38: error: declaration of \'f\' with internal linkage cannot be exported","clang/test/CXX/module/module.interface/p3.cpp:56:27: error: declaration of \'n\' with internal linkage cannot be exported"} } }, ["err_export_non_namespace_scope_name"]={ [d]={{nil,y,"err_export_non_namespace_scope_name"}}, [f]={{nil,y,"cannot export %0 as it is not at namespace scope"}}, [b]={{nil,y,"cannot export A as it is not at namespace scope"}}, [i]=k, [h]="cannot export (.*?) as it is not at namespace scope", [g]=a, [e]={{nil,y,m}}, [c]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions.","[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables into a record in task untied\nregions but clang does not support record with VLA data members.\n\nDifferential Revision: https://reviews.llvm.org/D99436"}, [j]={{A,6204,"/// 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 // Check whether the qualifying scope encloses the scope of the original\n // declaration. For a template-id, we perform the checks in\n // CheckTemplateSpecializationScope.\n if (!Cur->Encloses(DC) && !IsTemplateId) {\n if (Cur->isRecord())\n // ...\n else if (isa<TranslationUnitDecl>(DC))\n // ...\n else if (isa<FunctionDecl>(Cur))\n // ...\n else if (isa<BlockDecl>(Cur))\n // ...\n else if (isa<ExportDecl>(Cur)) {\n if (!isa<NamespaceDecl>(DC))\n Diag(Loc, diag::err_export_non_namespace_scope_name) << Name << SS.getRange();"}}, [l]={ ["clang/test/CXX/module/module.interface/p2-2.cpp"]={"clang/test/CXX/module/module.interface/p2-2.cpp:17:43: error: cannot export \'iterator\' as it is not at namespace scope","clang/test/CXX/module/module.interface/p2-2.cpp:18:41: error: cannot export \'foo\' as it is not at namespace scope","clang/test/CXX/module/module.interface/p2-2.cpp:19:60: error: cannot export \'bar\' as it is not at namespace scope","clang/test/CXX/module/module.interface/p2-2.cpp:30:18: error: cannot export \'iterator\' as it is not at namespace scope","clang/test/CXX/module/module.interface/p2-2.cpp:31:16: error: cannot export \'foo\' as it is not at namespace scope","clang/test/CXX/module/module.interface/p2-2.cpp:32:35: error: cannot export \'bar\' as it is not at namespace scope","clang/test/CXX/module/module.interface/p2-2.cpp:35:38: error: cannot export \'iterator\' as it is not at namespace scope","clang/test/CXX/module/module.interface/p2-2.cpp:36:13: error: cannot export \'iterator\' as it is not at namespace scope"} } }, ["err_export_not_in_module_interface"]={ [d]={{nil,I,"err_export_not_in_module_interface"}}, [f]="export declaration can only be used within a module purview", [b]="export declaration can only be used within a module purview", [i]=k, [h]="export declaration can only be used within a module purview", [g]=a, [e]={{nil,I,cb}}, [c]={"145e15a37b7d",1493075550,"[modules ts] Diagnose \'export\' declarations outside of a module interface.","[modules ts] Diagnose \'export\' declarations outside of a module interface.\n\nllvm-svn: 301271"}, [j]={{fb,621,"DeclResult Sema::ActOnModuleImport(SourceLocation StartLoc, SourceLocation ExportLoc, SourceLocation ImportLoc, Module *Mod, ModuleIdPath Path) {\n // ...\n // A module (partition) implementation unit shall not be exported.\n if (getLangOpts().CPlusPlusModules && ExportLoc.isValid() && Mod->Kind == Module::ModuleKind::ModulePartitionImplementation) {\n // ...\n } else if (!ModuleScopes.empty() && (ModuleScopes.back().ModuleInterface || (getLangOpts().CPlusPlusModules && ModuleScopes.back().Module->isGlobalModule()))) {\n // ...\n } else if (ExportLoc.isValid()) {\n // ...\n Diag(ExportLoc, diag::err_export_not_in_module_interface);"},{fb,766,"/// We have parsed the start of an export declaration, including the \'{\'\n/// (if present).\nDecl *Sema::ActOnStartExportDecl(Scope *S, SourceLocation ExportLoc, SourceLocation LBraceLoc) {\n // ...\n // C++2a [module.interface]p1:\n // An export-declaration shall appear only [...] in the purview of a module\n // interface unit. An export-declaration shall not appear directly or\n // indirectly within [...] a private-module-fragment.\n if (!isCurrentModulePurview()) {\n Diag(ExportLoc, diag::err_export_not_in_module_interface) << 0;"},{fb,770,"/// We have parsed the start of an export declaration, including the \'{\'\n/// (if present).\nDecl *Sema::ActOnStartExportDecl(Scope *S, SourceLocation ExportLoc, SourceLocation LBraceLoc) {\n // ...\n // C++2a [module.interface]p1:\n // An export-declaration shall appear only [...] in the purview of a module\n // interface unit. An export-declaration shall not appear directly or\n // indirectly within [...] a private-module-fragment.\n if (!isCurrentModulePurview()) {\n // ...\n } else if (!ModuleScopes.back().ModuleInterface) {\n Diag(ExportLoc, diag::err_export_not_in_module_interface) << 1;"}}, [l]={ ["clang/test/Modules/export-in-non-modules.cpp"]={"clang/test/Modules/export-in-non-modules.cpp:2:1: error: export declaration can only be used within a module purview"} } }, ["err_export_partition_impl"]={ [d]={{nil,x,"err_export_partition_impl"}}, [f]={{nil,x,"module partition implementations cannot be exported"}}, [b]={{nil,x,"module partition implementations cannot be exported"}}, [i]=k, [h]="module partition implementations cannot be exported", [g]=a, [e]={{nil,x,cb}}, [c]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls.","[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"}, [j]={{fb,604,"DeclResult Sema::ActOnModuleImport(SourceLocation StartLoc, SourceLocation ExportLoc, SourceLocation ImportLoc, Module *Mod, ModuleIdPath Path) {\n // ...\n // A module (partition) implementation unit shall not be exported.\n if (getLangOpts().CPlusPlusModules && ExportLoc.isValid() && Mod->Kind == Module::ModuleKind::ModulePartitionImplementation) {\n Diag(ExportLoc, diag::err_export_partition_impl) << SourceRange(ExportLoc, Path.back().second);"}} }, ["err_export_using_internal"]={ [d]={{nil,s,"err_export_using_internal"}}, [f]={{nil,x,"using declaration referring to %1 with %select{internal|module|unknown}0 linkage cannot be exported"},{y,s,"using declaration referring to %0 with internal linkage cannot be exported"}}, [b]={{nil,x,{"using declaration referring to B with ",{"internal","module","unknown"}," linkage cannot be exported"}},{y,s,"using declaration referring to A with internal linkage cannot be exported"}}, [i]=k, [h]="using declaration referring to (.*?) with (?:internal|module|unknown) linkage cannot be exported", [g]=a, [e]={{nil,s,cb}}, [c]={"e181de7f4fe9",1555973411,"[c++2a] Implement semantic restrictions for \'export\' declarations.","[c++2a] Implement semantic restrictions for \'export\' declarations.\n\nllvm-svn: 358932"}, [j]={{fb,856,"/// Check that it\'s valid to export \\p D.\nstatic bool checkExportedDecl(Sema &S, Decl *D, SourceLocation BlockStart) {\n // ...\n // C++2a [module.interface]p5:\n // all entities to which all of the using-declarators ultimately refer\n // shall have been introduced with a name having external linkage\n if (auto *USD = dyn_cast<UsingShadowDecl>(D)) {\n // ...\n if (Lk == InternalLinkage || Lk == ModuleLinkage) {\n S.Diag(USD->getLocation(), diag::err_export_using_internal) << (Lk == InternalLinkage ? 0 : 1) << Target;"}}, [l]={ ["clang/test/CXX/module/module.interface/p3.cpp"]={"clang/test/CXX/module/module.interface/p3.cpp:30:17: error: using declaration referring to \'ns_mem\' with module linkage cannot be exported","clang/test/CXX/module/module.interface/p3.cpp:32:19: error: using declaration referring to \'ns_mem\' with module linkage cannot be exported"} } }, ["err_export_within_anonymous_namespace"]={ [d]={{nil,s,"err_export_within_anonymous_namespace"}}, [f]={{nil,s,"export declaration appears within anonymous namespace"}}, [b]={{nil,s,"export declaration appears within anonymous namespace"}}, [i]=k, [h]="export declaration appears within anonymous namespace", [g]=a, [e]={{nil,s,cb}}, [c]={"e181de7f4fe9",1555973411,"[c++2a] Implement semantic restrictions for \'export\' declarations.","[c++2a] Implement semantic restrictions for \'export\' declarations.\n\nllvm-svn: 358932"}, [j]={{fb,789,"/// We have parsed the start of an export declaration, including the \'{\'\n/// (if present).\nDecl *Sema::ActOnStartExportDecl(Scope *S, SourceLocation ExportLoc, SourceLocation LBraceLoc) {\n // ...\n for (const DeclContext *DC = CurContext; DC; DC = DC->getLexicalParent()) {\n if (const auto *ND = dyn_cast<NamespaceDecl>(DC)) {\n // An export-declaration shall not appear directly or indirectly within\n // an unnamed namespace [...]\n if (ND->isAnonymousNamespace()) {\n Diag(ExportLoc, diag::err_export_within_anonymous_namespace);"}}, [l]={ ["clang/test/CXX/module/module.interface/p3.cpp"]={"clang/test/CXX/module/module.interface/p3.cpp:51:3: error: export declaration appears within anonymous namespace"} } }, ["err_export_within_export"]={ [d]="err_export_within_export", [f]="export declaration appears within another export declaration", [b]="export declaration appears within another export declaration", [i]=k, [h]="export declaration appears within another export declaration", [g]=a, [e]=cb, [c]={"3b66056a3f50",1474925243,"[Modules TS] Diagnose \'export\' declaration within \'export\' declaration.","[Modules TS] Diagnose \'export\' declaration within \'export\' declaration.\n\nllvm-svn: 282443"}, [j]={{fb,809,"/// We have parsed the start of an export declaration, including the \'{\'\n/// (if present).\nDecl *Sema::ActOnStartExportDecl(Scope *S, SourceLocation ExportLoc, SourceLocation LBraceLoc) {\n // ...\n // [...] its declaration or declaration-seq shall not contain an\n // export-declaration.\n if (auto *ED = getEnclosingExportDecl(D)) {\n Diag(ExportLoc, diag::err_export_within_export);"}}, [l]={ ["clang/test/Modules/export-in-another-export.cppm"]={"clang/test/Modules/export-in-another-export.cppm:4:5: error: export declaration appears within another export declaration"} } }, ["err_expr_not_cce"]={ [d]="err_expr_not_cce", [f]="%select{case value|enumerator value|non-type template argument|array size|explicit specifier argument|noexcept specifier argument|call to \'size()\'|call to \'data()\'}0 is not a constant expression", [b]={{nil,nil,{{Hb,Jb,Kb,Nb,"explicit specifier argument","noexcept specifier argument","call to \'size()\'","call to \'data()\'"},Lb}},{t,y,{{Hb,Jb,Kb,Nb,"explicit specifier argument","noexcept specifier argument"},Lb}},{L,L,{{Hb,Jb,Kb,Nb,"explicit specifier argument"},Lb}},{D,s,{{Hb,Jb,Kb,Nb,"constexpr if condition","explicit specifier argument"},Lb}},{J,nil,{{Hb,Jb,Kb,Nb,"constexpr if condition"},Lb}}}, [i]=k, [h]="(?:case value|enumerator value|non\\-type template argument|array size|explicit specifier argument|noexcept specifier argument|call to \'size\\(\\)\'|call to \'data\\(\\)\') is not a constant expression", [g]=a, [e]=m, [c]={"f8379a0fc359",1326930952,"constexpr: converted constant expression handling for enumerator values, case","constexpr: converted constant expression handling for enumerator values, case\nvalues and non-type template arguments of integral and enumeration types.\n\nThis change causes some legal C++98 code to no longer compile in C++11 mode, by\nenforcing the C++11 rule that narrowing integral conversions are not permitted\nin the final implicit conversion sequence for the above cases.\n\nllvm-svn: 148439"}, [j]={{"clang/lib/Sema/SemaOverload.cpp",5987,"/// EvaluateConvertedConstantExpression - Evaluate an Expression\n/// That is a converted constant expression\n/// (which was built with BuildConvertedConstantExpression)\nstatic ExprResult EvaluateConvertedConstantExpression(Sema &S, Expr *E, QualType T, APValue &Value, Sema::CCEKind CCE, bool RequireInt, const APValue &PreNarrowingValue) {\n // ...\n // It\'s not a constant expression. Produce an appropriate diagnostic.\n if (Notes.size() == 1 && Notes[0].second.getDiagID() == diag::note_invalid_subexpr_in_const_expr) {\n S.Diag(Notes[0].first, diag::err_expr_not_cce) << CCE;"},{"clang/lib/Sema/SemaOverload.cpp",5994,"/// EvaluateConvertedConstantExpression - Evaluate an Expression\n/// That is a converted constant expression\n/// (which was built with BuildConvertedConstantExpression)\nstatic ExprResult EvaluateConvertedConstantExpression(Sema &S, Expr *E, QualType T, APValue &Value, Sema::CCEKind CCE, bool RequireInt, const APValue &PreNarrowingValue) {\n // ...\n // It\'s not a constant expression. Produce an appropriate diagnostic.\n if (Notes.size() == 1 && Notes[0].second.getDiagID() == diag::note_invalid_subexpr_in_const_expr) {\n // ...\n } else if (!Notes.empty() && Notes[0].second.getDiagID() == diag::note_constexpr_invalid_template_arg) {\n // ...\n } else {\n S.Diag(E->getBeginLoc(), diag::err_expr_not_cce) << CCE << E->getSourceRange();"}}, [l]={ ["clang/test/CXX/temp/temp.param/p8-cxx20.cpp"]={"clang/test/CXX/temp/temp.param/p8-cxx20.cpp:64:5: error: non-type template argument is not a constant expression"} } }, ["err_expr_not_ice"]={ [d]="err_expr_not_ice", [f]="expression is not an %select{integer|integral}0 constant expression", [b]={{nil,nil,{"expression is not an ",{"integer","integral"}," constant expression"}}}, [i]=k, [h]="expression is not an (?:integer|integral) constant expression", [g]=a, [e]=m, [c]={u,1236199783,v,w}, [j]={{rb,17830,"ExprResult Sema::VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result, AllowFoldKind CanFold) {\n class SimpleICEDiagnoser : public VerifyICEDiagnoser {\n // ...\n SemaDiagnosticBuilder diagnoseNotICE(Sema &S, SourceLocation Loc) override { return S.Diag(Loc, diag::err_expr_not_ice) << S.LangOpts.CPlusPlus; }"}}, [l]={ ["clang/test/Sema/switch.c"]={"clang/test/Sema/switch.c:44:8: error: expression is not an integer constant expression","clang/test/Sema/switch.c:45:14: error: expression is not an integer constant expression","clang/test/Sema/switch.c:55:8: error: expression is not an integer constant expression","clang/test/Sema/switch.c:62:7: error: expression is not an integer constant expression"} } }, ["err_expr_not_string_literal"]={ [d]="err_expr_not_string_literal", [f]="expression is not a string literal", [b]="expression is not a string literal", [i]=k, [h]="expression is not a string literal", [g]=a, [e]=m, [c]={"59b2d8390941",1434390661,"This patch implements clang support for the ACLE special register intrinsics","This patch implements clang support for the ACLE special register intrinsics\nin section 10.1, __arm_{w,r}sr{,p,64}.\n\nThis includes arm_acle.h definitions with builtins and codegen to support\nthese, the intrinsics are implemented by generating read/write_register calls\nwhich get appropriately lowered in the backend based on the register string\nprovided. SemaChecking is also implemented to fault invalid parameters.\n\nDifferential Revision: http://reviews.llvm.org/D9697\n\nllvm-svn: 239737"}, [j]={{db,4471,"bool Sema::CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n // Check that sync scope is a constant literal\n if (!ArgExpr->EvaluateAsConstantExpr(ArgResult1, Context))\n return Diag(ArgExpr->getExprLoc(), diag::err_expr_not_string_literal) << ArgExpr->getType();"},{db,5466,"/// SemaBuiltinCpuSupports - Handle __builtin_cpu_supports(char *).\n/// This checks that the target supports __builtin_cpu_supports and\n/// that the string argument is constant and valid.\nstatic bool SemaBuiltinCpuSupports(Sema &S, const TargetInfo &TI, CallExpr *TheCall) {\n // ...\n // Check if the argument is a string literal.\n if (!isa<StringLiteral>(Arg->IgnoreParenImpCasts()))\n return S.Diag(TheCall->getBeginLoc(), diag::err_expr_not_string_literal) << Arg->getSourceRange();"},{db,5486,"/// SemaBuiltinCpuIs - Handle __builtin_cpu_is(char *).\n/// This checks that the target supports __builtin_cpu_is and\n/// that the string argument is constant and valid.\nstatic bool SemaBuiltinCpuIs(Sema &S, const TargetInfo &TI, CallExpr *TheCall) {\n // ...\n // Check if the argument is a string literal.\n if (!isa<StringLiteral>(Arg->IgnoreParenImpCasts()))\n return S.Diag(TheCall->getBeginLoc(), diag::err_expr_not_string_literal) << Arg->getSourceRange();"},{db,9132,"/// SemaBuiltinARMSpecialReg - Handle a check if argument ArgNum of CallExpr\n/// TheCall is an ARM/AArch64 special register string literal.\nbool Sema::SemaBuiltinARMSpecialReg(unsigned BuiltinID, CallExpr *TheCall, int ArgNum, unsigned ExpectedFieldNum, bool AllowName) {\n // ...\n // Check if the argument is a string literal.\n if (!isa<StringLiteral>(Arg->IgnoreParenImpCasts()))\n return Diag(TheCall->getBeginLoc(), diag::err_expr_not_string_literal) << Arg->getSourceRange();"}}, [l]={ ["clang/test/Sema/arm-special-register.c"]={"clang/test/Sema/arm-special-register.c:4:3: error: expression is not a string literal"} } }, ["err_ext_vector_component_exceeds_length"]={ [d]="err_ext_vector_component_exceeds_length", [f]="vector component access exceeds type %0", [b]="vector component access exceeds type A", [i]=k, [h]="vector component access exceeds type (.*?)", [g]=a, [e]=m, [c]={u,1236199783,v,w}, [j]={{"clang/lib/Sema/SemaExprMember.cpp",382,"/// Check an ext-vector component access expression.\n///\n/// VK should be set in advance to the value kind of the base\n/// expression.\nstatic QualType CheckExtVectorComponent(Sema &S, QualType baseType, ExprValueKind &VK, SourceLocation OpLoc, const IdentifierInfo *CompName, SourceLocation CompLoc) {\n // ...\n // Ensure no component accessor exceeds the width of the vector type it\n // operates on.\n if (!HalvingSwizzle) {\n // ...\n while (*compStr) {\n if (!vecType->isAccessorWithinNumElements(*compStr++, HexSwizzle)) {\n S.Diag(OpLoc, diag::err_ext_vector_component_exceeds_length) << baseType << SourceRange(CompLoc);"}}, [l]={ ["clang/test/Sema/ext_vector_components.c"]={"clang/test/Sema/ext_vector_components.c:17:9: error: vector component access exceeds type \'float2\' (vector of 2 \'float\' values)","clang/test/Sema/ext_vector_components.c:18:9: error: vector component access exceeds type \'float2\' (vector of 2 \'float\' values)","clang/test/Sema/ext_vector_components.c:36:12: error: vector component access exceeds type \'float2\' (vector of 2 \'float\' values)","clang/test/Sema/ext_vector_components.c:37:9: error: vector component access exceeds type \'float4\' (vector of 4 \'float\' values)","clang/test/Sema/ext_vector_components.c:43:9: error: vector component access exceeds type \'float2\' (vector of 2 \'float\' values)","clang/test/Sema/ext_vector_components.c:44:9: error: vector component access exceeds type \'float2\' (vector of 2 \'float\' values)","clang/test/Sema/ext_vector_components.c:49:9: error: vector component access exceeds type \'float4\' (vector of 4 \'float\' values)","clang/test/Sema/ext_vector_components.c:64:12: error: vector component access exceeds type \'float2\' (vector of 2 \'float\' values)"} } }, ["err_ext_vector_component_name_illegal"]={ [d]="err_ext_vector_component_name_illegal", [f]="illegal vector component name \'%0\'", [b]="illegal vector component name \'A\'", [i]=k, [h]="illegal vector component name \'(.*?)\'", [g]=a, [e]=m, [c]={u,1236199783,v,w}, [j]={{"clang/lib/Sema/SemaExprMember.cpp",367,"/// Check an ext-vector component access expression.\n///\n/// VK should be set in advance to the value kind of the base\n/// expression.\nstatic QualType CheckExtVectorComponent(Sema &S, QualType baseType, ExprValueKind &VK, SourceLocation OpLoc, const IdentifierInfo *CompName, SourceLocation CompLoc) {\n // ...\n if (!HalvingSwizzle && *compStr) {\n // ...\n S.Diag(OpLoc, diag::err_ext_vector_component_name_illegal) << StringRef(compStr, 1) << SourceRange(CompLoc);"},{"clang/lib/Sema/SemaExprMember.cpp",1618,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n if (BaseType->isExtVectorBoolType()) {\n // ...\n S.Diag(R.getNameLoc(), diag::err_ext_vector_component_name_illegal) << MemberName << (BaseExpr.get() ? BaseExpr.get()->getSourceRange() : SourceRange());"}}, [l]={ ["clang/test/Sema/ext_vector_components.c"]={"clang/test/Sema/ext_vector_components.c:20:9: error: illegal vector component name \'c\'","clang/test/Sema/ext_vector_components.c:21:9: error: illegal vector component name \'z\'","clang/test/Sema/ext_vector_components.c:46:9: error: illegal vector component name \'z\'","clang/test/Sema/ext_vector_components.c:47:9: error: illegal vector component name \'c\'","clang/test/Sema/ext_vector_components.c:48:9: error: illegal vector component name \'r\'"} } }, ["err_extdefmap_parsing"]={ [d]={{nil,J,"err_extdefmap_parsing"}}, [f]={{nil,x,"error parsing index file: \'%0\' line: %1 \'<USR-Length>:<USR> <File-Path>\' format expected"},{y,J,"error parsing index file: \'%0\' line: %1 \'UniqueID filename\' format expected"}}, [b]={{nil,x,"error parsing index file: \'A\' line: B \'<USR-Length>:<USR> <File-Path>\' format expected"},{y,J,"error parsing index file: \'A\' line: B \'UniqueID filename\' format expected"}}, [i]=k, [h]="error parsing index file\\: \'(.*?)\' line\\: (.*?) \'\\<USR\\-Length\\>\\:\\<USR\\> \\<File\\-Path\\>\' format expected", [g]=a, [e]={{nil,J,o}}, [c]={"8c48705a1975",1547142244,"[analyzer][CrossTU][NFC] Generalize to external definitions instead of external functions","[analyzer][CrossTU][NFC] Generalize to external definitions instead of external functions\n\nSummary: This is just changing naming and documentation to be general about external definitions that can be imported for cross translation unit analysis. There is at least a plan to add VarDecls: D46421\n\nReviewers: NoQ, xazax.hun, martong, a.sidorin, george.karpenkov, serge-sans-paille\n\nReviewed By: xazax.hun, martong\n\nSubscribers: mgorny, whisperity, baloghadamsoftware, szepet, rnkovacs, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D56441\n\nllvm-svn: 350852"}, [j]={{"clang/lib/CrossTU/CrossTranslationUnit.cpp",378,"void CrossTranslationUnitContext::emitCrossTUDiagnostics(const IndexError &IE) {\n // ...\n case index_error_code::invalid_index_format:\n Context.getDiagnostics().Report(diag::err_extdefmap_parsing) << IE.getFileName() << IE.getLineNum();"}} }, ["err_extern_c_global_conflict"]={ [d]="err_extern_c_global_conflict", [f]="declaration of %1 %select{with C language linkage|in global scope}0 conflicts with declaration %select{in global scope|with C language linkage}0", [b]={{nil,nil,{"declaration of B ",{"with C language linkage","in global scope"}," conflicts with declaration ",{"in global scope","with C language linkage"}}}}, [i]=k, [h]="declaration of (.*?) (?:with C language linkage|in global scope) conflicts with declaration (?:in global scope|with C language linkage)", [g]=a, [e]=m, [c]={"902befa2773d",1372457031,"PR7927, PR16247: Reimplement handling of matching extern \"C\" declarations","PR7927, PR16247: Reimplement handling of matching extern \"C\" declarations\nacross scopes.\n\nWhen we declare an extern \"C\" name that is not a redeclaration of an entity in\nthe same scope, check whether it redeclares some extern \"C\" entity from another\nscope, and if not, check whether it conflicts with a (non-extern-\"C\") entity in\nthe translation unit.\n\nWhen we declare a name in the translation unit that is not a redeclaration,\ncheck whether it conflicts with any extern \"C\" entities (possibly from other\nscopes).\n\nllvm-svn: 185229"}, [j]={{A,8463,"/// Check for conflict between this global or extern \"C\" declaration and\n/// previous global or extern \"C\" declarations. This is only used in C++.\ntemplate <typename T> static bool checkGlobalOrExternCConflict(Sema &S, const T *ND, bool IsGlobal, LookupResult &Previous) {\n // ...\n S.Diag(ND->getLocation(), diag::err_extern_c_global_conflict) << IsGlobal << ND;"}}, [l]={ ["clang/test/SemaCXX/extern-c.cpp"]={"clang/test/SemaCXX/extern-c.cpp:19:7: error: declaration of \'test2_x\' in global scope conflicts with declaration with C language linkage","clang/test/SemaCXX/extern-c.cpp:39:14: error: declaration of \'test4_b\' in global scope conflicts with declaration with C language linkage","clang/test/SemaCXX/extern-c.cpp:56:16: error: declaration of \'test5_b\' in global scope conflicts with declaration with C language linkage","clang/test/SemaCXX/extern-c.cpp:126:10: error: declaration of \'lookup_in_global_f\' with C language linkage conflicts with declaration in global scope","clang/test/SemaCXX/extern-c.cpp:130:5: error: declaration of \'lookup_in_global_g\' in global scope conflicts with declaration with C language linkage","clang/test/SemaCXX/extern-c.cpp:180:19: error: declaration of \'global_var_vs_extern_c_fn_1\' with C language linkage conflicts with declaration in global scope","clang/test/SemaCXX/extern-c.cpp:183:5: error: declaration of \'global_var_vs_extern_c_fn_2\' in global scope conflicts with declaration with C language linkage","clang/test/SemaCXX/extern-c.cpp:186:21: error: declaration of \'global_var_vs_extern_c_var_1\' with C language linkage conflicts with declaration in global scope","clang/test/SemaCXX/extern-c.cpp:189:5: error: declaration of \'global_var_vs_extern_c_var_2\' in global scope conflicts with declaration with C language linkage"} } }, ["err_extern_def_in_header_unit"]={ [d]={{nil,t,"err_extern_def_in_header_unit"}}, [f]={{nil,t,"non-inline external definitions are not permitted in C++ header units"}}, [b]={{nil,t,"non-inline external definitions are not permitted in C++ header units"}}, [i]=k, [h]="non\\-inline external definitions are not permitted in C\\+\\+ header units", [g]=a, [e]={{nil,t,cb}}, [c]={"95f50964fbf5",1625925174,"Implement P2361 Unevaluated string literals","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"}, [j]={{A,13221,"/// AddInitializerToDecl - Adds the initializer Init to the\n/// declaration dcl. If DirectInit is true, this is C++ direct\n/// initialization rather than copy initialization.\nvoid Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {\n // ...\n // C++ [module.import/6] external definitions are not permitted in header\n // units.\n if (getLangOpts().CPlusPlusModules && currentModuleIsHeaderUnit() && !VDecl->isInvalidDecl() && VDecl->isThisDeclarationADefinition() && VDecl->getFormalLinkage() == Linkage::ExternalLinkage && !VDecl->isInline() && !VDecl->isTemplated() && !isa<VarTemplateSpecializationDecl>(VDecl)) {\n Diag(VDecl->getLocation(), diag::err_extern_def_in_header_unit);"},{A,15408,"Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D, SkipBodyInfo *SkipBody, FnBodyKind BodyKind) {\n // ...\n // C++ [module.import/6] external definitions are not permitted in header\n // units. Deleted and Defaulted functions are implicitly inline (but the\n // inline state is not set at this point, so check the BodyKind explicitly).\n // FIXME: Consider an alternate location for the test where the inlined()\n // state is complete.\n if (getLangOpts().CPlusPlusModules && currentModuleIsHeaderUnit() && !FD->isInvalidDecl() && !FD->isInlined() && BodyKind != FnBodyKind::Delete && BodyKind != FnBodyKind::Default && FD->getFormalLinkage() == Linkage::ExternalLinkage && !FD->isTemplated() && !FD->isTemplateInstantiation()) {\n // ...\n Diag(FD->getLocation(), diag::err_extern_def_in_header_unit);"}} }, ["err_extern_non_extern"]={ [d]="err_extern_non_extern", [f]="extern declaration of %0 follows non-extern declaration", [b]="extern declaration of A follows non-extern declaration", [i]=k, [h]="extern declaration of (.*?) follows non\\-extern declaration", [g]=a, [e]=m, [c]={"819f61094216",1296457486,"Diagnose if extern local variable is followed by non-extern and vice-versa.","Diagnose if extern local variable is followed by non-extern and vice-versa.\n\nllvm-svn: 124579"}, [j]={{A,4661,"/// 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 // Check if extern is followed by non-extern and vice-versa.\n if (New->hasExternalStorage() && !Old->hasLinkage() && Old->isLocalVarDeclOrParm()) {\n Diag(New->getLocation(), diag::err_extern_non_extern) << New->getDeclName();"}}, [l]={ ["clang/test/Sema/var-redecl.c"]={"clang/test/Sema/var-redecl.c:65:14: error: extern declaration of \'x\' follows non-extern declaration"} } }, ["err_external_source_symbol_duplicate_clause"]={ [d]={{nil,I,"err_external_source_symbol_duplicate_clause"}}, [f]={{nil,I,"duplicate %0 clause in an \'external_source_symbol\' attribute"}}, [b]={{nil,I,"duplicate A clause in an \'external_source_symbol\' attribute"}}, [i]=k, [h]="duplicate (.*?) clause in an \'external_source_symbol\' attribute", [g]=a, [e]={{nil,I,n}}, [c]={"d5d27e16d423",1488391585,"Introduce an \'external_source_symbol\' attribute that describes the origin","Introduce an \'external_source_symbol\' attribute that describes the origin\nand the nature of a declaration\n\nThis commit adds an external_source_symbol attribute to Clang. This attribute\nspecifies that a declaration originates from an external source and describes\nthe nature of that source. This attribute will be used to improve IDE features\nlike \'jump-to-definition\' for mixed-language projects or project that use\nauto-generated code.\n\nrdar://30423368\n\nDifferential Revision: https://reviews.llvm.org/D29819\n\nllvm-svn: 296649"}, [j]={{p,1395,"/// Parse the contents of the \"external_source_symbol\" attribute.\n///\n/// external-source-symbol-attribute:\n/// \'external_source_symbol\' \'(\' keyword-arg-list \')\'\n///\n/// keyword-arg-list:\n/// keyword-arg\n/// keyword-arg \',\' keyword-arg-list\n///\n/// keyword-arg:\n/// \'language\' \'=\' <string>\n/// \'defined_in\' \'=\' <string>\n/// \'USR\' \'=\' <string>\n/// \'generated_declaration\'\nvoid Parser::ParseExternalSourceSymbolAttribute(IdentifierInfo &ExternalSourceSymbol, SourceLocation Loc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n // Parse the language/defined_in/generated_declaration keywords\n do {\n // ...\n if (Keyword == Ident_generated_declaration) {\n if (GeneratedDeclaration) {\n Diag(Tok, diag::err_external_source_symbol_duplicate_clause) << Keyword;"},{p,1438,"/// Parse the contents of the \"external_source_symbol\" attribute.\n///\n/// external-source-symbol-attribute:\n/// \'external_source_symbol\' \'(\' keyword-arg-list \')\'\n///\n/// keyword-arg-list:\n/// keyword-arg\n/// keyword-arg \',\' keyword-arg-list\n///\n/// keyword-arg:\n/// \'language\' \'=\' <string>\n/// \'defined_in\' \'=\' <string>\n/// \'USR\' \'=\' <string>\n/// \'generated_declaration\'\nvoid Parser::ParseExternalSourceSymbolAttribute(IdentifierInfo &ExternalSourceSymbol, SourceLocation Loc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n // Parse the language/defined_in/generated_declaration keywords\n do {\n // ...\n if (Keyword == Ident_language) {\n if (HadLanguage) {\n Diag(KeywordLoc, diag::err_external_source_symbol_duplicate_clause) << Keyword;"},{p,1446,"/// Parse the contents of the \"external_source_symbol\" attribute.\n///\n/// external-source-symbol-attribute:\n/// \'external_source_symbol\' \'(\' keyword-arg-list \')\'\n///\n/// keyword-arg-list:\n/// keyword-arg\n/// keyword-arg \',\' keyword-arg-list\n///\n/// keyword-arg:\n/// \'language\' \'=\' <string>\n/// \'defined_in\' \'=\' <string>\n/// \'USR\' \'=\' <string>\n/// \'generated_declaration\'\nvoid Parser::ParseExternalSourceSymbolAttribute(IdentifierInfo &ExternalSourceSymbol, SourceLocation Loc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n // Parse the language/defined_in/generated_declaration keywords\n do {\n // ...\n if (Keyword == Ident_language) {\n // ...\n } else if (Keyword == Ident_USR) {\n if (HadUSR) {\n Diag(KeywordLoc, diag::err_external_source_symbol_duplicate_clause) << Keyword;"},{p,1455,"/// Parse the contents of the \"external_source_symbol\" attribute.\n///\n/// external-source-symbol-attribute:\n/// \'external_source_symbol\' \'(\' keyword-arg-list \')\'\n///\n/// keyword-arg-list:\n/// keyword-arg\n/// keyword-arg \',\' keyword-arg-list\n///\n/// keyword-arg:\n/// \'language\' \'=\' <string>\n/// \'defined_in\' \'=\' <string>\n/// \'USR\' \'=\' <string>\n/// \'generated_declaration\'\nvoid Parser::ParseExternalSourceSymbolAttribute(IdentifierInfo &ExternalSourceSymbol, SourceLocation Loc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n // Parse the language/defined_in/generated_declaration keywords\n do {\n // ...\n if (Keyword == Ident_language) {\n // ...\n } else if (Keyword == Ident_USR) {\n // ...\n } else {\n // ...\n if (HadDefinedIn) {\n Diag(KeywordLoc, diag::err_external_source_symbol_duplicate_clause) << Keyword;"}}, [l]={ ["clang/test/Sema/attr-external-source-symbol.c"]={"clang/test/Sema/attr-external-source-symbol.c:9:124: error: duplicate \'generated_declaration\' clause in an \'external_source_symbol\' attribute","clang/test/Sema/attr-external-source-symbol.c:27:107: error: duplicate \'generated_declaration\' clause in an \'external_source_symbol\' attribute"} } }, ["err_external_source_symbol_expected_keyword"]={ [d]={{nil,I,"err_external_source_symbol_expected_keyword"}}, [f]="expected \'language\', \'defined_in\', \'generated_declaration\', or \'USR\'", [b]="expected \'language\', \'defined_in\', \'generated_declaration\', or \'USR\'", [i]=k, [h]="expected \'language\', \'defined_in\', \'generated_declaration\', or \'USR\'", [g]=a, [e]={{nil,I,n}}, [c]={"d5d27e16d423",1488391585,"Introduce an \'external_source_symbol\' attribute that describes the origin","Introduce an \'external_source_symbol\' attribute that describes the origin\nand the nature of a declaration\n\nThis commit adds an external_source_symbol attribute to Clang. This attribute\nspecifies that a declaration originates from an external source and describes\nthe nature of that source. This attribute will be used to improve IDE features\nlike \'jump-to-definition\' for mixed-language projects or project that use\nauto-generated code.\n\nrdar://30423368\n\nDifferential Revision: https://reviews.llvm.org/D29819\n\nllvm-svn: 296649"}, [j]={{p,1386,"/// Parse the contents of the \"external_source_symbol\" attribute.\n///\n/// external-source-symbol-attribute:\n/// \'external_source_symbol\' \'(\' keyword-arg-list \')\'\n///\n/// keyword-arg-list:\n/// keyword-arg\n/// keyword-arg \',\' keyword-arg-list\n///\n/// keyword-arg:\n/// \'language\' \'=\' <string>\n/// \'defined_in\' \'=\' <string>\n/// \'USR\' \'=\' <string>\n/// \'generated_declaration\'\nvoid Parser::ParseExternalSourceSymbolAttribute(IdentifierInfo &ExternalSourceSymbol, SourceLocation Loc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n // Parse the language/defined_in/generated_declaration keywords\n do {\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_external_source_symbol_expected_keyword);"},{p,1405,"/// Parse the contents of the \"external_source_symbol\" attribute.\n///\n/// external-source-symbol-attribute:\n/// \'external_source_symbol\' \'(\' keyword-arg-list \')\'\n///\n/// keyword-arg-list:\n/// keyword-arg\n/// keyword-arg \',\' keyword-arg-list\n///\n/// keyword-arg:\n/// \'language\' \'=\' <string>\n/// \'defined_in\' \'=\' <string>\n/// \'USR\' \'=\' <string>\n/// \'generated_declaration\'\nvoid Parser::ParseExternalSourceSymbolAttribute(IdentifierInfo &ExternalSourceSymbol, SourceLocation Loc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n // Parse the language/defined_in/generated_declaration keywords\n do {\n // ...\n if (Keyword != Ident_language && Keyword != Ident_defined_in && Keyword != Ident_USR) {\n Diag(Tok, diag::err_external_source_symbol_expected_keyword);"}}, [l]={ ["clang/test/Parser/attr-external-source-symbol.m"]={"clang/test/Parser/attr-external-source-symbol.m:22:39: error: expected \'language\', \'defined_in\', \'generated_declaration\', or \'USR\'","clang/test/Parser/attr-external-source-symbol.m:24:39: error: expected \'language\', \'defined_in\', \'generated_declaration\', or \'USR\'","clang/test/Parser/attr-external-source-symbol.m:54:39: error: expected \'language\', \'defined_in\', \'generated_declaration\', or \'USR\'","clang/test/Parser/attr-external-source-symbol.m:57:39: error: expected \'language\', \'defined_in\', \'generated_declaration\', or \'USR\'","clang/test/Parser/attr-external-source-symbol.m:60:39: error: expected \'language\', \'defined_in\', \'generated_declaration\', or \'USR\'","clang/test/Parser/attr-external-source-symbol.m:63:57: error: expected \'language\', \'defined_in\', \'generated_declaration\', or \'USR\'","clang/test/Parser/attr-external-source-symbol.m:90:73: error: expected \'language\', \'defined_in\', \'generated_declaration\', or \'USR\'"} } }, ["err_extract_api_ignores_file_not_found"]={ [d]={{nil,t,"err_extract_api_ignores_file_not_found"}}, [f]={{nil,t,"file \'%0\' specified by \'--extract-api-ignores=\' not found"}}, [b]={{nil,t,"file \'A\' specified by \'--extract-api-ignores=\' not found"}}, [i]=ab, [h]="file \'(.*?)\' specified by \'\\-\\-extract\\-api\\-ignores\\=\' not found", [g]=a, [e]={{nil,t,o}}, [c]={"a033dbbe5c43",1666225776,"[Clang] Give Clang the ability to use a shared stat cache","[Clang] Give Clang the ability to use a shared stat cache\n\nEvery Clang instance uses an internal FileSystemStatCache to avoid\nstating the same content multiple times. However, different instances\nof Clang will contend for filesystem access for their initial stats\nduring HeaderSearch or module validation.\n\nOn some workloads, the time spent in the kernel in these concurrent\nstat calls has been measured to be over 20% of the overall compilation\ntime. This is extremly wassteful when most of the stat calls target\nmostly immutable content like a SDK.\n\nThis commit introduces a new tool `clang-stat-cache` able to generate\nan OnDiskHashmap containing the stat data for a given filesystem\nhierarchy.\n\nThe driver part of this has been modeled after -ivfsoverlay given\nthe similarities with what it influences. It introduces a new\n-ivfsstatcache driver option to instruct Clang to use a stat cache\ngenerated by `clang-stat-cache`. These stat caches are inserted at\nthe bottom of the VFS stack (right above the real filesystem).\n\nDifferential Revision: https://reviews.llvm.org/D136651"}, [j]={{"clang/lib/ExtractAPI/ExtractAPIConsumer.cpp",431,"std::unique_ptr<ASTConsumer> ExtractAPIAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {\n // ...\n if (!CI.getFrontendOpts().ExtractAPIIgnoresFileList.empty()) {\n llvm::handleAllErrors(APIIgnoresList::create(CI.getFrontendOpts().ExtractAPIIgnoresFileList, CI.getFileManager()).moveInto(IgnoresList), [&CI](const IgnoresFileNotFound &Err) { CI.getDiagnostics().Report(diag::err_extract_api_ignores_file_not_found) << Err.Path; });"},{"clang/lib/ExtractAPI/ExtractAPIConsumer.cpp",535,"std::unique_ptr<ASTConsumer> WrappingExtractAPIAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {\n // ...\n if (!CI.getFrontendOpts().ExtractAPIIgnoresFileList.empty()) {\n llvm::handleAllErrors(APIIgnoresList::create(CI.getFrontendOpts().ExtractAPIIgnoresFileList, CI.getFileManager()).moveInto(IgnoresList), [&CI](const IgnoresFileNotFound &Err) { CI.getDiagnostics().Report(diag::err_extract_api_ignores_file_not_found) << Err.Path; });"}} }, ["err_extraneous_closing_brace"]={ [d]="err_extraneous_closing_brace", [f]="extraneous closing brace (\'}\')", [b]="extraneous closing brace (\'}\')", [i]=k, [h]="extraneous closing brace \\(\'\\}\'\\)", [g]=a, [e]=n, [c]={"e1df10a79ea0",1326762267,"Improve diagnostics for dangling \'}\'.","Improve diagnostics for dangling \'}\'.\n\nFixes PR6484. Patch from Jason Switzer!\n\nllvm-svn: 148270"}, [j]={{M,871,"/// 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::r_brace:\n Diag(Tok, diag::err_extraneous_closing_brace);"}}, [l]={ ["clang/test/Parser/objc-quirks.m"]={"clang/test/Parser/objc-quirks.m:9:1: error: extraneous closing brace (\'}\')"} } }, ["err_extraneous_rparen_in_condition"]={ [d]="err_extraneous_rparen_in_condition", [f]="extraneous \')\' after condition, expected a statement", [b]="extraneous \')\' after condition, expected a statement", [i]=k, [h]="extraneous \'\\)\' after condition, expected a statement", [g]=a, [e]=n, [c]={"70d449889924",1335630260,"improve error recovery for extra \')\'s after a if/switch/while condition. Before:","improve error recovery for extra \')\'s after a if/switch/while condition. Before:\n\nt.c:3:9: error: expected expression\n if (x)) {\n ^\n\n.. which isn\'t even true - a statement or expression is fine. After:\n\nt.c:3:9: error: extraneous \')\' after condition, expected a statement\n if (x)) {\n ^\n\nThis is the second part of PR12595\n\nllvm-svn: 155762"}, [j]={{B,1348,"/// ParseParenExprOrCondition:\n/// [C ] \'(\' expression \')\'\n/// [C++] \'(\' condition \')\'\n/// [C++1z] \'(\' init-statement[opt] condition \')\'\n///\n/// This function parses and performs error recovery on the specified condition\n/// or expression (depending on whether we\'re in C++ or C mode). This function\n/// goes out of its way to recover well. It returns true if there was a parser\n/// error (the right paren couldn\'t be found), which indicates that the caller\n/// should try to recover harder. It returns false if the condition is\n/// successfully parsed. Note that a successful parse can still have semantic\n/// errors in the condition.\n/// Additionally, it will assign the location of the outer-most \'(\' and \')\',\n/// to LParenLoc and RParenLoc, respectively.\nbool Parser::ParseParenExprOrCondition(StmtResult *InitStmt, Sema::ConditionResult &Cond, SourceLocation Loc, Sema::ConditionKind CK, SourceLocation &LParenLoc, SourceLocation &RParenLoc) {\n // ...\n // Check for extraneous \')\'s to catch things like \"if (foo())) {\". We know\n // that all callers are looking for a statement after the condition, so \")\"\n // isn\'t valid.\n while (Tok.is(tok::r_paren)) {\n Diag(Tok, diag::err_extraneous_rparen_in_condition) << FixItHint::CreateRemoval(Tok.getLocation());"}}, [l]={ ["clang/test/Parser/recovery.c"]={"clang/test/Parser/recovery.c:42:16: error: extraneous \')\' after condition, expected a statement"} } }, ["err_extraneous_token_before_semi"]={ [d]="err_extraneous_token_before_semi", [f]="extraneous \'%0\' before \';\'", [b]="extraneous \'A\' before \';\'", [i]=k, [h]="extraneous \'(.*?)\' before \';\'", [g]=a, [e]=n, [c]={"45d6bdfa88d5",1283872991,"Improve recovery when there is a stray \']\' or \')\' before the \';\' at","Improve recovery when there is a stray \']\' or \')\' before the \';\' at\nthe end of a statement. Fixes <rdar://problem/6896493>.\n\nllvm-svn: 113202"}, [j]={{M,169,"bool Parser::ExpectAndConsumeSemi(unsigned DiagID, StringRef TokenUsed) {\n // ...\n if ((Tok.is(tok::r_paren) || Tok.is(tok::r_square)) && NextToken().is(tok::semi)) {\n Diag(Tok, diag::err_extraneous_token_before_semi) << PP.getSpelling(Tok) << FixItHint::CreateRemoval(Tok.getLocation());"}}, [l]={ ["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:110:19: error: extraneous \')\' before \';\'"} } }, ["err_falloff_nonvoid_block"]={ [d]="err_falloff_nonvoid_block", [f]={{nil,H,"non-void block does not return a value"},{s,nil,"control reaches end of non-void block"}}, [b]={{nil,H,"non-void block does not return a value"},{s,nil,"control reaches end of non-void block"}}, [i]=k, [h]="non\\-void block does not return a value", [g]=a, [e]=m, [c]={"3bf1ab48d304",1248818641,"Add noreturn support for blocks.","Add noreturn support for blocks.\n\nllvm-svn: 77377"}, [j]={{"clang/lib/Sema/AnalysisBasedWarnings.cpp",603,"struct CheckFallThroughDiagnostics {\n // ...\n static CheckFallThroughDiagnostics MakeForBlock() {\n // ...\n D.diag_AlwaysFallThrough_ReturnsNonVoid = diag::err_falloff_nonvoid_block;"}}, [l]={ ["clang/test/Sema/block-return-3.c"]={"clang/test/Sema/block-return-3.c:4:18: error: non-void block does not return a value"} } }, ["err_fallthrough_attr_invalid_placement"]={ [d]="err_fallthrough_attr_invalid_placement", [f]="fallthrough annotation does not directly precede switch label", [b]="fallthrough annotation does not directly precede switch label", [i]=k, [h]="fallthrough annotation does not directly precede switch label", [g]=a, [e]=m, [c]={"4f902c7eccd4",1457397175,"P0188R1: add support for standard [[fallthrough]] attribute. This is almost","P0188R1: add support for standard [[fallthrough]] attribute. This is almost\nexactly the same as clang\'s existing [[clang::fallthrough]] attribute, which\nhas been updated to have the same semantics. The one significant difference\nis that [[fallthrough]] is ill-formed if it\'s not used immediately before a\nswitch label (even when -Wimplicit-fallthrough is disabled). To support that,\nwe now build a CFG of any function that uses a \'[[fallthrough]];\' statement\nto check.\n\nIn passing, fix some bugs with our support for statement attributes -- in\nparticular, diagnose their use on declarations, rather than asserting.\n\nllvm-svn: 262881"}, [j]={{"clang/lib/Sema/AnalysisBasedWarnings.cpp",1334,"static void DiagnoseSwitchLabelsFallthrough(Sema &S, AnalysisDeclContext &AC, bool PerFunction) {\n // ...\n for (const auto *F : FM.getFallthroughStmts())\n S.Diag(F->getBeginLoc(), diag::err_fallthrough_attr_invalid_placement);"}}, [l]={ ["clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.fallthrough/p1.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.fallthrough/p1.cpp:16:7: error: fallthrough annotation does not directly precede switch label","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.fallthrough/p1.cpp:19:7: error: fallthrough annotation does not directly precede switch label","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.fallthrough/p1.cpp:22:7: error: fallthrough annotation does not directly precede switch label","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.fallthrough/p1.cpp:24:8: error: fallthrough annotation does not directly precede switch label","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.fallthrough/p1.cpp:26:8: error: fallthrough annotation does not directly precede switch label","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.fallthrough/p1.cpp:35:5: error: fallthrough annotation does not directly precede switch label"} } }, ["err_fallthrough_attr_outside_switch"]={ [d]="err_fallthrough_attr_outside_switch", [f]="fallthrough annotation is outside switch statement", [b]="fallthrough annotation is outside switch statement", [i]=k, [h]="fallthrough annotation is outside switch statement", [g]=a, [e]=m, [c]={"84837d5b5aa0",1336069659,"Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between","Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between\ncases in switch statements. Also add a [[clang::fallthrough]] attribute, which\ncan be used to suppress the warning in the case of intentional fallthrough.\n\nPatch by Alexander Kornienko!\n\nThe handling of C++11 attribute namespaces in this patch is temporary, and will\nbe replaced with a cleaner mechanism in a subsequent patch.\n\nllvm-svn: 156086"}, [j]={{"clang/lib/Sema/SemaStmtAttr.cpp",41,"static Attr *handleFallThroughAttr(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange Range) {\n // ...\n if (FnScope->SwitchStack.empty()) {\n S.Diag(A.getRange().getBegin(), diag::err_fallthrough_attr_outside_switch);"}}, [l]={ ["clang/test/SemaCXX/switch-implicit-fallthrough.cpp"]={"clang/test/SemaCXX/switch-implicit-fallthrough.cpp:327:5: error: fallthrough annotation is outside switch statement"} } }, ["err_fallthrough_attr_wrong_target"]={ [d]="err_fallthrough_attr_wrong_target", [f]="%0 attribute is only allowed on empty statements", [b]="A attribute is only allowed on empty statements", [i]=k, [h]="(.*?) attribute is only allowed on empty statements", [g]=a, [e]=m, [c]={"84837d5b5aa0",1336069659,"Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between","Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between\ncases in switch statements. Also add a [[clang::fallthrough]] attribute, which\ncan be used to suppress the warning in the case of intentional fallthrough.\n\nPatch by Alexander Kornienko!\n\nThe handling of C++11 attribute namespaces in this patch is temporary, and will\nbe replaced with a cleaner mechanism in a subsequent patch.\n\nllvm-svn: 156086"}, [j]={{"clang/lib/Sema/SemaStmtAttr.cpp",32,"static Attr *handleFallThroughAttr(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange Range) {\n // ...\n if (isa<SwitchCase>(St)) {\n S.Diag(A.getRange().getBegin(), diag::err_fallthrough_attr_wrong_target) << A << St->getBeginLoc();"}}, [l]={ ["clang/test/SemaCXX/switch-implicit-fallthrough.cpp"]={"clang/test/SemaCXX/switch-implicit-fallthrough.cpp:338:7: error: \'fallthrough\' attribute is only allowed on empty statements"} } }, ["err_fe_action_not_available"]={ [d]="err_fe_action_not_available", [f]="action %0 not compiled in", [b]="action A not compiled in", [i]=k, [h]="action (.*?) not compiled in", [g]=a, [e]=o, [c]={"d93c8c008efe",1355414982,"Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user","Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user\nspecifies not to. Dont build ASTMatchers with Rewriter disabled and\nStaticAnalyzer when it\'s disabled.\n\nWithout all those three, the clang binary shrinks (x86_64) from ~36MB\nto ~32MB (unstripped).\n\nllvm-svn: 170135"}, [j]={{"clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp",133,"#if !CLANG_ENABLE_ARCMT || !CLANG_ENABLE_STATIC_ANALYZER || !CLANG_ENABLE_OBJC_REWRITER\n CI.getDiagnostics().Report(diag::err_fe_action_not_available) << Action;"}} }, ["err_fe_ast_file_modified"]={ [d]="err_fe_ast_file_modified", [f]={{nil,y,"file \'%0\' has been modified since the %select{precompiled header|module file|AST file}1 \'%2\' was built: %select{size|mtime|content}3 changed%select{| (was %5, now %6)}4"},{L,D,"file \'%0\' has been modified since the %select{precompiled header|module file|AST file}1 \'%2\' was built: %select{size|mtime|content}3 changed"},{jb,H,"file \'%0\' has been modified since the AST file \'%1\' was built: %select{size|mtime|content}2 changed"},{s,nil,"file \'%0\' has been modified since the AST file \'%1\' was built"}}, [b]={{nil,y,{"file \'A\' has been modified since the ",{"precompiled header","module file","AST file"}," \'C\' was built: ",{"size","mtime","content"}," changed",{a," (was F, now G)"}}},{L,D,{"file \'A\' has been modified since the ",{"precompiled header","module file","AST file"}," \'C\' was built: ",{"size","mtime","content"}," changed"}},{jb,H,{"file \'A\' has been modified since the AST file \'B\' was built: ",{"size","mtime","content"}," changed"}},{s,nil,"file \'A\' has been modified since the AST file \'B\' was built"}}, [i]=ab, [h]="file \'(.*?)\' has been modified since the (?:precompiled header|module file|AST file) \'(.*?)\' was built\\: (?:size|mtime|content) changed(?:| \\(was (.*?), now (.*?)\\))", [g]=a, [e]=zb, [c]={"c8c9415644fa",1477092903,"Module: correctly set the module file kind when emitting file_modified.","Module: correctly set the module file kind when emitting file_modified.\n\nrdar://28503343\n\nDifferential Revision: http://reviews.llvm.org/D25806\n\nllvm-svn: 284899"}, [j]={{kb,2503,"InputFile ASTReader::getInputFile(ModuleFile &F, unsigned ID, bool Complain) {\n // ...\n // For an overridden file, there is nothing to validate.\n if (!Overridden && FileChange.Kind != Change::None) {\n if (Complain && !Diags.isDiagnosticInFlight()) {\n // ...\n Diag(diag::err_fe_ast_file_modified) << Filename << moduleKindForDiagnostic(ImportStack.back()->Kind) << TopLevelPCHName << FileChange.Kind << (FileChange.Old && FileChange.New) << llvm::itostr(FileChange.Old.value_or(0)) << llvm::itostr(FileChange.New.value_or(0));"}} }, ["err_fe_backend_error_attr"]={ [d]={{nil,y,"err_fe_backend_error_attr"}}, [f]={{nil,t,"call to \'%0\' declared with \'error\' attribute: %1"},{x,y,"call to %0 declared with \'error\' attribute: %1"}}, [b]={{nil,t,"call to \'A\' declared with \'error\' attribute: B"},{x,y,"call to A declared with \'error\' attribute: B"}}, [i]=k, [h]="call to \'(.*?)\' declared with \'error\' attribute\\: (.*?)", [g]=a, [e]={{nil,y,"Backend Issue"}}, [c]={"846e562dcc6a",1629911893,"[Clang] add support for error+warning fn attrs","[Clang] add support for error+warning fn attrs\n\nAdd support for the GNU C style __attribute__((error(\"\"))) and\n__attribute__((warning(\"\"))). These attributes are meant to be put on\ndeclarations of functions whom should not be called.\n\nThey are frequently used to provide compile time diagnostics similar to\n_Static_assert, but which may rely on non-ICE conditions (ie. relying on\ncompiler optimizations). This is also similar to diagnose_if function\nattribute, but can diagnose after optimizations have been run.\n\nWhile users may instead simply call undefined functions in such cases to\nget a linkage failure from the linker, these provide a much more\nergonomic and actionable diagnostic to users and do so at compile time\nrather than at link time. Users instead may be able use inline asm .err\ndirectives.\n\nThese are used throughout the Linux kernel in its implementation of\nBUILD_BUG and BUILD_BUG_ON macros. These macros generally cannot be\nconverted to use _Static_assert because many of the parameters are not\nICEs. The Linux kernel still needs to be modified to make use of these\nwhen building with Clang; I have a patch that does so I will send once\nthis feature is landed.\n\nTo do so, we create a new IR level Function attribute, \"dontcall\" (both\nerror and warning boil down to one IR Fn Attr). Then, similar to calls\nto inline asm, we attach a !srcloc Metadata node to call sites of such\nattributed callees.\n\nThe backend diagnoses these during instruction selection, while we still\nknow that a call is a call (vs say a JMP that\'s a tail call) in an arch\nagnostic manner.\n\nThe frontend then reconstructs the SourceLocation from that Metadata,\nand determines whether to emit an error or warning based on the callee\'s\nattribute.\n\nLink: https://bugs.llvm.org/show_bug.cgi?id=16428\nLink: https://github.com/ClangBuiltLinux/linux/issues/1173\n\nReviewed By: aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D106030"}, [j]={{"clang/lib/CodeGen/CodeGenAction.cpp",857,"void BackendConsumer::DontCallDiagHandler(const DiagnosticInfoDontCall &D) {\n // ...\n Diags.Report(LocCookie, D.getSeverity() == DiagnosticSeverity::DS_Error ? diag::err_fe_backend_error_attr : diag::warn_fe_backend_warning_attr) << llvm::demangle(D.getFunctionName()) << D.getNote();"}}, [l]={ ["clang/test/Frontend/backend-attribute-error-warning-optimize.c"]={"clang/test/Frontend/backend-attribute-error-warning-optimize.c:11:3: error: call to \'foo\' declared with \'error\' attribute: oh no foo"} } }, ["err_fe_backend_resource_limit"]={ [d]={{nil,t,"err_fe_backend_resource_limit"}}, [f]={{nil,t,"%0 (%1) exceeds limit (%2) in \'%3\'"}}, [b]={{nil,t,"A (B) exceeds limit (C) in \'D\'"}}, [i]=k, [h]="(.*?) \\((.*?)\\) exceeds limit \\((.*?)\\) in \'(.*?)\'", [g]=a, [e]={{nil,t,"Backend Issue"}}, [c]={"a033dbbe5c43",1666225776,"[Clang] Give Clang the ability to use a shared stat cache","[Clang] Give Clang the ability to use a shared stat cache\n\nEvery Clang instance uses an internal FileSystemStatCache to avoid\nstating the same content multiple times. However, different instances\nof Clang will contend for filesystem access for their initial stats\nduring HeaderSearch or module validation.\n\nOn some workloads, the time spent in the kernel in these concurrent\nstat calls has been measured to be over 20% of the overall compilation\ntime. This is extremly wassteful when most of the stat calls target\nmostly immutable content like a SDK.\n\nThis commit introduces a new tool `clang-stat-cache` able to generate\nan OnDiskHashmap containing the stat data for a given filesystem\nhierarchy.\n\nThe driver part of this has been modeled after -ivfsoverlay given\nthe similarities with what it influences. It introduces a new\n-ivfsstatcache driver option to instruct Clang to use a stat cache\ngenerated by `clang-stat-cache`. These stat caches are inserted at\nthe bottom of the VFS stack (right above the real filesystem).\n\nDifferential Revision: https://reviews.llvm.org/D136651"}, [j]={{"clang/lib/CodeGen/CodeGenAction.cpp",649,"bool BackendConsumer::ResourceLimitDiagHandler(const llvm::DiagnosticInfoResourceLimit &D) {\n // ...\n unsigned DiagID = diag::err_fe_backend_resource_limit;"}} }, ["err_fe_dependency_file_requires_MT"]={ [d]="err_fe_dependency_file_requires_MT", [f]="-dependency-file requires at least one -MT or -MQ option", [b]="-dependency-file requires at least one -MT or -MQ option", [i]=k, [h]="\\-dependency\\-file requires at least one \\-MT or \\-MQ option", [g]=a, [e]=o, [c]={"7ad807f248ae",1256850318,"Move some clang-cc errors to use diagnostics, and simplify.","Move some clang-cc errors to use diagnostics, and simplify.\n\nllvm-svn: 85527"}, [j]={{Z,4466,"bool CompilerInvocation::CreateFromArgsImpl(CompilerInvocation &Res, ArrayRef<const char *> CommandLineArgs, DiagnosticsEngine &Diags, const char *Argv0) {\n // ...\n if (!Res.getDependencyOutputOpts().OutputFile.empty() && Res.getDependencyOutputOpts().Targets.empty())\n Diags.Report(diag::err_fe_dependency_file_requires_MT);"}} }, ["err_fe_error_backend"]={ [d]="err_fe_error_backend", [f]="error in backend: %0", [b]="error in backend: A", [i]=ab, [h]="error in backend\\: (.*?)", [g]=a, [e]=o, [c]={"71f22e738a2c",1249875628,"Use LLVM\'s new error handler API to report back end errors using Diagnostic.","Use LLVM\'s new error handler API to report back end errors using Diagnostic.\n\nFor example,\n--\nddunbar@giles:Frontend$ clang -c backend-errors.c\nfatal error: error in backend: Global variable \'a\' has an invalid section specifier\n \'I AM, not, legal\': mach-o section specifier uses an unknown section type.\n--\ncompare to:\n--\nddunbar@giles:Frontend$ gcc -c backend-errors.c\n/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Expected comma after segment-name\n/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Rest of line ignored. 1st junk character valued 77 (M).\n--\n\nYay!\n\nI am not tied to my wording choice, we could also go with \"uncoverable error\"\nfor the prefix, or just leave it off entirely.\n\nllvm-svn: 78554"}, [j]={{"clang/tools/clang-repl/ClangRepl.cpp",44,"static void LLVMErrorHandler(void *UserData, const char *Message, bool GenCrashDiag) {\n // ...\n Diags.Report(clang::diag::err_fe_error_backend) << Message;"},{sb,614,"static void LLVMErrorHandler(void *UserData, const char *Message, bool GenCrashDiag) {\n // ...\n Diags.Report(diag::err_fe_error_backend) << Message;"},{"clang/tools/driver/cc1_main.cpp",65,"static void LLVMErrorHandler(void *UserData, const char *Message, bool GenCrashDiag) {\n // ...\n Diags.Report(diag::err_fe_error_backend) << Message;"}}, [l]={ ["clang/test/CodeGenCUDA/texture.cu"]={"fatal error: error in backend: Broken module found, compilation aborted!"} } }, ["err_fe_error_opening"]={ [d]="err_fe_error_opening", [f]="error opening \'%0\': %1", [b]="error opening \'A\': B", [i]=k, [h]="error opening \'(.*?)\'\\: (.*?)", [g]=a, [e]=o, [c]={"7ad807f248ae",1256850318,"Move some clang-cc errors to use diagnostics, and simplify.","Move some clang-cc errors to use diagnostics, and simplify.\n\nllvm-svn: 85527"}, [j]={{"clang/lib/Frontend/DependencyFile.cpp",330,"void DependencyFileGenerator::outputDependencyFile(DiagnosticsEngine &Diags) {\n // ...\n if (EC) {\n Diags.Report(diag::err_fe_error_opening) << OutputFile << EC.message();"},{"clang/lib/Frontend/DependencyGraph.cpp",100,"void DependencyGraphCallback::OutputGraphFile() {\n // ...\n if (EC) {\n PP->getDiagnostics().Report(diag::err_fe_error_opening) << OutputFile << EC.message();"}}, [l]={ ["clang/test/Driver/m-and-mm.c"]={"error: error opening \'/dev/null.d\': Permission denied"} } }, ["err_fe_error_reading"]={ [d]="err_fe_error_reading", [f]="error reading \'%0\': %1", [b]="error reading \'A\': B", [i]=k, [h]="error reading \'(.*?)\'\\: (.*?)", [g]=a, [e]=o, [c]={Cb,1236852856,Db,Ib}, [j]={{ib,992,"// static\nbool CompilerInstance::InitializeSourceManager(const FrontendInputFile &Input, DiagnosticsEngine &Diags, FileManager &FileMgr, SourceManager &SourceMgr) {\n // ...\n if (!FileOrErr) {\n // ...\n if (InputFile != \"-\")\n Diags.Report(diag::err_fe_error_reading) << InputFile << EC.message();"},{sb,396,"static bool ExecuteAssemblerImpl(AssemblerInvocation &Opts, DiagnosticsEngine &Diags) {\n // ...\n if (std::error_code EC = Buffer.getError()) {\n return Diags.Report(diag::err_fe_error_reading) << Opts.InputFile << EC.message();"}}, [l]={ ["clang/test/Modules/working-dir-flag.m"]={"error: error reading \'clang/test/Modules/working-dir-flag.m\': No such file or directory"} } }, ["err_fe_error_reading_stdin"]={ [d]="err_fe_error_reading_stdin", [f]="error reading stdin: %0", [b]="error reading stdin: A", [i]=k, [h]="error reading stdin\\: (.*?)", [g]=a, [e]=o, [c]={Cb,1236852856,Db,Ib}, [j]={{ib,994,"// static\nbool CompilerInstance::InitializeSourceManager(const FrontendInputFile &Input, DiagnosticsEngine &Diags, FileManager &FileMgr, SourceManager &SourceMgr) {\n // ...\n if (!FileOrErr) {\n // ...\n if (InputFile != \"-\")\n // ...\n else\n Diags.Report(diag::err_fe_error_reading_stdin) << EC.message();"}} }, ["err_fe_expected_clang_command"]={ [d]="err_fe_expected_clang_command", [f]="expected a clang compiler command", [b]="expected a clang compiler command", [i]=k, [h]="expected a clang compiler command", [g]=a, [e]=o, [c]={"55a17b66cd66",1259724225,"Add ASTUnit::LoadFromCommandLine, which creates an ASTUnit out of a list of","Add ASTUnit::LoadFromCommandLine, which creates an ASTUnit out of a list of\n(clang/driver) command line arguments (including the source file).\n - The arguments are expected to include the source file.\n\n - The idea is that even though this is a somewhat odd API, its the form which\n many tools can most easily use (for example, by interposing with the compiler).\n\nAlso, switch index-test\'s -ast-from-source to use this entry point, and provide\na -arg command line argument which can be used to test that the command line\narguments are handled correctly.\n\nllvm-svn: 90288"}, [j]={{"clang/lib/Frontend/CreateInvocationFromCommandLine.cpp",98,"std::unique_ptr<CompilerInvocation> clang::createInvocation(ArrayRef<const char *> ArgList, CreateInvocationOptions Opts) {\n // ...\n if (Cmd == Jobs.end()) {\n Diags->Report(diag::err_fe_expected_clang_command);"}} }, ["err_fe_expected_compiler_job"]={ [d]="err_fe_expected_compiler_job", [f]="unable to handle compilation, expected exactly one compiler job in \'%0\'", [b]="unable to handle compilation, expected exactly one compiler job in \'A\'", [i]=k, [h]="unable to handle compilation, expected exactly one compiler job in \'(.*?)\'", [g]=a, [e]=o, [c]={"55a17b66cd66",1259724225,"Add ASTUnit::LoadFromCommandLine, which creates an ASTUnit out of a list of","Add ASTUnit::LoadFromCommandLine, which creates an ASTUnit out of a list of\n(clang/driver) command line arguments (including the source file).\n - The arguments are expected to include the source file.\n\n - The idea is that even though this is a somewhat odd API, its the form which\n many tools can most easily use (for example, by interposing with the compiler).\n\nAlso, switch index-test\'s -ast-from-source to use this entry point, and provide\na -arg command line argument which can be used to test that the command line\narguments are handled correctly.\n\nllvm-svn: 90288"}, [j]={{"clang/lib/Frontend/CreateInvocationFromCommandLine.cpp",91,"std::unique_ptr<CompilerInvocation> clang::createInvocation(ArrayRef<const char *> ArgList, CreateInvocationOptions Opts) {\n // ...\n if (Jobs.size() == 0 || (Jobs.size() > 1 && !PickFirstOfMany)) {\n // ...\n Diags->Report(diag::err_fe_expected_compiler_job) << OS.str();"},{"clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp",491,"bool DependencyScanningWorker::computeDependencies(StringRef WorkingDirectory, const std::vector<std::string> &CommandLine, DependencyConsumer &Consumer, DependencyActionController &Controller, DiagnosticConsumer &DC, std::optional<StringRef> ModuleName) {\n // ...\n if (Success && !Action.hasScanned())\n Diags->Report(diag::err_fe_expected_compiler_job) << llvm::join(FinalCommandLine, \" \");"},{"clang/lib/Tooling/Tooling.cpp",156,"const llvm::opt::ArgStringList *getCC1Arguments(DiagnosticsEngine *Diagnostics, driver::Compilation *Compilation) {\n // ...\n if (CC1Jobs.empty() || (CC1Jobs.size() > 1 && !ignoreExtraCC1Commands(Compilation))) {\n // ...\n Diagnostics->Report(diag::err_fe_expected_compiler_job) << error_stream.str();"}} }, ["err_fe_invalid_alignment"]={ [d]="err_fe_invalid_alignment", [f]="invalid value \'%1\' in \'%0\'; alignment must be a power of 2", [b]="invalid value \'B\' in \'A\'; alignment must be a power of 2", [i]=k, [h]="invalid value \'(.*?)\' in \'(.*?)\'; alignment must be a power of 2", [g]=a, [e]=o, [c]={"591390284f70",1475275296,"P0035R4: add predefined __STDCPP_DEFAULT_NEW_ALIGNMENT__ macro. By default, we","P0035R4: add predefined __STDCPP_DEFAULT_NEW_ALIGNMENT__ macro. By default, we\nassume that ::operator new provides no more alignment than is necessary for any\nprimitive type, except when we\'re on a GNU OS, where glibc\'s malloc guarantees\nto provide 64-bit alignment on 32-bit systems and 128-bit alignment on 64-bit\nsystems. This can be controlled by the command-line -fnew-alignment flag.\n\nllvm-svn: 282974"}, [j]={{Z,503,"static bool FixupInvocation(CompilerInvocation &Invocation, DiagnosticsEngine &Diags, const ArgList &Args, InputKind IK) {\n // ...\n if (LangOpts.NewAlignOverride && !llvm::isPowerOf2_32(LangOpts.NewAlignOverride)) {\n // ...\n Diags.Report(diag::err_fe_invalid_alignment) << A->getAsString(Args) << A->getValue();"}} }, ["err_fe_invalid_code_complete_file"]={ [d]="err_fe_invalid_code_complete_file", [f]="cannot locate code-completion file %0", [b]="cannot locate code-completion file A", [i]=ab, [h]="cannot locate code\\-completion file (.*?)", [g]=a, [e]=o, [c]={"ea9b03e6e234",1253653898,"Replace the -code-completion-dump option with ","Replace the -code-completion-dump option with \n\n -code-completion-at=filename:line:column\n\nwhich performs code completion at the specified location by truncating\nthe file at that position and enabling code completion. This approach\nmakes it possible to run multiple tests from a single test file, and\ngives a more natural command-line interface.\n\nllvm-svn: 82571"}, [j]={{ib,709,"static bool EnableCodeCompletion(Preprocessor &PP, StringRef Filename, unsigned Line, unsigned Column) {\n // ...\n if (!Entry) {\n PP.getDiagnostics().Report(diag::err_fe_invalid_code_complete_file) << Filename;"}} }, ["err_fe_invalid_exception_model"]={ [d]={{nil,K,"err_fe_invalid_exception_model"}}, [f]={{nil,L,"invalid exception model \'%select{none|sjlj|seh|dwarf|wasm}0\' for target \'%1\'"},{D,D,"invalid exception model \'%select{none|dwarf|sjlj|arm|seh|wasm|aix}0\' for target \'%1\'"},{jb,K,"invalid exception model \'%0\' for target \'%1\'"}}, [b]={{nil,L,{"invalid exception model \'",{"none","sjlj","seh","dwarf","wasm"},"\' for target \'B\'"}},{D,D,{"invalid exception model \'",{"none","dwarf","sjlj","arm","seh","wasm","aix"},"\' for target \'B\'"}},{jb,K,"invalid exception model \'A\' for target \'B\'"}}, [i]=k, [h]="invalid exception model \'(?:none|sjlj|seh|dwarf|wasm)\' for target \'(.*?)\'", [g]=a, [e]={{nil,K,o}}, [c]={"d8d154738742",1528412094,"[Frontend] Disallow non-MSVC exception models for windows-msvc targets","[Frontend] Disallow non-MSVC exception models for windows-msvc targets\n\nThe windows-msvc target is used for MSVC ABI compatibility, including\nthe exceptions model. It doesn\'t make sense to pair a windows-msvc\ntarget with a non-MSVC exception model. This would previously cause an\nassertion failure; explicitly error out for it in the frontend instead.\nThis also allows us to reduce the matrix of target/exception models a\nbit (see the modified tests), and we can possibly simplify some of the\npersonality code in a follow-up.\n\nDifferential Revision: https://reviews.llvm.org/D47853\n\nllvm-svn: 334243"}, [j]={{Z,494,"static bool FixupInvocation(CompilerInvocation &Invocation, DiagnosticsEngine &Diags, const ArgList &Args, InputKind IK) {\n // ...\n if (LangOpts.getExceptionHandling() != LangOptions::ExceptionHandlingKind::None && T.isWindowsMSVCEnvironment())\n Diags.Report(diag::err_fe_invalid_exception_model) << static_cast<unsigned>(LangOpts.getExceptionHandling()) << T.str();"}} }, ["err_fe_invalid_plugin_name"]={ [d]="err_fe_invalid_plugin_name", [f]="unable to find plugin \'%0\'", [b]="unable to find plugin \'A\'", [i]=k, [h]="unable to find plugin \'(.*?)\'", [g]=a, [e]=o, [c]={"d392dd070941",1258243924,"Add pluggable action support to clang-cc, via -plugin command line option.","Add pluggable action support to clang-cc, via -plugin command line option.\n - Expects the plugin has been loaded with -load.\n\n - Using this may require disabling TOOL_NO_EXPORTS in the clang-cc Makefile, this breaks the llvm::Registry way of working (static constructors are bad, kids). This should be replaced with a \"real\" plugin model that has explicit plugin interfaces.\n\nllvm-svn: 88824"}, [j]={{"clang/lib/Frontend/FrontendAction.cpp",176,"std::unique_ptr<ASTConsumer> FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI, StringRef InFile) {\n // ...\n for (const std::string &Arg : CI.getFrontendOpts().AddPluginActions) {\n // ...\n if (!Found) {\n CI.getDiagnostics().Report(diag::err_fe_invalid_plugin_name) << Arg;"},{"clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp",95,"static std::unique_ptr<FrontendAction> CreateFrontendBaseAction(CompilerInstance &CI) {\n // ...\n case PluginAction: {\n // ...\n CI.getDiagnostics().Report(diag::err_fe_invalid_plugin_name) << CI.getFrontendOpts().ActionName;"}} }, ["err_fe_invalid_source_date_epoch"]={ [d]={{nil,t,"err_fe_invalid_source_date_epoch"}}, [f]={{nil,t,"environment variable \'SOURCE_DATE_EPOCH\' (\'%0\') must be a non-negative decimal integer <= %1"}}, [b]={{nil,t,"environment variable \'SOURCE_DATE_EPOCH\' (\'A\') must be a non-negative decimal integer <= B"}}, [i]=k, [h]="environment variable \'SOURCE_DATE_EPOCH\' \\(\'(.*?)\'\\) must be a non\\-negative decimal integer \\<\\= (.*?)", [g]=a, [e]={{nil,t,o}}, [c]={"2c090162746a",1665600926,"[Frontend] Recognize environment variable SOURCE_DATE_EPOCH","[Frontend] Recognize environment variable SOURCE_DATE_EPOCH\n\nSee https://reproducible-builds.org/docs/source-date-epoch/ . The environment\nvariable ``SOURCE_DATE_EPOCH`` been recognized by many compilers.\n\nIn GCC, if `SOURCE_DATE_EPOCH` is set, it specifies a UNIX timestamp to be used\nin replacement of the current date and time in the `__DATE__` and `__TIME__`\nmacros. Note: GCC as of today does not update `__TIMESTAMP__` (the modification\ntime of the current source file) but\nhttps://wiki.debian.org/ReproducibleBuilds/TimestampsFromCPPMacros expresses the\nintention to update it.\n\nThis patches parses SOURCE_DATE_EPOCH and changes all the three macros.\n\nIn addition, in case gmtime/localtime returns null (e.g. on 64-bit Windows\ngmtime returns null when the timestamp is larger than 32536850399\n(3001-01-19T21:59:59Z)), use `??? ?? ????` as used by GCC.\n\nReviewed By: ychen\n\nDifferential Revision: https://reviews.llvm.org/D135045"}, [j]={{Z,4275,"#include \"clang/Driver/Options.inc\"\n // ...\n if (const Arg *A = Args.getLastArg(OPT_source_date_epoch)) {\n // ...\n if (Epoch.getAsInteger(10, V) || V > MaxTimestamp) {\n Diags.Report(diag::err_fe_invalid_source_date_epoch) << Epoch << MaxTimestamp;"}} }, ["err_fe_linking_module"]={ [d]={{nil,y,"err_fe_linking_module"}}, [f]={{nil,y,"cannot link module \'%0\': %1"}}, [b]={{nil,y,"cannot link module \'A\': B"}}, [i]=ab, [h]="cannot link module \'(.*?)\'\\: (.*?)", [g]=a, [e]={{nil,y,o}}, [c]={"1c829ce1e362",1629504872,"[clang][codegen] Set CurLinkModule in CodeGenAction::ExecuteAction","[clang][codegen] Set CurLinkModule in CodeGenAction::ExecuteAction\n\nCodeGenAction::ExecuteAction creates a BackendConsumer for the\npurpose of handling diagnostics. The BackendConsumer\'s\nDiagnosticHandlerImpl method expects CurLinkModule to be set,\nbut this did not happen on the code path that goes through\nExecuteAction. This change makes it so that the BackendConsumer\nconstructor used by ExecuteAction requires the Module to be\nspecified and passes the appropriate module in ExecuteAction.\n\nThe change also adds a test that fails without this change\nand passes with it. To make the test work, the FIXME in the\nhandling of DK_Linker diagnostics was addressed so that warnings\nand notes are no longer silently discarded. Since this introduces\na new warning diagnostic, a flag to control it (-Wlinker-warnings)\nhas also been added.\n\nReviewed By: xur\n\nDifferential Revision: https://reviews.llvm.org/D108603"} }, ["err_fe_no_pch_in_dir"]={ [d]="err_fe_no_pch_in_dir", [f]="no suitable precompiled header file found in directory \'%0\'", [b]="no suitable precompiled header file found in directory \'A\'", [i]=k, [h]="no suitable precompiled header file found in directory \'(.*?)\'", [g]=a, [e]=o, [c]={"fc9e7a296965",1350973104,"If the precompiled header named by \"-include\" is actually a directory,","If the precompiled header named by \"-include\" is actually a directory,\ncheck each of the files within that directory to determine if any of\nthem is an AST file that matches the language and target options. If\nso, the first matching AST file is loaded. This fixes a longstanding\ndiscrepency with GCC\'s precompiled header implementation.\n\nllvm-svn: 166469"}, [j]={{"clang/lib/Frontend/FrontendAction.cpp",799,"bool FrontendAction::BeginSourceFile(CompilerInstance &CI, const FrontendInputFile &RealInput) {\n // ...\n // If the implicit PCH include is actually a directory, rather than\n // a single file, search for a suitable PCH file in that directory.\n if (!CI.getPreprocessorOpts().ImplicitPCHInclude.empty()) {\n // ...\n if (auto PCHDir = FileMgr.getOptionalDirectoryRef(PCHInclude)) {\n // ...\n if (!Found) {\n CI.getDiagnostics().Report(diag::err_fe_no_pch_in_dir) << PCHInclude;"}} }, ["err_fe_not_a_pch_file"]={ [d]="err_fe_not_a_pch_file", [f]="input is not a PCH file: \'%0\'", [b]="input is not a PCH file: \'A\'", [i]=k, [h]="input is not a PCH file\\: \'(.*?)\'", [g]=a, [e]=zb, [c]={"3b95148ce1c7",1259831586,"Switch PCHReader::getOriginalSourceFile to use proper diagnostics.","Switch PCHReader::getOriginalSourceFile to use proper diagnostics.\n\nllvm-svn: 90434"}, [j]={{kb,5169,"/// Retrieve the name of the original source file name\n/// directly from the AST file, without actually loading the AST\n/// file.\nstd::string ASTReader::getOriginalSourceFile(const std::string &ASTFileName, FileManager &FileMgr, const PCHContainerReader &PCHContainerRdr, DiagnosticsEngine &Diags) {\n // ...\n // Sniff for the signature.\n if (llvm::Error Err = doesntStartWithASTFileMagic(Stream)) {\n Diags.Report(diag::err_fe_not_a_pch_file) << ASTFileName << std::move(Err);"}} }, ["err_fe_pch_file_overridden"]={ [d]="err_fe_pch_file_overridden", [f]="file \'%0\' from the precompiled header has been overridden", [b]="file \'A\' from the precompiled header has been overridden", [i]=k, [h]="file \'(.*?)\' from the precompiled header has been overridden", [g]=a, [e]=zb, [c]={"6eec06d0d4fa",1336081839,"[PCH] When validating that the files coming from PCH did not change, also","[PCH] When validating that the files coming from PCH did not change, also\nvalidate that we didn\'t override the contents of any of such files.\n\nIf this is detected, emit a diagnostic error and recover gracefully\nby using the contents of the original file that the PCH was built from.\n\nPart of rdar://11305263\n\nllvm-svn: 156107"}, [j]={{kb,2435,"InputFile ASTReader::getInputFile(ModuleFile &F, unsigned ID, bool Complain) {\n // ...\n // FIXME: Reject if the overrides are different.\n if ((!Overridden && !Transient) && !SkipChecks && SM.isFileOverridden(File)) {\n if (Complain)\n Error(diag::err_fe_pch_file_overridden, Filename);"}} }, ["err_fe_pch_malformed"]={ [d]="err_fe_pch_malformed", [f]="malformed or corrupted AST file: \'%0\'", [b]="malformed or corrupted AST file: \'A\'", [i]=ab, [h]="malformed or corrupted AST file\\: \'(.*?)\'", [g]=a, [e]=zb, [c]={"1ff615ce4cc5",1268873814,"Turn several PCH reader assertions into compiler errors, thus making","Turn several PCH reader assertions into compiler errors, thus making\nthe PCHReader more robust to corrupt or invalid PCH files.\n\nllvm-svn: 98788"}, [j]={{kb,1290,"void ASTReader::Error(StringRef Msg) const {\n Error(diag::err_fe_pch_malformed, Msg);"}} }, ["err_fe_pch_malformed_block"]={ [d]="err_fe_pch_malformed_block", [f]="malformed block record in PCH file: \'%0\'", [b]="malformed block record in PCH file: \'A\'", [i]=ab, [h]="malformed block record in PCH file\\: \'(.*?)\'", [g]=a, [e]=zb, [c]={"3b95148ce1c7",1259831586,"Switch PCHReader::getOriginalSourceFile to use proper diagnostics.","Switch PCHReader::getOriginalSourceFile to use proper diagnostics.\n\nllvm-svn: 90434"}, [j]={{kb,5175,"/// Retrieve the name of the original source file name\n/// directly from the AST file, without actually loading the AST\n/// file.\nstd::string ASTReader::getOriginalSourceFile(const std::string &ASTFileName, FileManager &FileMgr, const PCHContainerReader &PCHContainerRdr, DiagnosticsEngine &Diags) {\n // ...\n // Scan for the CONTROL_BLOCK_ID block.\n if (SkipCursorToBlock(Stream, CONTROL_BLOCK_ID)) {\n Diags.Report(diag::err_fe_pch_malformed_block) << ASTFileName;"},{kb,5195,"/// Retrieve the name of the original source file name\n/// directly from the AST file, without actually loading the AST\n/// file.\nstd::string ASTReader::getOriginalSourceFile(const std::string &ASTFileName, FileManager &FileMgr, const PCHContainerReader &PCHContainerRdr, DiagnosticsEngine &Diags) {\n // ...\n while (true) {\n // ...\n if (Entry.Kind != llvm::BitstreamEntry::Record) {\n Diags.Report(diag::err_fe_pch_malformed_block) << ASTFileName;"}} }, ["err_fe_remap_missing_from_file"]={ [d]="err_fe_remap_missing_from_file", [f]="could not remap from missing file \'%0\'", [b]="could not remap from missing file \'A\'", [i]=ab, [h]="could not remap from missing file \'(.*?)\'", [g]=a, [e]=o, [c]={"d062bff7ee5b",1259741319,"Introduce a new clang-cc option ","Introduce a new clang-cc option \n\n -remap-file=from;to\n\nwhich takes the file \"from\" and transparently replaces its contents\nwith the contents of the file \"to\" from the source manager\'s\nperspective. This is the moral equivalent of\n\n cp from saved\n cp to from\n <call clang>\n cp saved from\n rm saved\n\nwithout all of the pesky file copying.\n\nllvm-svn: 90307"}, [j]={{ib,409,"// Initialize the remapping of files to alternative contents, e.g.,\n// those specified through other files.\nstatic void InitializeFileRemapping(DiagnosticsEngine &Diags, SourceManager &SourceMgr, FileManager &FileMgr, const PreprocessorOptions &InitOpts) {\n // Remap files in the source manager (with buffers).\n for (const auto &RB : InitOpts.RemappedFileBuffers) {\n // ...\n if (!FromFile) {\n Diags.Report(diag::err_fe_remap_missing_from_file) << RB.first;"},{ib,440,"// Initialize the remapping of files to alternative contents, e.g.,\n// those specified through other files.\nstatic void InitializeFileRemapping(DiagnosticsEngine &Diags, SourceManager &SourceMgr, FileManager &FileMgr, const PreprocessorOptions &InitOpts) {\n // ...\n // Remap files in the source manager (with other files).\n for (const auto &RF : InitOpts.RemappedFiles) {\n // ...\n if (!FromFile) {\n Diags.Report(diag::err_fe_remap_missing_from_file) << RF.first;"}} }, ["err_fe_remap_missing_to_file"]={ [d]="err_fe_remap_missing_to_file", [f]="could not remap file \'%0\' to the contents of file \'%1\'", [b]="could not remap file \'A\' to the contents of file \'B\'", [i]=ab, [h]="could not remap file \'(.*?)\' to the contents of file \'(.*?)\'", [g]=a, [e]=o, [c]={"d062bff7ee5b",1259741319,"Introduce a new clang-cc option ","Introduce a new clang-cc option \n\n -remap-file=from;to\n\nwhich takes the file \"from\" and transparently replaces its contents\nwith the contents of the file \"to\" from the source manager\'s\nperspective. This is the moral equivalent of\n\n cp from saved\n cp to from\n <call clang>\n cp saved from\n rm saved\n\nwithout all of the pesky file copying.\n\nllvm-svn: 90307"}, [j]={{ib,432,"// Initialize the remapping of files to alternative contents, e.g.,\n// those specified through other files.\nstatic void InitializeFileRemapping(DiagnosticsEngine &Diags, SourceManager &SourceMgr, FileManager &FileMgr, const PreprocessorOptions &InitOpts) {\n // ...\n // Remap files in the source manager (with other files).\n for (const auto &RF : InitOpts.RemappedFiles) {\n // ...\n if (!ToFile) {\n Diags.Report(diag::err_fe_remap_missing_to_file) << RF.first << RF.second;"}} }, ["err_fe_unable_to_create_target"]={ [d]="err_fe_unable_to_create_target", [f]="unable to create target: \'%0\'", [b]="unable to create target: \'A\'", [i]=k, [h]="unable to create target\\: \'(.*?)\'", [g]=a, [e]=o, [c]={"acadc55d4e7f",1259831574,"Fix BackendConsumer to use proper diagnostics.","Fix BackendConsumer to use proper diagnostics.\n\nllvm-svn: 90433"}, [j]={{Ob,555,"void EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {\n // ...\n if (!TheTarget) {\n if (MustCreateTM)\n Diags.Report(diag::err_fe_unable_to_create_target) << Error;"}} }, ["err_fe_unable_to_interface_with_target"]={ [d]="err_fe_unable_to_interface_with_target", [f]="unable to interface with target machine", [b]="unable to interface with target machine", [i]=k, [h]="unable to interface with target machine", [g]=a, [e]=o, [c]={"acadc55d4e7f",1259831574,"Fix BackendConsumer to use proper diagnostics.","Fix BackendConsumer to use proper diagnostics.\n\nllvm-svn: 90433"}, [j]={{Ob,597,"bool EmitAssemblyHelper::AddEmitPasses(legacy::PassManager &CodeGenPasses, BackendAction Action, raw_pwrite_stream &OS, raw_pwrite_stream *DwoOS) {\n // ...\n if (TM->addPassesToEmitFile(CodeGenPasses, OS, DwoOS, CGFT,\n // ...\n Diags.Report(diag::err_fe_unable_to_interface_with_target);"}} }, ["err_fe_unable_to_load_basic_block_sections_file"]={ [d]={{nil,C,"err_fe_unable_to_load_basic_block_sections_file"}}, [f]={{nil,C,"unable to load basic block sections function list: \'%0\'"}}, [b]={{nil,C,"unable to load basic block sections function list: \'A\'"}}, [i]=k, [h]="unable to load basic block sections function list\\: \'(.*?)\'", [g]=a, [e]={{nil,C,o}}, [c]={"e0bca46b0854",1591078649,"Options for Basic Block Sections, enabled in D68063 and D73674.","Options for Basic Block Sections, enabled in D68063 and D73674.\n\nThis patch adds clang options:\n-fbasic-block-sections={all,<filename>,labels,none} and\n-funique-basic-block-section-names.\nLLVM Support for basic block sections is already enabled.\n\n+ -fbasic-block-sections={all, <file>, labels, none} : Enables/Disables basic\nblock sections for all or a subset of basic blocks. \"labels\" only enables\nbasic block symbols.\n+ -funique-basic-block-section-names: Enables unique section names for\nbasic block sections, disabled by default.\n\nDifferential Revision: https://reviews.llvm.org/D68049"}, [j]={{Ob,414,"static bool initTargetOptions(DiagnosticsEngine &Diags, llvm::TargetOptions &Options, const CodeGenOptions &CodeGenOpts, const clang::TargetOptions &TargetOpts, const LangOptions &LangOpts, const HeaderSearchOptions &HSOpts) {\n // ...\n if (Options.BBSections == llvm::BasicBlockSection::List) {\n // ...\n if (!MBOrErr) {\n Diags.Report(diag::err_fe_unable_to_load_basic_block_sections_file) << MBOrErr.getError().message();"}} }, ["err_fe_unable_to_load_pch"]={ [d]="err_fe_unable_to_load_pch", [f]="unable to load PCH file", [b]="unable to load PCH file", [i]=k, [h]="unable to load PCH file", [g]=a, [e]=o, [c]={"59203007acb7",1259804744,"Fix ASTUnit to allows require a (persistent) Diagnostic object be provided; propogate and simplify.","Fix ASTUnit to allows require a (persistent) Diagnostic object be provided; propogate and simplify.\n\nllvm-svn: 90379"}, [j]={{"clang/lib/Frontend/ASTUnit.cpp",873,"std::unique_ptr<ASTUnit> ASTUnit::LoadFromASTFile(const std::string &Filename, const PCHContainerReader &PCHContainerRdr, WhatToLoad ToLoad, IntrusiveRefCntPtr<DiagnosticsEngine> Diags, const FileSystemOptions &FileSystemOpts, std::shared_ptr<HeaderSearchOptions> HSOpts, bool UseDebugInfo, bool OnlyLocalDecls, CaptureDiagsKind CaptureDiagnostics, bool AllowASTWithCompilerErrors, bool UserFilesAreVolatile, IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS) {\n // ...\n case ASTReader::Failure:\n case ASTReader::Missing:\n case ASTReader::OutOfDate:\n case ASTReader::VersionMismatch:\n case ASTReader::ConfigurationMismatch:\n case ASTReader::HadErrors:\n AST->getDiagnostics().Report(diag::err_fe_unable_to_load_pch);"}} }, ["err_fe_unable_to_load_plugin"]={ [d]="err_fe_unable_to_load_plugin", [f]="unable to load plugin \'%0\': \'%1\'", [b]="unable to load plugin \'A\': \'B\'", [i]=k, [h]="unable to load plugin \'(.*?)\'\\: \'(.*?)\'", [g]=a, [e]=o, [c]={"da7a52289fbd",1259817065,"Add clang -cc1 -load option.","Add clang -cc1 -load option.\n\nllvm-svn: 90413"}, [j]={{Ob,901,"void EmitAssemblyHelper::RunOptimizationPipeline(BackendAction Action, std::unique_ptr<raw_pwrite_stream> &OS, std::unique_ptr<llvm::ToolOutputFile> &ThinLinkOS) {\n // ...\n // Attempt to load pass plugins and register their callbacks with PB.\n for (auto &PluginFN : CodeGenOpts.PassPlugins) {\n // ...\n if (PassPlugin) {\n // ...\n } else {\n Diags.Report(diag::err_fe_unable_to_load_plugin) << PluginFN << toString(PassPlugin.takeError());"},{ib,1117,"void CompilerInstance::LoadRequestedPlugins() {\n // Load any requested plugins.\n for (const std::string &Path : getFrontendOpts().Plugins) {\n // ...\n if (llvm::sys::DynamicLibrary::LoadLibraryPermanently(Path.c_str(), &Error))\n getDiagnostics().Report(diag::err_fe_unable_to_load_plugin) << Path << Error;"},{"clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp",79,"#include \"clang/StaticAnalyzer/Checkers/Checkers.inc\"\n // ...\n // Register checkers from plugins.\n for (const std::string &Plugin : Plugins) {\n // ...\n if (!Lib.isValid()) {\n Diags.Report(diag::err_fe_unable_to_load_plugin) << Plugin << ErrorMsg;"}} }, ["err_fe_unable_to_open_output"]={ [d]="err_fe_unable_to_open_output", [f]="unable to open output file \'%0\': \'%1\'", [b]="unable to open output file \'A\': \'B\'", [i]=k, [h]="unable to open output file \'(.*?)\'\\: \'(.*?)\'", [g]=a, [e]=o, [c]={"7554699afabf",1259831610,"Fix CompilerInstance::createOutputFile to use proper diagnostics, and (try to) update all clients to...","Fix CompilerInstance::createOutputFile to use proper diagnostics, and (try to) update all clients to be able to handle failure.\n\nllvm-svn: 90437"}, [j]={{Ob,151,"class EmitAssemblyHelper {\n // ...\n std::unique_ptr<llvm::ToolOutputFile> openOutputFile(StringRef Path) {\n // ...\n if (EC) {\n Diags.Report(diag::err_fe_unable_to_open_output) << Path << EC.message();"},{ib,839,"std::unique_ptr<raw_pwrite_stream> CompilerInstance::createOutputFile(StringRef OutputPath, bool Binary, bool RemoveFileOnSignal, bool UseTemporary, bool CreateMissingDirectories) {\n // ...\n getDiagnostics().Report(diag::err_fe_unable_to_open_output) << OutputPath << errorToErrorCode(OS.takeError()).message();"},{ib,2165,"void CompilerInstance::createModuleFromSource(SourceLocation ImportLoc, StringRef ModuleName, StringRef Source) {\n // ...\n if (std::error_code EC = llvm::sys::fs::createTemporaryFile(CleanModuleName, \"pcm\", ModuleFileName)) {\n getDiagnostics().Report(ImportLoc, diag::err_fe_unable_to_open_output) << ModuleFileName << EC.message();"},{"clang/lib/Frontend/Rewrite/FixItRewriter.cpp",109,"bool FixItRewriter::WriteFixedFiles(std::vector<std::pair<std::string, std::string>> *RewrittenFiles) {\n // ...\n for (iterator I = buffer_begin(), E = buffer_end(); I != E; ++I) {\n // ...\n if (EC) {\n Diags.Report(clang::diag::err_fe_unable_to_open_output) << Filename << EC.message();"},{sb,377,"static std::unique_ptr<raw_fd_ostream> getOutputStream(StringRef Path, DiagnosticsEngine &Diags, bool Binary) {\n // ...\n if (EC) {\n Diags.Report(diag::err_fe_unable_to_open_output) << Path << EC.message();"}}, [l]={ ["clang/test/Driver/ftime-trace.cpp"]={"error: unable to open output file \'/dev/null.json\': \'Permission denied\'"} } }, ["err_fe_unable_to_read_pch_file"]={ [d]="err_fe_unable_to_read_pch_file", [f]="unable to read PCH file %0: \'%1\'", [b]="unable to read PCH file A: \'B\'", [i]=k, [h]="unable to read PCH file (.*?)\\: \'(.*?)\'", [g]=a, [e]=zb, [c]={"3b95148ce1c7",1259831586,"Switch PCHReader::getOriginalSourceFile to use proper diagnostics.","Switch PCHReader::getOriginalSourceFile to use proper diagnostics.\n\nllvm-svn: 90434"}, [j]={{kb,5159,"/// Retrieve the name of the original source file name\n/// directly from the AST file, without actually loading the AST\n/// file.\nstd::string ASTReader::getOriginalSourceFile(const std::string &ASTFileName, FileManager &FileMgr, const PCHContainerReader &PCHContainerRdr, DiagnosticsEngine &Diags) {\n // ...\n if (!Buffer) {\n Diags.Report(diag::err_fe_unable_to_read_pch_file) << ASTFileName << Buffer.getError().message();"}} }, ["err_feature_check_malformed"]={ [d]="err_feature_check_malformed", [f]="builtin feature check macro requires a parenthesized identifier", [b]="builtin feature check macro requires a parenthesized identifier", [i]=k, [h]="builtin feature check macro requires a parenthesized identifier", [g]=a, [e]=mb, [c]={"b6f77af5327f",1244877208,"implement and document a new __has_feature and __has_builtin magic ","implement and document a new __has_feature and __has_builtin magic \nbuiltin preprocessor macro. This appears to work with two caveats:\n1) builtins are registered in -E mode, and 2) target-specific builtins\nare unconditionally registered even if they aren\'t supported by the\ntarget (e.g. SSE4 builtin when only SSE1 is enabled).\n\nllvm-svn: 73289"}, [j]={{S,1652,"/// ExpandBuiltinMacro - If an identifier token is read that is to be expanded\n/// as a builtin macro, handle it and return the next token as \'Tok\'.\nvoid Preprocessor::ExpandBuiltinMacro(Token &Tok) {\n // ...\n if (II == Ident__LINE__) {\n // ...\n } else if (II == Ident__FILE__ || II == Ident__BASE_FILE__ || II == Ident__FILE_NAME__) {\n // ...\n } else if (II == Ident__DATE__) {\n // ...\n } else if (II == Ident__TIME__) {\n // ...\n } else if (II == Ident__INCLUDE_LEVEL__) {\n // ...\n } else if (II == Ident__TIMESTAMP__) {\n // ...\n } else if (II == Ident__FLT_EVAL_METHOD__) {\n // ...\n } else if (II == Ident__COUNTER__) {\n // ...\n } else if (II == Ident__has_feature) {\n EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, false, [this](Token &Tok, bool &HasLexedNextToken) -> int {\n IdentifierInfo *II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_feature_check_malformed);"},{S,1659,"/// ExpandBuiltinMacro - If an identifier token is read that is to be expanded\n/// as a builtin macro, handle it and return the next token as \'Tok\'.\nvoid Preprocessor::ExpandBuiltinMacro(Token &Tok) {\n // ...\n if (II == Ident__LINE__) {\n // ...\n } else if (II == Ident__FILE__ || II == Ident__BASE_FILE__ || II == Ident__FILE_NAME__) {\n // ...\n } else if (II == Ident__DATE__) {\n // ...\n } else if (II == Ident__TIME__) {\n // ...\n } else if (II == Ident__INCLUDE_LEVEL__) {\n // ...\n } else if (II == Ident__TIMESTAMP__) {\n // ...\n } else if (II == Ident__FLT_EVAL_METHOD__) {\n // ...\n } else if (II == Ident__COUNTER__) {\n // ...\n } else if (II == Ident__has_feature) {\n // ...\n } else if (II == Ident__has_extension) {\n EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, false, [this](Token &Tok, bool &HasLexedNextToken) -> int {\n IdentifierInfo *II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_feature_check_malformed);"},{S,1666,"/// ExpandBuiltinMacro - If an identifier token is read that is to be expanded\n/// as a builtin macro, handle it and return the next token as \'Tok\'.\nvoid Preprocessor::ExpandBuiltinMacro(Token &Tok) {\n // ...\n if (II == Ident__LINE__) {\n // ...\n } else if (II == Ident__FILE__ || II == Ident__BASE_FILE__ || II == Ident__FILE_NAME__) {\n // ...\n } else if (II == Ident__DATE__) {\n // ...\n } else if (II == Ident__TIME__) {\n // ...\n } else if (II == Ident__INCLUDE_LEVEL__) {\n // ...\n } else if (II == Ident__TIMESTAMP__) {\n // ...\n } else if (II == Ident__FLT_EVAL_METHOD__) {\n // ...\n } else if (II == Ident__COUNTER__) {\n // ...\n } else if (II == Ident__has_feature) {\n // ...\n } else if (II == Ident__has_extension) {\n // ...\n } else if (II == Ident__has_builtin) {\n EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, false, [this](Token &Tok, bool &HasLexedNextToken) -> int {\n IdentifierInfo *II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_feature_check_malformed);"},{S,1724,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, false, [this](Token &Tok, bool &HasLexedNextToken) -> int {\n IdentifierInfo *II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_feature_check_malformed);"},{S,1740,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n // ...\n } else if (II == Ident__is_identifier) {\n // ...\n } else if (II == Ident__has_attribute) {\n EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, true, [this](Token &Tok, bool &HasLexedNextToken) -> int {\n IdentifierInfo *II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_feature_check_malformed);"},{S,1749,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n // ...\n } else if (II == Ident__is_identifier) {\n // ...\n } else if (II == Ident__has_attribute) {\n // ...\n } else if (II == Ident__has_declspec) {\n EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, true, [this](Token &Tok, bool &HasLexedNextToken) -> int {\n IdentifierInfo *II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_feature_check_malformed);"},{S,1766,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n // ...\n } else if (II == Ident__is_identifier) {\n // ...\n } else if (II == Ident__has_attribute) {\n // ...\n } else if (II == Ident__has_declspec) {\n // ...\n } else if (II == Ident__has_cpp_attribute || II == Ident__has_c_attribute) {\n // ...\n EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, true, [&](Token &Tok, bool &HasLexedNextToken) -> int {\n // ...\n IdentifierInfo *II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_feature_check_malformed);"},{S,1780,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n // ...\n } else if (II == Ident__is_identifier) {\n // ...\n } else if (II == Ident__has_attribute) {\n // ...\n } else if (II == Ident__has_declspec) {\n // ...\n } else if (II == Ident__has_cpp_attribute || II == Ident__has_c_attribute) {\n // ...\n EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, true, [&](Token &Tok, bool &HasLexedNextToken) -> int {\n // ...\n if (Tok.isNot(tok::coloncolon))\n // ...\n else {\n // ...\n II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_feature_check_malformed);"},{S,1902,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n // ...\n } else if (II == Ident__is_identifier) {\n // ...\n } else if (II == Ident__has_attribute) {\n // ...\n } else if (II == Ident__has_declspec) {\n // ...\n } else if (II == Ident__has_cpp_attribute || II == Ident__has_c_attribute) {\n // ...\n } else if (II == Ident__has_include || II == Ident__has_include_next) {\n // ...\n } else if (II == Ident__has_warning) {\n // ...\n } else if (II == Ident__building_module) {\n // ...\n } else if (II == Ident__MODULE__) {\n // ...\n } else if (II == Ident__identifier) {\n // ...\n } else if (II == Ident__is_target_arch) {\n EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, false, [this](Token &Tok, bool &HasLexedNextToken) -> int {\n IdentifierInfo *II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_feature_check_malformed);"},{S,1910,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n // ...\n } else if (II == Ident__is_identifier) {\n // ...\n } else if (II == Ident__has_attribute) {\n // ...\n } else if (II == Ident__has_declspec) {\n // ...\n } else if (II == Ident__has_cpp_attribute || II == Ident__has_c_attribute) {\n // ...\n } else if (II == Ident__has_include || II == Ident__has_include_next) {\n // ...\n } else if (II == Ident__has_warning) {\n // ...\n } else if (II == Ident__building_module) {\n // ...\n } else if (II == Ident__MODULE__) {\n // ...\n } else if (II == Ident__identifier) {\n // ...\n } else if (II == Ident__is_target_arch) {\n // ...\n } else if (II == Ident__is_target_vendor) {\n EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, false, [this](Token &Tok, bool &HasLexedNextToken) -> int {\n IdentifierInfo *II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_feature_check_malformed);"},{S,1918,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n // ...\n } else if (II == Ident__is_identifier) {\n // ...\n } else if (II == Ident__has_attribute) {\n // ...\n } else if (II == Ident__has_declspec) {\n // ...\n } else if (II == Ident__has_cpp_attribute || II == Ident__has_c_attribute) {\n // ...\n } else if (II == Ident__has_include || II == Ident__has_include_next) {\n // ...\n } else if (II == Ident__has_warning) {\n // ...\n } else if (II == Ident__building_module) {\n // ...\n } else if (II == Ident__MODULE__) {\n // ...\n } else if (II == Ident__identifier) {\n // ...\n } else if (II == Ident__is_target_arch) {\n // ...\n } else if (II == Ident__is_target_vendor) {\n // ...\n } else if (II == Ident__is_target_os) {\n EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, false, [this](Token &Tok, bool &HasLexedNextToken) -> int {\n IdentifierInfo *II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_feature_check_malformed);"},{S,1926,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n // ...\n } else if (II == Ident__is_identifier) {\n // ...\n } else if (II == Ident__has_attribute) {\n // ...\n } else if (II == Ident__has_declspec) {\n // ...\n } else if (II == Ident__has_cpp_attribute || II == Ident__has_c_attribute) {\n // ...\n } else if (II == Ident__has_include || II == Ident__has_include_next) {\n // ...\n } else if (II == Ident__has_warning) {\n // ...\n } else if (II == Ident__building_module) {\n // ...\n } else if (II == Ident__MODULE__) {\n // ...\n } else if (II == Ident__identifier) {\n // ...\n } else if (II == Ident__is_target_arch) {\n // ...\n } else if (II == Ident__is_target_vendor) {\n // ...\n } else if (II == Ident__is_target_os) {\n // ...\n } else if (II == Ident__is_target_environment) {\n EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, false, [this](Token &Tok, bool &HasLexedNextToken) -> int {\n IdentifierInfo *II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_feature_check_malformed);"},{S,1934,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n // ...\n } else if (II == Ident__is_identifier) {\n // ...\n } else if (II == Ident__has_attribute) {\n // ...\n } else if (II == Ident__has_declspec) {\n // ...\n } else if (II == Ident__has_cpp_attribute || II == Ident__has_c_attribute) {\n // ...\n } else if (II == Ident__has_include || II == Ident__has_include_next) {\n // ...\n } else if (II == Ident__has_warning) {\n // ...\n } else if (II == Ident__building_module) {\n // ...\n } else if (II == Ident__MODULE__) {\n // ...\n } else if (II == Ident__identifier) {\n // ...\n } else if (II == Ident__is_target_arch) {\n // ...\n } else if (II == Ident__is_target_vendor) {\n // ...\n } else if (II == Ident__is_target_os) {\n // ...\n } else if (II == Ident__is_target_environment) {\n // ...\n } else if (II == Ident__is_target_variant_os) {\n EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, false, [this](Token &Tok, bool &HasLexedNextToken) -> int {\n IdentifierInfo *II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_feature_check_malformed);"},{S,1942,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n // ...\n } else if (II == Ident__is_identifier) {\n // ...\n } else if (II == Ident__has_attribute) {\n // ...\n } else if (II == Ident__has_declspec) {\n // ...\n } else if (II == Ident__has_cpp_attribute || II == Ident__has_c_attribute) {\n // ...\n } else if (II == Ident__has_include || II == Ident__has_include_next) {\n // ...\n } else if (II == Ident__has_warning) {\n // ...\n } else if (II == Ident__building_module) {\n // ...\n } else if (II == Ident__MODULE__) {\n // ...\n } else if (II == Ident__identifier) {\n // ...\n } else if (II == Ident__is_target_arch) {\n // ...\n } else if (II == Ident__is_target_vendor) {\n // ...\n } else if (II == Ident__is_target_os) {\n // ...\n } else if (II == Ident__is_target_environment) {\n // ...\n } else if (II == Ident__is_target_variant_os) {\n // ...\n } else if (II == Ident__is_target_variant_environment) {\n EvaluateFeatureLikeBuiltinMacro(OS, Tok, II, *this, false, [this](Token &Tok, bool &HasLexedNextToken) -> int {\n IdentifierInfo *II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_feature_check_malformed);"}}, [l]={ ["clang/test/Preprocessor/has_attribute_errors.cpp"]={"clang/test/Preprocessor/has_attribute_errors.cpp:13:21: error: builtin feature check macro requires a parenthesized identifier"} } }, ["err_field_declared_as_function"]={ [d]="err_field_declared_as_function", [f]="field %0 declared as a function", [b]="field A declared as a function", [i]=k, [h]="field (.*?) declared as a function", [g]=a, [e]=m, [c]={U,1237025389,T,W}, [j]={{A,18778,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n // ...\n if (FDTy->isFunctionType()) {\n // ...\n Diag(FD->getLocation(), diag::err_field_declared_as_function) << FD->getDeclName();"}}, [l]={ ["clang/test/SemaObjC/ivar-sem-check-1.m"]={"clang/test/SemaObjC/ivar-sem-check-1.m:15:9: error: field \'BADFUNC\' declared as a function"} } }, ["err_field_designator_non_aggr"]={ [d]="err_field_designator_non_aggr", [f]="field designator cannot initialize a %select{non-struct, non-union|non-class}0 type %1", [b]={{nil,nil,{"field designator cannot initialize a ",{"non-struct, non-union","non-class"}," type B"}}}, [i]=k, [h]="field designator cannot initialize a (?:non\\-struct, non\\-union|non\\-class) type (.*?)", [g]=a, [e]=m, [c]={u,1236199783,v,w}, [j]={{R,2686,"/// Check the well-formedness of a C99 designated initializer.\n///\n/// Determines whether the designated initializer @p DIE, which\n/// resides at the given @p Index within the initializer list @p\n/// IList, is well-formed for a current object of type @p DeclType\n/// (C99 6.7.8). The actual subobject that this designator refers to\n/// within the current subobject is returned in either\n/// @p NextField or @p NextElementIndex (whichever is appropriate).\n///\n/// @param IList The initializer list in which this designated\n/// initializer occurs.\n///\n/// @param DIE The designated initializer expression.\n///\n/// @param DesigIdx The index of the current designator.\n///\n/// @param CurrentObjectType The type of the \"current object\" (C99 6.7.8p17),\n/// into which the designation in @p DIE should refer.\n///\n/// @param NextField If non-NULL and the first designator in @p DIE is\n/// a field, this will be set to the field declaration corresponding\n/// to the field named by the designator. On input, this is expected to be\n/// the next field that would be initialized in the absence of designation,\n/// if the complete object being initialized is a struct.\n///\n/// @param NextElementIndex If non-NULL and the first designator in @p\n/// DIE is an array designator or GNU array-range designator, this\n/// will be set to the last index initialized by this designator.\n///\n/// @param Index Index into @p IList where the designated initializer\n/// @p DIE occurs.\n///\n/// @param StructuredList The initializer list expression that\n/// describes all of the subobject initializers in the order they\'ll\n/// actually be initialized.\n///\n/// @returns true if there was an error, false otherwise.\nbool InitListChecker::CheckDesignatedInitializer(const InitializedEntity &Entity, InitListExpr *IList, DesignatedInitExpr *DIE, unsigned DesigIdx, QualType &CurrentObjectType, RecordDecl::field_iterator *NextField, llvm::APSInt *NextElementIndex, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex, bool FinishSubobjectInit, bool TopLevelObject) {\n // ...\n if (D->isFieldDesignator()) {\n // ...\n if (!RD) {\n // ...\n if (!VerifyOnly)\n SemaRef.Diag(Loc, diag::err_field_designator_non_aggr) << SemaRef.getLangOpts().CPlusPlus << CurrentObjectType;"}}, [l]={ ["clang/test/Sema/designated-initializers.c"]={"clang/test/Sema/designated-initializers.c:53:3: error: field designator cannot initialize a non-struct, non-union type \'struct point[10]\'"} } }, ["err_field_designator_nonfield"]={ [d]="err_field_designator_nonfield", [f]="field designator %0 does not refer to a non-static data member", [b]="field designator A does not refer to a non-static data member", [i]=k, [h]="field designator (.*?) does not refer to a non\\-static data member", [g]=a, [e]=m, [c]={u,1236199783,v,w}, [j]={{R,2719,"/// Check the well-formedness of a C99 designated initializer.\n///\n/// Determines whether the designated initializer @p DIE, which\n/// resides at the given @p Index within the initializer list @p\n/// IList, is well-formed for a current object of type @p DeclType\n/// (C99 6.7.8). The actual subobject that this designator refers to\n/// within the current subobject is returned in either\n/// @p NextField or @p NextElementIndex (whichever is appropriate).\n///\n/// @param IList The initializer list in which this designated\n/// initializer occurs.\n///\n/// @param DIE The designated initializer expression.\n///\n/// @param DesigIdx The index of the current designator.\n///\n/// @param CurrentObjectType The type of the \"current object\" (C99 6.7.8p17),\n/// into which the designation in @p DIE should refer.\n///\n/// @param NextField If non-NULL and the first designator in @p DIE is\n/// a field, this will be set to the field declaration corresponding\n/// to the field named by the designator. On input, this is expected to be\n/// the next field that would be initialized in the absence of designation,\n/// if the complete object being initialized is a struct.\n///\n/// @param NextElementIndex If non-NULL and the first designator in @p\n/// DIE is an array designator or GNU array-range designator, this\n/// will be set to the last index initialized by this designator.\n///\n/// @param Index Index into @p IList where the designated initializer\n/// @p DIE occurs.\n///\n/// @param StructuredList The initializer list expression that\n/// describes all of the subobject initializers in the order they\'ll\n/// actually be initialized.\n///\n/// @returns true if there was an error, false otherwise.\nbool InitListChecker::CheckDesignatedInitializer(const InitializedEntity &Entity, InitListExpr *IList, DesignatedInitExpr *DIE, unsigned DesigIdx, QualType &CurrentObjectType, RecordDecl::field_iterator *NextField, llvm::APSInt *NextElementIndex, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex, bool FinishSubobjectInit, bool TopLevelObject) {\n // ...\n if (D->isFieldDesignator()) {\n // ...\n if (!KnownField) {\n // ...\n if (!KnownField) {\n // ...\n // Name lookup found something, but it wasn\'t a field.\n if (!Lookup.empty()) {\n SemaRef.Diag(D->getFieldLoc(), diag::err_field_designator_nonfield) << FieldName;"}} }, ["err_field_designator_unknown"]={ [d]="err_field_designator_unknown", [f]="field designator %0 does not refer to any field in type %1", [b]="field designator A does not refer to any field in type B", [i]=k, [h]="field designator (.*?) does not refer to any field in type (.*?)", [g]=a, [e]=m, [c]={u,1236199783,v,w}, [j]={{R,2749,"/// Check the well-formedness of a C99 designated initializer.\n///\n/// Determines whether the designated initializer @p DIE, which\n/// resides at the given @p Index within the initializer list @p\n/// IList, is well-formed for a current object of type @p DeclType\n/// (C99 6.7.8). The actual subobject that this designator refers to\n/// within the current subobject is returned in either\n/// @p NextField or @p NextElementIndex (whichever is appropriate).\n///\n/// @param IList The initializer list in which this designated\n/// initializer occurs.\n///\n/// @param DIE The designated initializer expression.\n///\n/// @param DesigIdx The index of the current designator.\n///\n/// @param CurrentObjectType The type of the \"current object\" (C99 6.7.8p17),\n/// into which the designation in @p DIE should refer.\n///\n/// @param NextField If non-NULL and the first designator in @p DIE is\n/// a field, this will be set to the field declaration corresponding\n/// to the field named by the designator. On input, this is expected to be\n/// the next field that would be initialized in the absence of designation,\n/// if the complete object being initialized is a struct.\n///\n/// @param NextElementIndex If non-NULL and the first designator in @p\n/// DIE is an array designator or GNU array-range designator, this\n/// will be set to the last index initialized by this designator.\n///\n/// @param Index Index into @p IList where the designated initializer\n/// @p DIE occurs.\n///\n/// @param StructuredList The initializer list expression that\n/// describes all of the subobject initializers in the order they\'ll\n/// actually be initialized.\n///\n/// @returns true if there was an error, false otherwise.\nbool InitListChecker::CheckDesignatedInitializer(const InitializedEntity &Entity, InitListExpr *IList, DesignatedInitExpr *DIE, unsigned DesigIdx, QualType &CurrentObjectType, RecordDecl::field_iterator *NextField, llvm::APSInt *NextElementIndex, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex, bool FinishSubobjectInit, bool TopLevelObject) {\n // ...\n if (D->isFieldDesignator()) {\n // ...\n if (!KnownField) {\n // ...\n if (!KnownField) {\n // ...\n if (TypoCorrection Corrected = SemaRef.CorrectTypo(DeclarationNameInfo(FieldName, D->getFieldLoc()), Sema::LookupMemberName, /*Scope=*/nullptr, /*SS=*/nullptr, CCC, Sema::CTK_ErrorRecovery, RD)) {\n // ...\n } else {\n // ...\n SemaRef.Diag(Loc, diag::err_field_designator_unknown) << FieldName << CurrentObjectType << DIE->getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/cxx2b-designated-initializers.cpp"]={"clang/test/SemaCXX/cxx2b-designated-initializers.cpp:12:18: error: field designator (null) does not refer to any field in type \'const S\'"} } }, ["err_field_designator_unknown_suggest"]={ [d]="err_field_designator_unknown_suggest", [f]="field designator %0 does not refer to any field in type %1; did you mean %2?", [b]="field designator A does not refer to any field in type B; did you mean C?", [i]=k, [h]="field designator (.*?) does not refer to any field in type (.*?); did you mean (.*?)\\?", [g]=a, [e]=m, [c]={"4e0299b657a1",1262304185,"Typo correction for C99 designated field initializers, e.g.,","Typo correction for C99 designated field initializers, e.g.,\n\ntest/FixIt/typo.c:19:4: error: field designator \'bunds\' does not refer to any\n field in type \'struct Window\'; did you mean \'bounds\'?\n .bunds.\n ^~~~~\n bounds\n\nllvm-svn: 92376"}, [j]={{R,2736,"/// Check the well-formedness of a C99 designated initializer.\n///\n/// Determines whether the designated initializer @p DIE, which\n/// resides at the given @p Index within the initializer list @p\n/// IList, is well-formed for a current object of type @p DeclType\n/// (C99 6.7.8). The actual subobject that this designator refers to\n/// within the current subobject is returned in either\n/// @p NextField or @p NextElementIndex (whichever is appropriate).\n///\n/// @param IList The initializer list in which this designated\n/// initializer occurs.\n///\n/// @param DIE The designated initializer expression.\n///\n/// @param DesigIdx The index of the current designator.\n///\n/// @param CurrentObjectType The type of the \"current object\" (C99 6.7.8p17),\n/// into which the designation in @p DIE should refer.\n///\n/// @param NextField If non-NULL and the first designator in @p DIE is\n/// a field, this will be set to the field declaration corresponding\n/// to the field named by the designator. On input, this is expected to be\n/// the next field that would be initialized in the absence of designation,\n/// if the complete object being initialized is a struct.\n///\n/// @param NextElementIndex If non-NULL and the first designator in @p\n/// DIE is an array designator or GNU array-range designator, this\n/// will be set to the last index initialized by this designator.\n///\n/// @param Index Index into @p IList where the designated initializer\n/// @p DIE occurs.\n///\n/// @param StructuredList The initializer list expression that\n/// describes all of the subobject initializers in the order they\'ll\n/// actually be initialized.\n///\n/// @returns true if there was an error, false otherwise.\nbool InitListChecker::CheckDesignatedInitializer(const InitializedEntity &Entity, InitListExpr *IList, DesignatedInitExpr *DIE, unsigned DesigIdx, QualType &CurrentObjectType, RecordDecl::field_iterator *NextField, llvm::APSInt *NextElementIndex, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex, bool FinishSubobjectInit, bool TopLevelObject) {\n // ...\n if (D->isFieldDesignator()) {\n // ...\n if (!KnownField) {\n // ...\n if (!KnownField) {\n // ...\n if (TypoCorrection Corrected = SemaRef.CorrectTypo(DeclarationNameInfo(FieldName, D->getFieldLoc()), Sema::LookupMemberName, /*Scope=*/nullptr, /*SS=*/nullptr, CCC, Sema::CTK_ErrorRecovery, RD)) {\n SemaRef.diagnoseTypo(Corrected, SemaRef.PDiag(diag::err_field_designator_unknown_suggest) << FieldName << CurrentObjectType);"}}, [l]={ ["clang/test/FixIt/typo.c"]={"clang/test/FixIt/typo.c:24:4: error: field designator \'bunds\' does not refer to any field in type \'struct Window\'; did you mean \'bounds\'?","clang/test/FixIt/typo.c:27:3: error: field designator \'topleft\' does not refer to any field in type \'struct Rectangle\'; did you mean \'top_left\'?"} } }, ["err_field_incomplete_or_sizeless"]={ [d]={{nil,C,"err_field_incomplete_or_sizeless"}}, [f]={{nil,C,"field has %select{incomplete|sizeless}0 type %1"}}, [b]={{nil,C,{"field has ",{"incomplete","sizeless"}," type B"}}}, [i]=k, [h]="field has (?:incomplete|sizeless) type (.*?)", [g]=a, [e]={{nil,C,m}}, [c]={"931fcd3ba011",1576908663,"[WebAssembly] Improve clang diagnostics for wasm attributes","[WebAssembly] Improve clang diagnostics for wasm attributes\n\nThis patch addresses the review comments on r352930:\n\n - Removes redundant diagnostic checking code\n - Removes errnoneous use of diag::err_alias_is_definition, which\n turned out to be ineffective anyway since functions can be defined later\n in the translation unit and avoid detection.\n - Adds a test for various invalid cases for import_name and import_module.\n\nDifferential Revision: https://reviews.llvm.org/D59520"}, [j]={{A,5816,"/// BuildMicrosoftCAnonymousStruct - Handle the declaration of an\n/// Microsoft C anonymous structure.\n/// Ref: http://msdn.microsoft.com/en-us/library/z2cx9y4f.aspx\n/// Example:\n///\n/// struct A { int a; };\n/// struct B { struct A; int b; };\n///\n/// void foo() {\n/// B var;\n/// var.a = 3;\n/// }\n///\nDecl *Sema::BuildMicrosoftCAnonymousStruct(Scope *S, DeclSpec &DS, RecordDecl *Record) {\n // ...\n if (RequireCompleteSizedType(Anon->getLocation(), RecTy, diag::err_field_incomplete_or_sizeless) || InjectAnonymousStructOrUnionMembers(*this, S, CurContext, RecordDef, AS_none, Chain)) {"},{A,17896,"// Note that FieldName may be null for anonymous bitfields.\nExprResult Sema::VerifyBitField(SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth) {\n // ...\n // C99 6.7.2.1p4 - verify the field type.\n // C++ 9.6p3: A bit-field shall have integral or enumeration type.\n if (!FieldTy->isDependentType() && !FieldTy->isIntegralOrEnumerationType()) {\n // ...\n if (RequireCompleteSizedType(FieldLoc, FieldTy, diag::err_field_incomplete_or_sizeless))"},{A,18109,"/// Build a new FieldDecl and check its well-formedness.\n///\n/// This routine builds a new FieldDecl given the fields name, type,\n/// record, etc. \\p PrevDecl should refer to any previous declaration\n/// with the same name and in the same scope as the field to be\n/// created.\n///\n/// \\returns a new FieldDecl.\n///\n/// \\todo The Declarator argument is a hack. It will be removed once\nFieldDecl *Sema::CheckFieldDecl(DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D) {\n // ...\n if (!EltTy->isDependentType() && !EltTy->containsErrors()) {\n if (RequireCompleteSizedType(Loc, EltTy, diag::err_field_incomplete_or_sizeless)) {"},{A,18849,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n // ...\n } else if (!FDTy->isDependentType() && RequireCompleteSizedType(FD->getLocation(), FD->getType(), diag::err_field_incomplete_or_sizeless)) {"},{"clang/lib/Sema/SemaLambda.cpp",1917,"/// Create a field within the lambda class or captured statement record for the\n/// given capture.\nFieldDecl *Sema::BuildCaptureField(RecordDecl *RD, const sema::Capture &Capture) {\n // ...\n // If the variable being captured has an invalid type, mark the class as\n // invalid as well.\n if (!FieldType->isDependentType()) {\n if (RequireCompleteSizedType(Loc, FieldType, diag::err_field_incomplete_or_sizeless)) {"}}, [l]={ ["clang/test/SemaCXX/PR6618.cpp"]={"clang/test/SemaCXX/PR6618.cpp:4:7: error: field has incomplete type \'bar\'"} } }, ["err_field_instantiates_to_function"]={ [d]="err_field_instantiates_to_function", [f]="data member instantiated with function type %0", [b]="data member instantiated with function type A", [i]=k, [h]="data member instantiated with function type (.*?)", [g]=a, [e]=m, [c]={U,1237025389,T,W}, [j]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",1235,"Decl *TemplateDeclInstantiator::VisitFieldDecl(FieldDecl *D) {\n // ...\n if (DI->getType()->isInstantiationDependentType() || DI->getType()->isVariablyModifiedType()) {\n // ...\n if (!DI) {\n // ...\n } else if (DI->getType()->isFunctionType()) {\n // ...\n SemaRef.Diag(D->getLocation(), diag::err_field_instantiates_to_function) << DI->getType();"},{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",1321,"Decl *TemplateDeclInstantiator::VisitMSPropertyDecl(MSPropertyDecl *D) {\n // ...\n if (DI->getType()->isVariablyModifiedType()) {\n // ...\n } else if (DI->getType()->isInstantiationDependentType()) {\n // ...\n if (!DI) {\n // ...\n } else if (DI->getType()->isFunctionType()) {\n // ...\n SemaRef.Diag(D->getLocation(), diag::err_field_instantiates_to_function) << DI->getType();"}}, [l]={ ["clang/test/CXX/temp/temp.spec/temp.explicit/p7.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p7.cpp:6:7: error: data member instantiated with function type \'int (int)\'"} } }, ["err_field_with_address_space"]={ [d]="err_field_with_address_space", [f]="field may not be qualified with an address space", [b]="field may not be qualified with an address space", [i]=k, [h]="field may not be qualified with an address space", [g]=a, [e]=m, [c]={"376f72092cbd",1361913360,"Fix assertion failure when a field is given an address space.","Fix assertion failure when a field is given an address space.\n\nllvm-svn: 176122"}, [j]={{A,18126,"/// Build a new FieldDecl and check its well-formedness.\n///\n/// This routine builds a new FieldDecl given the fields name, type,\n/// record, etc. \\p PrevDecl should refer to any previous declaration\n/// with the same name and in the same scope as the field to be\n/// created.\n///\n/// \\returns a new FieldDecl.\n///\n/// \\todo The Declarator argument is a hack. It will be removed once\nFieldDecl *Sema::CheckFieldDecl(DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D) {\n // ...\n // TR 18037 does not allow fields to be declared with address space\n if (T.hasAddressSpace() || T->isDependentAddressSpaceType() || T->getBaseElementTypeUnsafe()->isDependentAddressSpaceType()) {\n Diag(Loc, diag::err_field_with_address_space);"}}, [l]={ ["clang/test/SemaHLSL/group_shared.hlsl"]={"clang/test/SemaHLSL/group_shared.hlsl:47:23: error: field may not be qualified with an address space"} } }, ["err_file_modified"]={ [d]="err_file_modified", [f]="file \'%0\' modified since it was first processed", [b]="file \'A\' modified since it was first processed", [i]=ab, [h]="file \'(.*?)\' modified since it was first processed", [g]=a, [e]=o, [c]={"874cc62876c4",1268699739,"Use SourceManager\'s Diagnostic object for all file-reading errors,","Use SourceManager\'s Diagnostic object for all file-reading errors,\nsimplifying the SourceManager interfaces somewhat.\n\nllvm-svn: 98598"}, [j]={{"clang/lib/Basic/SourceManager.cpp",165,"std::optional<llvm::MemoryBufferRef> ContentCache::getBufferOrNone(DiagnosticsEngine &Diag, FileManager &FM, SourceLocation Loc) const {\n // ...\n // Unless this is a named pipe (in which case we can handle a mismatch),\n // check that the file\'s size is the same as in the file entry (which may\n // have come from a stat cache).\n if (!ContentsEntry->isNamedPipe() && Buffer->getBufferSize() != (size_t)ContentsEntry->getSize()) {\n if (Diag.isDiagnosticInFlight())\n Diag.SetDelayedDiagnostic(diag::err_file_modified, ContentsEntry->getName());"},{"clang/lib/Basic/SourceManager.cpp",168,"std::optional<llvm::MemoryBufferRef> ContentCache::getBufferOrNone(DiagnosticsEngine &Diag, FileManager &FM, SourceLocation Loc) const {\n // ...\n // Unless this is a named pipe (in which case we can handle a mismatch),\n // check that the file\'s size is the same as in the file entry (which may\n // have come from a stat cache).\n if (!ContentsEntry->isNamedPipe() && Buffer->getBufferSize() != (size_t)ContentsEntry->getSize()) {\n if (Diag.isDiagnosticInFlight())\n // ...\n else\n Diag.Report(Loc, diag::err_file_modified) << ContentsEntry->getName();"}} }, ["err_file_too_large"]={ [d]={{nil,s,"err_file_too_large"}}, [f]={{nil,s,"sorry, unsupported: file \'%0\' is too large for Clang to process"}}, [b]={{nil,s,"sorry, unsupported: file \'A\' is too large for Clang to process"}}, [i]=k, [h]="sorry, unsupported\\: file \'(.*?)\' is too large for Clang to process", [g]=a, [e]={{nil,s,o}}, [c]={"979ae80af7ec",1561149982,"PR42301: Abort cleanly if we encounter a huge source file rather than","PR42301: Abort cleanly if we encounter a huge source file rather than\ncrashing.\n\nIdeally we wouldn\'t care about the size of a file so long as it fits in\nmemory, but in practice we have lots of hardocded assumptions that\nunsigned can be used to index files, string literals, and so on.\n\nllvm-svn: 364103"}, [j]={{"clang/lib/Basic/SourceManager.cpp",150,"std::optional<llvm::MemoryBufferRef> ContentCache::getBufferOrNone(DiagnosticsEngine &Diag, FileManager &FM, SourceLocation Loc) const {\n // ...\n // Check that the file\'s size fits in an \'unsigned\' (with room for a\n // past-the-end value). This is deeply regrettable, but various parts of\n // Clang (including elsewhere in this file!) use \'unsigned\' to represent file\n // offsets, line numbers, string literal lengths, and so on, and fail\n // miserably on large source files.\n //\n // Note: ContentsEntry could be a named pipe, in which case\n // ContentsEntry::getSize() could have the wrong size. Use\n // MemoryBuffer::getBufferSize() instead.\n if (Buffer->getBufferSize() >= std::numeric_limits<unsigned>::max()) {\n if (Diag.isDiagnosticInFlight())\n Diag.SetDelayedDiagnostic(diag::err_file_too_large, ContentsEntry->getName());"},{"clang/lib/Basic/SourceManager.cpp",153,"std::optional<llvm::MemoryBufferRef> ContentCache::getBufferOrNone(DiagnosticsEngine &Diag, FileManager &FM, SourceLocation Loc) const {\n // ...\n // Check that the file\'s size fits in an \'unsigned\' (with room for a\n // past-the-end value). This is deeply regrettable, but various parts of\n // Clang (including elsewhere in this file!) use \'unsigned\' to represent file\n // offsets, line numbers, string literal lengths, and so on, and fail\n // miserably on large source files.\n //\n // Note: ContentsEntry could be a named pipe, in which case\n // ContentsEntry::getSize() could have the wrong size. Use\n // MemoryBuffer::getBufferSize() instead.\n if (Buffer->getBufferSize() >= std::numeric_limits<unsigned>::max()) {\n if (Diag.isDiagnosticInFlight())\n // ...\n else\n Diag.Report(Loc, diag::err_file_too_large) << ContentsEntry->getName();"}} }, ["err_filter_expression_integral"]={ [d]="err_filter_expression_integral", [f]={{nil,H,"filter expression has non-integral type %0"},{s,nil,"filter expression type should be an integral value not %0"}}, [b]={{nil,H,"filter expression has non-integral type A"},{s,nil,"filter expression type should be an integral value not A"}}, [i]=k, [h]="filter expression has non\\-integral type (.*?)", [g]=a, [e]=m, [c]={"1c0675e155b9",1303952914,"Parsing/AST support for Structured Exception Handling","Parsing/AST support for Structured Exception Handling\n\nPatch authored by Sohail Somani.\n\nProvide parsing and AST support for Windows structured exception handling.\n\nllvm-svn: 130366"}, [j]={{V,4621,"StmtResult Sema::ActOnSEHExceptBlock(SourceLocation Loc, Expr *FilterExpr, Stmt *Block) {\n // ...\n if (!FTy->isIntegerType() && !FTy->isDependentType()) {\n return StmtError(Diag(FilterExpr->getExprLoc(), diag::err_filter_expression_integral) << FTy);"}}, [l]={ ["clang/test/SemaCXX/exceptions-seh.cpp"]={"clang/test/SemaCXX/exceptions-seh.cpp:119:15: error: filter expression has non-integral type \'NotInteger\'"} } }, ["err_final_function_overridden"]={ [d]="err_final_function_overridden", [f]="declaration of %0 overrides a \'%select{final|sealed}1\' function", [b]={{nil,nil,{"declaration of A overrides a \'",{"final","sealed"},"\' function"}}}, [i]=k, [h]="declaration of (.*?) overrides a \'(?:final|sealed)\' function", [g]=a, [e]=m, [c]={"96d5c76498b2",1258792989,"Added rudimentary C++0x attribute support.","Added rudimentary C++0x attribute support.\nThe following attributes are currently supported in C++0x attribute\nlists (and in GNU ones as well):\n - align() - semantics believed to be conformant to n3000, except for\n redeclarations and what entities it may apply to\n - final - semantics believed to be conformant to CWG issue 817\'s proposed\n wording, except for redeclarations\n - noreturn - semantics believed to be conformant to n3000, except for\n redeclarations\n - carries_dependency - currently ignored (this is an optimization hint)\n\nllvm-svn: 89543"}, [j]={{Q,3331,"/// CheckIfOverriddenFunctionIsMarkedFinal - Checks whether a virtual member\n/// function overrides a virtual member function marked \'final\', according to\n/// C++11 [class.virtual]p4.\nbool Sema::CheckIfOverriddenFunctionIsMarkedFinal(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n Diag(New->getLocation(), diag::err_final_function_overridden) << New->getDeclName() << FA->isSpelledAsSealed();"}}, [l]={ ["clang/test/CXX/class.derived/class.virtual/p3-0x.cpp"]={"clang/test/CXX/class.derived/class.virtual/p3-0x.cpp:56:8: error: declaration of \'f\' overrides a \'final\' function","clang/test/CXX/class.derived/class.virtual/p3-0x.cpp:108:12: error: declaration of \'f\' overrides a \'final\' function"} } }, ["err_first_argument_to_cwsc_block_call"]={ [d]="err_first_argument_to_cwsc_block_call", [f]="first argument to __builtin_call_with_static_chain must not be a block call", [b]="first argument to __builtin_call_with_static_chain must not be a block call", [i]=k, [h]="first argument to __builtin_call_with_static_chain must not be a block call", [g]=a, [e]=m, [c]={"f770683f14f9",1418427685,"Implement the __builtin_call_with_static_chain GNU extension.","Implement the __builtin_call_with_static_chain GNU extension.\n\nThe extension has the following syntax:\n\n __builtin_call_with_static_chain(Call, Chain)\n where Call must be a function call expression and Chain must be of pointer type\n\nThis extension performs a function call Call with a static chain pointer\nChain passed to the callee in a designated register. This is useful for\ncalling foreign language functions whose ABI uses static chain pointers\n(e.g. to implement closures).\n\nDifferential Revision: http://reviews.llvm.org/D6332\n\nllvm-svn: 224167"}, [j]={{db,747,"static bool SemaBuiltinCallWithStaticChain(Sema &S, CallExpr *BuiltinCall) {\n // ...\n if (CE->getCallee()->getType()->isBlockPointerType()) {\n S.Diag(BuiltinLoc, diag::err_first_argument_to_cwsc_block_call) << Call->getSourceRange();"}}, [l]={ ["clang/test/Sema/call-with-static-chain.c"]={"clang/test/Sema/call-with-static-chain.c:8:3: error: first argument to __builtin_call_with_static_chain must not be a block call"} } }, ["err_first_argument_to_cwsc_builtin_call"]={ [d]="err_first_argument_to_cwsc_builtin_call", [f]="first argument to __builtin_call_with_static_chain must not be a builtin call", [b]="first argument to __builtin_call_with_static_chain must not be a builtin call", [i]=k, [h]="first argument to __builtin_call_with_static_chain must not be a builtin call", [g]=a, [e]=m, [c]={"f770683f14f9",1418427685,"Implement the __builtin_call_with_static_chain GNU extension.","Implement the __builtin_call_with_static_chain GNU extension.\n\nThe extension has the following syntax:\n\n __builtin_call_with_static_chain(Call, Chain)\n where Call must be a function call expression and Chain must be of pointer type\n\nThis extension performs a function call Call with a static chain pointer\nChain passed to the callee in a designated register. This is useful for\ncalling foreign language functions whose ABI uses static chain pointers\n(e.g. to implement closures).\n\nDifferential Revision: http://reviews.llvm.org/D6332\n\nllvm-svn: 224167"}, [j]={{db,755,"static bool SemaBuiltinCallWithStaticChain(Sema &S, CallExpr *BuiltinCall) {\n // ...\n if (const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(TargetDecl))\n if (FD->getBuiltinID()) {\n S.Diag(BuiltinLoc, diag::err_first_argument_to_cwsc_builtin_call) << Call->getSourceRange();"}}, [l]={ ["clang/test/Sema/call-with-static-chain.c"]={"clang/test/Sema/call-with-static-chain.c:9:3: error: first argument to __builtin_call_with_static_chain must not be a builtin call"} } }, ["err_first_argument_to_cwsc_not_call"]={ [d]="err_first_argument_to_cwsc_not_call", [f]="first argument to __builtin_call_with_static_chain must be a non-member call expression", [b]="first argument to __builtin_call_with_static_chain must be a non-member call expression", [i]=k, [h]="first argument to __builtin_call_with_static_chain must be a non\\-member call expression", [g]=a, [e]=m, [c]={"f770683f14f9",1418427685,"Implement the __builtin_call_with_static_chain GNU extension.","Implement the __builtin_call_with_static_chain GNU extension.\n\nThe extension has the following syntax:\n\n __builtin_call_with_static_chain(Call, Chain)\n where Call must be a function call expression and Chain must be of pointer type\n\nThis extension performs a function call Call with a static chain pointer\nChain passed to the callee in a designated register. This is useful for\ncalling foreign language functions whose ABI uses static chain pointers\n(e.g. to implement closures).\n\nDifferential Revision: http://reviews.llvm.org/D6332\n\nllvm-svn: 224167"}, [j]={{db,740,"static bool SemaBuiltinCallWithStaticChain(Sema &S, CallExpr *BuiltinCall) {\n // ...\n if (Call->getStmtClass() != Stmt::CallExprClass) {\n S.Diag(BuiltinLoc, diag::err_first_argument_to_cwsc_not_call) << Call->getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/call-with-static-chain.cpp"]={"clang/test/SemaCXX/call-with-static-chain.cpp:13:3: error: first argument to __builtin_call_with_static_chain must be a non-member call expression"} } }, ["err_first_argument_to_cwsc_pdtor_call"]={ [d]="err_first_argument_to_cwsc_pdtor_call", [f]="first argument to __builtin_call_with_static_chain must not be a pseudo-destructor call", [b]="first argument to __builtin_call_with_static_chain must not be a pseudo-destructor call", [i]=k, [h]="first argument to __builtin_call_with_static_chain must not be a pseudo\\-destructor call", [g]=a, [e]=m, [c]={"f770683f14f9",1418427685,"Implement the __builtin_call_with_static_chain GNU extension.","Implement the __builtin_call_with_static_chain GNU extension.\n\nThe extension has the following syntax:\n\n __builtin_call_with_static_chain(Call, Chain)\n where Call must be a function call expression and Chain must be of pointer type\n\nThis extension performs a function call Call with a static chain pointer\nChain passed to the callee in a designated register. This is useful for\ncalling foreign language functions whose ABI uses static chain pointers\n(e.g. to implement closures).\n\nDifferential Revision: http://reviews.llvm.org/D6332\n\nllvm-svn: 224167"}, [j]={{db,761,"static bool SemaBuiltinCallWithStaticChain(Sema &S, CallExpr *BuiltinCall) {\n // ...\n if (isa<CXXPseudoDestructorExpr>(CE->getCallee()->IgnoreParens())) {\n S.Diag(BuiltinLoc, diag::err_first_argument_to_cwsc_pdtor_call) << Call->getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/call-with-static-chain.cpp"]={"clang/test/SemaCXX/call-with-static-chain.cpp:14:3: error: first argument to __builtin_call_with_static_chain must not be a pseudo-destructor call"} } }, ["err_first_argument_to_va_arg_not_of_type_va_list"]={ [d]="err_first_argument_to_va_arg_not_of_type_va_list", [f]="first argument to \'va_arg\' is of type %0 and not \'va_list\'", [b]="first argument to \'va_arg\' is of type A and not \'va_list\'", [i]=k, [h]="first argument to \'va_arg\' is of type (.*?) and not \'va_list\'", [g]=a, [e]=m, [c]={U,1237025389,T,W}, [j]={{rb,17220,"ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc) {\n // ...\n if (!IsMS && !E->isTypeDependent() && !Context.hasSameType(VaListType, E->getType()))\n return ExprError(Diag(E->getBeginLoc(), diag::err_first_argument_to_va_arg_not_of_type_va_list) << OrigExpr->getType() << E->getSourceRange());"}}, [l]={ ["clang/test/Sema/va_arg_x86_32.c"]={"clang/test/Sema/va_arg_x86_32.c:5:20: error: first argument to \'va_arg\' is of type \'void *\' and not \'va_list\'"} } }, ["err_fixed_point_not_enabled"]={ [d]={{nil,K,"err_fixed_point_not_enabled"}}, [f]={{nil,K,"compile with \'-ffixed-point\' to enable fixed point types"}}, [b]={{nil,K,"compile with \'-ffixed-point\' to enable fixed point types"}}, [i]=k, [h]="compile with \'\\-ffixed\\-point\' to enable fixed point types", [g]=a, [e]={{nil,K,o}}, [c]={"db55d8331e63",1527908331,"This diff includes changes for supporting the following types.","This diff includes changes for supporting the following types.\n\n```\n\n// Primary fixed point types\nsigned short _Accum s_short_accum;\nsigned _Accum s_accum;\nsigned long _Accum s_long_accum;\nunsigned short _Accum u_short_accum;\nunsigned _Accum u_accum;\nunsigned long _Accum u_long_accum;\n\n// Aliased fixed point types\nshort _Accum short_accum;\n_Accum accum;\nlong _Accum long_accum;\n\n```\n\nThis diff only allows for declaration of the fixed point types. Assignment and other operations done on fixed point types according to http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1169.pdf will be added in future patches. The saturated versions of these types and the equivalent `_Fract` types will also be added in future patches.\n\nThe tests included are for asserting that we can declare these types.\n\nDifferential Revision: https://reviews.llvm.org/D46084\n\nllvm-svn: 333814"}, [j]={{p,3220,"// Choose the apprpriate diagnostic error for why fixed point types are\n// disabled, set the previous specifier, and mark as invalid.\nstatic void SetupFixedPointError(const LangOptions &LangOpts, const char *&PrevSpec, unsigned &DiagID, bool &isInvalid) {\n // ...\n DiagID = diag::err_fixed_point_not_enabled;"}}, [l]={ ["clang/test/Frontend/fixed_point_not_enabled.c"]={"clang/test/Frontend/fixed_point_not_enabled.c:4:14: error: compile with \'-ffixed-point\' to enable fixed point types","clang/test/Frontend/fixed_point_not_enabled.c:5:8: error: compile with \'-ffixed-point\' to enable fixed point types","clang/test/Frontend/fixed_point_not_enabled.c:6:13: error: compile with \'-ffixed-point\' to enable fixed point types","clang/test/Frontend/fixed_point_not_enabled.c:7:16: error: compile with \'-ffixed-point\' to enable fixed point types","clang/test/Frontend/fixed_point_not_enabled.c:8:10: error: compile with \'-ffixed-point\' to enable fixed point types","clang/test/Frontend/fixed_point_not_enabled.c:9:15: error: compile with \'-ffixed-point\' to enable fixed point types","clang/test/Frontend/fixed_point_not_enabled.c:12:7: error: compile with \'-ffixed-point\' to enable fixed point types","clang/test/Frontend/fixed_point_not_enabled.c:13:1: error: compile with \'-ffixed-point\' to enable fixed point types","clang/test/Frontend/fixed_point_not_enabled.c:15:6: error: compile with \'-ffixed-point\' to enable fixed point types"} } }, ["err_flexible_array_arc_retainable"]={ [d]={{nil,gb,"err_flexible_array_arc_retainable"}}, [f]={{nil,gb,"ARC forbids flexible array members with retainable object type"}}, [b]={{nil,gb,"ARC forbids flexible array members with retainable object type"}}, [i]=k, [h]="ARC forbids flexible array members with retainable object type", [g]=a, [e]={{nil,gb,m}}, [c]={"30680e943735",1508796101,"[Sema] Add support for flexible array members in Obj-C.","[Sema] Add support for flexible array members in Obj-C.\n\nAllow Obj-C ivars with incomplete array type but only as the last ivar.\nAlso add a requirement for ivars that contain a flexible array member to\nbe at the end of class too. It is possible to add in a subclass another\nivar at the end but we\'ll emit a warning in this case. Also we\'ll emit a\nwarning if a variable sized ivar is declared in class extension or in\nimplementation because subclasses won\'t know they should avoid adding\nnew ivars.\n\nIn ARC incomplete array objects are treated as __unsafe_unretained so\nrequire them to be marked as such.\n\nProhibit synthesizing ivars with flexible array members because order of\nsynthesized ivars is not obvious and tricky to control. Spelling out\nivar explicitly gives control to developers and helps to avoid surprises\nwith unexpected ivar ordering.\n\nFor C and C++ changed diagnostic to tell explicitly a field is not the\nlast one and point to the next field. It is not as useful as in Obj-C\nbut it is an improvement and it is consistent with Obj-C. For C for\nunions emit more specific err_flexible_array_union instead of generic\nerr_field_incomplete.\n\nrdar://problem/21054495\n\nReviewers: rjmccall, theraven\n\nReviewed By: rjmccall\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D38773\n\nllvm-svn: 316381"}, [j]={{X,3816,"/// Diagnose attempts to use flexible array member with retainable object type.\nstatic void DiagnoseRetainableFlexibleArrayMember(Sema &S, ObjCInterfaceDecl *ID) {\n // ...\n for (auto ivar = ID->all_declared_ivar_begin(); ivar; ivar = ivar->getNextIvar()) {\n // ...\n if (IvarTy->isIncompleteArrayType() && (IvarTy.getObjCLifetime() != Qualifiers::OCL_ExplicitNone) && IvarTy->isObjCLifetimeType()) {\n S.Diag(ivar->getLocation(), diag::err_flexible_array_arc_retainable);"}}, [l]={ ["clang/test/SemaObjC/flexible-array-arc.m"]={"clang/test/SemaObjC/flexible-array-arc.m:8:6: error: ARC forbids flexible array members with retainable object type"} } }, ["err_flexible_array_empty_aggregate"]={ [d]="err_flexible_array_empty_aggregate", [f]="flexible array member %0 not allowed in otherwise empty %select{struct|interface|union|class|enum}1", [b]={{nil,nil,{"flexible array member A not allowed in otherwise empty ",{"struct","interface","union","class","enum"}}}}, [i]=k, [h]="flexible array member (.*?) not allowed in otherwise empty (?:struct|interface|union|class|enum)", [g]=a, [e]=m, [c]={"4101621dd746",1383388685,"Sema: Cleanup and simplify anonymous union diagnostics","Sema: Cleanup and simplify anonymous union diagnostics\n\nThe determination of which diagnostics would be issued for certain\nanonymous unions started to get a little ridiculous. Clean this up by\ninverting the condition-tree\'s logic from dialect -> issue to\nissue -> diagnostic.\n\nAs part of this cleanup, move ext_c99_flexible_array_member from\nDiagnosticParseKinds.td to DiagnosticSemaKinds.td because it\'s driven by\nSema, not Parse.\n\nAlso, the liberty was taken to edit ext_c99_flexible_array_member to\nmatch other, similar, diagnostics.\n\nllvm-svn: 193919"}, [j]={{A,18809,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n // ...\n if (FDTy->isFunctionType()) {\n // ...\n } else if (FDTy->isIncompleteArrayType() && (Record || isa<ObjCContainerDecl>(EnclosingDecl))) {\n if (Record) {\n // ...\n if (!Record->isUnion() && !IsLastField) {\n // ...\n } else if (Record->isUnion())\n // ...\n else if (NumNamedMembers < 1)\n DiagID = getLangOpts().MicrosoftExt ? diag::ext_flexible_array_empty_aggregate_ms : getLangOpts().CPlusPlus ? diag::ext_flexible_array_empty_aggregate_gnu : diag::err_flexible_array_empty_aggregate;"}}, [l]={ ["clang/test/C/drs/dr5xx.c"]={"clang/test/C/drs/dr5xx.c:32:18: error: flexible array member \'a\' not allowed in otherwise empty struct"} } }, ["err_flexible_array_has_nontrivial_dtor"]={ [d]="err_flexible_array_has_nontrivial_dtor", [f]="flexible array member %0 of type %1 with non-trivial destruction", [b]="flexible array member A of type B with non-trivial destruction", [i]=k, [h]="flexible array member (.*?) of type (.*?) with non\\-trivial destruction", [g]=a, [e]=m, [c]={"6fa28ffd5a60",1389401615,"Fix \"regression\" caused by updating our notion of POD to better match the C++11","Fix \"regression\" caused by updating our notion of POD to better match the C++11\nrules: instead of requiring flexible array members to be POD, require them to\nbe trivially-destructible. This seems to be the only constraint that actually\nmatters here (and even then, it\'s questionable whether this matters).\n\nllvm-svn: 198983"}, [j]={{A,18833,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n // ...\n if (FDTy->isFunctionType()) {\n // ...\n } else if (FDTy->isIncompleteArrayType() && (Record || isa<ObjCContainerDecl>(EnclosingDecl))) {\n if (Record) {\n // ...\n if (!BaseElem->isDependentType() && BaseElem.isDestructedType()) {\n Diag(FD->getLocation(), diag::err_flexible_array_has_nontrivial_dtor) << FD->getDeclName() << FD->getType();"}}, [l]={ ["clang/test/SemaCXX/flexible-array-test.cpp"]={"clang/test/SemaCXX/flexible-array-test.cpp:96:15: error: flexible array member \'ntd\' of type \'NonTrivDtor[]\' with non-trivial destruction"} } }, ["err_flexible_array_init"]={ [d]="err_flexible_array_init", [f]="initialization of flexible array member is not allowed", [b]="initialization of flexible array member is not allowed", [i]=k, [h]="initialization of flexible array member is not allowed", [g]=a, [e]=m, [c]={"3fa64df54333",1314138297,"Refactor and fix checking for initialization of flexible array members. The old version had the che...","Refactor and fix checking for initialization of flexible array members. The old version had the checks scattered across the code, missed some checks, and had a couple nasty bugs in existing checks.\n\nFixes PR10648 and another similar accepts-invalid bug.\n\nllvm-svn: 138398"}, [j]={{R,2106,"bool InitListChecker::CheckFlexibleArrayInit(const InitializedEntity &Entity, Expr *InitExpr, FieldDecl *Field, bool TopLevelObject) {\n // ...\n if (isa<InitListExpr>(InitExpr) && cast<InitListExpr>(InitExpr)->getNumInits() == 0) {\n // ...\n } else if (!TopLevelObject) {\n // ...\n FlexArrayDiag = diag::err_flexible_array_init;"},{R,2109,"bool InitListChecker::CheckFlexibleArrayInit(const InitializedEntity &Entity, Expr *InitExpr, FieldDecl *Field, bool TopLevelObject) {\n // ...\n if (isa<InitListExpr>(InitExpr) && cast<InitListExpr>(InitExpr)->getNumInits() == 0) {\n // ...\n } else if (!TopLevelObject) {\n // ...\n } else if (Entity.getKind() != InitializedEntity::EK_Variable) {\n // ...\n FlexArrayDiag = diag::err_flexible_array_init;"},{R,2112,"bool InitListChecker::CheckFlexibleArrayInit(const InitializedEntity &Entity, Expr *InitExpr, FieldDecl *Field, bool TopLevelObject) {\n // ...\n if (isa<InitListExpr>(InitExpr) && cast<InitListExpr>(InitExpr)->getNumInits() == 0) {\n // ...\n } else if (!TopLevelObject) {\n // ...\n } else if (Entity.getKind() != InitializedEntity::EK_Variable) {\n // ...\n } else if (cast<VarDecl>(Entity.getDecl())->hasLocalStorage()) {\n // ...\n FlexArrayDiag = diag::err_flexible_array_init;"},{R,5566,"static void TryOrBuildParenListInitialization(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args, InitializationSequence &Sequence, bool VerifyOnly, ExprResult *Result = nullptr) {\n // ...\n if (const ArrayType *AT = S.getASTContext().getAsArrayType(Entity.getType())) {\n // ...\n } else if (auto *RT = Entity.getType()->getAs<RecordType>()) {\n // ...\n for (FieldDecl *FD : RD->fields()) {\n // ...\n if (EntityIndexToProcess < Args.size()) {\n // ...\n // Incomplete array types indicate flexible array members. Do not allow\n // paren list initializations of structs with these members, as GCC\n // doesn\'t either.\n if (FD->getType()->isIncompleteArrayType()) {\n if (!VerifyOnly) {\n S.Diag(E->getBeginLoc(), diag::err_flexible_array_init) << SourceRange(E->getBeginLoc(), E->getEndLoc());"}}, [l]={ ["clang/test/Sema/flexible-array-init.c"]={"clang/test/Sema/flexible-array-init.c:10:23: error: initialization of flexible array member is not allowed","clang/test/Sema/flexible-array-init.c:25:23: error: initialization of flexible array member is not allowed","clang/test/Sema/flexible-array-init.c:29:26: error: initialization of flexible array member is not allowed","clang/test/Sema/flexible-array-init.c:36:34: error: initialization of flexible array member is not allowed","clang/test/Sema/flexible-array-init.c:74:40: error: initialization of flexible array member is not allowed","clang/test/Sema/flexible-array-init.c:76:40: error: initialization of flexible array member is not allowed","clang/test/Sema/flexible-array-init.c:85:23: error: initialization of flexible array member is not allowed","clang/test/Sema/flexible-array-init.c:90:43: error: initialization of flexible array member is not allowed"} } }, ["err_flexible_array_init_needs_braces"]={ [d]="err_flexible_array_init_needs_braces", [f]="flexible array requires brace-enclosed initializer", [b]="flexible array requires brace-enclosed initializer", [i]=k, [h]="flexible array requires brace\\-enclosed initializer", [g]=a, [e]=m, [c]={U,1237025389,T,W}, [j]={{R,2895,"/// Check the well-formedness of a C99 designated initializer.\n///\n/// Determines whether the designated initializer @p DIE, which\n/// resides at the given @p Index within the initializer list @p\n/// IList, is well-formed for a current object of type @p DeclType\n/// (C99 6.7.8). The actual subobject that this designator refers to\n/// within the current subobject is returned in either\n/// @p NextField or @p NextElementIndex (whichever is appropriate).\n///\n/// @param IList The initializer list in which this designated\n/// initializer occurs.\n///\n/// @param DIE The designated initializer expression.\n///\n/// @param DesigIdx The index of the current designator.\n///\n/// @param CurrentObjectType The type of the \"current object\" (C99 6.7.8p17),\n/// into which the designation in @p DIE should refer.\n///\n/// @param NextField If non-NULL and the first designator in @p DIE is\n/// a field, this will be set to the field declaration corresponding\n/// to the field named by the designator. On input, this is expected to be\n/// the next field that would be initialized in the absence of designation,\n/// if the complete object being initialized is a struct.\n///\n/// @param NextElementIndex If non-NULL and the first designator in @p\n/// DIE is an array designator or GNU array-range designator, this\n/// will be set to the last index initialized by this designator.\n///\n/// @param Index Index into @p IList where the designated initializer\n/// @p DIE occurs.\n///\n/// @param StructuredList The initializer list expression that\n/// describes all of the subobject initializers in the order they\'ll\n/// actually be initialized.\n///\n/// @returns true if there was an error, false otherwise.\nbool InitListChecker::CheckDesignatedInitializer(const InitializedEntity &Entity, InitListExpr *IList, DesignatedInitExpr *DIE, unsigned DesigIdx, QualType &CurrentObjectType, RecordDecl::field_iterator *NextField, llvm::APSInt *NextElementIndex, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex, bool FinishSubobjectInit, bool TopLevelObject) {\n // ...\n if (D->isFieldDesignator()) {\n // ...\n // This designator names a flexible array member.\n if (Field->getType()->isIncompleteArrayType()) {\n // ...\n if (!hadError && !isa<InitListExpr>(DIE->getInit()) && !isa<StringLiteral>(DIE->getInit())) {\n // The initializer is not an initializer list.\n if (!VerifyOnly) {\n SemaRef.Diag(DIE->getInit()->getBeginLoc(), diag::err_flexible_array_init_needs_braces) << DIE->getInit()->getSourceRange();"}}, [l]={ ["clang/test/Sema/flexible-array-init.c"]={"clang/test/Sema/flexible-array-init.c:37:33: error: flexible array requires brace-enclosed initializer"} } }, ["err_flexible_array_not_at_end"]={ [d]={{nil,gb,"err_flexible_array_not_at_end"}}, [f]={{nil,gb,"flexible array member %0 with type %1 is not at the end of %select{struct|interface|union|class|enum}2"}}, [b]={{nil,gb,{"flexible array member A with type B is not at the end of ",{"struct","interface","union","class","enum"}}}}, [i]=k, [h]="flexible array member (.*?) with type (.*?) is not at the end of (?:struct|interface|union|class|enum)", [g]=a, [e]={{nil,gb,m}}, [c]={"30680e943735",1508796101,"[Sema] Add support for flexible array members in Obj-C.","[Sema] Add support for flexible array members in Obj-C.\n\nAllow Obj-C ivars with incomplete array type but only as the last ivar.\nAlso add a requirement for ivars that contain a flexible array member to\nbe at the end of class too. It is possible to add in a subclass another\nivar at the end but we\'ll emit a warning in this case. Also we\'ll emit a\nwarning if a variable sized ivar is declared in class extension or in\nimplementation because subclasses won\'t know they should avoid adding\nnew ivars.\n\nIn ARC incomplete array objects are treated as __unsafe_unretained so\nrequire them to be marked as such.\n\nProhibit synthesizing ivars with flexible array members because order of\nsynthesized ivars is not obvious and tricky to control. Spelling out\nivar explicitly gives control to developers and helps to avoid surprises\nwith unexpected ivar ordering.\n\nFor C and C++ changed diagnostic to tell explicitly a field is not the\nlast one and point to the next field. It is not as useful as in Obj-C\nbut it is an improvement and it is consistent with Obj-C. For C for\nunions emit more specific err_flexible_array_union instead of generic\nerr_field_incomplete.\n\nrdar://problem/21054495\n\nReviewers: rjmccall, theraven\n\nReviewed By: rjmccall\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D38773\n\nllvm-svn: 316381"}, [j]={{A,18792,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n // ...\n if (FDTy->isFunctionType()) {\n // ...\n } else if (FDTy->isIncompleteArrayType() && (Record || isa<ObjCContainerDecl>(EnclosingDecl))) {\n if (Record) {\n // ...\n if (!Record->isUnion() && !IsLastField) {\n Diag(FD->getLocation(), diag::err_flexible_array_not_at_end) << FD->getDeclName() << FD->getType() << Record->getTagKind();"},{X,3887,"static void DiagnoseVariableSizedIvars(Sema &S, ObjCContainerDecl *OCD) {\n // ...\n // Check if variable sized ivar is followed by another ivar.\n for (ObjCIvarDecl *ivar = IntfDecl->all_declared_ivar_begin(); ivar; ivar = ivar->getNextIvar()) {\n // ...\n if (IvarTy->isIncompleteArrayType()) {\n S.Diag(ivar->getLocation(), diag::err_flexible_array_not_at_end) << ivar->getDeclName() << IvarTy << TTK_Class; // Use \"class\" for Obj-C."}}, [l]={ ["clang/test/SemaCXX/flexible-array-test.cpp"]={"clang/test/SemaCXX/flexible-array-test.cpp:70:8: error: flexible array member \'c\' with type \'char[]\' is not at the end of class"} } }, ["err_flexible_array_union"]={ [d]="err_flexible_array_union", [f]="flexible array member %0 in a union is not allowed", [b]="flexible array member A in a union is not allowed", [i]=k, [h]="flexible array member (.*?) in a union is not allowed", [g]=a, [e]=m, [c]={"4101621dd746",1383388685,"Sema: Cleanup and simplify anonymous union diagnostics","Sema: Cleanup and simplify anonymous union diagnostics\n\nThe determination of which diagnostics would be issued for certain\nanonymous unions started to get a little ridiculous. Clean this up by\ninverting the condition-tree\'s logic from dialect -> issue to\nissue -> diagnostic.\n\nAs part of this cleanup, move ext_c99_flexible_array_member from\nDiagnosticParseKinds.td to DiagnosticSemaKinds.td because it\'s driven by\nSema, not Parse.\n\nAlso, the liberty was taken to edit ext_c99_flexible_array_member to\nmatch other, similar, diagnostics.\n\nllvm-svn: 193919"}, [j]={{A,18803,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n // ...\n if (FDTy->isFunctionType()) {\n // ...\n } else if (FDTy->isIncompleteArrayType() && (Record || isa<ObjCContainerDecl>(EnclosingDecl))) {\n if (Record) {\n // ...\n if (!Record->isUnion() && !IsLastField) {\n // ...\n } else if (Record->isUnion())\n DiagID = getLangOpts().MicrosoftExt ? diag::ext_flexible_array_union_ms : getLangOpts().CPlusPlus ? diag::ext_flexible_array_union_gnu : diag::err_flexible_array_union;"}}, [l]={ ["clang/test/Sema/transparent-union.c"]={"clang/test/Sema/transparent-union.c:134:22: error: flexible array member \'b\' in a union is not allowed"} } }, ["err_flexible_array_virtual_base"]={ [d]="err_flexible_array_virtual_base", [f]="flexible array member %0 not allowed in %select{struct|interface|union|class|enum}1 which has a virtual base class", [b]={{nil,nil,{"flexible array member A not allowed in ",{"struct","interface","union","class","enum"}," which has a virtual base class"}}}, [i]=k, [h]="flexible array member (.*?) not allowed in (?:struct|interface|union|class|enum) which has a virtual base class", [g]=a, [e]=m, [c]={"08cd76006fda",1383391153,"Sema: Disallow derived classes with virtual bases from having flexible array members","Sema: Disallow derived classes with virtual bases from having flexible array members\n\nFlexible array members only work out if they are the last field of a\nrecord, however virtual bases would give us many situations where the\nflexible array member would overlap with the virtual base fields.\n\nIt is unlikely in the extreme that this behavior was intended by the\nuser so raise a diagnostic instead of accepting. This is will not\nreject conforming code because flexible array members are an extension\nin C++ mode.\n\nllvm-svn: 193920"}, [j]={{A,18820,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n // ...\n if (FDTy->isFunctionType()) {\n // ...\n } else if (FDTy->isIncompleteArrayType() && (Record || isa<ObjCContainerDecl>(EnclosingDecl))) {\n if (Record) {\n // ...\n // While the layout of types that contain virtual bases is not specified\n // by the C++ standard, both the Itanium and Microsoft C++ ABIs place\n // virtual bases after the derived members. This would make a flexible\n // array member declared at the end of an object not adjacent to the end\n // of the type.\n if (CXXRecord && CXXRecord->getNumVBases() != 0)\n Diag(FD->getLocation(), diag::err_flexible_array_virtual_base) << FD->getDeclName() << Record->getTagKind();"}}, [l]={ ["clang/test/SemaCXX/flexible-array-test.cpp"]={"clang/test/SemaCXX/flexible-array-test.cpp:87:7: error: flexible array member \'data\' not allowed in struct which has a virtual base class"} } }, ["err_fold_expression_bad_operand"]={ [d]="err_fold_expression_bad_operand", [f]="expression not permitted as operand of fold expression", [b]="expression not permitted as operand of fold expression", [i]=k, [h]="expression not permitted as operand of fold expression", [g]=a, [e]=m, [c]={Fb,1415423236,Gb,Eb}, [j]={{"clang/lib/Sema/SemaTemplateVariadic.cpp",1182,"static void CheckFoldOperand(Sema &S, Expr *E) {\n // ...\n if ((OCE && OCE->isInfixBinaryOp()) || isa<BinaryOperator>(E) || isa<AbstractConditionalOperator>(E)) {\n S.Diag(E->getExprLoc(), diag::err_fold_expression_bad_operand) << E->getSourceRange() << FixItHint::CreateInsertion(E->getBeginLoc(), \"(\") << FixItHint::CreateInsertion(E->getEndLoc(), \")\");"}}, [l]={ ["clang/test/Parser/cxx1z-fold-expressions.cpp"]={"clang/test/Parser/cxx1z-fold-expressions.cpp:17:37: error: expression not permitted as operand of fold expression","clang/test/Parser/cxx1z-fold-expressions.cpp:18:37: error: expression not permitted as operand of fold expression","clang/test/Parser/cxx1z-fold-expressions.cpp:19:61: error: expression not permitted as operand of fold expression","clang/test/Parser/cxx1z-fold-expressions.cpp:21:49: error: expression not permitted as operand of fold expression","clang/test/Parser/cxx1z-fold-expressions.cpp:22:41: error: expression not permitted as operand of fold expression","clang/test/Parser/cxx1z-fold-expressions.cpp:23:41: error: expression not permitted as operand of fold expression"} } }, ["err_fold_expression_empty"]={ [d]="err_fold_expression_empty", [f]="unary fold expression has empty expansion for operator \'%0\' with no fallback value", [b]="unary fold expression has empty expansion for operator \'A\' with no fallback value", [i]=k, [h]="unary fold expression has empty expansion for operator \'(.*?)\' with no fallback value", [g]=a, [e]=m, [c]={Fb,1415423236,Gb,Eb}, [j]={{"clang/lib/Sema/SemaTemplateVariadic.cpp",1287,"ExprResult Sema::BuildEmptyCXXFoldExpr(SourceLocation EllipsisLoc, BinaryOperatorKind Operator) {\n // ...\n default:\n return Diag(EllipsisLoc, diag::err_fold_expression_empty) << BinaryOperator::getOpcodeStr(Operator);"}}, [l]={ ["clang/test/SemaTemplate/cxx1z-fold-expressions.cpp"]={"clang/test/SemaTemplate/cxx1z-fold-expressions.cpp:45:8: error: unary fold expression has empty expansion for operator \'+\' with no fallback value","clang/test/SemaTemplate/cxx1z-fold-expressions.cpp:46:8: error: unary fold expression has empty expansion for operator \'*\' with no fallback value","clang/test/SemaTemplate/cxx1z-fold-expressions.cpp:47:8: error: unary fold expression has empty expansion for operator \'|\' with no fallback value","clang/test/SemaTemplate/cxx1z-fold-expressions.cpp:48:8: error: unary fold expression has empty expansion for operator \'&\' with no fallback value","clang/test/SemaTemplate/cxx1z-fold-expressions.cpp:49:8: error: unary fold expression has empty expansion for operator \'-\' with no fallback value","clang/test/SemaTemplate/cxx1z-fold-expressions.cpp:50:8: error: unary fold expression has empty expansion for operator \'/\' with no fallback value","clang/test/SemaTemplate/cxx1z-fold-expressions.cpp:51:8: error: unary fold expression has empty expansion for operator \'%\' with no fallback value","clang/test/SemaTemplate/cxx1z-fold-expressions.cpp:52:8: error: unary fold expression has empty expansion for operator \'=\' with no fallback value"} } }, ["err_fold_expression_limit_exceeded"]={ [d]={{nil,D,"err_fold_expression_limit_exceeded"}}, [f]={{nil,D,"instantiating fold expression with %0 arguments exceeded expression nesting limit of %1"}}, [b]={{nil,D,"instantiating fold expression with A arguments exceeded expression nesting limit of B"}}, [i]=ab, [h]="instantiating fold expression with (.*?) arguments exceeded expression nesting limit of (.*?)", [g]=a, [e]={{nil,D,m}}, [c]={"14f6bfcb52e7",1582847864,"[clang] Implement objc_non_runtime_protocol to remove protocol metadata","[clang] Implement objc_non_runtime_protocol to remove protocol metadata\n\nSummary:\nMotivated by the new objc_direct attribute, this change adds a new\nattribute that remotes metadata from Protocols that the programmer knows\nisn\'t going to be used at runtime. We simply have the frontend skip\ngenerating any protocol metadata entries (e.g. OBJC_CLASS_NAME,\n_OBJC_$_PROTOCOL_INSTANCE_METHDOS, _OBJC_PROTOCOL, etc) for a protocol\nmarked with `__attribute__((objc_non_runtime_protocol))`.\n\nThere are a few APIs used to retrieve a protocol at runtime.\n`@protocol(SomeProtocol)` will now error out of the requested protocol\nis marked with attribute. `objc_getProtocol` will return `NULL` which\nis consistent with the behavior of a non-existing protocol.\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D75574"}, [l]={ ["clang/test/SemaCXX/fold_expr_expansion_limit.cpp"]={"clang/test/SemaCXX/fold_expr_expansion_limit.cpp:4:43: fatal error: instantiating fold expression with 3 arguments exceeded expression nesting limit of 2"} } }, ["err_fold_expression_packs_both_sides"]={ [d]="err_fold_expression_packs_both_sides", [f]="binary fold expression has unexpanded parameter packs in both operands", [b]="binary fold expression has unexpanded parameter packs in both operands", [i]=k, [h]="binary fold expression has unexpanded parameter packs in both operands", [g]=a, [e]=m, [c]={Fb,1415423236,Gb,Eb}, [j]={{"clang/lib/Sema/SemaTemplateVariadic.cpp",1213,"ExprResult Sema::ActOnCXXFoldExpr(Scope *S, SourceLocation LParenLoc, Expr *LHS, tok::TokenKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc) {\n // ...\n // [expr.prim.fold]p3:\n // In a binary fold, op1 and op2 shall be the same fold-operator, and\n // either e1 shall contain an unexpanded parameter pack or e2 shall contain\n // an unexpanded parameter pack, but not both.\n if (LHS && RHS && LHS->containsUnexpandedParameterPack() == RHS->containsUnexpandedParameterPack()) {\n // ...\n return Diag(EllipsisLoc, LHS->containsUnexpandedParameterPack() ? diag::err_fold_expression_packs_both_sides : diag::err_pack_expansion_without_parameter_packs) << LHS->getSourceRange() << RHS->getSourceRange();"}}, [l]={ ["clang/test/Parser/cxx1z-fold-expressions.cpp"]={"clang/test/Parser/cxx1z-fold-expressions.cpp:15:39: error: binary fold expression has unexpanded parameter packs in both operands"} } }, ["err_fold_operator_mismatch"]={ [d]="err_fold_operator_mismatch", [f]="operators in fold expression must be the same", [b]="operators in fold expression must be the same", [i]=k, [h]="operators in fold expression must be the same", [g]=a, [e]=n, [c]={Fb,1415423236,Gb,Eb}, [j]={{F,3441,"/// Parse A C++1z fold-expression after the opening paren and optional\n/// left-hand-side expression.\n///\n/// \\verbatim\n/// fold-expression:\n/// ( cast-expression fold-operator ... )\n/// ( ... fold-operator cast-expression )\n/// ( cast-expression fold-operator ... fold-operator cast-expression )\nExprResult Parser::ParseFoldExpression(ExprResult LHS, BalancedDelimiterTracker &T) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n // ...\n if (Kind != tok::unknown && Tok.getKind() != Kind)\n Diag(Tok.getLocation(), diag::err_fold_operator_mismatch) << SourceRange(FirstOpLoc);"}}, [l]={ ["clang/test/Parser/cxx1z-fold-expressions.cpp"]={"clang/test/Parser/cxx1z-fold-expressions.cpp:32:49: error: operators in fold expression must be the same","clang/test/Parser/cxx1z-fold-expressions.cpp:33:49: error: operators in fold expression must be the same"} } }, ["err_for_co_await_not_range_for"]={ [d]="err_for_co_await_not_range_for", [f]="\'co_await\' modifier can only be applied to range-based for loop", [b]="\'co_await\' modifier can only be applied to range-based for loop", [i]=k, [h]="\'co_await\' modifier can only be applied to range\\-based for loop", [g]=a, [e]="Coroutines Issue", [c]={"0e304ea8a1a4",1445489174,"[coroutines] Add parsing support for co_await expression, co_yield expression,","[coroutines] Add parsing support for co_await expression, co_yield expression,\nco_await modifier on range-based for loop, co_return statement.\n\nllvm-svn: 250985"}, [j]={{B,2226,"/// ParseForStatement\n/// for-statement: [C99 6.8.5.3]\n/// \'for\' \'(\' expr[opt] \';\' expr[opt] \';\' expr[opt] \')\' statement\n/// \'for\' \'(\' declaration expr[opt] \';\' expr[opt] \')\' statement\n/// [C++] \'for\' \'(\' for-init-statement condition[opt] \';\' expression[opt] \')\'\n/// [C++] statement\n/// [C++0x] \'for\'\n/// \'co_await\'[opt] [Coroutines]\n/// \'(\' for-range-declaration \':\' for-range-initializer \')\'\n/// statement\n/// [OBJC2] \'for\' \'(\' declaration \'in\' expr \')\' statement\n/// [OBJC2] \'for\' \'(\' expr \'in\' expr \')\' statement\n///\n/// [C++] for-init-statement:\n/// [C++] expression-statement\n/// [C++] simple-declaration\n/// [C++23] alias-declaration\n///\n/// [C++0x] for-range-declaration:\n/// [C++0x] attribute-specifier-seq[opt] type-specifier-seq declarator\n/// [C++0x] for-range-initializer:\n/// [C++0x] expression\n/// [C++0x] braced-init-list [TODO]\nStmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {\n // ...\n // C++ Coroutines [stmt.iter]:\n // \'co_await\' can only be used for a range-based for statement.\n if (CoawaitLoc.isValid() && !ForRangeInfo.ParsedForRangeDecl()) {\n Diag(CoawaitLoc, diag::err_for_co_await_not_range_for);"}}, [l]={ ["clang/test/Parser/cxx20-coroutines.cpp"]={"clang/test/Parser/cxx20-coroutines.cpp:15:7: error: \'co_await\' modifier can only be applied to range-based for loop"} } }, ["err_for_range_decl_must_be_var"]={ [d]="err_for_range_decl_must_be_var", [f]=wb, [b]=wb, [i]=k, [h]=wb, [g]=a, [e]=m, [c]={Sb,1302818966,Rb,Qb}, [j]={{A,13945,"void Sema::ActOnCXXForRangeDecl(Decl *D) {\n // ...\n if (!VD) {\n Diag(D->getLocation(), diag::err_for_range_decl_must_be_var);"}}, [l]={ ["clang/test/SemaObjCXX/foreach.mm"]={"clang/test/SemaObjCXX/foreach.mm:9:16: error: for range declaration must declare a variable","clang/test/SemaObjCXX/foreach.mm:10:12: error: for range declaration must declare a variable","clang/test/SemaObjCXX/foreach.mm:74:17: error: for range declaration must declare a variable"} } }, ["err_for_range_deduction_failure"]={ [d]="err_for_range_deduction_failure", [f]="cannot use type %0 as a range", [b]="cannot use type A as a range", [i]=k, [h]="cannot use type (.*?) as a range", [g]=a, [e]=m, [c]={Sb,1302818966,Rb,Qb}, [j]={{V,2534,"/// ActOnCXXForRangeStmt - Check and build a C++11 for-range statement.\n///\n/// C++11 [stmt.ranged]:\n/// A range-based for statement is equivalent to\n///\n/// {\n/// auto && __range = range-init;\n/// for ( auto __begin = begin-expr,\n/// __end = end-expr;\n/// __begin != __end;\n/// ++__begin ) {\n/// for-range-declaration = *__begin;\n/// statement\n/// }\n/// }\n///\n/// The body of the loop is not available yet, since it cannot be analysed until\n/// we have determined the type of the for-range-declaration.\nStmtResult Sema::ActOnCXXForRangeStmt(Scope *S, SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, Stmt *First, SourceLocation ColonLoc, Expr *Range, SourceLocation RParenLoc, BuildForRangeKind Kind) {\n // ...\n if (FinishForRangeVarDecl(*this, RangeVar, Range, RangeLoc, diag::err_for_range_deduction_failure)) {"}}, [l]={ ["clang/test/SemaCXX/typo-correction-crash.cpp"]={"clang/test/SemaCXX/typo-correction-crash.cpp:49:24: error: cannot use type \'void\' as a range"} } }, ["err_for_range_dereference"]={ [d]="err_for_range_dereference", [f]="invalid range expression of type %0; did you mean to dereference it with \'*\'?", [b]="invalid range expression of type A; did you mean to dereference it with \'*\'?", [i]=k, [h]="invalid range expression of type (.*?); did you mean to dereference it with \'\\*\'\\?", [g]=a, [e]=m, [c]={"0f38443616f5",1345510321,"Better diagnostics for range-based for loops with bad range types.","Better diagnostics for range-based for loops with bad range types.\n\nThe old error message stating that \'begin\' was an undeclared identifier\nis replaced with a new message explaining that the error is in the range\nexpression, along with which of the begin() and end() functions was\nproblematic if relevant.\n\nAdditionally, if the range was a pointer type or defines operator*,\nattempt to dereference the range, and offer a FixIt if the modified range\nworks.\n\nllvm-svn: 162248"}, [j]={{V,2733,"/// Speculatively attempt to dereference an invalid range expression.\n/// If the attempt fails, this function will return a valid, null StmtResult\n/// and emit no diagnostics.\nstatic StmtResult RebuildForRangeWithDereference(Sema &SemaRef, Scope *S, SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, Stmt *LoopVarDecl, SourceLocation ColonLoc, Expr *Range, SourceLocation RangeLoc, SourceLocation RParenLoc) {\n // ...\n SemaRef.Diag(RangeLoc, diag::err_for_range_dereference) << Range->getType() << FixItHint::CreateInsertion(RangeLoc, \"*\");"}}, [l]={ ["clang/test/SemaCXX/for-range-dereference.cpp"]={"clang/test/SemaCXX/for-range-dereference.cpp:40:17: error: invalid range expression of type \'T *\'; did you mean to dereference it with \'*\'?","clang/test/SemaCXX/for-range-dereference.cpp:45:17: error: invalid range expression of type \'int (*)[10]\'; did you mean to dereference it with \'*\'?","clang/test/SemaCXX/for-range-dereference.cpp:74:17: error: invalid range expression of type \'PrivateEnd *\'; did you mean to dereference it with \'*\'?","clang/test/SemaCXX/for-range-dereference.cpp:84:17: error: invalid range expression of type \'OverloadedStar\'; did you mean to dereference it with \'*\'?","clang/test/SemaCXX/for-range-dereference.cpp:86:18: error: invalid range expression of type \'T *\'; did you mean to dereference it with \'*\'?"} } }, ["err_for_range_expected_decl"]={ [d]="err_for_range_expected_decl", [f]=wb, [b]=wb, [i]=k, [h]=wb, [g]=a, [e]=n, [c]={"4f848f1dac75",1324421780,"PR11297: Provide a better diagnostic for code which contains a","PR11297: Provide a better diagnostic for code which contains a\nreasonable-looking but ill-formed for-range statement of the form:\n\n for (expression : expression)\n\nllvm-svn: 147006"}, [j]={{B,2131,"/// ParseForStatement\n/// for-statement: [C99 6.8.5.3]\n/// \'for\' \'(\' expr[opt] \';\' expr[opt] \';\' expr[opt] \')\' statement\n/// \'for\' \'(\' declaration expr[opt] \';\' expr[opt] \')\' statement\n/// [C++] \'for\' \'(\' for-init-statement condition[opt] \';\' expression[opt] \')\'\n/// [C++] statement\n/// [C++0x] \'for\'\n/// \'co_await\'[opt] [Coroutines]\n/// \'(\' for-range-declaration \':\' for-range-initializer \')\'\n/// statement\n/// [OBJC2] \'for\' \'(\' declaration \'in\' expr \')\' statement\n/// [OBJC2] \'for\' \'(\' expr \'in\' expr \')\' statement\n///\n/// [C++] for-init-statement:\n/// [C++] expression-statement\n/// [C++] simple-declaration\n/// [C++23] alias-declaration\n///\n/// [C++0x] for-range-declaration:\n/// [C++0x] attribute-specifier-seq[opt] type-specifier-seq declarator\n/// [C++0x] for-range-initializer:\n/// [C++0x] expression\n/// [C++0x] braced-init-list [TODO]\nStmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {\n // ...\n // Parse the first part of the for specifier.\n if (Tok.is(tok::semi)) { // for (;\n // ...\n } else if (getLangOpts().CPlusPlus && Tok.is(tok::identifier) && isForRangeIdentifier()) {\n // ...\n } else if (isForInitDeclaration()) { // for (int X = 4;\n // ...\n } else {\n // ...\n if (Tok.is(tok::semi)) {\n // ...\n } else if (ForEach) {\n // ...\n } else if (getLangOpts().CPlusPlus11 && Tok.is(tok::colon) && FirstPart.get()) {\n // ...\n Diag(Tok, diag::err_for_range_expected_decl) << FirstPart.get()->getSourceRange();"}} }, ["err_for_range_identifier"]={ [d]="err_for_range_identifier", [f]="range-based for loop requires type for loop variable", [b]="range-based for loop requires type for loop variable", [i]=k, [h]="range\\-based for loop requires type for loop variable", [g]=a, [e]=n, [c]={"83d3f150c86a",1417053267,"[c++1z] Remove terse range-based for loops; they\'ve been removed from","[c++1z] Remove terse range-based for loops; they\'ve been removed from\nconsideration for C++17 for now. Update C++ status page to match.\n\nllvm-svn: 222865"}, [j]={{B,2042,"/// ParseForStatement\n/// for-statement: [C99 6.8.5.3]\n/// \'for\' \'(\' expr[opt] \';\' expr[opt] \';\' expr[opt] \')\' statement\n/// \'for\' \'(\' declaration expr[opt] \';\' expr[opt] \')\' statement\n/// [C++] \'for\' \'(\' for-init-statement condition[opt] \';\' expression[opt] \')\'\n/// [C++] statement\n/// [C++0x] \'for\'\n/// \'co_await\'[opt] [Coroutines]\n/// \'(\' for-range-declaration \':\' for-range-initializer \')\'\n/// statement\n/// [OBJC2] \'for\' \'(\' declaration \'in\' expr \')\' statement\n/// [OBJC2] \'for\' \'(\' expr \'in\' expr \')\' statement\n///\n/// [C++] for-init-statement:\n/// [C++] expression-statement\n/// [C++] simple-declaration\n/// [C++23] alias-declaration\n///\n/// [C++0x] for-range-declaration:\n/// [C++0x] attribute-specifier-seq[opt] type-specifier-seq declarator\n/// [C++0x] for-range-initializer:\n/// [C++0x] expression\n/// [C++0x] braced-init-list [TODO]\nStmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {\n // ...\n // Parse the first part of the for specifier.\n if (Tok.is(tok::semi)) { // for (;\n // ...\n } else if (getLangOpts().CPlusPlus && Tok.is(tok::identifier) && isForRangeIdentifier()) {\n // ...\n Diag(Loc, diag::err_for_range_identifier) << ((getLangOpts().CPlusPlus11 && !getLangOpts().CPlusPlus17) ? FixItHint::CreateInsertion(Loc, \"auto &&\") : FixItHint());"}}, [l]={ ["clang/test/SemaCXX/for-range-examples.cpp"]={"clang/test/SemaCXX/for-range-examples.cpp:217:10: error: range-based for loop requires type for loop variable","clang/test/SemaCXX/for-range-examples.cpp:219:10: error: range-based for loop requires type for loop variable","clang/test/SemaCXX/for-range-examples.cpp:220:10: error: range-based for loop requires type for loop variable","clang/test/SemaCXX/for-range-examples.cpp:221:10: error: range-based for loop requires type for loop variable","clang/test/SemaCXX/for-range-examples.cpp:224:10: error: range-based for loop requires type for loop variable","clang/test/SemaCXX/for-range-examples.cpp:225:10: error: range-based for loop requires type for loop variable"} } }, ["err_for_range_incomplete_type"]={ [d]="err_for_range_incomplete_type", [f]="cannot use incomplete type %0 as a range", [b]="cannot use incomplete type A as a range", [i]=k, [h]="cannot use incomplete type (.*?) as a range", [g]=a, [e]=m, [c]={Sb,1302818966,Rb,Qb}, [j]={{V,2804,"/// BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.\nStmtResult Sema::BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *Begin, Stmt *End, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind) {\n // ...\n if (RangeVarType->isDependentType()) {\n // ...\n } else if (!BeginDeclStmt.get()) {\n // ...\n if (RequireCompleteType(RangeLoc, RangeType, diag::err_for_range_incomplete_type))"}}, [l]={ ["clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp"]={"clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp:124:17: error: cannot use incomplete type \'int[]\' as a range","clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp:127:18: error: cannot use incomplete type \'struct Incomplete[2]\' as a range","clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp:214:17: error: cannot use incomplete type \'struct Incomplete\' as a range"} } }, ["err_for_range_invalid"]={ [d]="err_for_range_invalid", [f]="invalid range expression of type %0; no viable \'%select{begin|end}1\' function available", [b]={{nil,nil,{"invalid range expression of type A; no viable \'",{"begin","end"},"\' function available"}}}, [i]=k, [h]="invalid range expression of type (.*?); no viable \'(?:begin|end)\' function available", [g]=a, [e]=m, [c]={"0f38443616f5",1345510321,"Better diagnostics for range-based for loops with bad range types.","Better diagnostics for range-based for loops with bad range types.\n\nThe old error message stating that \'begin\' was an undeclared identifier\nis replaced with a new message explaining that the error is in the range\nexpression, along with which of the begin() and end() functions was\nproblematic if relevant.\n\nAdditionally, if the range was a pointer type or defines operator*,\nattempt to dereference the range, and offer a FixIt if the modified range\nworks.\n\nllvm-svn: 162248"}, [j]={{V,2670,"/// Create the initialization, compare, and increment steps for\n/// the range-based for loop expression.\n/// This function does not handle array-based for loops,\n/// which are created in Sema::BuildCXXForRangeStmt.\n///\n/// \\returns a ForRangeStatus indicating success or what kind of error occurred.\n/// BeginExpr and EndExpr are set and FRS_Success is returned on success;\n/// CandidateSet and BEF are set and some non-success value is returned on\n/// failure.\nstatic Sema::ForRangeStatus BuildNonArrayForRange(Sema &SemaRef, Expr *BeginRange, Expr *EndRange, QualType RangeType, VarDecl *BeginVar, VarDecl *EndVar, SourceLocation ColonLoc, SourceLocation CoawaitLoc, OverloadCandidateSet *CandidateSet, ExprResult *BeginExpr, ExprResult *EndExpr, BeginEndFunction *BEF) {\n // ...\n if (CXXRecordDecl *D = RangeType->getAsCXXRecordDecl()) {\n // ...\n if (BeginMemberLookup.empty() != EndMemberLookup.empty()) {\n // Look up the non-member form of the member we didn\'t find, first.\n // This way we prefer a \"no viable \'end\'\" diagnostic over a \"i found\n // a \'begin\' but ignored it because there was no member \'end\'\"\n // diagnostic.\n auto BuildNonmember = [&](BeginEndFunction BEFFound, LookupResult &Found, llvm::function_ref<Sema::ForRangeStatus()> BuildFound, llvm::function_ref<Sema::ForRangeStatus()> BuildNotFound) {\n // ...\n case Sema::FRS_NoViableFunction:\n CandidateSet->NoteCandidates(PartialDiagnosticAt(BeginRange->getBeginLoc(), SemaRef.PDiag(diag::err_for_range_invalid) << BeginRange->getType() << BEFFound), SemaRef, OCD_AllCandidates, BeginRange);"},{V,2950,"/// BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.\nStmtResult Sema::BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *Begin, Stmt *End, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind) {\n // ...\n if (RangeVarType->isDependentType()) {\n // ...\n } else if (!BeginDeclStmt.get()) {\n // ...\n if (const ArrayType *UnqAT = RangeType->getAsArrayTypeUnsafe()) {\n // ...\n } else {\n // ...\n // Otherwise, emit diagnostics if we haven\'t already.\n if (RangeStatus == FRS_NoViableFunction) {\n // ...\n CandidateSet.NoteCandidates(PartialDiagnosticAt(Range->getBeginLoc(), PDiag(diag::err_for_range_invalid) << RangeLoc << Range->getType() << BEFFailure), *this, OCD_AllCandidates, Range);"}}, [l]={ ["clang/test/SemaCXX/for-range-dereference.cpp"]={"clang/test/SemaCXX/for-range-dereference.cpp:48:15: error: invalid range expression of type \'NoBegin\'; no viable \'begin\' function available","clang/test/SemaCXX/for-range-dereference.cpp:50:15: error: invalid range expression of type \'NoBegin *\'; no viable \'begin\' function available","clang/test/SemaCXX/for-range-dereference.cpp:52:15: error: invalid range expression of type \'NoBegin **\'; no viable \'begin\' function available","clang/test/SemaCXX/for-range-dereference.cpp:54:15: error: invalid range expression of type \'NoBegin *****\'; no viable \'begin\' function available","clang/test/SemaCXX/for-range-dereference.cpp:57:15: error: invalid range expression of type \'ADLNoEnd\'; no viable \'end\' function available","clang/test/SemaCXX/for-range-dereference.cpp:59:15: error: invalid range expression of type \'ADLNoEnd *\'; no viable \'begin\' function available","clang/test/SemaCXX/for-range-dereference.cpp:66:15: error: invalid range expression of type \'DeletedEnd *\'; no viable \'begin\' function available"} } }, ["err_for_range_iter_deduction_failure"]={ [d]="err_for_range_iter_deduction_failure", [f]="cannot use type %0 as an iterator", [b]="cannot use type A as an iterator", [i]=k, [h]="cannot use type (.*?) as an iterator", [g]=a, [e]=m, [c]={Sb,1302818966,Rb,Qb}, [j]={{V,2607,"/// Create the initialization, compare, and increment steps for\n/// the range-based for loop expression.\n/// This function does not handle array-based for loops,\n/// which are created in Sema::BuildCXXForRangeStmt.\n///\n/// \\returns a ForRangeStatus indicating success or what kind of error occurred.\n/// BeginExpr and EndExpr are set and FRS_Success is returned on success;\n/// CandidateSet and BEF are set and some non-success value is returned on\n/// failure.\nstatic Sema::ForRangeStatus BuildNonArrayForRange(Sema &SemaRef, Expr *BeginRange, Expr *EndRange, QualType RangeType, VarDecl *BeginVar, VarDecl *EndVar, SourceLocation ColonLoc, SourceLocation CoawaitLoc, OverloadCandidateSet *CandidateSet, ExprResult *BeginExpr, ExprResult *EndExpr, BeginEndFunction *BEF) {\n // ...\n auto BuildBegin = [&] {\n // ...\n if (FinishForRangeVarDecl(SemaRef, BeginVar, BeginExpr->get(), ColonLoc, diag::err_for_range_iter_deduction_failure)) {"},{V,2627,"/// Create the initialization, compare, and increment steps for\n/// the range-based for loop expression.\n/// This function does not handle array-based for loops,\n/// which are created in Sema::BuildCXXForRangeStmt.\n///\n/// \\returns a ForRangeStatus indicating success or what kind of error occurred.\n/// BeginExpr and EndExpr are set and FRS_Success is returned on success;\n/// CandidateSet and BEF are set and some non-success value is returned on\n/// failure.\nstatic Sema::ForRangeStatus BuildNonArrayForRange(Sema &SemaRef, Expr *BeginRange, Expr *EndRange, QualType RangeType, VarDecl *BeginVar, VarDecl *EndVar, SourceLocation ColonLoc, SourceLocation CoawaitLoc, OverloadCandidateSet *CandidateSet, ExprResult *BeginExpr, ExprResult *EndExpr, BeginEndFunction *BEF) {\n // ...\n auto BuildEnd = [&] {\n // ...\n if (FinishForRangeVarDecl(SemaRef, EndVar, EndExpr->get(), ColonLoc, diag::err_for_range_iter_deduction_failure)) {"},{V,2831,"/// BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.\nStmtResult Sema::BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *Begin, Stmt *End, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind) {\n // ...\n if (RangeVarType->isDependentType()) {\n // ...\n } else if (!BeginDeclStmt.get()) {\n // ...\n if (const ArrayType *UnqAT = RangeType->getAsArrayTypeUnsafe()) {\n // ...\n if (FinishForRangeVarDecl(*this, BeginVar, BeginRangeRef.get(), ColonLoc, diag::err_for_range_iter_deduction_failure)) {"},{V,2904,"/// BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.\nStmtResult Sema::BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *Begin, Stmt *End, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind) {\n // ...\n if (RangeVarType->isDependentType()) {\n // ...\n } else if (!BeginDeclStmt.get()) {\n // ...\n if (const ArrayType *UnqAT = RangeType->getAsArrayTypeUnsafe()) {\n // ...\n if (FinishForRangeVarDecl(*this, EndVar, EndExpr.get(), ColonLoc, diag::err_for_range_iter_deduction_failure)) {"}}, [l]={ ["clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp"]={"clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp:134:15: error: cannot use type \'void\' as an iterator","clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp:270:15: error: cannot use type \'void\' as an iterator"} } }, ["err_for_range_storage_class"]={ [d]="err_for_range_storage_class", [f]={{nil,D,"loop variable %0 may not be declared %select{\'extern\'|\'static\'|\'__private_extern__\'|\'auto\'|\'register\'|\'constexpr\'|\'thread_local\'}1"},{jb,nil,"loop variable %0 may not be declared %select{\'extern\'|\'static\'|\'__private_extern__\'|\'auto\'|\'register\'|\'constexpr\'}1"}}, [b]={{nil,D,{"loop variable A may not be declared ",{"\'extern\'","\'static\'","\'__private_extern__\'","\'auto\'","\'register\'","\'constexpr\'","\'thread_local\'"}}},{jb,nil,{"loop variable A may not be declared ",{"\'extern\'","\'static\'","\'__private_extern__\'","\'auto\'","\'register\'","\'constexpr\'"}}}}, [i]=k, [h]="loop variable (.*?) may not be declared (?:\'extern\'|\'static\'|\'__private_extern__\'|\'auto\'|\'register\'|\'constexpr\'|\'thread_local\')", [g]=a, [e]=m, [c]={Sb,1302818966,Rb,Qb}, [j]={{A,13986,"void Sema::ActOnCXXForRangeDecl(Decl *D) {\n // ...\n if (Error != -1) {\n Diag(VD->getOuterLocStart(), diag::err_for_range_storage_class) << VD << Error;"}}, [l]={ ["clang/test/Parser/cxx2a-init-statement.cpp"]={"clang/test/Parser/cxx2a-init-statement.cpp:35:19: error: loop variable \'m\' may not be declared \'static\'"} } }, ["err_format_attribute_implicit_this_format_string"]={ [d]="err_format_attribute_implicit_this_format_string", [f]="format attribute cannot specify the implicit this argument as the format string", [b]="format attribute cannot specify the implicit this argument as the format string", [i]=k, [h]="format attribute cannot specify the implicit this argument as the format string", [g]=a, [e]=m, [c]={"743682bb9f66",1289896543,"Re-work the handling of implicit \'this\' arguments and silly GCC-style attribute","Re-work the handling of implicit \'this\' arguments and silly GCC-style attribute\nargument indexes. This handles the offsets in a consistent manner for all of\nthe attributes which I saw working with these concepts. I\'ve also added tests\nfor the attribute that motivated this: nonnull.\n\nI consolidated the tests for format attributes into one file, and fleshed them\nout a bit to trigger more of the warning cases. Also improved the quality of\nsome of the diagnostics that occur with invalid argument indices.\n\nThe only really questionable change here is supporting the implicit this\nargument for the ownership attribute. I\'m not sure it\'s really a sensible\nconcept there, but implemented the logic for consistency.\n\nllvm-svn: 119339"}, [j]={{tb,3985,"/// Handle __attribute__((format(type,idx,firstarg))) attributes based on\n/// http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html\nstatic void handleFormatAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (HasImplicitThisParam) {\n if (ArgIdx == 0) {\n S.Diag(AL.getLoc(), diag::err_format_attribute_implicit_this_format_string) << IdxExpr->getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/attr-format.cpp"]={"clang/test/SemaCXX/attr-format.cpp:15:43: error: format attribute cannot specify the implicit this argument as the format string"} } }, ["err_format_attribute_not"]={ [d]="err_format_attribute_not", [f]={{nil,x,"format argument not a string type"},{y,nil,"format argument not %0"}}, [b]={{nil,x,"format argument not a string type"},{y,nil,"format argument not A"}}, [i]=k, [h]="format argument not a string type", [g]=a, [e]=m, [c]={u,1236199783,v,w}, [j]={{tb,3787,"/// Handle __attribute__((format_arg((idx)))) attribute based on\n/// http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html\nstatic void handleFormatArgAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (NotNSStringTy && !isCFStringType(Ty, S.Context) && (!Ty->isPointerType() || !Ty->castAs<PointerType>()->getPointeeType()->isCharType())) {\n S.Diag(AL.getLoc(), diag::err_format_attribute_not) << IdxExpr->getSourceRange() << getFunctionOrMethodParamRange(D, 0);"},{tb,3999,"/// Handle __attribute__((format(type,idx,firstarg))) attributes based on\n/// http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html\nstatic void handleFormatAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!isNSStringType(Ty, S.Context, true) && !isCFStringType(Ty, S.Context) && (!Ty->isPointerType() || !Ty->castAs<PointerType>()->getPointeeType()->isCharType())) {\n S.Diag(AL.getLoc(), diag::err_format_attribute_not) << IdxExpr->getSourceRange() << getFunctionOrMethodParamRange(D, ArgIdx);"}}, [l]={ ["clang/test/Sema/block-printf-attribute-1.c"]={"clang/test/Sema/block-printf-attribute-1.c:6:65: error: format argument not a string type","clang/test/Sema/block-printf-attribute-1.c:7:23: error: format argument not a string type"} } }, ["err_format_attribute_result_not"]={ [d]="err_format_attribute_result_not", [f]="function does not return %0", [b]="function does not return A", [i]=k, [h]="function does not return (.*?)", [g]=a, [e]=m, [c]={"f1c25029b4c6",1242841303,"implementation of format_arg for ObjC methods/functions.","implementation of format_arg for ObjC methods/functions.\nStill more to do.\n\nllvm-svn: 72173"}, [j]={{tb,3803,"/// Handle __attribute__((format_arg((idx)))) attribute based on\n/// http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html\nstatic void handleFormatArgAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!isNSStringType(Ty, S.Context, /*AllowNSAttributedString=*/true) && !isCFStringType(Ty, S.Context) && (!Ty->isPointerType() || !Ty->castAs<PointerType>()->getPointeeType()->isCharType())) {\n S.Diag(AL.getLoc(), diag::err_format_attribute_result_not) << (NotNSStringTy ? \"string type\" : \"NSString\") << IdxExpr->getSourceRange() << getFunctionOrMethodParamRange(D, 0);"}}, [l]={ ["clang/test/SemaObjC/format-arg-attribute.m"]={"clang/test/SemaObjC/format-arg-attribute.m:12:62: error: function does not return string type","clang/test/SemaObjC/format-arg-attribute.m:37:50: error: function does not return NSString"} } }, ["err_format_strftime_third_parameter"]={ [d]="err_format_strftime_third_parameter", [f]="strftime format attribute requires 3rd parameter to be 0", [b]="strftime format attribute requires 3rd parameter to be 0", [i]=k, [h]="strftime format attribute requires 3rd parameter to be 0", [g]=a, [e]=m, [c]={u,1236199783,v,w}, [j]={{tb,4015,"/// Handle __attribute__((format(type,idx,firstarg))) attributes based on\n/// http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html\nstatic void handleFormatAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n // FirstArg == 0 is is always valid.\n if (FirstArg != 0) {\n if (Kind == StrftimeFormat) {\n // ...\n S.Diag(AL.getLoc(), diag::err_format_strftime_third_parameter) << FirstArgExpr->getSourceRange() << FixItHint::CreateReplacement(FirstArgExpr->getSourceRange(), \"0\");"}}, [l]={ ["clang/test/Sema/attr-format.c"]={"clang/test/Sema/attr-format.c:20:46: error: strftime format attribute requires 3rd parameter to be 0"} } }, ["err_forward_ref_enum"]={ [d]="err_forward_ref_enum", [f]="ISO C++ forbids forward references to \'enum\' types", [b]="ISO C++ forbids forward references to \'enum\' types", [i]=k, [h]="ISO C\\+\\+ forbids forward references to \'enum\' types", [g]=a, [e]=m, [c]={U,1237025389,T,W}, [j]={{A,17514,"CreateNewDecl:\n // ...\n if (Kind == TTK_Enum) {\n // ...\n // If this is an undefined enum, warn.\n if (TUK != TUK_Definition && !Invalid) {\n // ...\n if (IsFixed && cast<EnumDecl>(New)->isFixed()) {\n // ...\n } else if (PrevDecl && (Def = cast<EnumDecl>(PrevDecl)->getDefinition())) {\n // ...\n } else {\n // ...\n if (getLangOpts().MSVCCompat)\n // ...\n else if (getLangOpts().CPlusPlus)\n DiagID = diag::err_forward_ref_enum;"}}, [l]={ ["clang/test/SemaCXX/linkage-invalid-decl.cpp"]={"clang/test/SemaCXX/linkage-invalid-decl.cpp:5:20: error: ISO C++ forbids forward references to \'enum\' types"} } }, ["err_forward_superclass"]={ [d]="err_forward_superclass", [f]="attempting to use the forward class %0 as superclass of %1", [b]="attempting to use the forward class A as superclass of B", [i]=k, [h]="attempting to use the forward class (.*?) as superclass of (.*?)", [g]=a, [e]=m, [c]={"3ee91fad9063",1308870979,"When forming a cycle in objc\'s inheritance hierarchy,","When forming a cycle in objc\'s inheritance hierarchy,\ndiagnose it properly and don\'t throw clang into an\ninfinit loop. // rdar://9653341\n\nllvm-svn: 133773"}, [j]={{X,621,"void Sema::ActOnSuperClassOfClassInterface(Scope *S, SourceLocation AtInterfaceLoc, ObjCInterfaceDecl *IDecl, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef<ParsedType> SuperTypeArgs, SourceRange SuperTypeArgsRange) {\n // ...\n if (declaresSameEntity(PrevDecl, IDecl)) {\n // ...\n } else {\n // ...\n if (!isa_and_nonnull<TypedefNameDecl>(PrevDecl)) {\n // ...\n else if (RequireCompleteType(SuperLoc, SuperClassType, diag::err_forward_superclass, SuperClassDecl->getDeclName(), ClassName, SourceRange(AtInterfaceLoc, ClassLoc))) {"}}, [l]={ ["clang/test/SemaObjC/forward-class-1.m"]={"clang/test/SemaObjC/forward-class-1.m:6:19: error: attempting to use the forward class \'FOO\' as superclass of \'INTF\'","clang/test/SemaObjC/forward-class-1.m:50:16: error: attempting to use the forward class \'B\' as superclass of \'A\'"} } }, ["err_found_in_dependent_base"]={ [d]={{nil,D,"err_found_in_dependent_base"}}, [f]={{nil,D,"explicit qualification required to use member %0 from dependent base class"}}, [b]={{nil,D,"explicit qualification required to use member A from dependent base class"}}, [i]=k, [h]="explicit qualification required to use member (.*?) from dependent base class", [g]=a, [e]={{nil,D,m}}, [c]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types","Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to support fadd/fsub:\n\nhttps://reviews.llvm.org/D53965\n\nHowever clang atomic builtins fetch add/sub still does not support\nemitting atomicrmw fadd/fsub.\n\nThis patch adds that.\n\nReviewed by: John McCall, Artem Belevich, Matt Arsenault, JF Bastien,\nJames Y Knight, Louis Dionne, Olivier Giroux\n\nDifferential Revision: https://reviews.llvm.org/D71726"}, [j]={{rb,2326,"/// Diagnose a lookup that found results in an enclosing class during error\n/// recovery. This usually indicates that the results were found in a dependent\n/// base class that could not be searched as part of a template definition.\n/// Always issues a diagnostic (though this may be only a warning in MS\n/// compatibility mode).\n///\n/// Return \\c true if the error is unrecoverable, or \\c false if the caller\n/// should attempt to recover using these lookup results.\nbool Sema::DiagnoseDependentMemberLookup(const LookupResult &R) {\n // ...\n unsigned DiagID = diag::err_found_in_dependent_base;"}}, [l]={ ["clang/test/SemaTemplate/dependent-names.cpp"]={"clang/test/SemaTemplate/dependent-names.cpp:99:7: error: explicit qualification required to use member \'foo\' from dependent base class"} } }, ["err_found_later_in_class"]={ [d]={{nil,D,"err_found_later_in_class"}}, [f]={{nil,D,"member %0 used before its declaration"}}, [b]={{nil,D,"member A used before its declaration"}}, [i]=k, [h]="member (.*?) used before its declaration", [g]=a, [e]={{nil,D,m}}, [c]={"61d065e21ff3",1590001902,"Let clang atomic builtins fetch add/sub support floating point types","Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to support fadd/fsub:\n\nhttps://reviews.llvm.org/D53965\n\nHowever clang atomic builtins fetch add/sub still does not support\nemitting atomicrmw fadd/fsub.\n\nThis patch adds that.\n\nReviewed by: John McCall, Artem Belevich, Matt Arsenault, JF Bastien,\nJames Y Knight, Louis Dionne, Olivier Giroux\n\nDifferential Revision: https://reviews.llvm.org/D71726"}, [j]={{rb,2330,"/// Diagnose a lookup that found results in an enclosing class during error\n/// recovery. This usually indicates that the results were found in a dependent\n/// base class that could not be searched as part of a template definition.\n/// Always issues a diagnostic (though this may be only a warning in MS\n/// compatibility mode).\n///\n/// Return \\c true if the error is unrecoverable, or \\c false if the caller\n/// should attempt to recover using these lookup results.\nbool Sema::DiagnoseDependentMemberLookup(const LookupResult &R) {\n // ...\n if (R.getRepresentativeDecl()->getDeclContext()->Equals(R.getNamingClass())) {\n DiagID = getLangOpts().MSVCCompat ? diag::ext_found_later_in_class : diag::err_found_later_in_class;"}}, [l]={ ["clang/test/SemaTemplate/recovery-crash.cpp"]={"clang/test/SemaTemplate/recovery-crash.cpp:62:5: error: member \'UndeclaredMethod\' used before its declaration"} } }, ["err_friend_decl_defines_type"]={ [d]="err_friend_decl_defines_type", [f]="cannot define a type in a friend declaration", [b]="cannot define a type in a friend declaration", [i]=k, [h]="cannot define a type in a friend declaration", [g]=a, [e]=n, [c]={"0f8ee22655a8",1326159194,"Update C++11 scoped enumeration support to match the final proposal:","Update C++11 scoped enumeration support to match the final proposal:\n - reject definitions of enums within friend declarations\n - require \'enum\', not \'enum class\', for non-declaring references to scoped\n enumerations\n\nllvm-svn: 147824"}, [j]={{p,4970,"/// ParseEnumSpecifier\n/// enum-specifier: [C99 6.7.2.2]\n/// \'enum\' identifier[opt] \'{\' enumerator-list \'}\'\n///[C99/C++]\'enum\' identifier[opt] \'{\' enumerator-list \',\' \'}\'\n/// [GNU] \'enum\' attributes[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\' attributes[opt]\n/// [MS] \'enum\' __declspec[opt] identifier[opt] \'{\' enumerator-list \',\' [opt]\n/// \'}\'\n/// \'enum\' identifier\n/// [GNU] \'enum\' attributes[opt] identifier\n///\n/// [C++11] enum-head \'{\' enumerator-list[opt] \'}\'\n/// [C++11] enum-head \'{\' enumerator-list \',\' \'}\'\n///\n/// enum-head: [C++11]\n/// enum-key attribute-specifier-seq[opt] identifier[opt] enum-base[opt]\n/// enum-key attribute-specifier-seq[opt] nested-name-specifier\n/// identifier enum-base[opt]\n///\n/// enum-key: [C++11]\n/// \'enum\'\n/// \'enum\' \'class\'\n/// \'enum\' \'struct\'\n///\n/// enum-base: [C++11]\n/// \':\' type-specifier-seq\n///\n/// [C++] elaborated-type-specifier:\n/// [C++] \'enum\' nested-name-specifier[opt] identifier\n///\nvoid Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC) {\n // ...\n if (AllowEnumSpecifier == AllowDefiningTypeSpec::No)\n // ...\n else if (Tok.is(tok::l_brace)) {\n if (DS.isFriendSpecified()) {\n Diag(Tok.getLocation(), diag::err_friend_decl_defines_type) << SourceRange(DS.getFriendSpecLoc());"},{r,1854,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n if (isDefiningTypeSpecifierContext(DSC, getLangOpts().CPlusPlus) == AllowDefiningTypeSpec::No || (getLangOpts().OpenMP && OpenMPDirectiveParsing))\n // ...\n else if (Tok.is(tok::l_brace) || (DSC != DeclSpecContext::DSC_association && getLangOpts().CPlusPlus && Tok.is(tok::colon)) || (isClassCompatibleKeyword() && (NextToken().is(tok::l_brace) || NextToken().is(tok::colon)))) {\n if (DS.isFriendSpecified()) {\n // ...\n Diag(Tok.getLocation(), diag::err_friend_decl_defines_type) << SourceRange(DS.getFriendSpecLoc());"}}, [l]={ ["clang/test/CXX/temp/temp.decls/temp.class/temp.mem.enum/p1.cpp"]={"clang/test/CXX/temp/temp.decls/temp.class/temp.mem.enum/p1.cpp:107:39: error: cannot define a type in a friend declaration"} } }, ["err_friend_decl_does_not_match"]={ [d]="err_friend_decl_does_not_match", [f]="friend declaration of %0 does not match any declaration in %1", [b]="friend declaration of A does not match any declaration in B", [i]=k, [h]="friend declaration of (.*?) does not match any declaration in (.*?)", [g]=a, [e]=m, [c]={"e85e1766005e",1335060830,"PR12585: When processing a friend template inside a class template, don\'t","PR12585: When processing a friend template inside a class template, don\'t\npretend there was no previous declaration -- that can lead us to injecting\na class template (with no access specifier) into a class scope. Instead,\njust avoid the problematic checks.\n\nllvm-svn: 155303"}, [j]={{G,2068,"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.isSet()) {\n // If the name of the template was qualified, we must be defining the\n // template out-of-line.\n if (!SS.isInvalid() && !Invalid && !PrevClassTemplate) {\n Diag(NameLoc, TUK == TUK_Friend ? diag::err_friend_decl_does_not_match : diag::err_member_decl_does_not_match) << Name << SemanticContext << /*IsDefinition*/ true << SS.getRange();"}}, [l]={ ["clang/test/SemaTemplate/friend.cpp"]={"clang/test/SemaTemplate/friend.cpp:57:35: error: friend declaration of \'f\' does not match any declaration in namespace \'qualified_friend\'","clang/test/SemaTemplate/friend.cpp:58:35: error: friend declaration of \'g\' does not match any declaration in namespace \'qualified_friend\'","clang/test/SemaTemplate/friend.cpp:61:35: error: friend declaration of \'f\' does not match any declaration in namespace \'qualified_friend\'","clang/test/SemaTemplate/friend.cpp:74:20: error: friend declaration of \'f\' does not match any declaration in \'qualified_friend::Y\'","clang/test/SemaTemplate/friend.cpp:75:20: error: friend declaration of \'g\' does not match any declaration in \'qualified_friend::Y\'","clang/test/SemaTemplate/friend.cpp:78:20: error: friend declaration of \'f\' does not match any declaration in \'qualified_friend::Y\'","clang/test/SemaTemplate/friend.cpp:113:20: error: friend declaration of \'f\' does not match any declaration in namespace \'qualified_friend_finds_nothing::N\'","clang/test/SemaTemplate/friend.cpp:118:20: error: friend declaration of \'f\' does not match any declaration in namespace \'qualified_friend_finds_nothing::N\'","clang/test/SemaTemplate/friend.cpp:139:26: error: friend declaration of \'z2\' does not match any declaration in namespace \'PR37556\'"} } }, ["err_friend_decl_spec"]={ [d]="err_friend_decl_spec", [f]="\'%0\' is invalid in friend declarations", [b]="\'A\' is invalid in friend declarations", [i]=k, [h]="\'(.*?)\' is invalid in friend declarations", [g]=a, [e]={{nil,J,o},{"7.1",nil,m}}, [c]={"deca70559335",1398882241,"Sema: Implement DR477","Sema: Implement DR477\n\nSummary: Friend declarations shouldn\'t mention explicit or virtual.\n\nReviewers: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D3562\n\nllvm-svn: 207682"}, [j]={{r,2445,"/// ParseOptionalCXX11VirtSpecifierSeq - Parse a virt-specifier-seq.\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\nvoid Parser::ParseOptionalCXX11VirtSpecifierSeq(VirtSpecifiers &VS, bool IsInterface, SourceLocation FriendLoc) {\n while (true) {\n // ...\n if (FriendLoc.isValid()) {\n Diag(Tok.getLocation(), diag::err_friend_decl_spec) << VirtSpecifiers::getSpecifierName(Specifier) << FixItHint::CreateRemoval(Tok.getLocation()) << SourceRange(FriendLoc, FriendLoc);"},{"clang/lib/Sema/DeclSpec.cpp",1407,"/// 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 // C++ [class.friend]p6:\n // No storage-class-specifier shall appear in the decl-specifier-seq\n // of a friend declaration.\n if (isFriendSpecified() && (getStorageClassSpec() || getThreadStorageClassSpec())) {\n // ...\n S.Diag(SCLoc, diag::err_friend_decl_spec) << SpecName << StorageHint << ThreadHint;"},{"clang/lib/Sema/DeclSpec.cpp",1435,"/// 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 // C++11 [dcl.fct.spec]p5:\n // The virtual specifier shall be used only in the initial\n // declaration of a non-static class member function;\n // C++11 [dcl.fct.spec]p6:\n // The explicit specifier shall be used only in the declaration of\n // a constructor or conversion function within its class\n // definition;\n if (isFriendSpecified() && (isVirtualSpecified() || hasExplicitSpecifier())) {\n // ...\n S.Diag(SCLoc, diag::err_friend_decl_spec) << Keyword << Hint;"},{Q,17405,"/// Handle a friend type declaration. This works in tandem with\n/// ActOnTag.\n///\n/// Notes on friend class templates:\n///\n/// We generally treat friend class declarations as if they were\n/// declaring a class. So, for example, the elaborated type specifier\n/// in a friend declaration is required to obey the restrictions of a\n/// class-head (i.e. no typedefs in the scope chain), template\n/// parameters are required to match up with simple template-ids, &c.\n/// However, unlike when declaring a template specialization, it\'s\n/// okay to refer to a template specialization without an empty\n/// template parameter declaration, e.g.\n/// friend class A<T>::B<unsigned>;\n/// We permit this as a special case; if there are any template\n/// parameters present at all, require proper matching, i.e.\n/// template <> template \\<class T> friend class A<int>::B;\nDecl *Sema::ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TempParams) {\n // ...\n // C++ [class.friend]p3:\n // A friend declaration that does not declare a function shall have one of\n // the following forms:\n // friend elaborated-type-specifier ;\n // friend simple-type-specifier ;\n // friend typename-specifier ;\n //\n // Any declaration with a type qualifier does not have that form. (It\'s\n // legal to specify a qualified type as a friend, you just can\'t write the\n // keywords.)\n if (DS.getTypeQualifiers()) {\n if (DS.getTypeQualifiers() & DeclSpec::TQ_const)\n Diag(DS.getConstSpecLoc(), diag::err_friend_decl_spec) << \"const\";"},{Q,17407,"/// Handle a friend type declaration. This works in tandem with\n/// ActOnTag.\n///\n/// Notes on friend class templates:\n///\n/// We generally treat friend class declarations as if they were\n/// declaring a class. So, for example, the elaborated type specifier\n/// in a friend declaration is required to obey the restrictions of a\n/// class-head (i.e. no typedefs in the scope chain), template\n/// parameters are required to match up with simple template-ids, &c.\n/// However, unlike when declaring a template specialization, it\'s\n/// okay to refer to a template specialization without an empty\n/// template parameter declaration, e.g.\n/// friend class A<T>::B<unsigned>;\n/// We permit this as a special case; if there are any template\n/// parameters present at all, require proper matching, i.e.\n/// template <> template \\<class T> friend class A<int>::B;\nDecl *Sema::ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TempParams) {\n // ...\n // C++ [class.friend]p3:\n // A friend declaration that does not declare a function shall have one of\n // the following forms:\n // friend elaborated-type-specifier ;\n // friend simple-type-specifier ;\n // friend typename-specifier ;\n //\n // Any declaration with a type qualifier does not have that form. (It\'s\n // legal to specify a qualified type as a friend, you just can\'t write the\n // keywords.)\n if (DS.getTypeQualifiers()) {\n // ...\n if (DS.getTypeQualifiers() & DeclSpec::TQ_volatile)\n Diag(DS.getVolatileSpecLoc(), diag::err_friend_decl_spec) << \"volatile\";"},{Q,17409,"/// Handle a friend type declaration. This works in tandem with\n/// ActOnTag.\n///\n/// Notes on friend class templates:\n///\n/// We generally treat friend class declarations as if they were\n/// declaring a class. So, for example, the elaborated type specifier\n/// in a friend declaration is required to obey the restrictions of a\n/// class-head (i.e. no typedefs in the scope chain), template\n/// parameters are required to match up with simple template-ids, &c.\n/// However, unlike when declaring a template specialization, it\'s\n/// okay to refer to a template specialization without an empty\n/// template parameter declaration, e.g.\n/// friend class A<T>::B<unsigned>;\n/// We permit this as a special case; if there are any template\n/// parameters present at all, require proper matching, i.e.\n/// template <> template \\<class T> friend class A<int>::B;\nDecl *Sema::ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TempParams) {\n // ...\n // C++ [class.friend]p3:\n // A friend declaration that does not declare a function shall have one of\n // the following forms:\n // friend elaborated-type-specifier ;\n // friend simple-type-specifier ;\n // friend typename-specifier ;\n //\n // Any declaration with a type qualifier does not have that form. (It\'s\n // legal to specify a qualified type as a friend, you just can\'t write the\n // keywords.)\n if (DS.getTypeQualifiers()) {\n // ...\n if (DS.getTypeQualifiers() & DeclSpec::TQ_restrict)\n Diag(DS.getRestrictSpecLoc(), diag::err_friend_decl_spec) << \"restrict\";"},{Q,17411,"/// Handle a friend type declaration. This works in tandem with\n/// ActOnTag.\n///\n/// Notes on friend class templates:\n///\n/// We generally treat friend class declarations as if they were\n/// declaring a class. So, for example, the elaborated type specifier\n/// in a friend declaration is required to obey the restrictions of a\n/// class-head (i.e. no typedefs in the scope chain), template\n/// parameters are required to match up with simple template-ids, &c.\n/// However, unlike when declaring a template specialization, it\'s\n/// okay to refer to a template specialization without an empty\n/// template parameter declaration, e.g.\n/// friend class A<T>::B<unsigned>;\n/// We permit this as a special case; if there are any template\n/// parameters present at all, require proper matching, i.e.\n/// template <> template \\<class T> friend class A<int>::B;\nDecl *Sema::ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TempParams) {\n // ...\n // C++ [class.friend]p3:\n // A friend declaration that does not declare a function shall have one of\n // the following forms:\n // friend elaborated-type-specifier ;\n // friend simple-type-specifier ;\n // friend typename-specifier ;\n //\n // Any declaration with a type qualifier does not have that form. (It\'s\n // legal to specify a qualified type as a friend, you just can\'t write the\n // keywords.)\n if (DS.getTypeQualifiers()) {\n // ...\n if (DS.getTypeQualifiers() & DeclSpec::TQ_atomic)\n Diag(DS.getAtomicSpecLoc(), diag::err_friend_decl_spec) << \"_Atomic\";"},{Q,17413,"/// Handle a friend type declaration. This works in tandem with\n/// ActOnTag.\n///\n/// Notes on friend class templates:\n///\n/// We generally treat friend class declarations as if they were\n/// declaring a class. So, for example, the elaborated type specifier\n/// in a friend declaration is required to obey the restrictions of a\n/// class-head (i.e. no typedefs in the scope chain), template\n/// parameters are required to match up with simple template-ids, &c.\n/// However, unlike when declaring a template specialization, it\'s\n/// okay to refer to a template specialization without an empty\n/// template parameter declaration, e.g.\n/// friend class A<T>::B<unsigned>;\n/// We permit this as a special case; if there are any template\n/// parameters present at all, require proper matching, i.e.\n/// template <> template \\<class T> friend class A<int>::B;\nDecl *Sema::ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TempParams) {\n // ...\n // C++ [class.friend]p3:\n // A friend declaration that does not declare a function shall have one of\n // the following forms:\n // friend elaborated-type-specifier ;\n // friend simple-type-specifier ;\n // friend typename-specifier ;\n //\n // Any declaration with a type qualifier does not have that form. (It\'s\n // legal to specify a qualified type as a friend, you just can\'t write the\n // keywords.)\n if (DS.getTypeQualifiers()) {\n // ...\n if (DS.getTypeQualifiers() & DeclSpec::TQ_unaligned)\n Diag(DS.getUnalignedSpecLoc(), diag::err_friend_decl_spec) << \"__unaligned\";"}}, [l]={ ["clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp"]={"clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:55:3: error: \'const\' is invalid in friend declarations","clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:55:9: error: \'volatile\' is invalid in friend declarations","clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:60:10: error: \'const\' is invalid in friend declarations","clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:61:10: error: \'volatile\' is invalid in friend declarations","clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:62:32: error: \'const\' is invalid in friend declarations","clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:66:10: error: \'restrict\' is invalid in friend declarations","clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:68:10: error: \'_Atomic\' is invalid in friend declarations"} } }, ["err_friend_decl_with_def_arg_must_be_def"]={ [d]="err_friend_decl_with_def_arg_must_be_def", [f]="friend declaration specifying a default argument must be a definition", [b]="friend declaration specifying a default argument must be a definition", [i]=k, [h]="friend declaration specifying a default argument must be a definition", [g]=a, [e]=m, [c]={"502b0ed2641f",1372201770,"Implement DR136","Implement DR136\n\nFriend declarations that specify a default argument must be a definition\nand the only declaration in the translation unit.\n\nllvm-svn: 184889"}, [j]={{Q,17777,"NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams) {\n // ...\n if (ND->isInvalidDecl()) {\n // ...\n } else {\n // ...\n // C++11 [dcl.fct.default]p4: If a friend declaration specifies a\n // default argument expression, that declaration shall be a definition\n // and shall be the only declaration of the function or function\n // template in the translation unit.\n if (functionDeclHasDefaultArgument(FD)) {\n // We can\'t look at FD->getPreviousDecl() because it may not have been set\n // if we\'re in a dependent context. If the function is known to be a\n // redeclaration, we will have narrowed Previous down to the right decl.\n if (D.isRedeclaration()) {\n // ...\n } else if (!D.isFunctionDefinition())\n Diag(FD->getLocation(), diag::err_friend_decl_with_def_arg_must_be_def);"}}, [l]={ ["clang/test/CXX/temp/temp.res/p4.cpp"]={"clang/test/CXX/temp/temp.res/p4.cpp:182:13: error: friend declaration specifying a default argument must be a definition","clang/test/CXX/temp/temp.res/p4.cpp:183:13: error: friend declaration specifying a default argument must be a definition"} } }, ["err_friend_decl_with_def_arg_redeclared"]={ [d]="err_friend_decl_with_def_arg_redeclared", [f]="friend declaration specifying a default argument must be the only declaration", [b]="friend declaration specifying a default argument must be the only declaration", [i]=k, [h]="friend declaration specifying a default argument must be the only declaration", [g]=a, [e]=m, [c]={"502b0ed2641f",1372201770,"Implement DR136","Implement DR136\n\nFriend declarations that specify a default argument must be a definition\nand the only declaration in the translation unit.\n\nllvm-svn: 184889"}, [j]={{Q,708,"/// MergeCXXFunctionDecl - Merge two declarations of the same C++\n/// function, once we already know that they have the same\n/// type. Subroutine of MergeFunctionDecl. Returns true if there was an\n/// error, false otherwise.\nbool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S) {\n // ...\n // C++11 [dcl.fct.default]p4: If a friend declaration specifies a default\n // argument expression, that declaration shall be a definition and shall be\n // the only declaration of the function or function template in the\n // translation unit.\n if (Old->getFriendObjectKind() == Decl::FOK_Undeclared && functionDeclHasDefaultArgument(Old)) {\n Diag(New->getLocation(), diag::err_friend_decl_with_def_arg_redeclared);"},{Q,17773,"NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams) {\n // ...\n if (ND->isInvalidDecl()) {\n // ...\n } else {\n // ...\n // C++11 [dcl.fct.default]p4: If a friend declaration specifies a\n // default argument expression, that declaration shall be a definition\n // and shall be the only declaration of the function or function\n // template in the translation unit.\n if (functionDeclHasDefaultArgument(FD)) {\n // We can\'t look at FD->getPreviousDecl() because it may not have been set\n // if we\'re in a dependent context. If the function is known to be a\n // redeclaration, we will have narrowed Previous down to the right decl.\n if (D.isRedeclaration()) {\n Diag(FD->getLocation(), diag::err_friend_decl_with_def_arg_redeclared);"}}, [l]={ ["clang/test/SemaCXX/invalid-decl.cpp"]={"clang/test/SemaCXX/invalid-decl.cpp:5:34: error: friend declaration specifying a default argument must be the only declaration","clang/test/SemaCXX/invalid-decl.cpp:10:14: error: friend declaration specifying a default argument must be the only declaration"} } }, ["err_friend_def_in_local_class"]={ [d]="err_friend_def_in_local_class", [f]="friend function cannot be defined in a local class", [b]="friend function cannot be defined in a local class", [i]=k, [h]="friend function cannot be defined in a local class", [g]=a, [e]=m, [c]={"16e65616d64b",1318209119,"Implement the restrictions in C++ [class.friend]p6, which disallow","Implement the restrictions in C++ [class.friend]p6, which disallow\ndefining a friend function with a qualified name or in a local\nclass. Fixes PR9853. \n\nllvm-svn: 141524"}, [j]={{Q,17580,"NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams) {\n // ...\n if ((SS.isInvalid() || !SS.isSet()) && (FunctionContainingLocalClass = cast<CXXRecordDecl>(CurContext)->isLocalClass())) {\n // ...\n // C++ [class.friend]p6:\n // A function can be defined in a friend declaration of a class if and\n // only if the class is a non-local class (9.8), the function name is\n // unqualified, and the function has namespace scope.\n if (D.isFunctionDefinition()) {\n Diag(NameInfo.getBeginLoc(), diag::err_friend_def_in_local_class);"}}, [l]={ ["clang/test/CXX/class.access/class.friend/p6.cpp"]={"clang/test/CXX/class.access/class.friend/p6.cpp:22:17: error: friend function cannot be defined in a local class"} } }, ["err_friend_explicit_instantiation"]={ [d]="err_friend_explicit_instantiation", [f]="friend cannot be declared in an explicit instantiation; if this declaration is meant to be a friend declaration, remove the \'template\' keyword", [b]="friend cannot be declared in an explicit instantiation; if this declaration is meant to be a friend declaration, remove the \'template\' keyword", [i]=k, [h]="friend cannot be declared in an explicit instantiation; if this declaration is meant to be a friend declaration, remove the \'template\' keyword", [g]=a, [e]=n, [c]={"b9bbaba6b14b",1371909371,"Instantiation bug fix extension (cf. r184503) -- minor code fixes, including a typo that caused a ru...","Instantiation bug fix extension (cf. r184503) -- minor code fixes, including a typo that caused a runtime assertion after firing diagnosis for class definitions, with the \'template\' keyword as template header, in friend declarations.\n\nllvm-svn: 184634"}, [j]={{r,2023,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n if (TemplateId) {\n // ...\n if (TemplateId->isInvalid()) {\n // ...\n } else if (TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation && TUK == Sema::TUK_Declaration) {\n // ...\n } else if (TUK == Sema::TUK_Reference || (TUK == Sema::TUK_Friend && TemplateInfo.Kind == ParsedTemplateInfo::NonTemplate)) {\n // ...\n } else {\n // ...\n if (TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation) {\n // ...\n if (TUK == Sema::TUK_Friend) {\n Diag(DS.getFriendSpecLoc(), diag::err_friend_explicit_instantiation);"}} }, ["err_friend_invalid_in_context"]={ [d]="err_friend_invalid_in_context", [f]="\'friend\' used outside of class", [b]="\'friend\' used outside of class", [i]=k, [h]="\'friend\' used outside of class", [g]=a, [e]=n, [c]={"07e91c04ba33",1249524943,"First pass at friend semantics.","First pass at friend semantics.\n\nllvm-svn: 78274"}, [j]={{p,4089,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n // friend\n case tok::kw_friend:\n if (DSContext == DeclSpecContext::DSC_class)\n // ...\n else {\n // ...\n DiagID = diag::err_friend_invalid_in_context;"}}, [l]={ ["clang/test/SemaTemplate/friend.cpp"]={"clang/test/SemaTemplate/friend.cpp:30:5: error: \'friend\' used outside of class","clang/test/SemaTemplate/friend.cpp:31:5: error: \'friend\' used outside of class"} } }, ["err_friend_is_member"]={ [d]="err_friend_is_member", [f]="friends cannot be members of the declaring class", [b]="friends cannot be members of the declaring class", [i]=k, [h]="friends cannot be members of the declaring class", [g]=a, [e]=m, [c]={"07e91c04ba33",1249524943,"First pass at friend semantics.","First pass at friend semantics.\n\nllvm-svn: 78274"}, [j]={{Q,17645,"NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams) {\n // ...\n if ((SS.isInvalid() || !SS.isSet()) && (FunctionContainingLocalClass = cast<CXXRecordDecl>(CurContext)->isLocalClass())) {\n // ...\n } else if (SS.isInvalid() || !SS.isSet()) {\n // ...\n } else if (!SS.getScopeRep()->isDependent()) {\n // ...\n // C++ [class.friend]p1: A friend of a class is a function or\n // class that is not a member of the class . . .\n if (DC->Equals(CurContext))\n Diag(DS.getFriendSpecLoc(), getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_friend_is_member : diag::err_friend_is_member);"}}, [l]={ ["clang/test/CXX/class/class.friend/p1.cpp"]={"clang/test/CXX/class/class.friend/p1.cpp:46:3: error: friends cannot be members of the declaring class"} } }, ["err_friend_not_first_in_declaration"]={ [d]="err_friend_not_first_in_declaration", [f]="\'friend\' must appear first in a non-function declaration", [b]="\'friend\' must appear first in a non-function declaration", [i]=k, [h]="\'friend\' must appear first in a non\\-function declaration", [g]=a, [e]=m, [c]={"a31a89a38e8a",1348104660,"Per C++11 [class.friend]p3, the \'friend\' keyword must appear first in a","Per C++11 [class.friend]p3, the \'friend\' keyword must appear first in a\nnon-function friend declaration. Patch by Josh Magee!\n\nllvm-svn: 164273"}, [j]={{Q,17241,"/// Perform semantic analysis of the given friend type declaration.\n///\n/// \\returns A friend declaration that.\nFriendDecl *Sema::CheckFriendTypeDecl(SourceLocation LocStart, SourceLocation FriendLoc, TypeSourceInfo *TSInfo) {\n // ...\n // C++03 [class.friend]p2:\n // An elaborated-type-specifier shall be used in a friend declaration\n // for a class.*\n //\n // * The class-key of the elaborated-type-specifier is required.\n if (!CodeSynthesisContexts.empty()) {\n // ...\n } else {\n // ...\n // C++11 [class.friend]p3:\n // A friend declaration that does not declare a function shall have one\n // of the following forms:\n // friend elaborated-type-specifier ;\n // friend simple-type-specifier ;\n // friend typename-specifier ;\n if (getLangOpts().CPlusPlus11 && LocStart != FriendLoc)\n Diag(FriendLoc, diag::err_friend_not_first_in_declaration) << T;"}}, [l]={ ["clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp"]={"clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:53:7: error: \'friend\' must appear first in a non-function declaration","clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:54:12: error: \'friend\' must appear first in a non-function declaration","clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:55:18: error: \'friend\' must appear first in a non-function declaration","clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp:59:11: error: \'friend\' must appear first in a non-function declaration"} } } };