Module:ClangDiags/DiagsLongData7
Jump to navigation
Jump to search
Documentation for this module may be created at Module:ClangDiags/DiagsLongData7/doc
local a=""; local b="source"; local c="regex2"; local d="id_hist"; local e="message_hist"; local f="commit"; local g="category_hist"; local h="regex3"; local i="hierarchical_hist"; local j="regex1"; local k="(?:error|fatal error)\\: "; local l="tests2"; local m="Semantic Issue"; local n="clang/lib/Sema/SemaOpenMP.cpp"; local o="OpenMP Issue"; local p="11.0"; local q="5.0"; local r="The basic representation of diagnostics information in tablegen format, plus (uncommented and incomp..."; local s="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 t="b1c4d5507fad"; local u="8.0"; local v="9.0"; local w="10.0"; local x="Lexical or Preprocessor Issue"; local y="clang/lib/Sema/SemaDeclCXX.cpp"; local z="7.0"; local A="clang/lib/Sema/SemaChecking.cpp"; local B="clang/lib/Sema/SemaOverload.cpp"; local C="13.0"; local D="clang/lib/Serialization/ASTReader.cpp"; local E="clang/lib/Sema/SemaExpr.cpp"; local F="6.0"; local G="clang/lib/Sema/SemaDecl.cpp"; local H="clang/lib/Sema/SemaType.cpp"; local I="clang/lib/Lex/PPDirectives.cpp"; local J="15.0"; local K="Parse Issue"; local L="clang/lib/Parse/ParseOpenMP.cpp"; local M="14.0"; local N="clang/lib/Sema/SemaExprCXX.cpp"; local O="16.0"; local P="AST Deserialization Issue"; local Q="clang/lib/Sema/SemaDeclAttr.cpp"; local R="clang/lib/Lex/PPExpressions.cpp"; local S="clang/lib/Lex/PPMacroExpansion.cpp"; local T="clang/lib/Lex/Pragma.cpp"; local U="clang/test/SemaOpenCL/invalid-block.cl"; local V="None"; local W="931fcd3ba011"; local X="[WebAssembly] Improve clang diagnostics for wasm attributes"; local Y="[WebAssembly] Improve clang diagnostics for wasm attributes\n\nThis patch addresses the review comments on r352930:\n\n - Removes redundant diagnostic checking code\n - Removes errnoneous use of diag::err_alias_is_definition, which\n turned out to be ineffective anyway since functions can be defined later\n in the translation unit and avoid detection.\n - Adds a test for various invalid cases for import_name and import_module.\n\nDifferential Revision: https://reviews.llvm.org/D59520"; local Z="clang/lib/Basic/Targets/PPC.cpp"; local ab="clang/lib/Sema/SemaTemplateVariadic.cpp"; local bb="Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"; local cb="clang/lib/Sema/SemaCast.cpp"; local db="Update tablegen diagnostic files to be in sync with the def files."; local eb="5a8987ca5113"; local fb="clang/lib/Sema/SemaTemplate.cpp"; local gb="clang/test/SemaCXX/overloaded-operator-decl.cpp"; local hb="12.0"; local ib="clang/lib/Parse/ParseDecl.cpp"; local jb="expected \'begin\' or \'end\'"; local kb="clang/lib/Sema/SemaInit.cpp"; local lb="clang/test/SemaOpenCL/cl20-device-side-enqueue.cl"; local mb="C-style cast"; local nb="a769e07232d2"; local ob="OpenMP threadprivate directive parsing and semantic analysis"; local pb="OpenMP threadprivate directive parsing and semantic analysis\n\nllvm-svn: 177705"; local qb="static_cast"; local rb="functional-style cast"; local sb="dynamic_cast"; local tb="reinterpret_cast"; local ub="clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp"; local vb="[OPENMP 4.0] Initial support for array sections."; local wb="[OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0\n\nApplying the following restrictions for block types in OpenCL (v2.0 s6.12.5):\n - __block storage class is disallowed\n - every block declaration must be const qualified and initialized\n - a block can\'t be used as a return type of a function\n - a blocks can\'t be used to declare a structure or union field\n - extern speficier is disallowed\n\nCorrected image and sampler types diagnostics with struct and unions.\n\nReview: http://reviews.llvm.org/D16928\nllvm-svn: 262616"; local xb="[OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0"; local yb="1f95cc097c2b"; local zb="[OPENMP 4.0] Initial support for array sections.\n\nAdds parsing/sema analysis/serialization/deserialization for array sections in OpenMP constructs (introduced in OpenMP 4.0).\nCurrently it is allowed to use array sections only in OpenMP clauses that accepts list of expressions.\nDifferential Revision: http://reviews.llvm.org/D10732\n\nllvm-svn: 245937"; local Ab="clang/test/OpenMP/declare_simd_messages.cpp"; local Bb="1a3320e4639c"; local Cb="clang/test/OpenMP/threadprivate_messages.cpp"; local Db="Improve diagnostics for malformed delete operator function declarations.\n\nllvm-svn: 91180"; local Eb="deleted"; local Fb="Improve diagnostics for malformed delete operator function declarations."; local Gb="[OpenCL] An implementation of device side enqueue (DSE) from OpenCL v2.0 s6.13.17."; local Hb="[OpenCL] An implementation of device side enqueue (DSE) from OpenCL v2.0 s6.13.17.\n\n- Added new Builtins: enqueue_kernel, get_kernel_work_group_size\nand get_kernel_preferred_work_group_size_multiple.\n\nThese Builtins use custom check to diagnose parameters of the passed Blocks\ni. e. variable number of \'local void*\' type params, and check different\noverloads specified in Table 6.31 of OpenCL v2.0.\n\n- IR is generated as an internal library call for each OpenCL Builtin,\nreusing ObjC Block implementation.\n\nReview: http://reviews.llvm.org/D20249\nllvm-svn: 274540"; local Ib="db7a31cce7b3"; local Jb="12308f41e7e2"; local Kb="7.1"; local Lb="unavailable"; return { ["err_omp_parent_cancel_region_ordered"]={ [d]="err_omp_parent_cancel_region_ordered", [e]={{nil,F,"parent region for \'omp %select{cancellation point|cancel}0\' construct cannot be ordered"},{q,nil,"parent region for \'omp %select{cancellation point/cancel}0\' construct cannot be ordered"}}, [i]={{nil,F,{"parent region for \'omp ",{"cancellation point","cancel"},"\' construct cannot be ordered"}},{q,nil,{"parent region for \'omp ",{"cancellation point/cancel"},"\' construct cannot be ordered"}}}, [j]=k, [c]="parent region for \'omp (?:cancellation point|cancel)\' construct cannot be ordered", [h]=a, [g]=o, [f]={"6d4ed0583033",1435733861,"[OPENMP 4.0] Initial support for \'omp cancellation point\' construct.","[OPENMP 4.0] Initial support for \'omp cancellation point\' construct.\n\nAdd parsing and sema analysis for \'omp cancellation point\' directive.\n\nllvm-svn: 241145"}, [b]={{n,13369,"StmtResult Sema::ActOnOpenMPCancellationPointDirective(SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion) {\n // ...\n if (DSAStack->isParentOrderedRegion()) {\n Diag(StartLoc, diag::err_omp_parent_cancel_region_ordered) << 0;"},{n,13385,"StmtResult Sema::ActOnOpenMPCancelDirective(ArrayRef<OMPClause *> Clauses, SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion) {\n // ...\n if (DSAStack->isParentOrderedRegion()) {\n Diag(StartLoc, diag::err_omp_parent_cancel_region_ordered) << 1;"}} }, ["err_omp_pointer_mapped_along_with_derived_section"]={ [d]="err_omp_pointer_mapped_along_with_derived_section", [e]="pointer cannot be mapped along with a section derived from itself", [i]="pointer cannot be mapped along with a section derived from itself", [j]=k, [c]="pointer cannot be mapped along with a section derived from itself", [h]=a, [g]=o, [f]={"5de996e3bd79",1453494096,"[OpenMP] Update map clause SEMA to support OpenMP 4.5 possible list items.","[OpenMP] Update map clause SEMA to support OpenMP 4.5 possible list items.\n\nSummary:\nExtend support in the map clause SEMA for the expressions supported in the OpenMP 4.5 specification, namely member expressions. \n\nFix some bugs in the previous implementation of SEMA related with expressions that do not consist of single variable references.\n\nFix bug in parsing when the expression in the map clause do not start with an identifier: accept any expression in the map clause and check for validity in SEMA instead of just ignoring it.\n\nReviewers: hfinkel, kkwli0, arpith-jacob, carlo.bertolli, ABataev\n\nSubscribers: cfe-commits, fraggamuffin, caomhin\n\nDifferential Revision: http://reviews.llvm.org/D16385\n\nllvm-svn: 258543"}, [b]={{n,21598,"// Return true if expression E associated with value VD has conflicts with other\n// map information.\nstatic bool checkMapConflicts(Sema &SemaRef, DSAStackTy *DSAS, const ValueDecl *VD, const Expr *E, bool CurrentRegionOnly, OMPClauseMappableExprCommon::MappableExprComponentListRef CurComponents, OpenMPClauseKind CKind) {\n // ...\n bool FoundError = DSAS->checkMappableExprComponentListsForDecl(VD, CurrentRegionOnly, [&IsEnclosedByDataEnvironmentExpr, &SemaRef, VD, CurrentRegionOnly, ELoc, ERange, CKind, &EnclosingExpr, CurComponents](OMPClauseMappableExprCommon::MappableExprComponentListRef StackComponents, OpenMPClauseKind Kind) {\n // ...\n // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, C/C++, p.1]\n // A variable for which the type is pointer and an array section\n // derived from that variable must not appear as list items of map\n // clauses of the same construct.\n //\n // Also, cover one of the cases in:\n // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.5]\n // If any part of the original storage of a list item has corresponding\n // storage in the device data environment, all of the original storage\n // must have corresponding storage in the device data environment.\n //\n if (DerivedType->isAnyPointerType()) {\n if (CI == CE || SI == SE) {\n SemaRef.Diag(DerivedLoc, diag::err_omp_pointer_mapped_along_with_derived_section) << DerivedLoc;"}}, [l]={ ["clang/test/OpenMP/target_has_device_addr_messages.cpp"]={"clang/test/OpenMP/target_has_device_addr_messages.cpp:193:44: error: pointer cannot be mapped along with a section derived from itself","clang/test/OpenMP/target_has_device_addr_messages.cpp:262:44: error: pointer cannot be mapped along with a section derived from itself"} } }, ["err_omp_predefined_allocator_with_traits"]={ [d]={{nil,p,"err_omp_predefined_allocator_with_traits"}}, [e]={{nil,p,"predefined allocator cannot have traits specified"}}, [i]={{nil,p,"predefined allocator cannot have traits specified"}}, [j]=k, [c]="predefined allocator cannot have traits specified", [h]=a, [g]={{nil,p,o}}, [f]={W,1576908663,X,Y}, [b]={{n,23911,"OMPClause *Sema::ActOnOpenMPUsesAllocatorClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef<UsesAllocatorsData> Data) {\n // ...\n for (const UsesAllocatorsData &D : Data) {\n // ...\n // Check allocator expression.\n if (D.Allocator->isTypeDependent()) {\n // ...\n } else {\n // ...\n // OpenMP [2.12.5, target Construct]\n // Predefined allocators appearing in a uses_allocators clause cannot have\n // traits specified.\n if (IsPredefinedAllocator && D.AllocatorTraits) {\n Diag(D.AllocatorTraits->getExprLoc(), diag::err_omp_predefined_allocator_with_traits) << D.AllocatorTraits->getSourceRange();"}}, [l]={ ["clang/test/OpenMP/target_uses_allocators_messages.cpp"]={"clang/test/OpenMP/target_uses_allocators_messages.cpp:37:58: error: predefined allocator cannot have traits specified","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:91: error: predefined allocator cannot have traits specified","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:120: error: predefined allocator cannot have traits specified","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:151: error: predefined allocator cannot have traits specified","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:182: error: predefined allocator cannot have traits specified","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:212: error: predefined allocator cannot have traits specified","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:241: error: predefined allocator cannot have traits specified","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:271: error: predefined allocator cannot have traits specified"} } }, ["err_omp_private_incomplete_type"]={ [d]="err_omp_private_incomplete_type", [e]="a private variable with incomplete type %0", [i]="a private variable with incomplete type A", [j]=k, [c]="a private variable with incomplete type (.*?)", [h]=a, [g]=o, [f]={"5ec3eb11fcb8",1374203623,"OpenMP: basic support for #pragma omp parallel","OpenMP: basic support for #pragma omp parallel\n\nllvm-svn: 186647"}, [b]={{n,18077,"OMPClause *Sema::ActOnOpenMPPrivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (RequireCompleteType(ELoc, Type, diag::err_omp_private_incomplete_type))"}}, [l]={ ["clang/test/OpenMP/target_teams_private_messages.cpp"]={"clang/test/OpenMP/target_teams_private_messages.cpp:88:35: error: a private variable with incomplete type \'S1\'"} } }, ["err_omp_prohibited_region"]={ [d]="err_omp_prohibited_region", [e]={{nil,p,"region cannot be%select{| closely}0 nested inside \'%1\' region%select{|; perhaps you forget to enclose \'omp %3\' directive into a parallel region?|; perhaps you forget to enclose \'omp %3\' directive into a for or a parallel for region with \'ordered\' clause?|; perhaps you forget to enclose \'omp %3\' directive into a target region?|; perhaps you forget to enclose \'omp %3\' directive into a teams region?|; perhaps you forget to enclose \'omp %3\' directive into a for, simd, for simd, parallel for, or parallel for simd region?}2"},{w,nil,"region cannot be%select{| closely}0 nested inside \'%1\' region%select{|; perhaps you forget to enclose \'omp %3\' directive into a parallel region?|; perhaps you forget to enclose \'omp %3\' directive into a for or a parallel for region with \'ordered\' clause?|; perhaps you forget to enclose \'omp %3\' directive into a target region?|; perhaps you forget to enclose \'omp %3\' directive into a teams region?}2"}}, [i]={{nil,p,{"region cannot be",{a," closely"}," nested inside \'B\' region",{a,"; perhaps you forget to enclose \'omp D\' directive into a parallel region?","; perhaps you forget to enclose \'omp D\' directive into a for or a parallel for region with \'ordered\' clause?","; perhaps you forget to enclose \'omp D\' directive into a target region?","; perhaps you forget to enclose \'omp D\' directive into a teams region?","; perhaps you forget to enclose \'omp D\' directive into a for, simd, for simd, parallel for, or parallel for simd region?"}}},{w,nil,{"region cannot be",{a," closely"}," nested inside \'B\' region",{a,"; perhaps you forget to enclose \'omp D\' directive into a parallel region?","; perhaps you forget to enclose \'omp D\' directive into a for or a parallel for region with \'ordered\' clause?","; perhaps you forget to enclose \'omp D\' directive into a target region?","; perhaps you forget to enclose \'omp D\' directive into a teams region?"}}}}, [j]=k, [c]="region cannot be(?:| closely) nested inside \'(.*?)\' region(?:|; perhaps you forget to enclose \'omp (.*?)\' directive into a parallel region\\?|; perhaps you forget to enclose \'omp (.*?)\' directive into a for or a parallel for region with \'ordered\' clause\\?|; perhaps you forget to enclose \'omp (.*?)\' directive into a target region\\?|; perhaps you forget to enclose \'omp (.*?)\' directive into a teams region\\?|; perhaps you forget to enclose \'omp (.*?)\' directive into a for, simd, for simd, parallel for, or parallel for simd region\\?)", [h]=a, [g]=o, [f]={"549210e783c7",1403584787,"[OPENMP] Added initial checking of nesting of OpenMP regions.","[OPENMP] Added initial checking of nesting of OpenMP regions.\n\nllvm-svn: 211566"}, [b]={{n,5238,"static bool checkNestingOfRegions(Sema &SemaRef, const DSAStackTy *Stack, OpenMPDirectiveKind CurrentRegion, const DeclarationNameInfo &CurrentName, OpenMPDirectiveKind CancelRegion, OpenMPBindClauseKind BindKind, SourceLocation StartLoc) {\n if (Stack->getCurScope()) {\n // ...\n if (NestingProhibited) {\n if (OrphanSeen) {\n // ...\n } else {\n SemaRef.Diag(StartLoc, diag::err_omp_prohibited_region) << CloseNesting << getOpenMPDirectiveName(OffendingRegion) << Recommend << getOpenMPDirectiveName(CurrentRegion);"}}, [l]={ ["clang/test/OpenMP/target_teams_generic_loop_messages.cpp"]={"clang/test/OpenMP/target_teams_generic_loop_messages.cpp:21:5: error: region cannot be closely nested inside \'target teams loop\' region","clang/test/OpenMP/target_teams_generic_loop_messages.cpp:30:5: error: region cannot be closely nested inside \'target teams loop\' region","clang/test/OpenMP/target_teams_generic_loop_messages.cpp:41:5: error: region cannot be closely nested inside \'target teams loop\' region; perhaps you forget to enclose \'omp ordered\' directive into a for or a parallel for region with \'ordered\' clause?","clang/test/OpenMP/target_teams_generic_loop_messages.cpp:48:5: error: region cannot be closely nested inside \'target teams loop\' region; perhaps you forget to enclose \'omp ordered\' directive into a for or a parallel for region with \'ordered\' clause?","clang/test/OpenMP/target_teams_generic_loop_messages.cpp:55:5: error: region cannot be closely nested inside \'target teams loop\' region; perhaps you forget to enclose \'omp ordered\' directive into a for or a parallel for region with \'ordered\' clause?"} } }, ["err_omp_prohibited_region_atomic"]={ [d]="err_omp_prohibited_region_atomic", [e]="OpenMP constructs may not be nested inside an atomic region", [i]="OpenMP constructs may not be nested inside an atomic region", [j]=k, [c]="OpenMP constructs may not be nested inside an atomic region", [h]=a, [g]=o, [f]={"0162e459efac",1406023835,"[OPENMP] Initial parsing and sema analysis for \'atomic\' directive.","[OPENMP] Initial parsing and sema analysis for \'atomic\' directive.\n\nllvm-svn: 213639"}, [b]={{n,5018,"static bool checkNestingOfRegions(Sema &SemaRef, const DSAStackTy *Stack, OpenMPDirectiveKind CurrentRegion, const DeclarationNameInfo &CurrentName, OpenMPDirectiveKind CancelRegion, OpenMPBindClauseKind BindKind, SourceLocation StartLoc) {\n if (Stack->getCurScope()) {\n // ...\n if (ParentRegion == OMPD_atomic) {\n // ...\n SemaRef.Diag(StartLoc, diag::err_omp_prohibited_region_atomic);"}}, [l]={ ["clang/test/OpenMP/nesting_of_regions.cpp"]={ [1]="clang/test/OpenMP/nesting_of_regions.cpp:4424:1: error: OpenMP constructs may not be nested inside an atomic region", [2]="clang/test/OpenMP/nesting_of_regions.cpp:4432:1: error: OpenMP constructs may not be nested inside an atomic region", [3]="clang/test/OpenMP/nesting_of_regions.cpp:4440:1: error: OpenMP constructs may not be nested inside an atomic region", [4]="clang/test/OpenMP/nesting_of_regions.cpp:4448:1: error: OpenMP constructs may not be nested inside an atomic region", [5]="clang/test/OpenMP/nesting_of_regions.cpp:4456:1: error: OpenMP constructs may not be nested inside an atomic region", [6]="clang/test/OpenMP/nesting_of_regions.cpp:4465:1: error: OpenMP constructs may not be nested inside an atomic region", [7]="clang/test/OpenMP/nesting_of_regions.cpp:4474:1: error: OpenMP constructs may not be nested inside an atomic region", [8]="clang/test/OpenMP/nesting_of_regions.cpp:4483:1: error: OpenMP constructs may not be nested inside an atomic region", [9]="clang/test/OpenMP/nesting_of_regions.cpp:4492:1: error: OpenMP constructs may not be nested inside an atomic region", [10]="clang/test/OpenMP/nesting_of_regions.cpp:4501:1: error: OpenMP constructs may not be nested inside an atomic region", [11]="clang/test/OpenMP/nesting_of_regions.cpp:4510:1: error: OpenMP constructs may not be nested inside an atomic region", [12]="clang/test/OpenMP/nesting_of_regions.cpp:4519:1: error: OpenMP constructs may not be nested inside an atomic region", [13]="clang/test/OpenMP/nesting_of_regions.cpp:4527:1: error: OpenMP constructs may not be nested inside an atomic region", [14]="clang/test/OpenMP/nesting_of_regions.cpp:4535:1: error: OpenMP constructs may not be nested inside an atomic region", [15]="clang/test/OpenMP/nesting_of_regions.cpp:4544:1: error: OpenMP constructs may not be nested inside an atomic region", [16]="clang/test/OpenMP/nesting_of_regions.cpp:4553:1: error: OpenMP constructs may not be nested inside an atomic region", [17]="clang/test/OpenMP/nesting_of_regions.cpp:4560:1: error: OpenMP constructs may not be nested inside an atomic region", [18]="clang/test/OpenMP/nesting_of_regions.cpp:4567:1: error: OpenMP constructs may not be nested inside an atomic region", [19]="clang/test/OpenMP/nesting_of_regions.cpp:4574:1: error: OpenMP constructs may not be nested inside an atomic region", [20]="clang/test/OpenMP/nesting_of_regions.cpp:4581:1: error: OpenMP constructs may not be nested inside an atomic region", [21]="clang/test/OpenMP/nesting_of_regions.cpp:4588:1: error: OpenMP constructs may not be nested inside an atomic region", [22]="clang/test/OpenMP/nesting_of_regions.cpp:4595:1: error: OpenMP constructs may not be nested inside an atomic region", [23]="clang/test/OpenMP/nesting_of_regions.cpp:4602:1: error: OpenMP constructs may not be nested inside an atomic region", [24]="clang/test/OpenMP/nesting_of_regions.cpp:4609:1: error: OpenMP constructs may not be nested inside an atomic region", [25]="clang/test/OpenMP/nesting_of_regions.cpp:4616:1: error: OpenMP constructs may not be nested inside an atomic region", [26]="clang/test/OpenMP/nesting_of_regions.cpp:4624:1: error: OpenMP constructs may not be nested inside an atomic region", [27]="clang/test/OpenMP/nesting_of_regions.cpp:4631:1: error: OpenMP constructs may not be nested inside an atomic region", [28]="clang/test/OpenMP/nesting_of_regions.cpp:4638:1: error: OpenMP constructs may not be nested inside an atomic region", [29]="clang/test/OpenMP/nesting_of_regions.cpp:4645:1: error: OpenMP constructs may not be nested inside an atomic region", [30]="clang/test/OpenMP/nesting_of_regions.cpp:4653:1: error: OpenMP constructs may not be nested inside an atomic region", [31]="clang/test/OpenMP/nesting_of_regions.cpp:4661:1: error: OpenMP constructs may not be nested inside an atomic region", [32]="clang/test/OpenMP/nesting_of_regions.cpp:4668:1: error: OpenMP constructs may not be nested inside an atomic region", [33]="clang/test/OpenMP/nesting_of_regions.cpp:4676:1: error: OpenMP constructs may not be nested inside an atomic region", [34]="clang/test/OpenMP/nesting_of_regions.cpp:4684:1: error: OpenMP constructs may not be nested inside an atomic region", [35]="clang/test/OpenMP/nesting_of_regions.cpp:4692:1: error: OpenMP constructs may not be nested inside an atomic region", [36]="clang/test/OpenMP/nesting_of_regions.cpp:4700:1: error: OpenMP constructs may not be nested inside an atomic region", [37]="clang/test/OpenMP/nesting_of_regions.cpp:4708:1: error: OpenMP constructs may not be nested inside an atomic region", [38]="clang/test/OpenMP/nesting_of_regions.cpp:4716:1: error: OpenMP constructs may not be nested inside an atomic region", [39]="clang/test/OpenMP/nesting_of_regions.cpp:4724:1: error: OpenMP constructs may not be nested inside an atomic region", [40]="clang/test/OpenMP/nesting_of_regions.cpp:4732:1: error: OpenMP constructs may not be nested inside an atomic region", [41]="clang/test/OpenMP/nesting_of_regions.cpp:4739:1: error: OpenMP constructs may not be nested inside an atomic region", [42]="clang/test/OpenMP/nesting_of_regions.cpp:4747:1: error: OpenMP constructs may not be nested inside an atomic region", [43]="clang/test/OpenMP/nesting_of_regions.cpp:4755:1: error: OpenMP constructs may not be nested inside an atomic region", [44]="clang/test/OpenMP/nesting_of_regions.cpp:4763:1: error: OpenMP constructs may not be nested inside an atomic region", [45]="clang/test/OpenMP/nesting_of_regions.cpp:13292:1: error: OpenMP constructs may not be nested inside an atomic region", [46]="clang/test/OpenMP/nesting_of_regions.cpp:13300:1: error: OpenMP constructs may not be nested inside an atomic region", [47]="clang/test/OpenMP/nesting_of_regions.cpp:13308:1: error: OpenMP constructs may not be nested inside an atomic region", [48]="clang/test/OpenMP/nesting_of_regions.cpp:13316:1: error: OpenMP constructs may not be nested inside an atomic region", [49]="clang/test/OpenMP/nesting_of_regions.cpp:13324:1: error: OpenMP constructs may not be nested inside an atomic region", [50]="clang/test/OpenMP/nesting_of_regions.cpp:13333:1: error: OpenMP constructs may not be nested inside an atomic region", [51]="clang/test/OpenMP/nesting_of_regions.cpp:13342:1: error: OpenMP constructs may not be nested inside an atomic region", [52]="clang/test/OpenMP/nesting_of_regions.cpp:13351:1: error: OpenMP constructs may not be nested inside an atomic region", [53]="clang/test/OpenMP/nesting_of_regions.cpp:13360:1: error: OpenMP constructs may not be nested inside an atomic region", [54]="clang/test/OpenMP/nesting_of_regions.cpp:13369:1: error: OpenMP constructs may not be nested inside an atomic region", [55]="clang/test/OpenMP/nesting_of_regions.cpp:13377:1: error: OpenMP constructs may not be nested inside an atomic region", [56]="clang/test/OpenMP/nesting_of_regions.cpp:13385:1: error: OpenMP constructs may not be nested inside an atomic region", [57]="clang/test/OpenMP/nesting_of_regions.cpp:13394:1: error: OpenMP constructs may not be nested inside an atomic region", [58]="clang/test/OpenMP/nesting_of_regions.cpp:13403:1: error: OpenMP constructs may not be nested inside an atomic region", [59]="clang/test/OpenMP/nesting_of_regions.cpp:13410:1: error: OpenMP constructs may not be nested inside an atomic region", [60]="clang/test/OpenMP/nesting_of_regions.cpp:13417:1: error: OpenMP constructs may not be nested inside an atomic region", [61]="clang/test/OpenMP/nesting_of_regions.cpp:13424:1: error: OpenMP constructs may not be nested inside an atomic region", [62]="clang/test/OpenMP/nesting_of_regions.cpp:13431:1: error: OpenMP constructs may not be nested inside an atomic region", [63]="clang/test/OpenMP/nesting_of_regions.cpp:13438:1: error: OpenMP constructs may not be nested inside an atomic region", [64]="clang/test/OpenMP/nesting_of_regions.cpp:13445:1: error: OpenMP constructs may not be nested inside an atomic region", [65]="clang/test/OpenMP/nesting_of_regions.cpp:13452:1: error: OpenMP constructs may not be nested inside an atomic region", [66]="clang/test/OpenMP/nesting_of_regions.cpp:13459:1: error: OpenMP constructs may not be nested inside an atomic region", [67]="clang/test/OpenMP/nesting_of_regions.cpp:13466:1: error: OpenMP constructs may not be nested inside an atomic region", [68]="clang/test/OpenMP/nesting_of_regions.cpp:13474:1: error: OpenMP constructs may not be nested inside an atomic region", [69]="clang/test/OpenMP/nesting_of_regions.cpp:13481:1: error: OpenMP constructs may not be nested inside an atomic region", [70]="clang/test/OpenMP/nesting_of_regions.cpp:13488:1: error: OpenMP constructs may not be nested inside an atomic region", [71]="clang/test/OpenMP/nesting_of_regions.cpp:13495:1: error: OpenMP constructs may not be nested inside an atomic region", [72]="clang/test/OpenMP/nesting_of_regions.cpp:13503:1: error: OpenMP constructs may not be nested inside an atomic region", [73]="clang/test/OpenMP/nesting_of_regions.cpp:13511:1: error: OpenMP constructs may not be nested inside an atomic region", [74]="clang/test/OpenMP/nesting_of_regions.cpp:13517:1: error: OpenMP constructs may not be nested inside an atomic region", [75]="clang/test/OpenMP/nesting_of_regions.cpp:13525:1: error: OpenMP constructs may not be nested inside an atomic region", [76]="clang/test/OpenMP/nesting_of_regions.cpp:13533:1: error: OpenMP constructs may not be nested inside an atomic region", [77]="clang/test/OpenMP/nesting_of_regions.cpp:13541:1: error: OpenMP constructs may not be nested inside an atomic region", [78]="clang/test/OpenMP/nesting_of_regions.cpp:13549:1: error: OpenMP constructs may not be nested inside an atomic region", [79]="clang/test/OpenMP/nesting_of_regions.cpp:13557:1: error: OpenMP constructs may not be nested inside an atomic region", [80]="clang/test/OpenMP/nesting_of_regions.cpp:13565:1: error: OpenMP constructs may not be nested inside an atomic region", [81]="clang/test/OpenMP/nesting_of_regions.cpp:13573:1: error: OpenMP constructs may not be nested inside an atomic region", [82]="clang/test/OpenMP/nesting_of_regions.cpp:13581:1: error: OpenMP constructs may not be nested inside an atomic region", [83]="clang/test/OpenMP/nesting_of_regions.cpp:13588:1: error: OpenMP constructs may not be nested inside an atomic region", [84]="clang/test/OpenMP/nesting_of_regions.cpp:13596:1: error: OpenMP constructs may not be nested inside an atomic region", [85]="clang/test/OpenMP/nesting_of_regions.cpp:13604:1: error: OpenMP constructs may not be nested inside an atomic region", [86]="clang/test/OpenMP/nesting_of_regions.cpp:13612:1: error: OpenMP constructs may not be nested inside an atomic region", [87]="clang/test/OpenMP/nesting_of_regions.cpp:13766:1: error: OpenMP constructs may not be nested inside an atomic region" } } }, ["err_omp_prohibited_region_critical_same_name"]={ [d]="err_omp_prohibited_region_critical_same_name", [e]="cannot nest \'critical\' regions having the same name %0", [i]="cannot nest \'critical\' regions having the same name A", [j]=k, [c]="cannot nest \'critical\' regions having the same name (.*?)", [h]=a, [g]=o, [f]={"d9ed09f7a5f1",1405935725,"[OPENMP] Parsing/Sema of the OpenMP directive \'critical\'.","[OPENMP] Parsing/Sema of the OpenMP directive \'critical\'.\n\nllvm-svn: 213510"}, [b]={{n,5104,"static bool checkNestingOfRegions(Sema &SemaRef, const DSAStackTy *Stack, OpenMPDirectiveKind CurrentRegion, const DeclarationNameInfo &CurrentName, OpenMPDirectiveKind CancelRegion, OpenMPBindClauseKind BindKind, SourceLocation StartLoc) {\n if (Stack->getCurScope()) {\n // ...\n if (CurrentRegion == OMPD_cancellation_point || CurrentRegion == OMPD_cancel) {\n // ...\n } else if (CurrentRegion == OMPD_master || CurrentRegion == OMPD_masked) {\n // ...\n } else if (CurrentRegion == OMPD_critical && CurrentName.getName()) {\n // ...\n if (DeadLock) {\n SemaRef.Diag(StartLoc, diag::err_omp_prohibited_region_critical_same_name) << CurrentName.getName();"}}, [l]={ ["clang/test/OpenMP/critical_messages.cpp"]={"clang/test/OpenMP/critical_messages.cpp:35:7: error: cannot nest \'critical\' regions having the same name \'name2\'","clang/test/OpenMP/critical_messages.cpp:102:7: error: cannot nest \'critical\' regions having the same name \'name2\'"} } }, ["err_omp_prohibited_region_order"]={ [d]={{nil,O,"err_omp_prohibited_region_order"}}, [e]={{nil,O,"construct \'%0\' not allowed in a region associated with a directive with \'order\' clause"}}, [i]={{nil,O,"construct \'A\' not allowed in a region associated with a directive with \'order\' clause"}}, [j]=k, [c]="construct \'(.*?)\' not allowed in a region associated with a directive with \'order\' clause", [h]=a, [g]={{nil,O,o}}, [f]={"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"}, [b]={{n,4988,"static bool checkNestingOfRegions(Sema &SemaRef, const DSAStackTy *Stack, OpenMPDirectiveKind CurrentRegion, const DeclarationNameInfo &CurrentName, OpenMPDirectiveKind CancelRegion, OpenMPBindClauseKind BindKind, SourceLocation StartLoc) {\n if (Stack->getCurScope()) {\n // ...\n if (SemaRef.LangOpts.OpenMP >= 51 && Stack->isParentOrderConcurrent() && CurrentRegion != OMPD_simd && CurrentRegion != OMPD_loop && CurrentRegion != OMPD_parallel && !isOpenMPCombinedParallelADirective(CurrentRegion)) {\n SemaRef.Diag(StartLoc, diag::err_omp_prohibited_region_order) << getOpenMPDirectiveName(CurrentRegion);"}}, [l]={ ["clang/test/OpenMP/for_order_messages.cpp"]={"clang/test/OpenMP/for_order_messages.cpp:32:1: error: construct \'atomic\' not allowed in a region associated with a directive with \'order\' clause","clang/test/OpenMP/for_order_messages.cpp:38:1: error: construct \'target\' not allowed in a region associated with a directive with \'order\' clause","clang/test/OpenMP/for_order_messages.cpp:44:1: error: construct \'target\' not allowed in a region associated with a directive with \'order\' clause"} } }, ["err_omp_prohibited_region_simd"]={ [d]="err_omp_prohibited_region_simd", [e]={{nil,p,"OpenMP constructs may not be nested inside a simd region%select{| except for ordered simd, simd, scan, or atomic directive}0"},{w,w,"OpenMP constructs may not be nested inside a simd region%select{| except for ordered simd, simd or atomic directive}0"},{v,nil,"OpenMP constructs may not be nested inside a simd region"}}, [i]={{nil,p,{"OpenMP constructs may not be nested inside a simd region",{a," except for ordered simd, simd, scan, or atomic directive"}}},{w,w,{"OpenMP constructs may not be nested inside a simd region",{a," except for ordered simd, simd or atomic directive"}}},{v,nil,"OpenMP constructs may not be nested inside a simd region"}}, [j]=k, [c]="OpenMP constructs may not be nested inside a simd region(?:| except for ordered simd, simd, scan, or atomic directive)", [h]=a, [g]=o, [f]={"549210e783c7",1403584787,"[OPENMP] Added initial checking of nesting of OpenMP regions.","[OPENMP] Added initial checking of nesting of OpenMP regions.\n\nllvm-svn: 211566"}, [b]={{n,5010,"static bool checkNestingOfRegions(Sema &SemaRef, const DSAStackTy *Stack, OpenMPDirectiveKind CurrentRegion, const DeclarationNameInfo &CurrentName, OpenMPDirectiveKind CancelRegion, OpenMPBindClauseKind BindKind, SourceLocation StartLoc) {\n if (Stack->getCurScope()) {\n // ...\n if (isOpenMPSimdDirective(ParentRegion) && ((SemaRef.LangOpts.OpenMP <= 45 && CurrentRegion != OMPD_ordered) || (SemaRef.LangOpts.OpenMP >= 50 && CurrentRegion != OMPD_ordered && CurrentRegion != OMPD_simd && CurrentRegion != OMPD_atomic && CurrentRegion != OMPD_scan))) {\n // ...\n SemaRef.Diag(StartLoc, (CurrentRegion != OMPD_simd) ? diag::err_omp_prohibited_region_simd : diag::warn_omp_nesting_simd) << (SemaRef.LangOpts.OpenMP >= 50 ? 1 : 0);"},{n,11362,"StmtResult Sema::ActOnOpenMPOrderedDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n if (!ErrorFound && !SC && isOpenMPSimdDirective(DSAStack->getParentDirective())) {\n // ...\n Diag(StartLoc, diag::err_omp_prohibited_region_simd) << (LangOpts.OpenMP >= 50 ? 1 : 0);"}}, [l]={ ["clang/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c"]={"clang/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c:172:1: error: OpenMP constructs may not be nested inside a simd region except for ordered simd, simd, scan, or atomic directive"} } }, ["err_omp_reduction_id_not_compatible"]={ [d]="err_omp_reduction_id_not_compatible", [e]="list item of type %0 is not valid for specified reduction operation: unable to provide default initialization value", [i]="list item of type A is not valid for specified reduction operation: unable to provide default initialization value", [j]=k, [c]="list item of type (.*?) is not valid for specified reduction operation\\: unable to provide default initialization value", [h]=a, [g]=o, [f]={"c5e025831ba7",1402902515,"[OPENMP] Initial support of \'reduction\' clause","[OPENMP] Initial support of \'reduction\' clause\n\nllvm-svn: 211007"}, [b]={{n,19659,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (!RHSVD->hasInit() && DeclareReductionRef.isUnset()) {\n S.Diag(ELoc, diag::err_omp_reduction_id_not_compatible) << Type << ReductionIdRange;"}} }, ["err_omp_reduction_identifier_mismatch"]={ [d]={{nil,F,"err_omp_reduction_identifier_mismatch"}}, [e]={{nil,F,"in_reduction variable must have the same reduction operation as in a task_reduction clause"}}, [i]={{nil,F,"in_reduction variable must have the same reduction operation as in a task_reduction clause"}}, [j]=k, [c]="in_reduction variable must have the same reduction operation as in a task_reduction clause", [h]=a, [g]={{nil,F,o}}, [f]={"fa312f33f840",1500662901,"[OPENMP] Initial support for \'in_reduction\' clause.","[OPENMP] Initial support for \'in_reduction\' clause.\n\nParsing/sema analysis for \'in_reduction\' clause for task-based\ndirectives.\n\nllvm-svn: 308768"}, [b]={{n,19809,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.15.4.6, Restrictions, p.2]\n // A list item that appears in an in_reduction clause of a task construct\n // must appear in a task_reduction clause of a construct associated with a\n // taskgroup region that includes the participating task in its taskgroup\n // set. The construct associated with the innermost region that meets this\n // condition must specify the same reduction-identifier as the in_reduction\n // clause.\n if (ClauseKind == OMPC_in_reduction) {\n // ...\n if ((DeclareReductionRef.isUnset() && IsParentReductionOp) || (DeclareReductionRef.isUsable() && IsParentBOK) || (IsParentBOK && BOK != ParentBOK) || IsParentReductionOp) {\n // ...\n if (EmitError) {\n S.Diag(ReductionId.getBeginLoc(), diag::err_omp_reduction_identifier_mismatch) << ReductionIdRange << RefExpr->getSourceRange();"}}, [l]={ ["clang/test/OpenMP/task_in_reduction_message.cpp"]={"clang/test/OpenMP/task_in_reduction_message.cpp:50:31: error: in_reduction variable must have the same reduction operation as in a task_reduction clause","clang/test/OpenMP/task_in_reduction_message.cpp:56:31: error: in_reduction variable must have the same reduction operation as in a task_reduction clause","clang/test/OpenMP/task_in_reduction_message.cpp:262:31: error: in_reduction variable must have the same reduction operation as in a task_reduction clause"} } }, ["err_omp_reduction_in_task"]={ [d]="err_omp_reduction_in_task", [e]="reduction variables may not be accessed in an explicit task", [i]="reduction variables may not be accessed in an explicit task", [j]=k, [c]="reduction variables may not be accessed in an explicit task", [h]=a, [g]=o, [f]={"c5e025831ba7",1402902515,"[OPENMP] Initial support of \'reduction\' clause","[OPENMP] Initial support of \'reduction\' clause\n\nllvm-svn: 211007"}, [b]={{n,3897,"class DSAAttrChecker final : public StmtVisitor<DSAAttrChecker, void> {\n // ...\n void VisitDeclRefExpr(DeclRefExpr *E) {\n // ...\n if (auto *VD = dyn_cast<VarDecl>(E->getDecl())) {\n // ...\n if (isOpenMPTaskingDirective(DKind) && DVar.CKind == OMPC_reduction) {\n // ...\n SemaRef.Diag(ELoc, diag::err_omp_reduction_in_task);"},{n,3993,"class DSAAttrChecker final : public StmtVisitor<DSAAttrChecker, void> {\n // ...\n void VisitMemberExpr(MemberExpr *E) {\n // ...\n if (auto *TE = dyn_cast<CXXThisExpr>(E->getBase()->IgnoreParenCasts())) {\n // ...\n if (isOpenMPTaskingDirective(DKind) && DVar.CKind == OMPC_reduction) {\n // ...\n SemaRef.Diag(ELoc, diag::err_omp_reduction_in_task);"}}, [l]={ ["clang/test/OpenMP/task_messages.cpp"]={"clang/test/OpenMP/task_messages.cpp:288:5: error: reduction variables may not be accessed in an explicit task","clang/test/OpenMP/task_messages.cpp:293:5: error: reduction variables may not be accessed in an explicit task","clang/test/OpenMP/task_messages.cpp:298:5: error: reduction variables may not be accessed in an explicit task","clang/test/OpenMP/task_messages.cpp:306:7: error: reduction variables may not be accessed in an explicit task","clang/test/OpenMP/task_messages.cpp:313:7: error: reduction variables may not be accessed in an explicit task","clang/test/OpenMP/task_messages.cpp:320:7: error: reduction variables may not be accessed in an explicit task","clang/test/OpenMP/task_messages.cpp:110:5: error: reduction variables may not be accessed in an explicit task","clang/test/OpenMP/task_messages.cpp:115:5: error: reduction variables may not be accessed in an explicit task","clang/test/OpenMP/task_messages.cpp:129:7: error: reduction variables may not be accessed in an explicit task","clang/test/OpenMP/task_messages.cpp:136:7: error: reduction variables may not be accessed in an explicit task","clang/test/OpenMP/task_messages.cpp:110:5: error: reduction variables may not be accessed in an explicit task","clang/test/OpenMP/task_messages.cpp:115:5: error: reduction variables may not be accessed in an explicit task","clang/test/OpenMP/task_messages.cpp:129:7: error: reduction variables may not be accessed in an explicit task","clang/test/OpenMP/task_messages.cpp:136:7: error: reduction variables may not be accessed in an explicit task"} } }, ["err_omp_reduction_incomplete_type"]={ [d]="err_omp_reduction_incomplete_type", [e]="a reduction list item with incomplete type %0", [i]="a reduction list item with incomplete type A", [j]=k, [c]="a reduction list item with incomplete type (.*?)", [h]=a, [g]=o, [f]={"c5e025831ba7",1402902515,"[OPENMP] Initial support of \'reduction\' clause","[OPENMP] Initial support of \'reduction\' clause\n\nllvm-svn: 211007"}, [b]={{n,19325,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (S.RequireCompleteType(ELoc, D->getType(), diag::err_omp_reduction_incomplete_type))"}}, [l]={ ["clang/test/OpenMP/parallel_reduction_messages.c"]={"clang/test/OpenMP/parallel_reduction_messages.c:19:36: error: a reduction list item with incomplete type \'int[]\'"} } }, ["err_omp_reduction_non_addressable_expression"]={ [d]={{nil,q,"err_omp_reduction_non_addressable_expression"}}, [e]={{nil,q,"expected addressable reduction item for the task-based directives"}}, [i]={{nil,q,"expected addressable reduction item for the task-based directives"}}, [j]=k, [c]="expected addressable reduction item for the task\\-based directives", [h]=a, [g]={{nil,q,o}}, [f]={"bcd0ae061711",1499800604,"[OPENMP] Add restriction for reduction clause in taskloop directives.","[OPENMP] Add restriction for reduction clause in taskloop directives.\n\nAdded checks for the reduction clauses in the taskloop directives:\n1. Only addressable items must be used in reduction clauses.\n2. Reduction clauses cannot be used with nogroup clauses.\n\nllvm-svn: 307693"}, [b]={{n,19848,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (!VD && !S.CurContext->isDependentContext()) {\n // ...\n if (!S.isOpenMPCapturedDecl(D)) {\n // ...\n if (Ref->getDecl()->hasAttr<OMPCaptureNoInitAttr>()) {\n // ...\n if (isOpenMPTaskingDirective(Stack->getCurrentDirective()) || Stack->getCurrentDirective() == OMPD_taskgroup) {\n S.Diag(RefExpr->getExprLoc(), diag::err_omp_reduction_non_addressable_expression) << RefExpr->getSourceRange();"}}, [l]={ ["clang/test/OpenMP/taskloop_reduction_messages_attr.cpp"]={"clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:102:43: error: expected addressable reduction item for the task-based directives"} } }, ["err_omp_reduction_not_inclusive_exclusive"]={ [d]={{nil,p,"err_omp_reduction_not_inclusive_exclusive"}}, [e]={{nil,p,"the inscan reduction list item must appear as a list item in an \'inclusive\' or \'exclusive\' clause on an inner \'omp scan\' directive"}}, [i]={{nil,p,"the inscan reduction list item must appear as a list item in an \'inclusive\' or \'exclusive\' clause on an inner \'omp scan\' directive"}}, [j]=k, [c]="the inscan reduction list item must appear as a list item in an \'inclusive\' or \'exclusive\' clause on an inner \'omp scan\' directive", [h]=a, [g]={{nil,p,o}}, [f]={W,1576908663,X,Y}, [b]={{n,2836,"/// Check consistency of the reduction clauses.\nstatic void checkReductionClauses(Sema &S, DSAStackTy *Stack, ArrayRef<OMPClause *> Clauses) {\n // ...\n if (InscanFound) {\n for (OMPClause *C : Clauses) {\n // ...\n for (Expr *Ref : RC->varlists()) {\n // ...\n if (!Stack->isUsedInScanDirective(getCanonicalDecl(D))) {\n S.Diag(Ref->getExprLoc(), diag::err_omp_reduction_not_inclusive_exclusive) << Ref->getSourceRange();"}}, [l]={ ["clang/test/OpenMP/scan_messages.cpp"]={"clang/test/OpenMP/scan_messages.cpp:106:39: error: the inscan reduction list item must appear as a list item in an \'inclusive\' or \'exclusive\' clause on an inner \'omp scan\' directive","clang/test/OpenMP/scan_messages.cpp:39:39: error: the inscan reduction list item must appear as a list item in an \'inclusive\' or \'exclusive\' clause on an inner \'omp scan\' directive","clang/test/OpenMP/scan_messages.cpp:55:39: error: the inscan reduction list item must appear as a list item in an \'inclusive\' or \'exclusive\' clause on an inner \'omp scan\' directive"} } }, ["err_omp_reduction_ref_type_arg"]={ [d]="err_omp_reduction_ref_type_arg", [e]="argument of OpenMP clause \'reduction\' must reference the same object in all threads", [i]="argument of OpenMP clause \'reduction\' must reference the same object in all threads", [j]=k, [c]="argument of OpenMP clause \'(.*?)\' must reference the same object in all threads", [h]=a, [g]=o, [f]={"c5e025831ba7",1402902515,"[OPENMP] Initial support of \'reduction\' clause","[OPENMP] Initial support of \'reduction\' clause\n\nllvm-svn: 211007"}, [b]={{n,19344,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.9.3.6, Restrictions, C/C++, p.4]\n // If a list-item is a reference type then it must bind to the same object\n // for all threads of the team.\n if (!ASE && !OASE) {\n if (VD) {\n // ...\n if (VD->getType()->isReferenceType() && VDDef && VDDef->hasInit()) {\n // ...\n if (Check.Visit(VDDef->getInit())) {\n S.Diag(ELoc, diag::err_omp_reduction_ref_type_arg) << getOpenMPClauseName(ClauseKind) << ERange;"}}, [l]={ ["clang/test/OpenMP/taskloop_reduction_messages_attr.cpp"]={"clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:179:84: error: argument of OpenMP clause \'reduction\' must reference the same object in all threads","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:179:102: error: argument of OpenMP clause \'reduction\' must reference the same object in all threads","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:281:55: error: argument of OpenMP clause \'reduction\' must reference the same object in all threads","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:281:73: error: argument of OpenMP clause \'reduction\' must reference the same object in all threads","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:284:84: error: argument of OpenMP clause \'reduction\' must reference the same object in all threads","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:284:102: error: argument of OpenMP clause \'reduction\' must reference the same object in all threads","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:293:125: error: argument of OpenMP clause \'reduction\' must reference the same object in all threads","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:176:55: error: argument of OpenMP clause \'reduction\' must reference the same object in all threads","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:176:73: error: argument of OpenMP clause \'reduction\' must reference the same object in all threads","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:188:125: error: argument of OpenMP clause \'reduction\' must reference the same object in all threads","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:176:55: error: argument of OpenMP clause \'reduction\' must reference the same object in all threads","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:176:73: error: argument of OpenMP clause \'reduction\' must reference the same object in all threads","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:188:125: error: argument of OpenMP clause \'reduction\' must reference the same object in all threads"} } }, ["err_omp_reduction_task_not_parallel_or_worksharing"]={ [d]={{nil,p,"err_omp_reduction_task_not_parallel_or_worksharing"}}, [e]={{nil,p,"\'reduction\' clause with \'task\' modifier allowed only on non-simd parallel or worksharing constructs"}}, [i]={{nil,p,"\'reduction\' clause with \'task\' modifier allowed only on non-simd parallel or worksharing constructs"}}, [j]=k, [c]="\'reduction\' clause with \'task\' modifier allowed only on non\\-simd parallel or worksharing constructs", [h]=a, [g]={{nil,p,o}}, [f]={W,1576908663,X,Y}, [b]={{n,2807,"/// Check consistency of the reduction clauses.\nstatic void checkReductionClauses(Sema &S, DSAStackTy *Stack, ArrayRef<OMPClause *> Clauses) {\n // ...\n // OpenMP 5.0, 2.19.5.4 reduction Clause, Restrictions.\n // A reduction clause without the inscan reduction-modifier may not appear on\n // a construct on which a reduction clause with the inscan reduction-modifier\n // appears.\n for (OMPClause *C : Clauses) {\n // ...\n if (RC->getModifier() == OMPC_REDUCTION_task) {\n // ...\n if (!(isOpenMPParallelDirective(CurDir) || isOpenMPWorksharingDirective(CurDir)) || isOpenMPSimdDirective(CurDir))\n S.Diag(RC->getModifierLoc(), diag::err_omp_reduction_task_not_parallel_or_worksharing);"}}, [l]={ ["clang/test/OpenMP/taskloop_reduction_messages_attr.cpp"]={"clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:306:39: error: \'reduction\' clause with \'task\' modifier allowed only on non-simd parallel or worksharing constructs"} } }, ["err_omp_reduction_vla_unsupported"]={ [d]={{nil,F,"err_omp_reduction_vla_unsupported"}}, [e]={{nil,F,"cannot generate code for reduction on %select{|array section, which requires a }0variable length array"}}, [i]={{nil,F,{"cannot generate code for reduction on ",{a,"array section, which requires a "},"variable length array"}}}, [j]=k, [c]="cannot generate code for reduction on (?:|array section, which requires a )variable length array", [h]=a, [g]={{nil,F,o}}, [f]={"87d44269885f",1511038846,"[OpenMP] Show error if VLAs are not supported","[OpenMP] Show error if VLAs are not supported\n\nSome target devices (e.g. Nvidia GPUs) don\'t support dynamic stack\nallocation and hence no VLAs. Print errors with description instead\nof failing in the backend or generating code that doesn\'t work.\n\nThis patch handles explicit uses of VLAs (local variable in target\nor declare target region) or implicitly generated (private) VLAs\nfor reductions on VLAs or on array sections with non-constant size.\n\nDifferential Revision: https://reviews.llvm.org/D39505\n\nllvm-svn: 318601"}, [b]={{n,19503,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if ((OASE && !ConstantLengthOASE) || (!OASE && !ASE && D->getType().getNonReferenceType()->isVariablyModifiedType())) {\n if (!Context.getTargetInfo().isVLASupported()) {\n if (isOpenMPTargetExecutionDirective(Stack->getCurrentDirective())) {\n S.Diag(ELoc, diag::err_omp_reduction_vla_unsupported) << !!OASE;"},{n,19507,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if ((OASE && !ConstantLengthOASE) || (!OASE && !ASE && D->getType().getNonReferenceType()->isVariablyModifiedType())) {\n if (!Context.getTargetInfo().isVLASupported()) {\n if (isOpenMPTargetExecutionDirective(Stack->getCurrentDirective())) {\n // ...\n } else {\n S.targetDiag(ELoc, diag::err_omp_reduction_vla_unsupported) << !!OASE;"}}, [l]={ ["clang/test/OpenMP/target_vla_messages.cpp"]={"clang/test/OpenMP/target_vla_messages.cpp:40:35: error: cannot generate code for reduction on array section, which requires a variable length array","clang/test/OpenMP/target_vla_messages.cpp:95:32: error: cannot generate code for reduction on variable length array","clang/test/OpenMP/target_vla_messages.cpp:111:32: error: cannot generate code for reduction on array section, which requires a variable length array","clang/test/OpenMP/target_vla_messages.cpp:119:32: error: cannot generate code for reduction on array section, which requires a variable length array","clang/test/OpenMP/target_vla_messages.cpp:136:35: error: cannot generate code for reduction on variable length array","clang/test/OpenMP/target_vla_messages.cpp:152:35: error: cannot generate code for reduction on array section, which requires a variable length array","clang/test/OpenMP/target_vla_messages.cpp:160:35: error: cannot generate code for reduction on array section, which requires a variable length array","clang/test/OpenMP/target_vla_messages.cpp:179:30: error: cannot generate code for reduction on variable length array","clang/test/OpenMP/target_vla_messages.cpp:198:30: error: cannot generate code for reduction on array section, which requires a variable length array","clang/test/OpenMP/target_vla_messages.cpp:207:30: error: cannot generate code for reduction on array section, which requires a variable length array","clang/test/OpenMP/target_vla_messages.cpp:213:34: error: cannot generate code for reduction on array section, which requires a variable length array"} } }, ["err_omp_reduction_with_nogroup"]={ [d]={{nil,q,"err_omp_reduction_with_nogroup"}}, [e]={{nil,q,"\'reduction\' clause cannot be used with \'nogroup\' clause"}}, [i]={{nil,q,"\'reduction\' clause cannot be used with \'nogroup\' clause"}}, [j]=k, [c]="\'reduction\' clause cannot be used with \'nogroup\' clause", [h]=a, [g]={{nil,q,o}}, [f]={"bcd0ae061711",1499800604,"[OPENMP] Add restriction for reduction clause in taskloop directives.","[OPENMP] Add restriction for reduction clause in taskloop directives.\n\nAdded checks for the reduction clauses in the taskloop directives:\n1. Only addressable items must be used in reduction clauses.\n2. Reduction clauses cannot be used with nogroup clauses.\n\nllvm-svn: 307693"}, [b]={{n,13412,"static bool checkReductionClauseWithNogroup(Sema &S, ArrayRef<OMPClause *> Clauses) {\n // ...\n if (ReductionClause && NogroupClause) {\n S.Diag(ReductionClause->getBeginLoc(), diag::err_omp_reduction_with_nogroup) << SourceRange(NogroupClause->getBeginLoc(), NogroupClause->getEndLoc());"}}, [l]={ ["clang/test/OpenMP/taskloop_reduction_messages_attr.cpp"]={"clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:309:37: error: \'reduction\' clause cannot be used with \'nogroup\' clause"} } }, ["err_omp_reduction_wrong_type"]={ [d]="err_omp_reduction_wrong_type", [e]="reduction type cannot be %select{qualified with \'const\', \'volatile\' or \'restrict\'|a function|a reference|an array}0 type", [i]={{nil,nil,{"reduction type cannot be ",{"qualified with \'const\', \'volatile\' or \'restrict\'","a function","a reference","an array"}," type"}}}, [j]=k, [c]="reduction type cannot be (?:qualified with \'const\', \'volatile\' or \'restrict\'|a function|a reference|an array) type", [h]=a, [g]=o, [f]={"94a4f0cb5f8a",1456982499,"[OPENMP 4.0] Initial support for \'omp declare reduction\' construct.","[OPENMP 4.0] Initial support for \'omp declare reduction\' construct.\n\nAdd parsing, sema analysis and serialization/deserialization for \'declare reduction\' construct.\nUser-defined reductions are defined as\n\n#pragma omp declare reduction( reduction-identifier : typename-list : combiner ) [initializer ( initializer-expr )]\nThese custom reductions may be used in \'reduction\' clauses of OpenMP constructs. The combiner specifies how partial results can be combined into a single value. The\ncombiner can use the special variable identifiers omp_in and omp_out that are of the type of the variables being reduced with this reduction-identifier. Each of them will\ndenote one of the values to be combined before executing the combiner. It is assumed that the special omp_out identifier will refer to the storage that holds the resulting\ncombined value after executing the combiner.\nAs the initializer-expr value of a user-defined reduction is not known a priori the initializer-clause can be used to specify one. Then the contents of the initializer-clause\nwill be used as the initializer for private copies of reduction list items where the omp_priv identifier will refer to the storage to be initialized. The special identifier\nomp_orig can also appear in the initializer-clause and it will refer to the storage of the original variable to be reduced.\nDifferential Revision: http://reviews.llvm.org/D11182\n\nllvm-svn: 262582"}, [b]={{n,22212,"QualType Sema::ActOnOpenMPDeclareReductionType(SourceLocation TyLoc, TypeResult ParsedType) {\n // ...\n // [OpenMP 4.0], 2.15 declare reduction Directive, Restrictions, C\\C++\n // A type name in a declare reduction directive cannot be a function type, an\n // array type, a reference type, or a type qualified with const, volatile or\n // restrict.\n if (ReductionType.hasQualifiers()) {\n Diag(TyLoc, diag::err_omp_reduction_wrong_type) << 0;"},{n,22217,"QualType Sema::ActOnOpenMPDeclareReductionType(SourceLocation TyLoc, TypeResult ParsedType) {\n // ...\n if (ReductionType->isFunctionType()) {\n Diag(TyLoc, diag::err_omp_reduction_wrong_type) << 1;"},{n,22221,"QualType Sema::ActOnOpenMPDeclareReductionType(SourceLocation TyLoc, TypeResult ParsedType) {\n // ...\n if (ReductionType->isReferenceType()) {\n Diag(TyLoc, diag::err_omp_reduction_wrong_type) << 2;"},{n,22225,"QualType Sema::ActOnOpenMPDeclareReductionType(SourceLocation TyLoc, TypeResult ParsedType) {\n // ...\n if (ReductionType->isArrayType()) {\n Diag(TyLoc, diag::err_omp_reduction_wrong_type) << 3;"}}, [l]={ ["clang/test/OpenMP/declare_reduction_messages.c"]={"clang/test/OpenMP/declare_reduction_messages.c:18:35: error: reduction type cannot be qualified with \'const\', \'volatile\' or \'restrict\' type","clang/test/OpenMP/declare_reduction_messages.c:19:35: error: reduction type cannot be qualified with \'const\', \'volatile\' or \'restrict\' type","clang/test/OpenMP/declare_reduction_messages.c:28:37: error: reduction type cannot be a function type","clang/test/OpenMP/declare_reduction_messages.c:29:37: error: reduction type cannot be an array type"} } }, ["err_omp_ref_type_arg"]={ [d]="err_omp_ref_type_arg", [e]="arguments of \'#pragma omp %0\' cannot be of reference type %1", [i]="arguments of \'#pragma omp A\' cannot be of reference type B", [j]=k, [c]="arguments of \'\\#pragma omp (.*?)\' cannot be of reference type (.*?)", [h]=a, [g]=o, [f]={nb,1363934075,ob,pb}, [b]={{n,3226,"OMPThreadPrivateDecl *Sema::CheckOMPThreadPrivateDecl(SourceLocation Loc, ArrayRef<Expr *> VarList) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.9.2, Restrictions, C/C++, p.10]\n // A threadprivate variable must not have a reference type.\n if (VD->getType()->isReferenceType()) {\n Diag(ILoc, diag::err_omp_ref_type_arg) << getOpenMPDirectiveName(OMPD_threadprivate) << VD->getType();"}}, [l]={ [Cb]={"clang/test/OpenMP/threadprivate_messages.cpp:59:28: error: arguments of \'#pragma omp threadprivate\' cannot be of reference type \'int &\'"} } }, ["err_omp_region_not_file_context"]={ [d]="err_omp_region_not_file_context", [e]="directive must be at file or namespace scope", [i]="directive must be at file or namespace scope", [j]=k, [c]="directive must be at file or namespace scope", [h]=a, [g]=o, [f]={"0b0da296e6de",1459942739,"[OPENMP] Parsing and Sema support for \'omp declare target\' directive","[OPENMP] Parsing and Sema support for \'omp declare target\' directive\n\nAdd parsing, sema analysis for \'declare target\' construct for OpenMP 4.0\n(4.5 support will be added in separate patch).\n\nThe declare target directive specifies that variables, functions (C, C++\nand Fortran), and subroutines (Fortran) are mapped to a device. The declare\ntarget directive is a declarative directive. In Clang declare target is\nimplemented as implicit attribute for the declaration.\n\nThe syntax of the declare target directive is as follows:\n\n #pragma omp declare target\n declarations-definition-seq\n #pragma omp end declare target\n\nBased on patch from Michael Wong http://reviews.llvm.org/D15321\n\nllvm-svn: 265530"}, [b]={{n,22983,"bool Sema::ActOnStartOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI) {\n // ...\n if (!CurLexicalContext->isFileContext() && !CurLexicalContext->isExternCContext() && !CurLexicalContext->isExternCXXContext() && !isa<CXXRecordDecl>(CurLexicalContext) && !isa<ClassTemplateDecl>(CurLexicalContext) && !isa<ClassTemplatePartialSpecializationDecl>(CurLexicalContext) && !isa<ClassTemplateSpecializationDecl>(CurLexicalContext)) {\n Diag(DTCI.Loc, diag::err_omp_region_not_file_context);"}} }, ["err_omp_required_access"]={ [d]="err_omp_required_access", [e]="%0 variable must be %1", [i]="A variable must be B", [j]=k, [c]="(.*?) variable must be (.*?)", [h]=a, [g]=o, [f]={"d48bcd8a4693",1396236998,"[OPENMP] Implemented \'copyin\' clause","[OPENMP] Implemented \'copyin\' clause\n\nllvm-svn: 205164"}, [b]={{n,18310,"OMPClause *Sema::ActOnOpenMPFirstprivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (!IsImplicitClause) {\n // ...\n // OpenMP [2.9.3.4, Restrictions, p.2]\n // A list item that is private within a parallel region must not appear\n // in a firstprivate clause on a worksharing construct if any of the\n // worksharing regions arising from the worksharing construct ever bind\n // to any of the parallel regions arising from the parallel construct.\n // OpenMP 4.5 [2.15.3.4, Restrictions, p.3]\n // A list item that is private within a teams region must not appear in a\n // firstprivate clause on a distribute construct if any of the distribute\n // regions arising from the distribute construct ever bind to any of the\n // teams regions arising from the teams construct.\n // OpenMP 4.5 [2.15.3.4, Restrictions, p.3]\n // A list item that appears in a reduction clause of a teams construct\n // must not appear in a firstprivate clause on a distribute construct if\n // any of the distribute regions arising from the distribute construct\n // ever bind to any of the teams regions arising from the teams construct.\n if ((isOpenMPWorksharingDirective(CurrDir) || isOpenMPDistributeDirective(CurrDir)) && !isOpenMPParallelDirective(CurrDir) && !isOpenMPTeamsDirective(CurrDir)) {\n // ...\n if (DVar.CKind != OMPC_shared && (isOpenMPParallelDirective(DVar.DKind) || isOpenMPTeamsDirective(DVar.DKind) || DVar.DKind == OMPD_unknown)) {\n Diag(ELoc, diag::err_omp_required_access) << getOpenMPClauseName(OMPC_firstprivate) << getOpenMPClauseName(OMPC_shared);"},{n,18585,"OMPClause *Sema::ActOnOpenMPLastprivateClause(ArrayRef<Expr *> VarList, OpenMPLastprivateModifier LPKind, SourceLocation LPKindLoc, SourceLocation ColonLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (isOpenMPWorksharingDirective(CurrDir) && !isOpenMPParallelDirective(CurrDir) && !isOpenMPTeamsDirective(CurrDir)) {\n // ...\n if (DVar.CKind != OMPC_shared) {\n Diag(ELoc, diag::err_omp_required_access) << getOpenMPClauseName(OMPC_lastprivate) << getOpenMPClauseName(OMPC_shared);"},{n,19388,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.9.3.6, Restrictions, C/C++, p.4]\n // If a list-item is a reference type then it must bind to the same object\n // for all threads of the team.\n if (!ASE && !OASE) {\n // ...\n // OpenMP [2.14.3.6, Restrictions, p.1]\n // A list item that appears in a reduction clause of a worksharing\n // construct must be shared in the parallel regions to which any of the\n // worksharing regions arising from the worksharing construct bind.\n if (isOpenMPWorksharingDirective(CurrDir) && !isOpenMPParallelDirective(CurrDir) && !isOpenMPTeamsDirective(CurrDir)) {\n // ...\n if (DVar.CKind != OMPC_shared) {\n S.Diag(ELoc, diag::err_omp_required_access) << getOpenMPClauseName(OMPC_reduction) << getOpenMPClauseName(OMPC_shared);"},{n,20378,"OMPClause *Sema::ActOnOpenMPCopyinClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.14.4.1, Restrictions, C/C++, p.1]\n // A list item that appears in a copyin clause must be threadprivate.\n if (!DSAStack->isThreadPrivate(VD)) {\n Diag(ELoc, diag::err_omp_required_access) << getOpenMPClauseName(OMPC_copyin) << getOpenMPDirectiveName(OMPD_threadprivate);"},{n,20474,"OMPClause *Sema::ActOnOpenMPCopyprivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.14.4.2, Restrictions, p.2]\n // A list item that appears in a copyprivate clause may not appear in a\n // private or firstprivate clause on the single construct.\n if (!VD || !DSAStack->isThreadPrivate(VD)) {\n // ...\n // OpenMP [2.11.4.2, Restrictions, p.1]\n // All list items that appear in a copyprivate clause must be either\n // threadprivate or private in the enclosing context.\n if (DVar.CKind == OMPC_unknown) {\n // ...\n if (DVar.CKind == OMPC_shared) {\n Diag(ELoc, diag::err_omp_required_access) << getOpenMPClauseName(OMPC_copyprivate) << \"threadprivate or private in the enclosing context\";"}}, [l]={ ["clang/test/OpenMP/parallel_sections_copyin_messages.cpp"]={"clang/test/OpenMP/parallel_sections_copyin_messages.cpp:101:38: error: copyin variable must be threadprivate","clang/test/OpenMP/parallel_sections_copyin_messages.cpp:109:38: error: copyin variable must be threadprivate"} } }, ["err_omp_required_clause"]={ [d]={{nil,C,"err_omp_required_clause"}}, [e]={{nil,C,"directive \'#pragma omp %0\' requires the \'%1\' clause"}}, [i]={{nil,C,"directive \'#pragma omp A\' requires the \'B\' clause"}}, [j]=k, [c]="directive \'\\#pragma omp (.*?)\' requires the \'(.*?)\' clause", [h]=a, [g]={{nil,C,V}}, [f]={"6c05005238a8",1613158019,"[OpenMP] Implement \'#pragma omp tile\', by Michael Kruse (@Meinersbur).","[OpenMP] Implement \'#pragma omp tile\', by Michael Kruse (@Meinersbur).\n\nThe tile directive is in OpenMP\'s Technical Report 8 and foreseeably will be part of the upcoming OpenMP 5.1 standard.\n\nThis implementation is based on an AST transformation providing a de-sugared loop nest. This makes it simple to forward the de-sugared transformation to loop associated directives taking the tiled loops. In contrast to other loop associated directives, the OMPTileDirective does not use CapturedStmts. Letting loop associated directives consume loops from different capture context would be difficult.\n\nA significant amount of code generation logic is taking place in the Sema class. Eventually, I would prefer if these would move into the CodeGen component such that we could make use of the OpenMPIRBuilder, together with flang. Only expressions converting between the language\'s iteration variable and the logical iteration space need to take place in the semantic analyzer: Getting the of iterations (e.g. the overload resolution of `std::distance`) and converting the logical iteration number to the iteration variable (e.g. overload resolution of `iteration + .omp.iv`). In clang, only CXXForRangeStmt is also represented by its de-sugared components. However, OpenMP loop are not defined as syntatic sugar. Starting with an AST-based approach allows us to gradually move generated AST statements into CodeGen, instead all at once.\n\nI would also like to refactor `checkOpenMPLoop` into its functionalities in a follow-up. In this patch it is used twice. Once for checking proper nesting and emitting diagnostics, and additionally for deriving the logical iteration space per-loop (instead of for the loop nest).\n\nDifferential Revision: https://reviews.llvm.org/D76342"}, [b]={{L,2945,"/// 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_parallel:\n case OMPD_simd:\n case OMPD_tile:\n case OMPD_unroll:\n case OMPD_for:\n case OMPD_for_simd:\n case OMPD_sections:\n case OMPD_single:\n case OMPD_section:\n case OMPD_master:\n case OMPD_critical:\n case OMPD_parallel_for:\n case OMPD_parallel_for_simd:\n case OMPD_parallel_sections:\n case OMPD_parallel_master:\n case OMPD_parallel_masked:\n case OMPD_task:\n case OMPD_ordered:\n case OMPD_atomic:\n case OMPD_target:\n case OMPD_teams:\n case OMPD_taskgroup:\n case OMPD_target_data:\n case OMPD_target_parallel:\n case OMPD_target_parallel_for:\n case OMPD_loop:\n case OMPD_teams_loop:\n case OMPD_target_teams_loop:\n case OMPD_parallel_loop:\n case OMPD_target_parallel_loop:\n case OMPD_taskloop:\n case OMPD_taskloop_simd:\n case OMPD_master_taskloop:\n case OMPD_masked_taskloop:\n case OMPD_master_taskloop_simd:\n case OMPD_masked_taskloop_simd:\n case OMPD_parallel_master_taskloop:\n case OMPD_parallel_masked_taskloop:\n case OMPD_parallel_master_taskloop_simd:\n case OMPD_parallel_masked_taskloop_simd:\n case OMPD_distribute:\n case OMPD_distribute_parallel_for:\n case OMPD_distribute_parallel_for_simd:\n case OMPD_distribute_simd:\n case OMPD_target_parallel_for_simd:\n case OMPD_target_simd:\n case OMPD_teams_distribute:\n case OMPD_teams_distribute_simd:\n case OMPD_teams_distribute_parallel_for_simd:\n case OMPD_teams_distribute_parallel_for:\n case OMPD_target_teams:\n case OMPD_target_teams_distribute:\n case OMPD_target_teams_distribute_parallel_for:\n case OMPD_target_teams_distribute_parallel_for_simd:\n case OMPD_target_teams_distribute_simd:\n case OMPD_dispatch:\n case OMPD_masked: {\n // ...\n if (DKind == OMPD_tile && !FirstClauses[unsigned(OMPC_sizes)].getInt()) {\n Diag(Loc, diag::err_omp_required_clause) << getOpenMPDirectiveName(OMPD_tile) << \"sizes\";"}}, [l]={ ["clang/test/OpenMP/tile_messages.cpp"]={"clang/test/OpenMP/tile_messages.cpp:57:3: error: directive \'#pragma omp tile\' requires the \'sizes\' clause"} } }, ["err_omp_requires_clause_redeclaration"]={ [d]={{nil,u,"err_omp_requires_clause_redeclaration"}}, [e]={{nil,u,"Only one %0 clause can appear on a requires directive in a single translation unit"}}, [i]={{nil,u,"Only one A clause can appear on a requires directive in a single translation unit"}}, [j]=k, [c]="Only one (.*?) clause can appear on a requires directive in a single translation unit", [h]=a, [g]={{nil,u,o}}, [f]={"1408f91a2588",1537936119,"[OPENMP] Add support for OMP5 requires directive + unified_address clause","[OPENMP] Add support for OMP5 requires directive + unified_address clause\n\nAdd support for OMP5.0 requires directive and unified_address clause.\nPatches to follow will include support for additional clauses.\n\nDifferential Revision: https://reviews.llvm.org/D52359\n\nllvm-svn: 343063"}, [b]={{n,678,"/// Stack for tracking declarations used in OpenMP directives and\n/// clauses and their data-sharing attributes.\nclass DSAStackTy {\n // ...\n /// Checks for a duplicate clause amongst previously declared requires\n /// directives\n bool hasDuplicateRequiresClause(ArrayRef<OMPClause *> ClauseList) const {\n // ...\n for (OMPClause *CNew : ClauseList) {\n for (const OMPRequiresDecl *D : RequiresDecls) {\n for (const OMPClause *CPrev : D->clauselists()) {\n if (CNew->getClauseKind() == CPrev->getClauseKind()) {\n SemaRef.Diag(CNew->getBeginLoc(), diag::err_omp_requires_clause_redeclaration) << getOpenMPClauseName(CNew->getClauseKind());"}}, [l]={ ["clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp"]={"clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp:10:22: error: Only one atomic_default_mem_order clause can appear on a requires directive in a single translation unit","clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp:11:22: error: Only one atomic_default_mem_order clause can appear on a requires directive in a single translation unit"} } }, ["err_omp_requires_out_inout_depend_type"]={ [d]={{nil,J,"err_omp_requires_out_inout_depend_type"}}, [e]={{nil,J,"reserved locator \'omp_all_memory\' requires \'out\' or \'inout\' dependency types"}}, [i]={{nil,J,"reserved locator \'omp_all_memory\' requires \'out\' or \'inout\' dependency types"}}, [j]=k, [c]="reserved locator \'omp_all_memory\' requires \'out\' or \'inout\' dependency types", [h]=a, [g]={{nil,J,K}}, [f]={"9ba937112fa6",1652807460,"[OpenMP] Add parsing/sema support for omp_all_memory reserved locator","[OpenMP] Add parsing/sema support for omp_all_memory reserved locator\n\nAdds support for the reserved locator \'omp_all_memory\' for use\nin depend clauses with \'out\' or \'inout\' dependence-types.\n\nDifferential Revision: https://reviews.llvm.org/D125828"}, [b]={{L,4312,"bool Parser::ParseOpenMPReservedLocator(OpenMPClauseKind Kind, Sema::OpenMPVarListDataTy &Data, const LangOptions &LangOpts) {\n // ...\n if (Tok.is(tok::identifier) && Tok.getIdentifierInfo()->isStr(\"omp_all_memory\")) {\n if (Data.ExtraModifier == OMPC_DEPEND_outallmemory || Data.ExtraModifier == OMPC_DEPEND_inoutallmemory)\n // ...\n else if (Data.ExtraModifier != OMPC_DEPEND_out && Data.ExtraModifier != OMPC_DEPEND_inout)\n Diag(Tok, diag::err_omp_requires_out_inout_depend_type);"}}, [l]={ ["clang/test/OpenMP/task_depend_messages.cpp"]={"clang/test/OpenMP/task_depend_messages.cpp:88:35: error: reserved locator \'omp_all_memory\' requires \'out\' or \'inout\' dependency types"} } }, ["err_omp_same_pointer_dereferenced"]={ [d]={{nil,z,"err_omp_same_pointer_dereferenced"}}, [e]={{nil,z,"same pointer dereferenced in multiple different ways in map clause expressions"}}, [i]={{nil,z,"same pointer dereferenced in multiple different ways in map clause expressions"}}, [j]=k, [c]="same pointer dereferenced in multiple different ways in map clause expressions", [h]=a, [g]={{nil,z,o}}, [f]={"2819260b357e",1519753320,"[OPENMP] Allow multiple mappings for member expressions for pointers.","[OPENMP] Allow multiple mappings for member expressions for pointers.\n\nIf several member expressions are mapped and they reference the same\naddress as a base, but access different members, this must be allowed.\n\nllvm-svn: 326212"}, [b]={{n,21609,"// Return true if expression E associated with value VD has conflicts with other\n// map information.\nstatic bool checkMapConflicts(Sema &SemaRef, DSAStackTy *DSAS, const ValueDecl *VD, const Expr *E, bool CurrentRegionOnly, OMPClauseMappableExprCommon::MappableExprComponentListRef CurComponents, OpenMPClauseKind CKind) {\n // ...\n bool FoundError = DSAS->checkMappableExprComponentListsForDecl(VD, CurrentRegionOnly, [&IsEnclosedByDataEnvironmentExpr, &SemaRef, VD, CurrentRegionOnly, ELoc, ERange, CKind, &EnclosingExpr, CurComponents](OMPClauseMappableExprCommon::MappableExprComponentListRef StackComponents, OpenMPClauseKind Kind) {\n // ...\n // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, C/C++, p.1]\n // A variable for which the type is pointer and an array section\n // derived from that variable must not appear as list items of map\n // clauses of the same construct.\n //\n // Also, cover one of the cases in:\n // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.5]\n // If any part of the original storage of a list item has corresponding\n // storage in the device data environment, all of the original storage\n // must have corresponding storage in the device data environment.\n //\n if (DerivedType->isAnyPointerType()) {\n // ...\n if (CI->getAssociatedExpression()->getStmtClass() != SI->getAssociatedExpression()->getStmtClass() || CI->getAssociatedDeclaration()->getCanonicalDecl() == SI->getAssociatedDeclaration()->getCanonicalDecl()) {\n // ...\n SemaRef.Diag(DerivedLoc, diag::err_omp_same_pointer_dereferenced) << DerivedLoc;"}}, [l]={ ["clang/test/OpenMP/target_teams_map_messages.cpp"]={"clang/test/OpenMP/target_teams_map_messages.cpp:245:45: error: same pointer dereferenced in multiple different ways in map clause expressions","clang/test/OpenMP/target_teams_map_messages.cpp:251:46: error: same pointer dereferenced in multiple different ways in map clause expressions"} } }, ["err_omp_scan_single_clause_expected"]={ [d]={{nil,p,"err_omp_scan_single_clause_expected"}}, [e]={{nil,p,"exactly one of \'inclusive\' or \'exclusive\' clauses is expected"}}, [i]={{nil,p,"exactly one of \'inclusive\' or \'exclusive\' clauses is expected"}}, [j]=k, [c]="exactly one of \'inclusive\' or \'exclusive\' clauses is expected", [h]=a, [g]={{nil,p,o}}, [f]={W,1576908663,X,Y}, [b]={{n,11277,"StmtResult Sema::ActOnOpenMPScanDirective(ArrayRef<OMPClause *> Clauses, SourceLocation StartLoc, SourceLocation EndLoc) {\n // Check that exactly one clause is specified.\n if (Clauses.size() != 1) {\n Diag(Clauses.empty() ? EndLoc : Clauses[1]->getBeginLoc(), diag::err_omp_scan_single_clause_expected);"}}, [l]={ ["clang/test/OpenMP/scan_messages.cpp"]={"clang/test/OpenMP/scan_messages.cpp:10:101: error: exactly one of \'inclusive\' or \'exclusive\' clauses is expected","clang/test/OpenMP/scan_messages.cpp:15:204: error: exactly one of \'inclusive\' or \'exclusive\' clauses is expected","clang/test/OpenMP/scan_messages.cpp:16:194: error: exactly one of \'inclusive\' or \'exclusive\' clauses is expected","clang/test/OpenMP/scan_messages.cpp:17:188: error: exactly one of \'inclusive\' or \'exclusive\' clauses is expected","clang/test/OpenMP/scan_messages.cpp:93:34: error: exactly one of \'inclusive\' or \'exclusive\' clauses is expected","clang/test/OpenMP/scan_messages.cpp:98:34: error: exactly one of \'inclusive\' or \'exclusive\' clauses is expected","clang/test/OpenMP/scan_messages.cpp:103:34: error: exactly one of \'inclusive\' or \'exclusive\' clauses is expected","clang/test/OpenMP/scan_messages.cpp:108:194: error: exactly one of \'inclusive\' or \'exclusive\' clauses is expected","clang/test/OpenMP/scan_messages.cpp:109:188: error: exactly one of \'inclusive\' or \'exclusive\' clauses is expected"} } }, ["err_omp_schedule_nonmonotonic_static"]={ [d]="err_omp_schedule_nonmonotonic_static", [e]="\'nonmonotonic\' modifier can only be specified with \'dynamic\' or \'guided\' schedule kind", [i]="\'nonmonotonic\' modifier can only be specified with \'dynamic\' or \'guided\' schedule kind", [j]=k, [c]="\'nonmonotonic\' modifier can only be specified with \'dynamic\' or \'guided\' schedule kind", [h]=a, [g]=o, [f]={"6402bcad714d",1451287551,"[OPENMP 4.5] Sema/parsing support for extended format of \'schedule\' clause.","[OPENMP 4.5] Sema/parsing support for extended format of \'schedule\' clause.\nOpenMP 4.0-3.1 supports the next format of ‘schedule’ clause: schedule(kind[, chunk_size])\nWhere kind can be one of ‘static’, ‘dynamic’, ‘guided’, ‘auto’ or ‘runtime’.\nOpenMP 4.5 defines the format: schedule([modifier [, modifier]:]kind[, chunk_size])\nModifier can be one of ‘monotonic’, ‘nonmonotonic’ or ‘simd’.\n\nllvm-svn: 256487"}, [b]={{n,17270,"OMPClause *Sema::ActOnOpenMPScheduleClause(OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP, 2.7.1, Loop Construct, Restrictions\n // The nonmonotonic modifier can only be specified with schedule(dynamic) or\n // schedule(guided).\n // OpenMP 5.0 does not have this restriction.\n if (LangOpts.OpenMP < 50 && (M1 == OMPC_SCHEDULE_MODIFIER_nonmonotonic || M2 == OMPC_SCHEDULE_MODIFIER_nonmonotonic) && Kind != OMPC_SCHEDULE_dynamic && Kind != OMPC_SCHEDULE_guided) {\n Diag(M1 == OMPC_SCHEDULE_MODIFIER_nonmonotonic ? M1Loc : M2Loc, diag::err_omp_schedule_nonmonotonic_static);"}}, [l]={ ["clang/test/OpenMP/for_schedule_messages.cpp"]={"clang/test/OpenMP/for_schedule_messages.cpp:37:29: error: \'nonmonotonic\' modifier can only be specified with \'dynamic\' or \'guided\' schedule kind","clang/test/OpenMP/for_schedule_messages.cpp:66:29: error: \'nonmonotonic\' modifier can only be specified with \'dynamic\' or \'guided\' schedule kind","clang/test/OpenMP/for_schedule_messages.cpp:68:29: error: \'nonmonotonic\' modifier can only be specified with \'dynamic\' or \'guided\' schedule kind","clang/test/OpenMP/for_schedule_messages.cpp:70:29: error: \'nonmonotonic\' modifier can only be specified with \'dynamic\' or \'guided\' schedule kind"} } }, ["err_omp_section_function_type"]={ [d]="err_omp_section_function_type", [e]="section of pointer to function type %0", [i]="section of pointer to function type A", [j]=k, [c]="section of pointer to function type (.*?)", [h]=a, [g]=o, [f]={Bb,1440512644,vb,zb}, [b]={{E,5361,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n // C99 6.5.2.1p1: \"shall have type \"pointer to *object* type\". Similarly,\n // C++ [expr.sub]p1: The type \"T\" shall be a completely-defined object\n // type. Note that functions are not objects, and that (in C99 parlance)\n // incomplete types are not object types.\n if (ResultTy->isFunctionType()) {\n Diag(Base->getExprLoc(), diag::err_omp_section_function_type) << ResultTy << Base->getSourceRange();"}} }, ["err_omp_section_incomplete_type"]={ [d]="err_omp_section_incomplete_type", [e]="section of pointer to incomplete type %0", [i]="section of pointer to incomplete type A", [j]=k, [c]="section of pointer to incomplete type (.*?)", [h]=a, [g]=o, [f]={Bb,1440512644,vb,zb}, [b]={{E,5371,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n if (RequireCompleteType(Base->getExprLoc(), ResultTy, diag::err_omp_section_incomplete_type, Base))"}} }, ["err_omp_section_length_negative"]={ [d]="err_omp_section_length_negative", [e]="section length is evaluated to a negative value %0", [i]="section length is evaluated to a negative value A", [j]=k, [c]="section length is evaluated to a negative value (.*?)", [h]=a, [g]=o, [f]={"ad9ecbab4253",1469047529,"[OpenMP] Allow negative lower bound in array sections based on pointers","[OpenMP] Allow negative lower bound in array sections based on pointers\n\nOpenMP 4.5 removed the restriction that array section lower bound must be non negative.\nThis change is to allow negative values for array section based on pointers.\nFor array section based on array type there is still a restriction: \"The array section must be a subset of the original array.\"\n\nPatch by David S.\n\nDifferential Revision: https://reviews.llvm.org/D22481\n\nllvm-svn: 276177"}, [b]={{E,5397,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n if (Length) {\n // ...\n if (Length->EvaluateAsInt(Result, Context)) {\n // ...\n if (LengthValue.isNegative()) {\n Diag(Length->getExprLoc(), diag::err_omp_section_length_negative) << toString(LengthValue, /*Radix=*/10, /*Signed=*/true) << Length->getSourceRange();"}}, [l]={ ["clang/test/OpenMP/taskwait_depend_messages.cpp"]={"clang/test/OpenMP/taskwait_depend_messages.cpp:51:44: error: section length is evaluated to a negative value -1"} } }, ["err_omp_section_length_undefined"]={ [d]="err_omp_section_length_undefined", [e]="section length is unspecified and cannot be inferred because subscripted value is %select{not an array|an array of unknown bound}0", [i]={{nil,nil,{"section length is unspecified and cannot be inferred because subscripted value is ",{"not an array","an array of unknown bound"}}}}, [j]=k, [c]="section length is unspecified and cannot be inferred because subscripted value is (?:not an array|an array of unknown bound)", [h]=a, [g]=o, [f]={Bb,1440512644,vb,zb}, [b]={{E,5409,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n if (Length) {\n // ...\n } else if (ColonLocFirst.isValid() && (OriginalTy.isNull() || (!OriginalTy->isConstantArrayType() && !OriginalTy->isVariableArrayType()))) {\n // ...\n Diag(ColonLocFirst, diag::err_omp_section_length_undefined) << (!OriginalTy.isNull() && OriginalTy->isArrayType());"},{n,21292,"class MapBaseChecker final : public StmtVisitor<MapBaseChecker, bool> {\n // ...\n bool VisitOMPArraySectionExpr(OMPArraySectionExpr *OASE) {\n // ...\n if (AllowWholeSizeArraySection) {\n // ...\n } else if (DKind == OMPD_target_update && SemaRef.getLangOpts().OpenMP >= 50) {\n if (IsPointer && !AllowAnotherPtr)\n SemaRef.Diag(ELoc, diag::err_omp_section_length_undefined) << /*array of unknown bound */ 1;"}}, [l]={ ["clang/test/OpenMP/taskwait_depend_messages.cpp"]={"clang/test/OpenMP/taskwait_depend_messages.cpp:48:42: error: section length is unspecified and cannot be inferred because subscripted value is not an array","clang/test/OpenMP/taskwait_depend_messages.cpp:53:42: error: section length is unspecified and cannot be inferred because subscripted value is not an array","clang/test/OpenMP/taskwait_depend_messages.cpp:57:40: error: section length is unspecified and cannot be inferred because subscripted value is not an array","clang/test/OpenMP/taskwait_depend_messages.cpp:58:39: error: section length is unspecified and cannot be inferred because subscripted value is an array of unknown bound"} } }, ["err_omp_section_not_subset_of_array"]={ [d]="err_omp_section_not_subset_of_array", [e]="array section must be a subset of the original array", [i]="array section must be a subset of the original array", [j]=k, [c]="array section must be a subset of the original array", [h]=a, [g]=o, [f]={"ad9ecbab4253",1469047529,"[OpenMP] Allow negative lower bound in array sections based on pointers","[OpenMP] Allow negative lower bound in array sections based on pointers\n\nOpenMP 4.5 removed the restriction that array section lower bound must be non negative.\nThis change is to allow negative values for array section based on pointers.\nFor array section based on array type there is still a restriction: \"The array section must be a subset of the original array.\"\n\nPatch by David S.\n\nDifferential Revision: https://reviews.llvm.org/D22481\n\nllvm-svn: 276177"}, [b]={{E,5385,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n if (LowerBound && !OriginalTy->isAnyPointerType()) {\n // ...\n if (LowerBound->EvaluateAsInt(Result, Context)) {\n // ...\n if (LowerBoundValue.isNegative()) {\n Diag(LowerBound->getExprLoc(), diag::err_omp_section_not_subset_of_array) << LowerBound->getSourceRange();"}}, [l]={ ["clang/test/OpenMP/target_parallel_map_messages.cpp"]={"clang/test/OpenMP/target_parallel_map_messages.cpp:225:35: error: array section must be a subset of the original array","clang/test/OpenMP/target_parallel_map_messages.cpp:96:35: error: array section must be a subset of the original array","clang/test/OpenMP/target_parallel_map_messages.cpp:96:35: error: array section must be a subset of the original array"} } }, ["err_omp_section_stride_non_positive"]={ [d]={{nil,p,"err_omp_section_stride_non_positive"}}, [e]={{nil,p,"section stride is evaluated to a non-positive value %0"}}, [i]={{nil,p,"section stride is evaluated to a non-positive value A"}}, [j]=k, [c]="section stride is evaluated to a non\\-positive value (.*?)", [h]=a, [g]={{nil,p,o}}, [f]={"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"}, [b]={{E,5451,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n if (Stride) {\n // ...\n if (Stride->EvaluateAsInt(Result, Context)) {\n // ...\n if (!StrideValue.isStrictlyPositive()) {\n Diag(Stride->getExprLoc(), diag::err_omp_section_stride_non_positive) << toString(StrideValue, /*Radix=*/10, /*Signed=*/true) << Stride->getSourceRange();"}}, [l]={ ["clang/test/OpenMP/target_update_messages.cpp"]={"clang/test/OpenMP/target_update_messages.cpp:179:43: error: section stride is evaluated to a non-positive value -1","clang/test/OpenMP/target_update_messages.cpp:185:45: error: section stride is evaluated to a non-positive value -1"} } }, ["err_omp_sections_not_compound_stmt"]={ [d]="err_omp_sections_not_compound_stmt", [e]="the statement for \'#pragma omp sections\' must be a compound statement", [i]="the statement for \'#pragma omp sections\' must be a compound statement", [j]=k, [c]="the statement for \'\\#pragma omp sections\' must be a compound statement", [h]=a, [g]=o, [f]={"d3f8dd2d1595",1403696689,"[OPENMP] Initial support for \'sections\' directive.","[OPENMP] Initial support for \'sections\' directive.\n\nllvm-svn: 211685"}, [b]={{n,10465,"StmtResult Sema::ActOnOpenMPSectionsDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n if (auto *C = dyn_cast_or_null<CompoundStmt>(BaseStmt)) {\n // ...\n } else {\n Diag(AStmt->getBeginLoc(), diag::err_omp_sections_not_compound_stmt);"}}, [l]={ ["clang/test/OpenMP/sections_misc_messages.c"]={"clang/test/OpenMP/sections_misc_messages.c:30:3: error: the statement for \'#pragma omp sections\' must be a compound statement"} } }, ["err_omp_sections_substmt_not_section"]={ [d]="err_omp_sections_substmt_not_section", [e]="statement in \'omp sections\' directive must be enclosed into a section region", [i]="statement in \'omp sections\' directive must be enclosed into a section region", [j]=k, [c]="statement in \'omp sections\' directive must be enclosed into a section region", [h]=a, [g]=o, [f]={"1e0498a92d6e",1403770918,"[OPENMP] Initial parsing and sema analysis for \'section\' directive.","[OPENMP] Initial parsing and sema analysis for \'section\' directive.\n\nllvm-svn: 211767"}, [b]={{n,10458,"StmtResult Sema::ActOnOpenMPSectionsDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n if (auto *C = dyn_cast_or_null<CompoundStmt>(BaseStmt)) {\n // ...\n // All associated statements must be \'#pragma omp section\' except for\n // the first one.\n for (Stmt *SectionStmt : llvm::drop_begin(S)) {\n if (!SectionStmt || !isa<OMPSectionDirective>(SectionStmt)) {\n if (SectionStmt)\n Diag(SectionStmt->getBeginLoc(), diag::err_omp_sections_substmt_not_section);"}}, [l]={ ["clang/test/OpenMP/sections_misc_messages.c"]={"clang/test/OpenMP/sections_misc_messages.c:35:5: error: statement in \'omp sections\' directive must be enclosed into a section region"} } }, ["err_omp_several_directives_in_region"]={ [d]={{nil,p,"err_omp_several_directives_in_region"}}, [e]={{nil,p,"exactly one \'%0\' directive must appear in the loop body of an enclosing directive"}}, [i]={{nil,p,"exactly one \'A\' directive must appear in the loop body of an enclosing directive"}}, [j]=k, [c]="exactly one \'(.*?)\' directive must appear in the loop body of an enclosing directive", [h]=a, [g]={{nil,p,o}}, [f]={"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"}, [b]={{n,11291,"StmtResult Sema::ActOnOpenMPScanDirective(ArrayRef<OMPClause *> Clauses, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // Check that only one instance of scan directives is used in the same outer\n // region.\n if (DSAStack->doesParentHasScanDirective()) {\n Diag(StartLoc, diag::err_omp_several_directives_in_region) << \"scan\";"},{n,11398,"StmtResult Sema::ActOnOpenMPOrderedDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP 5.0, 2.17.9, ordered Construct, Restrictions.\n // During execution of an iteration of a worksharing-loop or a loop nest\n // within a worksharing-loop, simd, or worksharing-loop SIMD region, a thread\n // must not execute more than one ordered region corresponding to an ordered\n // construct without a depend clause.\n if (!DependFound && !DoacrossFound) {\n if (DSAStack->doesParentHasOrderedDirective()) {\n Diag(StartLoc, diag::err_omp_several_directives_in_region) << \"ordered\";"}}, [l]={ ["clang/test/OpenMP/scan_messages.cpp"]={"clang/test/OpenMP/scan_messages.cpp:81:1: error: exactly one \'scan\' directive must appear in the loop body of an enclosing directive","clang/test/OpenMP/scan_messages.cpp:173:1: error: exactly one \'scan\' directive must appear in the loop body of an enclosing directive"} } }, ["err_omp_several_mem_order_clauses"]={ [d]={{nil,p,"err_omp_several_mem_order_clauses"}}, [e]={{nil,p,"directive \'#pragma omp %0\' cannot contain more than one %select{\'seq_cst\', \'relaxed\', |}1\'acq_rel\', \'acquire\' or \'release\' clause"}}, [i]={{nil,p,{"directive \'#pragma omp A\' cannot contain more than one ",{"\'seq_cst\', \'relaxed\', ",a},"\'acq_rel\', \'acquire\' or \'release\' clause"}}}, [j]=k, [c]="directive \'\\#pragma omp (.*?)\' cannot contain more than one (?:\'seq_cst\', \'relaxed\', |)\'acq_rel\', \'acquire\' or \'release\' clause", [h]=a, [g]={{nil,p,o}}, [f]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, [b]={{n,11228,"StmtResult Sema::ActOnOpenMPFlushDirective(ArrayRef<OMPClause *> Clauses, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n for (const OMPClause *C : Clauses) {\n if (C->getClauseKind() == OMPC_acq_rel || C->getClauseKind() == OMPC_acquire || C->getClauseKind() == OMPC_release) {\n if (MemOrderKind != OMPC_unknown) {\n Diag(C->getBeginLoc(), diag::err_omp_several_mem_order_clauses) << getOpenMPDirectiveName(OMPD_flush) << 1 << SourceRange(C->getBeginLoc(), C->getEndLoc());"},{n,12516,"StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n for (const OMPClause *C : Clauses) {\n // ...\n case OMPC_seq_cst:\n case OMPC_acq_rel:\n case OMPC_acquire:\n case OMPC_release:\n case OMPC_relaxed: {\n if (MemOrderKind != OMPC_unknown) {\n Diag(C->getBeginLoc(), diag::err_omp_several_mem_order_clauses) << getOpenMPDirectiveName(OMPD_atomic) << 0 << SourceRange(C->getBeginLoc(), C->getEndLoc());"}}, [l]={ ["clang/test/OpenMP/flush_messages.cpp"]={"clang/test/OpenMP/flush_messages.cpp:143:27: error: directive \'#pragma omp flush\' cannot contain more than one \'acq_rel\', \'acquire\' or \'release\' clause","clang/test/OpenMP/flush_messages.cpp:144:27: error: directive \'#pragma omp flush\' cannot contain more than one \'acq_rel\', \'acquire\' or \'release\' clause"} } }, ["err_omp_shaping_dimension_not_positive"]={ [d]={{nil,p,"err_omp_shaping_dimension_not_positive"}}, [e]={{nil,p,"array shaping dimension is evaluated to a non-positive value %0"}}, [i]={{nil,p,"array shaping dimension is evaluated to a non-positive value A"}}, [j]=k, [c]="array shaping dimension is evaluated to a non\\-positive value (.*?)", [h]=a, [g]={{nil,p,o}}, [f]={W,1576908663,X,Y}, [b]={{E,5530,"ExprResult Sema::ActOnOMPArrayShapingExpr(Expr *Base, SourceLocation LParenLoc, SourceLocation RParenLoc, ArrayRef<Expr *> Dims, ArrayRef<SourceRange> Brackets) {\n // ...\n for (Expr *Dim : Dims) {\n // ...\n if (!Dim->isTypeDependent()) {\n // ...\n if (!Dim->isValueDependent() && Dim->EvaluateAsInt(EvResult, Context)) {\n // ...\n if (!Value.isStrictlyPositive()) {\n Diag(Dim->getExprLoc(), diag::err_omp_shaping_dimension_not_positive) << toString(Value, /*Radix=*/10, /*Signed=*/true) << Dim->getSourceRange();"}}, [l]={ ["clang/test/OpenMP/task_affinity_messages.cpp"]={"clang/test/OpenMP/task_affinity_messages.cpp:61:31: error: array shaping dimension is evaluated to a non-positive value -1","clang/test/OpenMP/task_affinity_messages.cpp:61:35: error: array shaping dimension is evaluated to a non-positive value 0"} } }, ["err_omp_simd_region_cannot_use_stmt"]={ [d]="err_omp_simd_region_cannot_use_stmt", [e]="\'%0\' statement cannot be used in OpenMP simd region", [i]="\'A\' statement cannot be used in OpenMP simd region", [j]=k, [c]="\'(.*?)\' statement cannot be used in OpenMP simd region", [h]=a, [g]=o, [f]={"a8e9d2eccc6e",1401790607,"[OPENMP] Loop canonical form analysis (Sema)","[OPENMP] Loop canonical form analysis (Sema)\n\nThis patch implements semantic analysis to make sure that the loop is in OpenMP canonical form.\nThis is the form required for \'omp simd\', \'omp for\' and other loop pragmas.\n\nDifferential revision: http://reviews.llvm.org/D3778\n\nllvm-svn: 210095"}, [b]={{N,884,"ExprResult Sema::BuildCXXThrow(SourceLocation OpLoc, Expr *Ex, bool IsThrownVarInScope) {\n // ...\n if (getCurScope() && getCurScope()->isOpenMPSimdDirectiveScope())\n Diag(OpLoc, diag::err_omp_simd_region_cannot_use_stmt) << \"throw\";"},{"clang/lib/Sema/SemaStmt.cpp",4488,"/// 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 if (getCurScope() && getCurScope()->isOpenMPSimdDirectiveScope())\n Diag(TryLoc, diag::err_omp_simd_region_cannot_use_stmt) << \"try\";"}}, [l]={ ["clang/test/OpenMP/parallel_for_simd_loop_messages.cpp"]={"clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:596:11: error: \'throw\' statement cannot be used in OpenMP simd region","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:598:7: error: \'throw\' statement cannot be used in OpenMP simd region","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:601:9: error: \'throw\' statement cannot be used in OpenMP simd region","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:593:5: error: \'try\' statement cannot be used in OpenMP simd region","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:613:9: error: \'throw\' statement cannot be used in OpenMP simd region"} } }, ["err_omp_simple_clause_incompatible_with_ordered"]={ [d]={{nil,p,"err_omp_simple_clause_incompatible_with_ordered"}}, [e]={{nil,p,"\'%0\' clause with \'%1\' modifier cannot be specified if an \'ordered\' clause is specified"}}, [i]={{nil,p,"\'A\' clause with \'B\' modifier cannot be specified if an \'ordered\' clause is specified"}}, [j]=k, [c]="\'(.*?)\' clause with \'(.*?)\' modifier cannot be specified if an \'ordered\' clause is specified", [h]=a, [g]={{nil,p,o}}, [f]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, [b]={{n,4762,"static bool checkOrderedOrderSpecified(Sema &S, const ArrayRef<OMPClause *> Clauses) {\n // ...\n if (Ordered && Order) {\n S.Diag(Order->getKindKwLoc(), diag::err_omp_simple_clause_incompatible_with_ordered) << getOpenMPClauseName(OMPC_order) << getOpenMPSimpleClauseTypeName(OMPC_order, OMPC_ORDER_concurrent) << SourceRange(Order->getBeginLoc(), Order->getEndLoc());"},{n,4858,"StmtResult Sema::ActOnOpenMPRegionEnd(StmtResult S, ArrayRef<OMPClause *> Clauses) {\n // ...\n // OpenMP, 2.7.1 Loop Construct, Restrictions\n // The nonmonotonic modifier cannot be specified if an ordered clause is\n // specified.\n if (SC && (SC->getFirstScheduleModifier() == OMPC_SCHEDULE_MODIFIER_nonmonotonic || SC->getSecondScheduleModifier() == OMPC_SCHEDULE_MODIFIER_nonmonotonic) && OC) {\n Diag(SC->getFirstScheduleModifier() == OMPC_SCHEDULE_MODIFIER_nonmonotonic ? SC->getFirstScheduleModifierLoc() : SC->getSecondScheduleModifierLoc(), diag::err_omp_simple_clause_incompatible_with_ordered) << getOpenMPClauseName(OMPC_schedule) << getOpenMPSimpleClauseTypeName(OMPC_schedule, OMPC_SCHEDULE_MODIFIER_nonmonotonic) << SourceRange(OC->getBeginLoc(), OC->getEndLoc());"}}, [l]={ ["clang/test/OpenMP/for_schedule_messages.cpp"]={"clang/test/OpenMP/for_schedule_messages.cpp:80:29: error: \'schedule\' clause with \'nonmonotonic\' modifier cannot be specified if an \'ordered\' clause is specified","clang/test/OpenMP/for_schedule_messages.cpp:82:39: error: \'schedule\' clause with \'nonmonotonic\' modifier cannot be specified if an \'ordered\' clause is specified"} } }, ["err_omp_single_copyprivate_with_nowait"]={ [d]="err_omp_single_copyprivate_with_nowait", [e]="the \'copyprivate\' clause must not be used with the \'nowait\' clause", [i]="the \'copyprivate\' clause must not be used with the \'nowait\' clause", [j]=k, [c]="the \'copyprivate\' clause must not be used with the \'nowait\' clause", [h]=a, [g]=o, [f]={"3255bf3aacbb",1421644846,"[OPENMP] Disable copyprivate an nowait clauses in \'single\' directive.","[OPENMP] Disable copyprivate an nowait clauses in \'single\' directive.\nThe copyprivate clause must not be used with the nowait clause in single\ndirective.\n\nllvm-svn: 226429"}, [b]={{n,10825,"StmtResult Sema::ActOnOpenMPSingleDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n for (const OMPClause *Clause : Clauses) {\n // ...\n if (Copyprivate && Nowait) {\n Diag(Copyprivate->getBeginLoc(), diag::err_omp_single_copyprivate_with_nowait);"}}, [l]={ ["clang/test/OpenMP/single_copyprivate_messages.cpp"]={"clang/test/OpenMP/single_copyprivate_messages.cpp:179:20: error: the \'copyprivate\' clause must not be used with the \'nowait\' clause"} } }, ["err_omp_single_decl_in_declare_simd_variant"]={ [d]={{nil,w,"err_omp_single_decl_in_declare_simd_variant"}}, [e]={{nil,w,"single declaration is expected after \'declare %select{simd|variant}0\' directive"}}, [i]={{nil,w,{"single declaration is expected after \'declare ",{"simd","variant"},"\' directive"}}}, [j]=k, [c]="single declaration is expected after \'declare (?:simd|variant)\' directive", [h]=a, [g]={{nil,w,o}}, [f]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias)).","[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a name of your choice (say\n`foo`), but have clang treat it as if it were a builtin function (say\n`__builtin_foo`), by writing\n\n static __inline__ __attribute__((__clang_arm_mve_alias(__builtin_foo)))\n int foo(args);\n\nI\'m intending to use this for the ACLE intrinsics for MVE, which have\nto be polymorphic on their argument types and also need to be\nimplemented by builtins. To avoid having to implement the polymorphism\nwith several layers of nested _Generic and make error reporting\nhideous, I want to make all the user-facing intrinsics correspond\ndirectly to clang builtins, so that after clang resolves\n__attribute__((overloadable)) polymorphism it\'s already holding the\nright BuiltinID for the intrinsic it selected.\n\nHowever, this commit itself just introduces the new attribute, and\ndoesn\'t use it for anything.\n\nTo avoid unanticipated side effects if this attribute is used to make\naliases to other builtins, there\'s a restriction mechanism: only\n(BuiltinID, alias) pairs that are approved by the function\nArmMveAliasValid() will be permitted. At present, that function\ndoesn\'t permit anything, because the Tablegen that will generate its\nlist of valid pairs isn\'t yet implemented. So the only test of this\nfacility is one that checks that an unapproved builtin _can\'t_ be\naliased.\n\nReviewers: dmgreen, miyuki, ostannard\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D67159"}, [b]={{n,6839,"Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds, ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears, ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR) {\n // ...\n if (!DG.get().isSingleDecl()) {\n Diag(SR.getBegin(), diag::err_omp_single_decl_in_declare_simd_variant) << SimdId;"},{n,7359,"std::optional<std::pair<FunctionDecl *, Expr *>> Sema::checkOpenMPDeclareVariantFunction(Sema::DeclGroupPtrTy DG, Expr *VariantRef, OMPTraitInfo &TI, unsigned NumAppendArgs, SourceRange SR) {\n // ...\n // Must be applied only to single decl.\n if (!DG.get().isSingleDecl()) {\n Diag(SR.getBegin(), diag::err_omp_single_decl_in_declare_simd_variant) << VariantId << SR;"}}, [l]={ [Ab]={"clang/test/OpenMP/declare_simd_messages.cpp:43:1: error: single declaration is expected after \'declare simd\' directive"} } }, ["err_omp_sink_and_source_iteration_not_allowd"]={ [d]="err_omp_sink_and_source_iteration_not_allowd", [e]=" \'%0 %select{sink:|source:}1\' must be with \'%select{omp_cur_iteration - 1|omp_cur_iteration}1\'", [i]={{nil,nil,{" \'A ",{"sink:","source:"},"\' must be with \'",{"omp_cur_iteration - 1","omp_cur_iteration"},"\'"}}}, [j]=k, [c]=" \'(.*?) (?:sink\\:|source\\:)\' must be with \'(?:omp_cur_iteration \\- 1|omp_cur_iteration)\'", [h]=a, [g]=K, [f]={"ef9ec4bbcca2",1677810915,"[OpenMP] Add the `ompx_attribute` clause for target directives","[OpenMP] Add the `ompx_attribute` clause for target directives\n\nCUDA and HIP have kernel attributes to tune the code generation (in the\nbackend). To reuse this functionality for OpenMP target regions we\nintroduce the `ompx_attribute` clause that takes these kernel\nattributes and emits code as if they had been attached to the kernel\nfuction (which is implicitly generated).\n\nTo limit the impact, we only support three kernel attributes:\n`amdgpu_waves_per_eu`, for AMDGPU\n`amdgpu_flat_work_group_size`, for AMDGPU\n`launch_bounds`, for NVPTX\n\nThe existing implementations of those attributes are used for error\nchecking and code generation. `ompx_attribute` can be attached to any\nexecutable target region and it can hold more than one kernel attribute.\n\nDifferential Revision: https://reviews.llvm.org/D156184"}, [b]={{L,4432,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n } else if (Kind == OMPC_depend || Kind == OMPC_doacross) {\n // ...\n if (Kind == OMPC_doacross) {\n // ...\n if (Data.ExtraModifier == OMPC_DOACROSS_sink_omp_cur_iteration) {\n if (Tok.isNot(tok::minus)) {\n Diag(Tok, diag::err_omp_sink_and_source_iteration_not_allowd) << getOpenMPClauseName(Kind) << 0 << 0;"},{L,4442,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n } else if (Kind == OMPC_depend || Kind == OMPC_doacross) {\n // ...\n if (Kind == OMPC_doacross) {\n // ...\n if (Data.ExtraModifier == OMPC_DOACROSS_sink_omp_cur_iteration) {\n if (Tok.isNot(tok::minus)) {\n // ...\n } else {\n // ...\n if (Tok.isNot(tok::numeric_constant) || (PP.parseSimpleIntegerLiteral(Tok, Value) && Value != 1)) {\n Diag(Loc, diag::err_omp_sink_and_source_iteration_not_allowd) << getOpenMPClauseName(Kind) << 0 << 0;"},{L,4451,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n } else if (Kind == OMPC_depend || Kind == OMPC_doacross) {\n // ...\n if (Kind == OMPC_doacross) {\n // ...\n if (Data.ExtraModifier == OMPC_DOACROSS_source_omp_cur_iteration) {\n if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::err_omp_sink_and_source_iteration_not_allowd) << getOpenMPClauseName(Kind) << 1 << 1;"}}, [l]={ ["clang/test/OpenMP/ordered_messages.cpp"]={"clang/test/OpenMP/ordered_messages.cpp:162:53: error: \'doacross sink:\' must be with \'omp_cur_iteration - 1\'","clang/test/OpenMP/ordered_messages.cpp:163:55: error: \'doacross sink:\' must be with \'omp_cur_iteration - 1\'","clang/test/OpenMP/ordered_messages.cpp:164:52: error: \'doacross sink:\' must be with \'omp_cur_iteration - 1\'","clang/test/OpenMP/ordered_messages.cpp:165:55: error: \'doacross source:\' must be with \'omp_cur_iteration\'"} } }, ["err_omp_sink_and_source_not_allowed"]={ [d]="err_omp_sink_and_source_not_allowed", [e]="\'%0(%select{source|sink:vec}1)\' clause%select{|s}1 cannot be mixed with \'%0(%select{sink:vec|source}1)\' clause%select{s|}1", [i]={{nil,nil,{"\'A(",{b,"sink:vec"},")\' clause",{a,"s"}," cannot be mixed with \'A(",{"sink:vec",b},")\' clause",{"s",a}}}}, [j]=k, [c]="\'(.*?)\\((?:source|sink\\:vec)\\)\' clause(?:|s) cannot be mixed with \'(.*?)\\((?:sink\\:vec|source)\\)\' clause(?:s|)", [h]=a, [g]=o, [f]={"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"}, [b]={{n,11335,"StmtResult Sema::ActOnOpenMPOrderedDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n for (const OMPClause *C : Clauses) {\n // ...\n if (DC || DOC) {\n // ...\n if ((DC && DC->getDependencyKind() == OMPC_DEPEND_source) || (DOC && (ODK.isSource(DOC)))) {\n // ...\n if ((DC && DependSinkClause) || (DOC && DoacrossSinkClause)) {\n Diag(C->getBeginLoc(), diag::err_omp_sink_and_source_not_allowed) << (DC ? \"depend\" : \"doacross\") << 0;"},{n,11342,"StmtResult Sema::ActOnOpenMPOrderedDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n for (const OMPClause *C : Clauses) {\n // ...\n if (DC || DOC) {\n // ...\n if ((DC && DC->getDependencyKind() == OMPC_DEPEND_source) || (DOC && (ODK.isSource(DOC)))) {\n // ...\n } else if ((DC && DC->getDependencyKind() == OMPC_DEPEND_sink) || (DOC && (ODK.isSink(DOC) || ODK.isSinkIter(DOC)))) {\n if (DependSourceClause || DoacrossSourceClause) {\n Diag(C->getBeginLoc(), diag::err_omp_sink_and_source_not_allowed) << (DC ? \"depend\" : \"doacross\") << 1;"}}, [l]={ ["clang/test/OpenMP/ordered_messages.cpp"]={"clang/test/OpenMP/ordered_messages.cpp:216:53: error: \'depend(source)\' clause cannot be mixed with \'depend(sink:vec)\' clauses","clang/test/OpenMP/ordered_messages.cpp:217:36: error: \'depend(sink:vec)\' clauses cannot be mixed with \'depend(source)\' clause","clang/test/OpenMP/ordered_messages.cpp:395:55: error: \'depend(source)\' clause cannot be mixed with \'depend(sink:vec)\' clauses","clang/test/OpenMP/ordered_messages.cpp:396:36: error: \'depend(sink:vec)\' clauses cannot be mixed with \'depend(source)\' clause"} } }, ["err_omp_stmt_depends_on_loop_counter"]={ [d]={{nil,v,"err_omp_stmt_depends_on_loop_counter"}}, [e]={{nil,v,"the loop %select{initializer|condition}0 expression depends on the current loop control variable"}}, [i]={{nil,v,{"the loop ",{"initializer","condition"}," expression depends on the current loop control variable"}}}, [j]=k, [c]="the loop (?:initializer|condition) expression depends on the current loop control variable", [h]=a, [g]={{nil,v,o}}, [f]={"622af1d282a1",1556135910,"[OPENMP]Initial support for non-rectangular loop nest.","[OPENMP]Initial support for non-rectangular loop nest.\n\nAdded basic semantic analysis for the non-rectangular loop nests for\nOpenMP 5.0 support.\n\nllvm-svn: 359132"}, [b]={{n,8058,"/// Checker for the non-rectangular loops. Checks if the initializer or\n/// condition expression references loop counter variable.\nclass LoopCounterRefChecker final : public ConstStmtVisitor<LoopCounterRefChecker, bool> {\n // ...\n bool checkDecl(const Expr *E, const ValueDecl *VD) {\n if (getCanonicalDecl(VD) == getCanonicalDecl(CurLCDecl)) {\n SemaRef.Diag(E->getExprLoc(), diag::err_omp_stmt_depends_on_loop_counter) << (IsInitializer ? 0 : 1);"}}, [l]={ ["clang/test/OpenMP/unroll_messages.cpp"]={"clang/test/OpenMP/unroll_messages.cpp:14:26: error: the loop condition expression depends on the current loop control variable"} } }, ["err_omp_target_contains_not_only_teams"]={ [d]="err_omp_target_contains_not_only_teams", [e]="target construct with nested teams region contains statements outside of the teams construct", [i]="target construct with nested teams region contains statements outside of the teams construct", [j]=k, [c]="target construct with nested teams region contains statements outside of the teams construct", [h]=a, [g]=o, [f]={"941bbec6f4d9",1412676813,"[OPENMP] \'omp teams\' directive basic support.","[OPENMP] \'omp teams\' directive basic support.\nIncludes parsing and semantic analysis for \'omp teams\' directive support from OpenMP 4.0. Adds additional analysis to \'omp target\' directive with \'omp teams\' directive.\n\nllvm-svn: 219197"}, [b]={{n,13059,"StmtResult Sema::ActOnOpenMPTargetDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP [2.16, Nesting of Regions]\n // If specified, a teams construct must be contained within a target\n // construct. That target construct must contain no statements or directives\n // outside of the teams construct.\n if (DSAStack->hasInnerTeamsRegion()) {\n // ...\n if (!OMPTeamsFound) {\n Diag(StartLoc, diag::err_omp_target_contains_not_only_teams);"}}, [l]={ ["clang/test/OpenMP/nesting_of_regions.cpp"]={"clang/test/OpenMP/nesting_of_regions.cpp:4880:1: error: target construct with nested teams region contains statements outside of the teams construct","clang/test/OpenMP/nesting_of_regions.cpp:4887:1: error: target construct with nested teams region contains statements outside of the teams construct","clang/test/OpenMP/nesting_of_regions.cpp:4893:1: error: target construct with nested teams region contains statements outside of the teams construct","clang/test/OpenMP/nesting_of_regions.cpp:13737:1: error: target construct with nested teams region contains statements outside of the teams construct","clang/test/OpenMP/nesting_of_regions.cpp:13744:1: error: target construct with nested teams region contains statements outside of the teams construct"} } }, ["err_omp_taskwait_depend_mutexinoutset_not_allowed"]={ [d]={{nil,M,"err_omp_taskwait_depend_mutexinoutset_not_allowed"}}, [e]={{nil,M,"\'mutexinoutset\' modifier not allowed in \'depend\' clause on \'taskwait\' directive"}}, [i]={{nil,M,"\'mutexinoutset\' modifier not allowed in \'depend\' clause on \'taskwait\' directive"}}, [j]=k, [c]="\'mutexinoutset\' modifier not allowed in \'depend\' clause on \'taskwait\' directive", [h]=a, [g]={{nil,M,o}}, [f]={"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"}, [b]={{n,20736,"OMPClause *Sema::ActOnOpenMPDependClause(const OMPDependClause::DependDataTy &Data, Expr *DepModifier, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n if (DSAStack->getCurrentDirective() == OMPD_taskwait && DepKind == OMPC_DEPEND_mutexinoutset) {\n Diag(DepLoc, diag::err_omp_taskwait_depend_mutexinoutset_not_allowed);"}}, [l]={ ["clang/test/OpenMP/taskwait_depend_messages.cpp"]={"clang/test/OpenMP/taskwait_depend_messages.cpp:33:31: error: \'mutexinoutset\' modifier not allowed in \'depend\' clause on \'taskwait\' directive"} } }, ["err_omp_threadprivate_in_clause"]={ [d]="err_omp_threadprivate_in_clause", [e]="threadprivate variables are not allowed in \'%0\' clause", [i]="threadprivate variables are not allowed in \'A\' clause", [j]=k, [c]="threadprivate variables are not allowed in \'(.*?)\' clause", [h]=a, [g]=o, [f]={"661c0904e144",1464284398,"[OpenMP] Parsing and sema support for the to clause","[OpenMP] Parsing and sema support for the to clause\n\nSummary:\nThe patch contains the parsing and sema support for the `to` clause. \n\nPatch based on the original post by Kelvin Li.\n\nReviewers: carlo.bertolli, hfinkel, kkwli0, arpith-jacob, ABataev\n\nSubscribers: caomhin, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D18597\n\nllvm-svn: 270880"}, [b]={{n,21976,"// Check the validity of the provided variable list for the provided clause kind\n// \\a CKind. In the check process the valid expressions, mappable expression\n// components, variables, and user-defined mappers are extracted and used to\n// fill \\a ProcessedVarList, \\a VarComponents, \\a VarBaseDeclarations, and \\a\n// UDMapperList in MVLI. \\a MapType, \\a IsMapTypeImplicit, \\a MapperIdScopeSpec,\n// and \\a MapperId are expected to be valid if the clause kind is \'map\'.\nstatic void checkMappableExpressionList(Sema &SemaRef, DSAStackTy *DSAS, OpenMPClauseKind CKind, MappableVarListInfo &MVLI, SourceLocation StartLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo MapperId, ArrayRef<Expr *> UnresolvedMappers, OpenMPMapClauseKind MapType = OMPC_MAP_unknown, ArrayRef<OpenMPMapModifierKind> Modifiers = std::nullopt, bool IsMapTypeImplicit = false, bool NoDiagnose = false) {\n // ...\n for (Expr *RE : MVLI.VarList) {\n // ...\n // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.10]\n // threadprivate variables cannot appear in a map clause.\n // OpenMP 4.5 [2.10.5, target update Construct]\n // threadprivate variables cannot appear in a from clause.\n if (VD && DSAS->isThreadPrivate(VD)) {\n // ...\n SemaRef.Diag(ELoc, diag::err_omp_threadprivate_in_clause) << getOpenMPClauseName(CKind);"}}, [l]={ ["clang/test/OpenMP/target_update_from_messages.cpp"]={"clang/test/OpenMP/target_update_from_messages.cpp:120:32: error: threadprivate variables are not allowed in \'from\' clause","clang/test/OpenMP/target_update_from_messages.cpp:176:32: error: threadprivate variables are not allowed in \'from\' clause"} } }, ["err_omp_threadprivate_in_target"]={ [d]="err_omp_threadprivate_in_target", [e]="threadprivate variables cannot be used in target constructs", [i]="threadprivate variables cannot be used in target constructs", [j]=k, [c]="threadprivate variables cannot be used in target constructs", [h]=a, [g]=o, [f]={"0b0da296e6de",1459942739,"[OPENMP] Parsing and Sema support for \'omp declare target\' directive","[OPENMP] Parsing and Sema support for \'omp declare target\' directive\n\nAdd parsing, sema analysis for \'declare target\' construct for OpenMP 4.0\n(4.5 support will be added in separate patch).\n\nThe declare target directive specifies that variables, functions (C, C++\nand Fortran), and subroutines (Fortran) are mapped to a device. The declare\ntarget directive is a declarative directive. In Clang declare target is\nimplemented as implicit attribute for the declaration.\n\nThe syntax of the declare target directive is as follows:\n\n #pragma omp declare target\n declarations-definition-seq\n #pragma omp end declare target\n\nBased on patch from Michael Wong http://reviews.llvm.org/D15321\n\nllvm-svn: 265530"}, [b]={{n,23159,"void Sema::checkDeclIsAllowedInOpenMPTarget(Expr *E, Decl *D, SourceLocation IdLoc) {\n // ...\n if (auto *VD = dyn_cast<VarDecl>(D)) {\n // ...\n // 2.10.6: threadprivate variable cannot appear in a declare target\n // directive.\n if (DSAStack->isThreadPrivate(VD)) {\n Diag(SL, diag::err_omp_threadprivate_in_target);"}}, [l]={ ["clang/test/OpenMP/declare_target_messages.cpp"]={"clang/test/OpenMP/declare_target_messages.cpp:153:3: error: threadprivate variables cannot be used in target constructs","clang/test/OpenMP/declare_target_messages.cpp:155:3: error: threadprivate variables cannot be used in target constructs"} } }, ["err_omp_threadprivate_incomplete_type"]={ [d]="err_omp_threadprivate_incomplete_type", [e]="threadprivate variable with incomplete type %0", [i]="threadprivate variable with incomplete type A", [j]=k, [c]="threadprivate variable with incomplete type (.*?)", [h]=a, [g]=o, [f]={"6f6f3b4baf55",1368418698,"OpenMP threadprivate with qualified names.","OpenMP threadprivate with qualified names.\n\nllvm-svn: 181683"}, [b]={{n,3219,"OMPThreadPrivateDecl *Sema::CheckOMPThreadPrivateDecl(SourceLocation Loc, ArrayRef<Expr *> VarList) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (RequireCompleteType(ILoc, VD->getType(), diag::err_omp_threadprivate_incomplete_type)) {"}}, [l]={ [Cb]={"clang/test/OpenMP/threadprivate_messages.cpp:56:28: error: threadprivate variable with incomplete type \'IncompleteSt\'"} } }, ["err_omp_typecheck_section_not_integer"]={ [d]="err_omp_typecheck_section_not_integer", [e]="array section %select{lower bound|length}0 is not an integer", [i]={{nil,nil,{"array section ",{"lower bound","length"}," is not an integer"}}}, [j]=k, [c]="array section (?:lower bound|length) is not an integer", [h]=a, [g]=o, [f]={Bb,1440512644,vb,zb}, [b]={{E,5318,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n // C99 6.5.2.1p1\n if (LowerBound) {\n // ...\n if (Res.isInvalid())\n return ExprError(Diag(LowerBound->getExprLoc(), diag::err_omp_typecheck_section_not_integer) << 0 << LowerBound->getSourceRange());"},{E,5332,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n if (Length) {\n // ...\n if (Res.isInvalid())\n return ExprError(Diag(Length->getExprLoc(), diag::err_omp_typecheck_section_not_integer) << 1 << Length->getSourceRange());"},{E,5346,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n if (Stride) {\n // ...\n if (Res.isInvalid())\n return ExprError(Diag(Stride->getExprLoc(), diag::err_omp_typecheck_section_not_integer) << 1 << Stride->getSourceRange());"}} }, ["err_omp_typecheck_section_value"]={ [d]="err_omp_typecheck_section_value", [e]="subscripted value is not an array or pointer", [i]="subscripted value is not an array or pointer", [j]=k, [c]="subscripted value is not an array or pointer", [h]=a, [g]=o, [f]={Bb,1440512644,vb,zb}, [b]={{E,5312,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n if (OriginalTy->isAnyPointerType()) {\n // ...\n } else if (OriginalTy->isArrayType()) {\n // ...\n } else {\n return ExprError(Diag(Base->getExprLoc(), diag::err_omp_typecheck_section_value) << Base->getSourceRange());"}}, [l]={ ["clang/test/OpenMP/taskwait_depend_messages.cpp"]={"clang/test/OpenMP/taskwait_depend_messages.cpp:45:37: error: subscripted value is not an array or pointer","clang/test/OpenMP/taskwait_depend_messages.cpp:55:34: error: subscripted value is not an array or pointer"} } }, ["err_omp_typecheck_shaping_not_integer"]={ [d]={{nil,p,"err_omp_typecheck_shaping_not_integer"}}, [e]={{nil,p,"array shaping operation dimension is not an integer"}}, [i]={{nil,p,"array shaping operation dimension is not an integer"}}, [j]=k, [c]="array shaping operation dimension is not an integer", [h]=a, [g]={{nil,p,o}}, [f]={W,1576908663,X,Y}, [b]={{E,5487,"ExprResult Sema::ActOnOMPArrayShapingExpr(Expr *Base, SourceLocation LParenLoc, SourceLocation RParenLoc, ArrayRef<Expr *> Dims, ArrayRef<SourceRange> Brackets) {\n // ...\n for (Expr *Dim : Dims) {\n // ...\n if (!Dim->isTypeDependent()) {\n // ...\n if (Result.isInvalid()) {\n // ...\n Diag(Dim->getExprLoc(), diag::err_omp_typecheck_shaping_not_integer) << Dim->getSourceRange();"}} }, ["err_omp_unexpected_append_op"]={ [d]={{nil,M,"err_omp_unexpected_append_op"}}, [e]={{nil,M,"unexpected operation specified in \'append_args\' clause, expected \'interop\'"}}, [i]={{nil,M,"unexpected operation specified in \'append_args\' clause, expected \'interop\'"}}, [j]=k, [c]="unexpected operation specified in \'append_args\' clause, expected \'interop\'", [h]=a, [g]={{nil,M,K}}, [f]={"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"}, [b]={{L,1534,"bool Parser::parseOpenMPAppendArgs(SmallVectorImpl<OMPInteropInfo> &InteropInfos) {\n // ...\n if (!HasError && InteropInfos.empty()) {\n // ...\n Diag(Tok.getLocation(), diag::err_omp_unexpected_append_op);"}}, [l]={ ["clang/test/OpenMP/declare_variant_clauses_messages.cpp"]={"clang/test/OpenMP/declare_variant_clauses_messages.cpp:143:49: error: unexpected operation specified in \'append_args\' clause, expected \'interop\'"} } }, ["err_omp_unexpected_call_to_omp_runtime_api"]={ [d]={{nil,O,"err_omp_unexpected_call_to_omp_runtime_api"}}, [e]={{nil,O,"calls to OpenMP runtime API are not allowed within a region that corresponds to a construct with an order clause that specifies concurrent"}}, [i]={{nil,O,"calls to OpenMP runtime API are not allowed within a region that corresponds to a construct with an order clause that specifies concurrent"}}, [j]=k, [c]="calls to OpenMP runtime API are not allowed within a region that corresponds to a construct with an order clause that specifies concurrent", [h]=a, [g]={{nil,O,o}}, [f]={"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"}, [b]={{n,7253,"ExprResult Sema::ActOnOpenMPCall(ExprResult Call, Scope *Scope, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig) {\n // ...\n if (LangOpts.OpenMP >= 51 && CalleeFnDecl->getIdentifier() && CalleeFnDecl->getName().starts_with_insensitive(\"omp_\")) {\n // checking for any calls inside an Order region\n if (Scope && Scope->isOpenMPOrderClauseScope())\n Diag(LParenLoc, diag::err_omp_unexpected_call_to_omp_runtime_api);"}}, [l]={ ["clang/test/OpenMP/for_order_messages.cpp"]={"clang/test/OpenMP/for_order_messages.cpp:13:24: error: calls to OpenMP runtime API are not allowed within a region that corresponds to a construct with an order clause that specifies concurrent","clang/test/OpenMP/for_order_messages.cpp:17:24: error: calls to OpenMP runtime API are not allowed within a region that corresponds to a construct with an order clause that specifies concurrent","clang/test/OpenMP/for_order_messages.cpp:21:24: error: calls to OpenMP runtime API are not allowed within a region that corresponds to a construct with an order clause that specifies concurrent","clang/test/OpenMP/for_order_messages.cpp:26:26: error: calls to OpenMP runtime API are not allowed within a region that corresponds to a construct with an order clause that specifies concurrent"} } }, ["err_omp_unexpected_clause"]={ [d]="err_omp_unexpected_clause", [e]="unexpected OpenMP clause \'%0\' in directive \'#pragma omp %1\'", [i]="unexpected OpenMP clause \'A\' in directive \'#pragma omp B\'", [j]=k, [c]="unexpected OpenMP clause \'(.*?)\' in directive \'\\#pragma omp (.*?)\'", [h]=a, [g]=K, [f]={"5ec3eb11fcb8",1374203623,"OpenMP: basic support for #pragma omp parallel","OpenMP: basic support for #pragma omp parallel\n\nllvm-svn: 186647"}, [b]={{L,3180,"/// Parsing of OpenMP clauses.\n///\n/// clause:\n/// if-clause | final-clause | num_threads-clause | safelen-clause |\n/// default-clause | private-clause | firstprivate-clause | shared-clause\n/// | linear-clause | aligned-clause | collapse-clause | bind-clause |\n/// lastprivate-clause | reduction-clause | proc_bind-clause |\n/// schedule-clause | copyin-clause | copyprivate-clause | untied-clause |\n/// mergeable-clause | flush-clause | read-clause | write-clause |\n/// update-clause | capture-clause | seq_cst-clause | device-clause |\n/// simdlen-clause | threads-clause | simd-clause | num_teams-clause |\n/// thread_limit-clause | priority-clause | grainsize-clause |\n/// nogroup-clause | num_tasks-clause | hint-clause | to-clause |\n/// from-clause | is_device_ptr-clause | task_reduction-clause |\n/// in_reduction-clause | allocator-clause | allocate-clause |\n/// acq_rel-clause | acquire-clause | release-clause | relaxed-clause |\n/// depobj-clause | destroy-clause | detach-clause | inclusive-clause |\n/// exclusive-clause | uses_allocators-clause | use_device_addr-clause |\n/// has_device_addr\n///\nOMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, OpenMPClauseKind CKind, bool FirstClause) {\n // ...\n // Check if clause is allowed for the given directive.\n if (CKind != OMPC_unknown && !isAllowedClauseForDirective(DKind, CKind, getLangOpts().OpenMP)) {\n Diag(Tok, diag::err_omp_unexpected_clause) << getOpenMPClauseName(CKind) << getOpenMPDirectiveName(DKind);"},{L,3411,"/// Parsing of OpenMP clauses.\n///\n/// clause:\n/// if-clause | final-clause | num_threads-clause | safelen-clause |\n/// default-clause | private-clause | firstprivate-clause | shared-clause\n/// | linear-clause | aligned-clause | collapse-clause | bind-clause |\n/// lastprivate-clause | reduction-clause | proc_bind-clause |\n/// schedule-clause | copyin-clause | copyprivate-clause | untied-clause |\n/// mergeable-clause | flush-clause | read-clause | write-clause |\n/// update-clause | capture-clause | seq_cst-clause | device-clause |\n/// simdlen-clause | threads-clause | simd-clause | num_teams-clause |\n/// thread_limit-clause | priority-clause | grainsize-clause |\n/// nogroup-clause | num_tasks-clause | hint-clause | to-clause |\n/// from-clause | is_device_ptr-clause | task_reduction-clause |\n/// in_reduction-clause | allocator-clause | allocate-clause |\n/// acq_rel-clause | acquire-clause | release-clause | relaxed-clause |\n/// depobj-clause | destroy-clause | detach-clause | inclusive-clause |\n/// exclusive-clause | uses_allocators-clause | use_device_addr-clause |\n/// has_device_addr\n///\nOMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, OpenMPClauseKind CKind, bool FirstClause) {\n // ...\n case OMPC_threadprivate:\n case OMPC_uniform:\n case OMPC_match:\n if (!WrongDirective)\n Diag(Tok, diag::err_omp_unexpected_clause) << getOpenMPClauseName(CKind) << getOpenMPDirectiveName(DKind);"}}, [l]={ ["clang/test/OpenMP/cancel_messages.cpp"]={"clang/test/OpenMP/cancel_messages.cpp:13:29: error: unexpected OpenMP clause \'untied\' in directive \'#pragma omp cancel\'","clang/test/OpenMP/cancel_messages.cpp:48:29: error: unexpected OpenMP clause \'allocate\' in directive \'#pragma omp cancel\'"} } }, ["err_omp_unexpected_clause_value"]={ [d]="err_omp_unexpected_clause_value", [e]="expected %0 in OpenMP clause \'%1\'", [i]="expected A in OpenMP clause \'B\'", [j]=k, [c]="expected (.*?) in OpenMP clause \'(.*?)\'", [h]=a, [g]=o, [f]={"5ec3eb11fcb8",1374203623,"OpenMP: basic support for #pragma omp parallel","OpenMP: basic support for #pragma omp parallel\n\nllvm-svn: 186647"}, [b]={{n,16831,"OMPClause *Sema::ActOnOpenMPDefaultClause(DefaultKind Kind, SourceLocation KindKwLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n if (Kind == OMP_DEFAULT_unknown) {\n Diag(KindKwLoc, diag::err_omp_unexpected_clause_value) << getListOfPossibleValues(OMPC_default, /*First=*/0,"},{n,16865,"OMPClause *Sema::ActOnOpenMPProcBindClause(ProcBindKind Kind, SourceLocation KindKwLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n if (Kind == OMP_PROC_BIND_unknown) {\n Diag(KindKwLoc, diag::err_omp_unexpected_clause_value) << getListOfPossibleValues(OMPC_proc_bind,"},{n,16877,"OMPClause *Sema::ActOnOpenMPProcBindClause(ProcBindKind Kind, SourceLocation KindKwLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n if (Kind == OMP_PROC_BIND_primary && LangOpts.OpenMP < 51)\n Diag(KindKwLoc, diag::err_omp_unexpected_clause_value) << getListOfPossibleValues(OMPC_proc_bind,"},{n,16891,"OMPClause *Sema::ActOnOpenMPAtomicDefaultMemOrderClause(OpenMPAtomicDefaultMemOrderClauseKind Kind, SourceLocation KindKwLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n if (Kind == OMPC_ATOMIC_DEFAULT_MEM_ORDER_unknown) {\n Diag(KindKwLoc, diag::err_omp_unexpected_clause_value) << getListOfPossibleValues(OMPC_atomic_default_mem_order, /*First=*/0,"},{n,16908,"OMPClause *Sema::ActOnOpenMPAtClause(OpenMPAtClauseKind Kind, SourceLocation KindKwLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n if (Kind == OMPC_AT_unknown) {\n Diag(KindKwLoc, diag::err_omp_unexpected_clause_value) << getListOfPossibleValues(OMPC_at, /*First=*/0,"},{n,16924,"OMPClause *Sema::ActOnOpenMPSeverityClause(OpenMPSeverityClauseKind Kind, SourceLocation KindKwLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n if (Kind == OMPC_SEVERITY_unknown) {\n Diag(KindKwLoc, diag::err_omp_unexpected_clause_value) << getListOfPossibleValues(OMPC_severity, /*First=*/0,"},{n,16957,"OMPClause *Sema::ActOnOpenMPOrderClause(OpenMPOrderClauseModifier Modifier, OpenMPOrderClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc) {\n if (Kind != OMPC_ORDER_concurrent || (LangOpts.OpenMP < 51 && MLoc.isValid())) {\n // ...\n Diag(KindLoc, diag::err_omp_unexpected_clause_value) << getListOfPossibleValues(OMPC_order,"},{n,16966,"OMPClause *Sema::ActOnOpenMPOrderClause(OpenMPOrderClauseModifier Modifier, OpenMPOrderClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc) {\n // ...\n if (LangOpts.OpenMP >= 51) {\n if (Modifier == OMPC_ORDER_MODIFIER_unknown && MLoc.isValid()) {\n Diag(MLoc, diag::err_omp_unexpected_clause_value) << getListOfPossibleValues(OMPC_order,"},{n,16997,"OMPClause *Sema::ActOnOpenMPUpdateClause(OpenMPDependClauseKind Kind, SourceLocation KindKwLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n if (Kind == OMPC_DEPEND_unknown || Kind == OMPC_DEPEND_source || Kind == OMPC_DEPEND_sink || Kind == OMPC_DEPEND_depobj) {\n // ...\n Diag(KindKwLoc, diag::err_omp_unexpected_clause_value) << getListOfPossibleValues(OMPC_depend, /*First=*/0,"},{n,17214,"static bool checkScheduleModifiers(Sema &S, OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, SourceLocation M1Loc, SourceLocation M2Loc) {\n if (M1 == OMPC_SCHEDULE_MODIFIER_unknown && M1Loc.isValid()) {\n // ...\n S.Diag(M1Loc, diag::err_omp_unexpected_clause_value) << getListOfPossibleValues(OMPC_schedule,"},{n,17257,"OMPClause *Sema::ActOnOpenMPScheduleClause(OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc) {\n // ...\n if (Kind == OMPC_SCHEDULE_unknown) {\n // ...\n Diag(KindLoc, diag::err_omp_unexpected_clause_value) << Values << getOpenMPClauseName(OMPC_schedule);"},{n,18487,"OMPClause *Sema::ActOnOpenMPLastprivateClause(ArrayRef<Expr *> VarList, OpenMPLastprivateModifier LPKind, SourceLocation LPKindLoc, SourceLocation ColonLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n if (LPKind == OMPC_LASTPRIVATE_unknown && LPKindLoc.isValid()) {\n // ...\n Diag(LPKindLoc, diag::err_omp_unexpected_clause_value) << getListOfPossibleValues(OMPC_lastprivate, /*First=*/0,"},{n,19891,"OMPClause *Sema::ActOnOpenMPReductionClause(ArrayRef<Expr *> VarList, OpenMPReductionClauseModifier Modifier, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions) {\n if (ModifierLoc.isValid() && Modifier == OMPC_REDUCTION_unknown) {\n Diag(LParenLoc, diag::err_omp_unexpected_clause_value) << getListOfPossibleValues(OMPC_reduction, /*First=*/0,"},{n,20730,"OMPClause *Sema::ActOnOpenMPDependClause(const OMPDependClause::DependDataTy &Data, Expr *DepModifier, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n if (DSAStack->getCurrentDirective() == OMPD_ordered && DepKind != OMPC_DEPEND_source && DepKind != OMPC_DEPEND_sink) {\n Diag(DepLoc, diag::err_omp_unexpected_clause_value) << \"\'source\' or \'sink\'\" << getOpenMPClauseName(OMPC_depend);"},{n,20756,"OMPClause *Sema::ActOnOpenMPDependClause(const OMPDependClause::DependDataTy &Data, Expr *DepModifier, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n if ((DSAStack->getCurrentDirective() != OMPD_ordered || DSAStack->getCurrentDirective() == OMPD_depobj) && (DepKind == OMPC_DEPEND_unknown || DepKind == OMPC_DEPEND_source || DepKind == OMPC_DEPEND_sink || ((LangOpts.OpenMP < 50 || DSAStack->getCurrentDirective() == OMPD_depobj) && DepKind == OMPC_DEPEND_depobj))) {\n // ...\n Diag(DepLoc, diag::err_omp_unexpected_clause_value) << Expected + getListOfPossibleValues(OMPC_depend, /*First=*/0,"},{n,20919,"OMPClause *Sema::ActOnOpenMPDeviceClause(OpenMPDeviceClauseModifier Modifier, Expr *Device, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc) {\n // ...\n if (ModifierLoc.isValid() && Modifier == OMPC_DEVICE_unknown) {\n // ...\n Diag(ModifierLoc, diag::err_omp_unexpected_clause_value) << Values << getOpenMPClauseName(OMPC_device);"},{n,22699,"OMPClause *Sema::ActOnOpenMPGrainsizeClause(OpenMPGrainsizeClauseModifier Modifier, Expr *Grainsize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc) {\n // ...\n if (ModifierLoc.isValid() && Modifier == OMPC_GRAINSIZE_unknown) {\n // ...\n Diag(ModifierLoc, diag::err_omp_unexpected_clause_value) << Values << getOpenMPClauseName(OMPC_grainsize);"},{n,22733,"OMPClause *Sema::ActOnOpenMPNumTasksClause(OpenMPNumTasksClauseModifier Modifier, Expr *NumTasks, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc) {\n // ...\n if (ModifierLoc.isValid() && Modifier == OMPC_NUMTASKS_unknown) {\n // ...\n Diag(ModifierLoc, diag::err_omp_unexpected_clause_value) << Values << getOpenMPClauseName(OMPC_num_tasks);"},{n,22842,"OMPClause *Sema::ActOnOpenMPDistScheduleClause(OpenMPDistScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc) {\n if (Kind == OMPC_DIST_SCHEDULE_unknown) {\n // ...\n Diag(KindLoc, diag::err_omp_unexpected_clause_value) << Values << getOpenMPClauseName(OMPC_dist_schedule);"},{n,22907,"OMPClause *Sema::ActOnOpenMPDefaultmapClause(OpenMPDefaultmapClauseModifier M, OpenMPDefaultmapClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc) {\n if (getLangOpts().OpenMP < 50) {\n if (M != OMPC_DEFAULTMAP_MODIFIER_tofrom || Kind != OMPC_DEFAULTMAP_scalar) {\n // ...\n Diag(Loc, diag::err_omp_unexpected_clause_value) << Value << getOpenMPClauseName(OMPC_defaultmap);"},{n,22921,"OMPClause *Sema::ActOnOpenMPDefaultmapClause(OpenMPDefaultmapClauseModifier M, OpenMPDefaultmapClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc) {\n if (getLangOpts().OpenMP < 50) {\n // ...\n } else {\n // ...\n if (!isDefaultmapKind || !isDefaultmapModifier) {\n // ...\n if (LangOpts.OpenMP == 50) {\n // ...\n if (!isDefaultmapKind && isDefaultmapModifier) {\n Diag(KindLoc, diag::err_omp_unexpected_clause_value) << KindValue << getOpenMPClauseName(OMPC_defaultmap);"},{n,22924,"OMPClause *Sema::ActOnOpenMPDefaultmapClause(OpenMPDefaultmapClauseModifier M, OpenMPDefaultmapClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc) {\n if (getLangOpts().OpenMP < 50) {\n // ...\n } else {\n // ...\n if (!isDefaultmapKind || !isDefaultmapModifier) {\n // ...\n if (LangOpts.OpenMP == 50) {\n // ...\n if (!isDefaultmapKind && isDefaultmapModifier) {\n // ...\n } else if (isDefaultmapKind && !isDefaultmapModifier) {\n Diag(MLoc, diag::err_omp_unexpected_clause_value) << ModifierValue << getOpenMPClauseName(OMPC_defaultmap);"},{n,22927,"OMPClause *Sema::ActOnOpenMPDefaultmapClause(OpenMPDefaultmapClauseModifier M, OpenMPDefaultmapClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc) {\n if (getLangOpts().OpenMP < 50) {\n // ...\n } else {\n // ...\n if (!isDefaultmapKind || !isDefaultmapModifier) {\n // ...\n if (LangOpts.OpenMP == 50) {\n // ...\n if (!isDefaultmapKind && isDefaultmapModifier) {\n // ...\n } else if (isDefaultmapKind && !isDefaultmapModifier) {\n // ...\n } else {\n Diag(MLoc, diag::err_omp_unexpected_clause_value) << ModifierValue << getOpenMPClauseName(OMPC_defaultmap);"},{n,22929,"OMPClause *Sema::ActOnOpenMPDefaultmapClause(OpenMPDefaultmapClauseModifier M, OpenMPDefaultmapClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc) {\n if (getLangOpts().OpenMP < 50) {\n // ...\n } else {\n // ...\n if (!isDefaultmapKind || !isDefaultmapModifier) {\n // ...\n if (LangOpts.OpenMP == 50) {\n // ...\n if (!isDefaultmapKind && isDefaultmapModifier) {\n // ...\n } else if (isDefaultmapKind && !isDefaultmapModifier) {\n // ...\n } else {\n // ...\n Diag(KindLoc, diag::err_omp_unexpected_clause_value) << KindValue << getOpenMPClauseName(OMPC_defaultmap);"},{n,22937,"OMPClause *Sema::ActOnOpenMPDefaultmapClause(OpenMPDefaultmapClauseModifier M, OpenMPDefaultmapClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc) {\n if (getLangOpts().OpenMP < 50) {\n // ...\n } else {\n // ...\n if (!isDefaultmapKind || !isDefaultmapModifier) {\n // ...\n if (LangOpts.OpenMP == 50) {\n // ...\n } else {\n // ...\n if (!isDefaultmapKind && isDefaultmapModifier) {\n Diag(KindLoc, diag::err_omp_unexpected_clause_value) << KindValue << getOpenMPClauseName(OMPC_defaultmap);"},{n,22940,"OMPClause *Sema::ActOnOpenMPDefaultmapClause(OpenMPDefaultmapClauseModifier M, OpenMPDefaultmapClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc) {\n if (getLangOpts().OpenMP < 50) {\n // ...\n } else {\n // ...\n if (!isDefaultmapKind || !isDefaultmapModifier) {\n // ...\n if (LangOpts.OpenMP == 50) {\n // ...\n } else {\n // ...\n if (!isDefaultmapKind && isDefaultmapModifier) {\n // ...\n } else if (isDefaultmapKind && !isDefaultmapModifier) {\n Diag(MLoc, diag::err_omp_unexpected_clause_value) << ModifierValue << getOpenMPClauseName(OMPC_defaultmap);"},{n,22943,"OMPClause *Sema::ActOnOpenMPDefaultmapClause(OpenMPDefaultmapClauseModifier M, OpenMPDefaultmapClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc) {\n if (getLangOpts().OpenMP < 50) {\n // ...\n } else {\n // ...\n if (!isDefaultmapKind || !isDefaultmapModifier) {\n // ...\n if (LangOpts.OpenMP == 50) {\n // ...\n } else {\n // ...\n if (!isDefaultmapKind && isDefaultmapModifier) {\n // ...\n } else if (isDefaultmapKind && !isDefaultmapModifier) {\n // ...\n } else {\n Diag(MLoc, diag::err_omp_unexpected_clause_value) << ModifierValue << getOpenMPClauseName(OMPC_defaultmap);"},{n,22945,"OMPClause *Sema::ActOnOpenMPDefaultmapClause(OpenMPDefaultmapClauseModifier M, OpenMPDefaultmapClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc) {\n if (getLangOpts().OpenMP < 50) {\n // ...\n } else {\n // ...\n if (!isDefaultmapKind || !isDefaultmapModifier) {\n // ...\n if (LangOpts.OpenMP == 50) {\n // ...\n } else {\n // ...\n if (!isDefaultmapKind && isDefaultmapModifier) {\n // ...\n } else if (isDefaultmapKind && !isDefaultmapModifier) {\n // ...\n } else {\n // ...\n Diag(KindLoc, diag::err_omp_unexpected_clause_value) << KindValue << getOpenMPClauseName(OMPC_defaultmap);"},{n,24024,"OMPClause *Sema::ActOnOpenMPBindClause(OpenMPBindClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n if (Kind == OMPC_BIND_unknown) {\n Diag(KindLoc, diag::err_omp_unexpected_clause_value) << getListOfPossibleValues(OMPC_bind, /*First=*/0,"},{n,24073,"OMPClause *Sema::ActOnOpenMPDoacrossClause(OpenMPDoacrossClauseModifier DepType, SourceLocation DepLoc, SourceLocation ColonLoc, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n if (DSAStack->getCurrentDirective() == OMPD_ordered && DepType != OMPC_DOACROSS_source && DepType != OMPC_DOACROSS_sink && DepType != OMPC_DOACROSS_sink_omp_cur_iteration && DepType != OMPC_DOACROSS_source_omp_cur_iteration && DepType != OMPC_DOACROSS_source) {\n Diag(DepLoc, diag::err_omp_unexpected_clause_value) << \"\'source\' or \'sink\'\" << getOpenMPClauseName(OMPC_doacross);"}}, [l]={ ["clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp"]={"clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp:12:47: error: expected \'seq_cst\', \'acq_rel\' or \'relaxed\' in OpenMP clause \'atomic_default_mem_order\'"} } }, ["err_omp_unexpected_directive"]={ [d]="err_omp_unexpected_directive", [e]={{nil,z,"unexpected OpenMP directive %select{|\'#pragma omp %1\'}0"},{F,nil,"unexpected OpenMP directive \'#pragma omp %0\'"}}, [i]={{nil,z,{"unexpected OpenMP directive ",{a,"\'#pragma omp B\'"}}},{F,nil,"unexpected OpenMP directive \'#pragma omp A\'"}}, [j]=k, [c]="unexpected OpenMP directive (?:|\'\\#pragma omp (.*?)\')", [h]=a, [g]=K, [f]={nb,1363934075,ob,pb}, [b]={{L,2358,"/// 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_target: {\n if (!Actions.isInOpenMPDeclareTargetContext()) {\n Diag(Tok, diag::err_omp_unexpected_directive) << 1 << getOpenMPDirectiveName(DKind);"},{L,2439,"/// 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_parallel:\n case OMPD_simd:\n case OMPD_tile:\n case OMPD_unroll:\n case OMPD_task:\n case OMPD_taskyield:\n case OMPD_barrier:\n case OMPD_taskwait:\n case OMPD_taskgroup:\n case OMPD_flush:\n case OMPD_depobj:\n case OMPD_scan:\n case OMPD_for:\n case OMPD_for_simd:\n case OMPD_sections:\n case OMPD_section:\n case OMPD_single:\n case OMPD_master:\n case OMPD_ordered:\n case OMPD_critical:\n case OMPD_parallel_for:\n case OMPD_parallel_for_simd:\n case OMPD_parallel_sections:\n case OMPD_parallel_master:\n case OMPD_parallel_masked:\n case OMPD_atomic:\n case OMPD_target:\n case OMPD_teams:\n case OMPD_cancellation_point:\n case OMPD_cancel:\n case OMPD_target_data:\n case OMPD_target_enter_data:\n case OMPD_target_exit_data:\n case OMPD_target_parallel:\n case OMPD_target_parallel_for:\n case OMPD_taskloop:\n case OMPD_taskloop_simd:\n case OMPD_master_taskloop:\n case OMPD_master_taskloop_simd:\n case OMPD_parallel_master_taskloop:\n case OMPD_parallel_master_taskloop_simd:\n case OMPD_masked_taskloop:\n case OMPD_masked_taskloop_simd:\n case OMPD_parallel_masked_taskloop:\n case OMPD_parallel_masked_taskloop_simd:\n case OMPD_distribute:\n case OMPD_target_update:\n case OMPD_distribute_parallel_for:\n case OMPD_distribute_parallel_for_simd:\n case OMPD_distribute_simd:\n case OMPD_target_parallel_for_simd:\n case OMPD_target_simd:\n case OMPD_teams_distribute:\n case OMPD_teams_distribute_simd:\n case OMPD_teams_distribute_parallel_for_simd:\n case OMPD_teams_distribute_parallel_for:\n case OMPD_target_teams:\n case OMPD_target_teams_distribute:\n case OMPD_target_teams_distribute_parallel_for:\n case OMPD_target_teams_distribute_parallel_for_simd:\n case OMPD_target_teams_distribute_simd:\n case OMPD_dispatch:\n case OMPD_masked:\n case OMPD_metadirective:\n case OMPD_loop:\n case OMPD_teams_loop:\n case OMPD_target_teams_loop:\n case OMPD_parallel_loop:\n case OMPD_target_parallel_loop:\n Diag(Tok, diag::err_omp_unexpected_directive) << 1 << getOpenMPDirectiveName(DKind);"},{L,2991,"/// 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_declare_simd:\n case OMPD_declare_target:\n case OMPD_begin_declare_target:\n case OMPD_end_declare_target:\n case OMPD_requires:\n case OMPD_begin_declare_variant:\n case OMPD_end_declare_variant:\n case OMPD_declare_variant:\n Diag(Tok, diag::err_omp_unexpected_directive) << 1 << getOpenMPDirectiveName(DKind);"},{"clang/lib/Parse/ParsePragma.cpp",2643,"/// Handle \'#pragma omp ...\' when OpenMP is enabled.\n///\nvoid PragmaOpenMPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstTok) {\n // ...\n while (Tok.isNot(tok::eod) && Tok.isNot(tok::eof)) {\n // ...\n if (Tok.is(tok::annot_pragma_openmp)) {\n PP.Diag(Tok, diag::err_omp_unexpected_directive) << 0;"}}, [l]={ ["clang/test/OpenMP/parallel_messages.cpp"]={"clang/test/OpenMP/parallel_messages.cpp:14:13: error: unexpected OpenMP directive \'#pragma omp parallel\'"} } }, ["err_omp_unexpected_execution_modifier"]={ [d]={{nil,O,"err_omp_unexpected_execution_modifier"}}, [e]={{nil,O,"unexpected \'execution\' modifier in non-executable context"}}, [i]={{nil,O,"unexpected \'execution\' modifier in non-executable context"}}, [j]=k, [c]="unexpected \'execution\' modifier in non\\-executable context", [h]=a, [g]={{nil,O,K}}, [f]={"628fdc3f57ad",1668132755,"[OPENMP]Initial support for at clause","[OPENMP]Initial support for at clause\n\nError directive is allowed in both declared and executable contexts.\nThe function ActOnOpenMPAtClause is called in both places during the\nparsers.\n\nAdding a param \"bool InExContext\" to identify context which is used to\nemit error massage.\n\nDifferential Revision: https://reviews.llvm.org/D137851"}, [b]={{n,11155,"StmtResult Sema::ActOnOpenMPErrorDirective(ArrayRef<OMPClause *> Clauses, SourceLocation StartLoc, SourceLocation EndLoc, bool InExContext) {\n // ...\n if (AtC && !InExContext && AtC->getAtKind() == OMPC_AT_execution) {\n Diag(AtC->getAtKindKwLoc(), diag::err_omp_unexpected_execution_modifier);"}}, [l]={ ["clang/test/OpenMP/error_message.cpp"]={"clang/test/OpenMP/error_message.cpp:120:22: error: unexpected \'execution\' modifier in non-executable context","clang/test/OpenMP/error_message.cpp:127:22: error: unexpected \'execution\' modifier in non-executable context"} } }, ["err_omp_unexpected_schedule_modifier"]={ [d]="err_omp_unexpected_schedule_modifier", [e]="modifier \'%0\' cannot be used along with modifier \'%1\'", [i]="modifier \'A\' cannot be used along with modifier \'B\'", [j]=k, [c]="modifier \'(.*?)\' cannot be used along with modifier \'(.*?)\'", [h]=a, [g]=o, [f]={"6402bcad714d",1451287551,"[OPENMP 4.5] Sema/parsing support for extended format of \'schedule\' clause.","[OPENMP 4.5] Sema/parsing support for extended format of \'schedule\' clause.\nOpenMP 4.0-3.1 supports the next format of ‘schedule’ clause: schedule(kind[, chunk_size])\nWhere kind can be one of ‘static’, ‘dynamic’, ‘guided’, ‘auto’ or ‘runtime’.\nOpenMP 4.5 defines the format: schedule([modifier [, modifier]:]kind[, chunk_size])\nModifier can be one of ‘monotonic’, ‘nonmonotonic’ or ‘simd’.\n\nllvm-svn: 256487"}, [b]={{n,17241,"OMPClause *Sema::ActOnOpenMPScheduleClause(OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP, 2.7.1, Loop Construct, Restrictions\n // Either the monotonic modifier or the nonmonotonic modifier can be specified\n // but not both.\n if ((M1 == M2 && M1 != OMPC_SCHEDULE_MODIFIER_unknown) || (M1 == OMPC_SCHEDULE_MODIFIER_monotonic && M2 == OMPC_SCHEDULE_MODIFIER_nonmonotonic) || (M1 == OMPC_SCHEDULE_MODIFIER_nonmonotonic && M2 == OMPC_SCHEDULE_MODIFIER_monotonic)) {\n Diag(M2Loc, diag::err_omp_unexpected_schedule_modifier) << getOpenMPSimpleClauseTypeName(OMPC_schedule, M2) << getOpenMPSimpleClauseTypeName(OMPC_schedule, M1);"}}, [l]={ ["clang/test/OpenMP/for_schedule_messages.cpp"]={"clang/test/OpenMP/for_schedule_messages.cpp:72:40: error: modifier \'nonmonotonic\' cannot be used along with modifier \'monotonic\'","clang/test/OpenMP/for_schedule_messages.cpp:74:43: error: modifier \'monotonic\' cannot be used along with modifier \'nonmonotonic\'","clang/test/OpenMP/for_schedule_messages.cpp:76:43: error: modifier \'nonmonotonic\' cannot be used along with modifier \'nonmonotonic\'","clang/test/OpenMP/for_schedule_messages.cpp:78:40: error: modifier \'monotonic\' cannot be used along with modifier \'monotonic\'"} } }, ["err_omp_union_type_not_allowed"]={ [d]="err_omp_union_type_not_allowed", [e]={{nil,F,"mapping of union members is not allowed"},{q,nil,"mapped storage cannot be derived from a union"}}, [i]={{nil,F,"mapping of union members is not allowed"},{q,nil,"mapped storage cannot be derived from a union"}}, [j]=k, [c]="mapping of union members is not allowed", [h]=a, [g]=o, [f]={"5de996e3bd79",1453494096,"[OpenMP] Update map clause SEMA to support OpenMP 4.5 possible list items.","[OpenMP] Update map clause SEMA to support OpenMP 4.5 possible list items.\n\nSummary:\nExtend support in the map clause SEMA for the expressions supported in the OpenMP 4.5 specification, namely member expressions. \n\nFix some bugs in the previous implementation of SEMA related with expressions that do not consist of single variable references.\n\nFix bug in parsing when the expression in the map clause do not start with an identifier: accept any expression in the map clause and check for validity in SEMA instead of just ignoring it.\n\nReviewers: hfinkel, kkwli0, arpith-jacob, carlo.bertolli, ABataev\n\nSubscribers: cfe-commits, fraggamuffin, caomhin\n\nDifferential Revision: http://reviews.llvm.org/D16385\n\nllvm-svn: 258543"}, [b]={{n,21192,"class MapBaseChecker final : public StmtVisitor<MapBaseChecker, bool> {\n // ...\n bool VisitMemberExpr(MemberExpr *ME) {\n // ...\n // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, C/C++, p.2]\n // A list item cannot be a variable that is a member of a structure with\n // a union type.\n //\n if (CurType->isUnionType()) {\n if (!NoDiagnose) {\n SemaRef.Diag(ELoc, diag::err_omp_union_type_not_allowed) << ME->getSourceRange();"}}, [l]={ ["clang/test/OpenMP/target_teams_map_messages.cpp"]={"clang/test/OpenMP/target_teams_map_messages.cpp:298:34: error: mapping of union members is not allowed"} } }, ["err_omp_unknown_directive"]={ [d]="err_omp_unknown_directive", [e]="expected an OpenMP directive", [i]="expected an OpenMP directive", [j]=k, [c]="expected an OpenMP directive", [h]=a, [g]=K, [f]={nb,1363934075,ob,pb}, [b]={{L,2368,"/// 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_unknown:\n Diag(Tok, diag::err_omp_unknown_directive);"},{L,2510,"/// 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 if (ReadDirectiveWithinMetadirective && DKind == OMPD_unknown) {\n Diag(Tok, diag::err_omp_unknown_directive);"},{L,2997,"/// 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_unknown:\n default:\n Diag(Tok, diag::err_omp_unknown_directive);"}}, [l]={ ["clang/test/OpenMP/openmp_attribute_parsing.cpp"]={"clang/test/OpenMP/openmp_attribute_parsing.cpp:17:18: error: expected an OpenMP directive","clang/test/OpenMP/openmp_attribute_parsing.cpp:30:27: error: expected an OpenMP directive","clang/test/OpenMP/openmp_attribute_parsing.cpp:31:32: error: expected an OpenMP directive","clang/test/OpenMP/openmp_attribute_parsing.cpp:32:27: error: expected an OpenMP directive","clang/test/OpenMP/openmp_attribute_parsing.cpp:33:32: error: expected an OpenMP directive","clang/test/OpenMP/openmp_attribute_parsing.cpp:39:1: error: expected an OpenMP directive","clang/test/OpenMP/openmp_attribute_parsing.cpp:45:24: error: expected an OpenMP directive","clang/test/OpenMP/openmp_attribute_parsing.cpp:47:38: error: expected an OpenMP directive","clang/test/OpenMP/openmp_attribute_parsing.cpp:48:33: error: expected an OpenMP directive"} } }, ["err_omp_unknown_map_type"]={ [d]="err_omp_unknown_map_type", [e]="incorrect map type, expected one of \'to\', \'from\', \'tofrom\', \'alloc\', \'release\', or \'delete\'", [i]="incorrect map type, expected one of \'to\', \'from\', \'tofrom\', \'alloc\', \'release\', or \'delete\'", [j]=k, [c]="incorrect map type, expected one of \'to\', \'from\', \'tofrom\', \'alloc\', \'release\', or \'delete\'", [h]=a, [g]=K, [f]={"0bff7afab5bb",1448256723,"[OpenMP] Parsing and sema support for map clause","[OpenMP] Parsing and sema support for map clause\n\nhttp://reviews.llvm.org/D14134 \n\nllvm-svn: 253849"}, [b]={{L,4185,"/// Parse map-type in map clause.\n/// map([ [map-type-modifier[,] [map-type-modifier[,] ...] map-type : ] list)\n/// where, map-type ::= to | from | tofrom | alloc | release | delete\nstatic void parseMapType(Parser &P, Sema::OpenMPVarListDataTy &Data) {\n // ...\n if (Data.ExtraModifier == OMPC_MAP_unknown)\n P.Diag(Tok, diag::err_omp_unknown_map_type);"}}, [l]={ ["clang/test/OpenMP/target_parallel_map_messages.cpp"]={"clang/test/OpenMP/target_parallel_map_messages.cpp:94:33: error: incorrect map type, expected one of \'to\', \'from\', \'tofrom\', \'alloc\', \'release\', or \'delete\'","clang/test/OpenMP/target_parallel_map_messages.cpp:106:33: error: incorrect map type, expected one of \'to\', \'from\', \'tofrom\', \'alloc\', \'release\', or \'delete\'","clang/test/OpenMP/target_parallel_map_messages.cpp:223:33: error: incorrect map type, expected one of \'to\', \'from\', \'tofrom\', \'alloc\', \'release\', or \'delete\'"} } }, ["err_omp_unknown_map_type_modifier"]={ [d]="err_omp_unknown_map_type_modifier", [e]={{nil,O,"incorrect map type modifier, expected one of: \'always\', \'close\', \'mapper\'%select{|, \'present\'|, \'present\', \'iterator\'}0%select{|, \'ompx_hold\'}1"},{J,M,"incorrect map type modifier, expected one of: \'always\', \'close\', \'mapper\'%select{|, \'present\'}0%select{|, \'ompx_hold\'}1"},{C,hb,"incorrect map type modifier, expected \'always\', \'close\', %select{or \'mapper\'|\'mapper\', or \'present\'}0"},{"11.1",v,"incorrect map type modifier, expected \'always\', \'close\', or \'mapper\'"},{u,u,"incorrect map type modifier, expected \'always\' or \'close\'"},{Kb,nil,"incorrect map type modifier, expected \'always\'"}}, [i]={{nil,O,{"incorrect map type modifier, expected one of: \'always\', \'close\', \'mapper\'",{a,", \'present\'",", \'present\', \'iterator\'"},{a,", \'ompx_hold\'"}}},{J,M,{"incorrect map type modifier, expected one of: \'always\', \'close\', \'mapper\'",{a,", \'present\'"},{a,", \'ompx_hold\'"}}},{C,hb,{"incorrect map type modifier, expected \'always\', \'close\', ",{"or \'mapper\'","\'mapper\', or \'present\'"}}},{"11.1",v,"incorrect map type modifier, expected \'always\', \'close\', or \'mapper\'"},{u,u,"incorrect map type modifier, expected \'always\' or \'close\'"},{Kb,nil,"incorrect map type modifier, expected \'always\'"}}, [j]=k, [c]="incorrect map type modifier, expected one of\\: \'always\', \'close\', \'mapper\'(?:|, \'present\'|, \'present\', \'iterator\')(?:|, \'ompx_hold\')", [h]=a, [g]=K, [f]={"0bff7afab5bb",1448256723,"[OpenMP] Parsing and sema support for map clause","[OpenMP] Parsing and sema support for map clause\n\nhttp://reviews.llvm.org/D14134 \n\nllvm-svn: 253849"}, [b]={{L,4148,"/// Parse map-type-modifiers in map clause.\n/// map([ [map-type-modifier[,] [map-type-modifier[,] ...] map-type : ] list)\n/// where, map-type-modifier ::= always | close | mapper(mapper-identifier) |\n/// present\nbool Parser::parseMapTypeModifiers(Sema::OpenMPVarListDataTy &Data) {\n while (getCurToken().isNot(tok::colon)) {\n // ...\n if (TypeModifier == OMPC_MAP_MODIFIER_always || TypeModifier == OMPC_MAP_MODIFIER_close || TypeModifier == OMPC_MAP_MODIFIER_present || TypeModifier == OMPC_MAP_MODIFIER_ompx_hold) {\n // ...\n } else if (TypeModifier == OMPC_MAP_MODIFIER_mapper) {\n // ...\n } else {\n // ...\n Diag(Tok, diag::err_omp_unknown_map_type_modifier) << (getLangOpts().OpenMP >= 51 ? (getLangOpts().OpenMP >= 52 ? 2 : 1) : 0) << getLangOpts().OpenMPExtensions;"},{L,4504,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n } else if (Kind == OMPC_depend || Kind == OMPC_doacross) {\n // ...\n } else if (Kind == OMPC_linear) {\n // ...\n } else if (Kind == OMPC_lastprivate) {\n // ...\n } else if (Kind == OMPC_map) {\n // Handle optional iterator map modifier.\n if (Tok.is(tok::identifier) && PP.getSpelling(Tok) == \"iterator\") {\n // ...\n if (getLangOpts().OpenMP < 52) {\n Diag(Tok, diag::err_omp_unknown_map_type_modifier) << (getLangOpts().OpenMP >= 51 ? 1 : 0) << getLangOpts().OpenMPExtensions;"}}, [l]={ ["clang/test/OpenMP/target_exit_data_map_messages.c"]={"clang/test/OpenMP/target_exit_data_map_messages.c:29:36: error: incorrect map type modifier, expected one of: \'always\', \'close\', \'mapper\', \'present\'","clang/test/OpenMP/target_exit_data_map_messages.c:32:36: error: incorrect map type modifier, expected one of: \'always\', \'close\', \'mapper\', \'present\'","clang/test/OpenMP/target_exit_data_map_messages.c:35:36: error: incorrect map type modifier, expected one of: \'always\', \'close\', \'mapper\', \'present\'"} } }, ["err_omp_unknown_reduction_identifier_prior_omp_6_0"]={ [d]="err_omp_unknown_reduction_identifier_prior_omp_6_0", [e]="incorrect reduction identifier, expected one of \'+\', \'-\', \'*\', \'&\', \'|\', \'^\', \'&&\', \'||\', \'min\' or \'max\' or declare reduction for type %0", [i]="incorrect reduction identifier, expected one of \'+\', \'-\', \'*\', \'&\', \'|\', \'^\', \'&&\', \'||\', \'min\' or \'max\' or declare reduction for type A", [j]=k, [c]="incorrect reduction identifier, expected one of \'\\+\', \'\\-\', \'\\*\', \'&\', \'\\|\', \'\\^\', \'&&\', \'\\|\\|\', \'min\' or \'max\' or declare reduction for type (.*?)", [h]=a, [g]=o, [f]={"f9caa12328b2",1688403744,"[Clang] Fix constraint checking of non-generic lambdas.","[Clang] Fix constraint checking of non-generic lambdas.\n\nA lambda call operator can be a templated entity -\nand therefore have constraints while not being a function template\n\n template<class T> void f() {\n []() requires false { }();\n }\n\nIn that case, we would check the constraints of the call operator\nwhich is non-viable. However, we would find a viable candidate:\nthe conversion operator to function pointer, and use it to\nperform a surrogate call.\nThese constraints were not checked because:\n * We never check the constraints of surrogate functions\n * The lambda conversion operator has non constraints.\n\nFrom the wording, it is not clear what the intent is but\nit seems reasonable to expect the constraints of the lambda conversion\noperator to be checked and it is consistent with GCC and MSVC.\n\nThis patch also improve the diagnostics for constraint failure\non surrogate calls.\n\nFixes #63181\n\nReviewed By: #clang-language-wg, aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D154368"}, [b]={{n,19430,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (BOK == BO_Comma && DeclareReductionRef.isUnset()) {\n // Not allowed reduction identifier is found.\n if (S.LangOpts.OpenMP > 52)\n // ...\n else\n S.Diag(ReductionId.getBeginLoc(), diag::err_omp_unknown_reduction_identifier_prior_omp_6_0) << Type << ReductionIdRange;"}}, [l]={ ["clang/test/OpenMP/declare_reduction_messages.cpp"]={"clang/test/OpenMP/declare_reduction_messages.cpp:136:50: error: incorrect reduction identifier, expected one of \'+\', \'-\', \'*\', \'&\', \'|\', \'^\', \'&&\', \'||\', \'min\' or \'max\' or declare reduction for type \'int\'","clang/test/OpenMP/declare_reduction_messages.cpp:105:35: error: incorrect reduction identifier, expected one of \'+\', \'-\', \'*\', \'&\', \'|\', \'^\', \'&&\', \'||\', \'min\' or \'max\' or declare reduction for type \'int\'","clang/test/OpenMP/declare_reduction_messages.cpp:119:35: error: incorrect reduction identifier, expected one of \'+\', \'-\', \'*\', \'&\', \'|\', \'^\', \'&&\', \'||\', \'min\' or \'max\' or declare reduction for type \'int\'"} } }, ["err_omp_unknown_reduction_identifier_since_omp_6_0"]={ [d]="err_omp_unknown_reduction_identifier_since_omp_6_0", [e]="incorrect reduction identifier, expected one of \'+\', \'*\', \'&\', \'|\', \'^\', \'&&\', \'||\', \'min\' or \'max\' or declare reduction for type %0", [i]="incorrect reduction identifier, expected one of \'+\', \'*\', \'&\', \'|\', \'^\', \'&&\', \'||\', \'min\' or \'max\' or declare reduction for type A", [j]=k, [c]="incorrect reduction identifier, expected one of \'\\+\', \'\\*\', \'&\', \'\\|\', \'\\^\', \'&&\', \'\\|\\|\', \'min\' or \'max\' or declare reduction for type (.*?)", [h]=a, [g]=o, [f]={"f9caa12328b2",1688403744,"[Clang] Fix constraint checking of non-generic lambdas.","[Clang] Fix constraint checking of non-generic lambdas.\n\nA lambda call operator can be a templated entity -\nand therefore have constraints while not being a function template\n\n template<class T> void f() {\n []() requires false { }();\n }\n\nIn that case, we would check the constraints of the call operator\nwhich is non-viable. However, we would find a viable candidate:\nthe conversion operator to function pointer, and use it to\nperform a surrogate call.\nThese constraints were not checked because:\n * We never check the constraints of surrogate functions\n * The lambda conversion operator has non constraints.\n\nFrom the wording, it is not clear what the intent is but\nit seems reasonable to expect the constraints of the lambda conversion\noperator to be checked and it is consistent with GCC and MSVC.\n\nThis patch also improve the diagnostics for constraint failure\non surrogate calls.\n\nFixes #63181\n\nReviewed By: #clang-language-wg, aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D154368"}, [b]={{n,19426,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (BOK == BO_Comma && DeclareReductionRef.isUnset()) {\n // Not allowed reduction identifier is found.\n if (S.LangOpts.OpenMP > 52)\n S.Diag(ReductionId.getBeginLoc(), diag::err_omp_unknown_reduction_identifier_since_omp_6_0) << Type << ReductionIdRange;"}}, [l]={ ["clang/test/OpenMP/taskgroup_task_reduction_messages.cpp"]={"clang/test/OpenMP/taskgroup_task_reduction_messages.cpp:213:38: error: incorrect reduction identifier, expected one of \'+\', \'*\', \'&\', \'|\', \'^\', \'&&\', \'||\', \'min\' or \'max\' or declare reduction for type \'int\'","clang/test/OpenMP/taskgroup_task_reduction_messages.cpp:266:27: error: incorrect reduction identifier, expected one of \'+\', \'*\', \'&\', \'|\', \'^\', \'&&\', \'||\', \'min\' or \'max\' or declare reduction for type \'float\'","clang/test/OpenMP/taskgroup_task_reduction_messages.cpp:126:38: error: incorrect reduction identifier, expected one of \'+\', \'*\', \'&\', \'|\', \'^\', \'&&\', \'||\', \'min\' or \'max\' or declare reduction for type \'int\'","clang/test/OpenMP/taskgroup_task_reduction_messages.cpp:171:27: error: incorrect reduction identifier, expected one of \'+\', \'*\', \'&\', \'|\', \'^\', \'&&\', \'||\', \'min\' or \'max\' or declare reduction for type \'int\'","clang/test/OpenMP/taskgroup_task_reduction_messages.cpp:126:38: error: incorrect reduction identifier, expected one of \'+\', \'*\', \'&\', \'|\', \'^\', \'&&\', \'||\', \'min\' or \'max\' or declare reduction for type \'float\'","clang/test/OpenMP/taskgroup_task_reduction_messages.cpp:171:27: error: incorrect reduction identifier, expected one of \'+\', \'*\', \'&\', \'|\', \'^\', \'&&\', \'||\', \'min\' or \'max\' or declare reduction for type \'float\'"} } }, ["err_omp_unnamed_if_clause"]={ [d]="err_omp_unnamed_if_clause", [e]={{nil,w,"expected%select{| one of}0 %1 directive name modifier%select{|s}0"},{v,nil,"expected %select{|one of}0 %1 directive name modifier%select{|s}0"}}, [i]={{nil,w,{"expected",{a," one of"}," B directive name modifier",{a,"s"}}},{v,nil,{"expected ",{a,"one of"}," B directive name modifier",{a,"s"}}}}, [j]=k, [c]="expected(?:| one of) (.*?) directive name modifier(?:|s)", [h]=a, [g]=o, [f]={"6b8046addfce",1441265028,"[OPENMP 4.1] Parsing/sema analysis for extended format of \'if\' clause.","[OPENMP 4.1] Parsing/sema analysis for extended format of \'if\' clause.\nOpenMP 4.1 added special \'directive-name-modifier\' to the \'if\' clause.\nFormat of \'if\' clause is as follows:\n```\nif([ directive-name-modifier :] scalar-logical-expression)\n```\n\nThe restriction rules are also changed.\n1. If any \'if\' clause on the directive includes a \'directive-name-modifier\' then all \'if\' clauses on the directive must include a \'directive-name-modifier\'.\n2. At most one \'if\' clause without a \'directive-name-modifier\' can appear on the directive.\n3. At most one \'if\' clause with some particular \'directive-name-modifier\' can appear on the directive.\n\n\'directive-name-modifier\' is important for combined directives and allows to separate conditions in \'if\' clause for simple sub-directives in combined directive. This \'directive-name-modifier\' identifies the sub-directive to which this \'if\' clause must be applied.\n\nllvm-svn: 246747"}, [b]={{n,5316,"static bool checkIfClauses(Sema &S, OpenMPDirectiveKind Kind, ArrayRef<OMPClause *> Clauses, ArrayRef<OpenMPDirectiveKind> AllowedNameModifiers) {\n // ...\n // If any if clause on the directive includes a directive-name-modifier then\n // all if clauses on the directive must include a directive-name-modifier.\n if (FoundNameModifiers[OMPD_unknown] && NamedModifiersNumber > 0) {\n if (NamedModifiersNumber == AllowedNameModifiers.size()) {\n // ...\n } else {\n // ...\n S.Diag(FoundNameModifiers[OMPD_unknown]->getCondition()->getBeginLoc(), diag::err_omp_unnamed_if_clause) << (TotalAllowedNum > 1) << Values;"}}, [l]={ ["clang/test/OpenMP/target_parallel_if_messages.cpp"]={"clang/test/OpenMP/target_parallel_if_messages.cpp:65:53: error: expected \'parallel\' directive name modifier","clang/test/OpenMP/target_parallel_if_messages.cpp:111:53: error: expected \'parallel\' directive name modifier"} } }, ["err_omp_unroll_full_variable_trip_count"]={ [d]={{nil,C,"err_omp_unroll_full_variable_trip_count"}}, [e]={{nil,C,"loop to be fully unrolled must have a constant trip count"}}, [i]={{nil,C,"loop to be fully unrolled must have a constant trip count"}}, [j]=k, [c]="loop to be fully unrolled must have a constant trip count", [h]=a, [g]={{nil,C,o}}, [f]={"3dbcea8b957a",1615397021,"Reland [clang] Check unsupported types in expressions","Reland [clang] Check unsupported types in expressions\n\nThis was committed as ec6c847179fd, but then reverted after a failure\nin: https://lab.llvm.org/buildbot/#/builders/84/builds/13983\n\nI was not able to reproduce the problem, but I added an extra check\nfor a NULL QualType just in case.\n\nOriginal comit message:\n\nThe patch adds missing diagnostics for cases like:\n\n float F3 = ((__float128)F1 * (__float128)F2) / 2.0f;\n\nSema::checkDeviceDecl (renamed to checkTypeSupport) is changed to work\nwith a type without the corresponding ValueDecl. It is also refactored\nso that host diagnostics for unsupported types can be added here as\nwell.\n\nDifferential Revision: https://reviews.llvm.org/D109315"}, [b]={{n,14993,"StmtResult Sema::ActOnOpenMPUnrollDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n if (FullClause) {\n if (!VerifyPositiveIntegerConstantInClause(LoopHelper.NumIterations, OMPC_full, /*StrictlyPositive=*/false,\n // ...\n Diag(AStmt->getBeginLoc(), diag::err_omp_unroll_full_variable_trip_count);"}}, [l]={ ["clang/test/OpenMP/unroll_messages.cpp"]={"clang/test/OpenMP/unroll_messages.cpp:84:3: error: loop to be fully unrolled must have a constant trip count","clang/test/OpenMP/unroll_messages.cpp:124:3: error: loop to be fully unrolled must have a constant trip count"} } }, ["err_omp_used_in_clause_twice"]={ [d]={{nil,w,"err_omp_used_in_clause_twice"}}, [e]={{nil,w,"%select{a variable|a parameter|\'this\'}0 cannot appear in more than one %1 clause"}}, [i]={{nil,w,{{"a variable","a parameter","\'this\'"}," cannot appear in more than one B clause"}}}, [j]=k, [c]="(?:a variable|a parameter|\'this\') cannot appear in more than one (.*?) clause", [h]=a, [g]={{nil,w,o}}, [f]={"fe17b30a7957",1575504770,"[attributes][analyzer] Add annotations for handles.","[attributes][analyzer] Add annotations for handles.\n\nThese annotations will be used in an upcomming static analyzer check\nthat finds handle leaks, use after releases, and double releases.\n\nDifferential Revision: https://reviews.llvm.org/D70469"}, [b]={{n,6905,"Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds, ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears, ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR) {\n // ...\n for (const Expr *E : Aligneds) {\n // ...\n if (const auto *DRE = dyn_cast<DeclRefExpr>(E))\n if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {\n // ...\n if (FD->getNumParams() > PVD->getFunctionScopeIndex() && FD->getParamDecl(PVD->getFunctionScopeIndex())->getCanonicalDecl() == CanonPVD) {\n // OpenMP [2.8.1, simd construct, Restrictions]\n // A list-item cannot appear in more than one aligned clause.\n if (AlignedArgs.count(CanonPVD) > 0) {\n Diag(E->getExprLoc(), diag::err_omp_used_in_clause_twice) << 1 << getOpenMPClauseName(OMPC_aligned) << E->getSourceRange();"},{n,6929,"Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds, ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears, ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR) {\n // ...\n for (const Expr *E : Aligneds) {\n // ...\n if (isa<CXXThisExpr>(E)) {\n if (AlignedThis) {\n Diag(E->getExprLoc(), diag::err_omp_used_in_clause_twice) << 2 << getOpenMPClauseName(OMPC_aligned) << E->getSourceRange();"},{n,20297,"OMPClause *Sema::ActOnOpenMPAlignedClause(ArrayRef<Expr *> VarList, Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.8.1, simd construct, Restrictions]\n // A list-item cannot appear in more than one aligned clause.\n if (const Expr *PrevRef = DSAStack->addUniqueAligned(D, SimpleRefExpr)) {\n Diag(ELoc, diag::err_omp_used_in_clause_twice) << 0 << getOpenMPClauseName(OMPC_aligned) << ERange;"},{n,23730,"OMPClause *Sema::ActOnOpenMPNontemporalClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP 5.0, 2.9.3.1 simd Construct, Restrictions.\n // A list-item cannot appear in more than one nontemporal clause.\n if (const Expr *PrevRef = DSAStack->addUniqueNontemporal(D, SimpleRefExpr)) {\n Diag(ELoc, diag::err_omp_used_in_clause_twice) << 0 << getOpenMPClauseName(OMPC_nontemporal) << ERange;"}}, [l]={ [Ab]={"clang/test/OpenMP/declare_simd_messages.cpp:151:45: error: a parameter cannot appear in more than one aligned clause","clang/test/OpenMP/declare_simd_messages.cpp:148:45: error: a parameter cannot appear in more than one aligned clause","clang/test/OpenMP/declare_simd_messages.cpp:223:68: error: \'this\' cannot appear in more than one aligned clause"} } }, ["err_omp_usedeviceptr_not_a_pointer"]={ [d]="err_omp_usedeviceptr_not_a_pointer", [e]="expected pointer or reference to pointer in \'use_device_ptr\' clause", [i]="expected pointer or reference to pointer in \'use_device_ptr\' clause", [j]=k, [c]="expected pointer or reference to pointer in \'use_device_ptr\' clause", [h]=a, [g]=o, [f]={"2404b1719241",1468424236,"[OpenMP] Initial implementation of parse+sema for clause use_device_ptr of \'target data\'","[OpenMP] Initial implementation of parse+sema for clause use_device_ptr of \'target data\'\n\nhttp://reviews.llvm.org/D21904\n\nThis patch is similar to the implementation of \'private\' clause: it adds a list of private pointers to be used within the target data region to store the device pointers returned by the runtime.\nPlease refer to the following document for a full description of what the runtime witll return in this case (page 10 and 11):\nhttps://github.com/clang-omp/OffloadingDesign\n\nI am happy to answer any question related to the runtime interface to help reviewing this patch.\n\nllvm-svn: 275271"}, [b]={{n,23368,"OMPClause *Sema::ActOnOpenMPUseDevicePtrClause(ArrayRef<Expr *> VarList, const OMPVarListLocTy &Locs) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // Item should be a pointer or reference to pointer.\n if (!Type->isPointerType()) {\n Diag(ELoc, diag::err_omp_usedeviceptr_not_a_pointer) << 0 << RefExpr->getSourceRange();"}}, [l]={ ["clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp"]={"clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:28:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:30:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:32:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:38:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:40:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:42:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:44:49: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:44:51: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:46:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:48:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:186:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:188:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:247:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:249:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:251:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:257:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:259:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:261:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:263:49: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:263:51: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:265:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:267:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:174:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:176:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:178:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:184:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:190:49: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:190:51: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:192:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause","clang/test/OpenMP/target_data_use_device_ptr_addr_messages.cpp:194:47: error: expected pointer or reference to pointer in \'use_device_ptr\' clause"} } }, ["err_omp_var_expected"]={ [d]={{nil,p,"err_omp_var_expected"}}, [e]={{nil,p,"expected variable of the \'%0\' type%select{|, not %2}1"}}, [i]={{nil,p,{"expected variable of the \'A\' type",{a,", not C"}}}}, [j]=k, [c]="expected variable of the \'(.*?)\' type(?:|, not (.*?))", [h]=a, [g]={{nil,p,o}}, [f]={W,1576908663,X,Y}, [b]={{n,22798,"OMPClause *Sema::ActOnOpenMPDetachClause(Expr *Evt, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n if (!Evt->isValueDependent() && !Evt->isTypeDependent() && !Evt->isInstantiationDependent() && !Evt->containsUnexpandedParameterPack()) {\n // ...\n if (!Ref) {\n Diag(Evt->getExprLoc(), diag::err_omp_var_expected) << \"omp_event_handle_t\" << 0 << Evt->getSourceRange();"},{n,22804,"OMPClause *Sema::ActOnOpenMPDetachClause(Expr *Evt, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n if (!Evt->isValueDependent() && !Evt->isTypeDependent() && !Evt->isInstantiationDependent() && !Evt->containsUnexpandedParameterPack()) {\n // ...\n if (!VD) {\n Diag(Evt->getExprLoc(), diag::err_omp_var_expected) << \"omp_event_handle_t\" << 0 << Evt->getSourceRange();"},{n,22811,"OMPClause *Sema::ActOnOpenMPDetachClause(Expr *Evt, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n if (!Evt->isValueDependent() && !Evt->isTypeDependent() && !Evt->isInstantiationDependent() && !Evt->containsUnexpandedParameterPack()) {\n // ...\n if (!Context.hasSameUnqualifiedType(DSAStack->getOMPEventHandleT(), VD->getType()) || VD->getType().isConstant(Context)) {\n Diag(Evt->getExprLoc(), diag::err_omp_var_expected) << \"omp_event_handle_t\" << 1 << VD->getType() << Evt->getSourceRange();"},{n,23901,"OMPClause *Sema::ActOnOpenMPUsesAllocatorClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef<UsesAllocatorsData> Data) {\n // ...\n for (const UsesAllocatorsData &D : Data) {\n // ...\n // Check allocator expression.\n if (D.Allocator->isTypeDependent()) {\n // ...\n } else {\n // ...\n if (!DRE || !IsTypeCompatible || (!IsPredefinedAllocator && !IsNonConstantLValue)) {\n Diag(D.Allocator->getExprLoc(), diag::err_omp_var_expected) << \"omp_allocator_handle_t\" << (DRE ? 1 : 0) << AllocatorExpr->getType() << D.Allocator->getSourceRange();"}}, [l]={ ["clang/test/OpenMP/target_uses_allocators_messages.cpp"]={"clang/test/OpenMP/target_uses_allocators_messages.cpp:31:36: error: expected variable of the \'omp_allocator_handle_t\' type, not \'int\'","clang/test/OpenMP/target_uses_allocators_messages.cpp:33:36: error: expected variable of the \'omp_allocator_handle_t\' type, not \'int\'","clang/test/OpenMP/target_uses_allocators_messages.cpp:39:46: error: expected variable of the \'omp_allocator_handle_t\' type, not \'const omp_allocator_handle_t\' (aka \'void **const\')"} } }, ["err_omp_var_scope"]={ [d]="err_omp_var_scope", [e]="\'#pragma omp %0\' must appear in the scope of the %q1 variable declaration", [i]="\'#pragma omp A\' must appear in the scope of the B variable declaration", [j]=k, [c]="\'\\#pragma omp (.*?)\' must appear in the scope of the (.*?) variable declaration", [h]=a, [g]=o, [f]={nb,1363934075,ob,pb}, [b]={{n,3085,"ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind) {\n // ...\n // OpenMP [2.9.2, Restrictions, C/C++, p.2]\n // A threadprivate directive for file-scope variables must appear outside\n // any definition or declaration.\n if (CanonicalVD->getDeclContext()->isTranslationUnit() && !getCurLexicalContext()->isTranslationUnit()) {\n Diag(Id.getLoc(), diag::err_omp_var_scope) << getOpenMPDirectiveName(Kind) << VD;"},{n,3100,"ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind) {\n // ...\n // OpenMP [2.9.2, Restrictions, C/C++, p.3]\n // A threadprivate directive for static class member variables must appear\n // in the class definition, in the same scope in which the member\n // variables are declared.\n if (CanonicalVD->isStaticDataMember() && !CanonicalVD->getDeclContext()->Equals(getCurLexicalContext())) {\n Diag(Id.getLoc(), diag::err_omp_var_scope) << getOpenMPDirectiveName(Kind) << VD;"},{n,3116,"ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind) {\n // ...\n // OpenMP [2.9.2, Restrictions, C/C++, p.4]\n // A threadprivate directive for namespace-scope variables must appear\n // outside any definition or declaration other than the namespace\n // definition itself.\n if (CanonicalVD->getDeclContext()->isNamespace() && (!getCurLexicalContext()->isFileContext() || !getCurLexicalContext()->Encloses(CanonicalVD->getDeclContext()))) {\n Diag(Id.getLoc(), diag::err_omp_var_scope) << getOpenMPDirectiveName(Kind) << VD;"},{n,3130,"ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind) {\n // ...\n // OpenMP [2.9.2, Restrictions, C/C++, p.6]\n // A threadprivate directive for static block-scope variables must appear\n // in the scope of the variable and not in a nested scope.\n if (CanonicalVD->isLocalVarDecl() && CurScope && !isDeclInScope(ND, getCurLexicalContext(), CurScope)) {\n Diag(Id.getLoc(), diag::err_omp_var_scope) << getOpenMPDirectiveName(Kind) << VD;"}}, [l]={ [Cb]={"clang/test/OpenMP/threadprivate_messages.cpp:71:39: error: \'#pragma omp threadprivate\' must appear in the scope of the \'TestClass::b\' variable declaration","clang/test/OpenMP/threadprivate_messages.cpp:137:27: error: \'#pragma omp threadprivate\' must appear in the scope of the \'d3\' variable declaration","clang/test/OpenMP/threadprivate_messages.cpp:143:27: error: \'#pragma omp threadprivate\' must appear in the scope of the \'a\' variable declaration","clang/test/OpenMP/threadprivate_messages.cpp:145:27: error: \'#pragma omp threadprivate\' must appear in the scope of the \'d\' variable declaration"} } }, ["err_omp_var_thread_local"]={ [d]="err_omp_var_thread_local", [e]="variable %0 cannot be threadprivate because it is %select{thread-local|a global named register variable}1", [i]={{nil,nil,{"variable A cannot be threadprivate because it is ",{"thread-local","a global named register variable"}}}}, [j]=k, [c]="variable (.*?) cannot be threadprivate because it is (?:thread\\-local|a global named register variable)", [h]=a, [g]=o, [f]={nb,1363934075,ob,pb}, [b]={{n,3244,"OMPThreadPrivateDecl *Sema::CheckOMPThreadPrivateDecl(SourceLocation Loc, ArrayRef<Expr *> VarList) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // Check if this is a TLS variable. If TLS is not being supported, produce\n // the corresponding diagnostic.\n if ((VD->getTLSKind() != VarDecl::TLS_None && !(VD->hasAttr<OMPThreadPrivateDeclAttr>() && getLangOpts().OpenMPUseTLS && getASTContext().getTargetInfo().isTLSSupported())) || (VD->getStorageClass() == SC_Register && VD->hasAttr<AsmLabelAttr>() && !VD->isLocalVarDecl())) {\n Diag(ILoc, diag::err_omp_var_thread_local) << VD << ((VD->getTLSKind() != VarDecl::TLS_None) ? 0 : 1);"}}, [l]={ [Cb]={"clang/test/OpenMP/threadprivate_messages.cpp:100:28: error: variable \'t\' cannot be threadprivate because it is thread-local","clang/test/OpenMP/threadprivate_messages.cpp:106:28: error: variable \'reg0\' cannot be threadprivate because it is a global named register variable"} } }, ["err_omp_var_used"]={ [d]="err_omp_var_used", [e]="\'#pragma omp %0\' must precede all references to variable %q1", [i]="\'#pragma omp A\' must precede all references to variable B", [j]=k, [c]="\'\\#pragma omp (.*?)\' must precede all references to variable (.*?)", [h]=a, [g]=o, [f]={nb,1363934075,ob,pb}, [b]={{n,3145,"ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind) {\n // ...\n // OpenMP [2.9.2, Restrictions, C/C++, p.2-6]\n // A threadprivate directive must lexically precede all references to any\n // of the variables in its list.\n if (Kind == OMPD_threadprivate && VD->isUsed() && !DSAStack->isThreadPrivate(VD)) {\n Diag(Id.getLoc(), diag::err_omp_var_used) << getOpenMPDirectiveName(Kind) << VD;"}}, [l]={ [Cb]={"clang/test/OpenMP/threadprivate_messages.cpp:133:27: error: \'#pragma omp threadprivate\' must precede all references to variable \'d2\'"} } }, ["err_omp_variable_in_given_clause_and_dsa"]={ [d]="err_omp_variable_in_given_clause_and_dsa", [e]="%0 variable cannot be in a %1 clause in \'#pragma omp %2\' directive", [i]="A variable cannot be in a B clause in \'#pragma omp C\' directive", [j]=k, [c]="(.*?) variable cannot be in a (.*?) clause in \'\\#pragma omp (.*?)\' directive", [h]=a, [g]=o, [f]={"6890b0963489",1469715909,"[OpenMP] Code generation for the is_device_ptr clause","[OpenMP] Code generation for the is_device_ptr clause\n\nSummary: This patch adds support for the is_device_ptr clause. It expands SEMA to use the mappable expression logic that can only be tested with code generation in place and check conflicts with other data sharing related clauses using the mappable expressions infrastructure.\n\nReviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev\n\nSubscribers: caomhin, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D22788\n\nllvm-svn: 276978"}, [b]={{n,18140,"OMPClause *Sema::ActOnOpenMPPrivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP 4.5 [2.15.5.1, Restrictions, p.3]\n // A list item cannot appear in both a map clause and a data-sharing\n // attribute clause on the same construct\n //\n // OpenMP 5.0 [2.19.7.1, Restrictions, p.7]\n // A list item cannot appear in both a map clause and a data-sharing\n // attribute clause on the same construct unless the construct is a\n // combined construct.\n if ((LangOpts.OpenMP <= 45 && isOpenMPTargetExecutionDirective(CurrDir)) || CurrDir == OMPD_target) {\n // ...\n if (DSAStack->checkMappableExprComponentListsForDecl(VD, /*CurrentRegionOnly=*/true, [&](OMPClauseMappableExprCommon::MappableExprComponentListRef, OpenMPClauseKind WhereFoundClauseKind) -> bool {\n // ...\n Diag(ELoc, diag::err_omp_variable_in_given_clause_and_dsa) << getOpenMPClauseName(OMPC_private) << getOpenMPClauseName(ConflictKind) << getOpenMPDirectiveName(CurrDir);"},{n,18371,"OMPClause *Sema::ActOnOpenMPFirstprivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (!IsImplicitClause) {\n // ...\n // OpenMP 4.5 [2.15.5.1, Restrictions, p.3]\n // A list item cannot appear in both a map clause and a data-sharing\n // attribute clause on the same construct\n //\n // OpenMP 5.0 [2.19.7.1, Restrictions, p.7]\n // A list item cannot appear in both a map clause and a data-sharing\n // attribute clause on the same construct unless the construct is a\n // combined construct.\n if ((LangOpts.OpenMP <= 45 && isOpenMPTargetExecutionDirective(CurrDir)) || CurrDir == OMPD_target) {\n // ...\n if (DSAStack->checkMappableExprComponentListsForDecl(VD, /*CurrentRegionOnly=*/true, [&ConflictKind](OMPClauseMappableExprCommon::MappableExprComponentListRef, OpenMPClauseKind WhereFoundClauseKind) {\n // ...\n Diag(ELoc, diag::err_omp_variable_in_given_clause_and_dsa) << getOpenMPClauseName(OMPC_firstprivate) << getOpenMPClauseName(ConflictKind) << getOpenMPDirectiveName(DSAStack->getCurrentDirective());"},{n,22113,"// Check the validity of the provided variable list for the provided clause kind\n// \\a CKind. In the check process the valid expressions, mappable expression\n// components, variables, and user-defined mappers are extracted and used to\n// fill \\a ProcessedVarList, \\a VarComponents, \\a VarBaseDeclarations, and \\a\n// UDMapperList in MVLI. \\a MapType, \\a IsMapTypeImplicit, \\a MapperIdScopeSpec,\n// and \\a MapperId are expected to be valid if the clause kind is \'map\'.\nstatic void checkMappableExpressionList(Sema &SemaRef, DSAStackTy *DSAS, OpenMPClauseKind CKind, MappableVarListInfo &MVLI, SourceLocation StartLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo MapperId, ArrayRef<Expr *> UnresolvedMappers, OpenMPMapClauseKind MapType = OMPC_MAP_unknown, ArrayRef<OpenMPMapModifierKind> Modifiers = std::nullopt, bool IsMapTypeImplicit = false, bool NoDiagnose = false) {\n // ...\n for (Expr *RE : MVLI.VarList) {\n // ...\n if (CKind == OMPC_map) {\n // ...\n // OpenMP 4.5 [2.15.5.1, Restrictions, p.3]\n // A list item cannot appear in both a map clause and a data-sharing\n // attribute clause on the same construct\n //\n // OpenMP 5.0 [2.19.7.1, Restrictions, p.7]\n // A list item cannot appear in both a map clause and a data-sharing\n // attribute clause on the same construct unless the construct is a\n // combined construct.\n if (VD && ((SemaRef.LangOpts.OpenMP <= 45 && isOpenMPTargetExecutionDirective(DKind)) || DKind == OMPD_target)) {\n // ...\n if (isOpenMPPrivate(DVar.CKind)) {\n SemaRef.Diag(ELoc, diag::err_omp_variable_in_given_clause_and_dsa) << getOpenMPClauseName(DVar.CKind) << getOpenMPClauseName(OMPC_map) << getOpenMPDirectiveName(DSAS->getCurrentDirective());"},{n,23506,"OMPClause *Sema::ActOnOpenMPIsDevicePtrClause(ArrayRef<Expr *> VarList, const OMPVarListLocTy &Locs) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (isOpenMPPrivate(DVar.CKind)) {\n Diag(ELoc, diag::err_omp_variable_in_given_clause_and_dsa) << getOpenMPClauseName(DVar.CKind) << getOpenMPClauseName(OMPC_is_device_ptr) << getOpenMPDirectiveName(DSAStack->getCurrentDirective());"},{n,23581,"OMPClause *Sema::ActOnOpenMPHasDeviceAddrClause(ArrayRef<Expr *> VarList, const OMPVarListLocTy &Locs) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (isOpenMPPrivate(DVar.CKind)) {\n Diag(ELoc, diag::err_omp_variable_in_given_clause_and_dsa) << getOpenMPClauseName(DVar.CKind) << getOpenMPClauseName(OMPC_has_device_addr) << getOpenMPDirectiveName(DSAStack->getCurrentDirective());"}}, [l]={ ["clang/test/OpenMP/target_private_messages.cpp"]={"clang/test/OpenMP/target_private_messages.cpp:206:35: error: private variable cannot be in a map clause in \'#pragma omp target\' directive"} } }, ["err_omp_variably_modified_type_not_supported"]={ [d]="err_omp_variably_modified_type_not_supported", [e]="arguments of OpenMP clause \'%0\' in \'#pragma omp %2\' directive cannot be of variably-modified type %1", [i]="arguments of OpenMP clause \'A\' in \'#pragma omp C\' directive cannot be of variably-modified type B", [j]=k, [c]="arguments of OpenMP clause \'(.*?)\' in \'\\#pragma omp (.*?)\' directive cannot be of variably\\-modified type (.*?)", [h]=a, [g]=o, [f]={"7a3e5853dfe4",1432023564,"[OPENMP] Prohibit variably modified types in \'copyprivate\' clause.","[OPENMP] Prohibit variably modified types in \'copyprivate\' clause.\nRuntime does not allow to work with VLAs in copyprivate clause.\n\nllvm-svn: 237672"}, [b]={{n,18111,"OMPClause *Sema::ActOnOpenMPPrivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // Variably modified types are not supported for tasks.\n if (!Type->isAnyPointerType() && Type->isVariablyModifiedType() && isOpenMPTaskingDirective(CurrDir)) {\n Diag(ELoc, diag::err_omp_variably_modified_type_not_supported) << getOpenMPClauseName(OMPC_private) << Type << getOpenMPDirectiveName(CurrDir);"},{n,18384,"OMPClause *Sema::ActOnOpenMPFirstprivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // Variably modified types are not supported for tasks.\n if (!Type->isAnyPointerType() && Type->isVariablyModifiedType() && isOpenMPTaskingDirective(DSAStack->getCurrentDirective())) {\n Diag(ELoc, diag::err_omp_variably_modified_type_not_supported) << getOpenMPClauseName(OMPC_firstprivate) << Type << getOpenMPDirectiveName(DSAStack->getCurrentDirective());"},{n,20485,"OMPClause *Sema::ActOnOpenMPCopyprivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // Variably modified types are not supported.\n if (!Type->isAnyPointerType() && Type->isVariablyModifiedType()) {\n Diag(ELoc, diag::err_omp_variably_modified_type_not_supported) << getOpenMPClauseName(OMPC_copyprivate) << Type << getOpenMPDirectiveName(DSAStack->getCurrentDirective());"}} }, ["err_omp_variant_ctx_second_match_extension"]={ [d]={{nil,p,"err_omp_variant_ctx_second_match_extension"}}, [e]={{nil,p,"only a single match extension allowed per OpenMP context selector"}}, [i]={{nil,p,"only a single match extension allowed per OpenMP context selector"}}, [j]=k, [c]="only a single match extension allowed per OpenMP context selector", [h]=a, [g]={{nil,p,K}}, [f]={"a19eb1de726c",1585931393,"[OpenMP] Add match_{all,any,none} declare variant selector extensions.","[OpenMP] Add match_{all,any,none} declare variant selector extensions.\n\nBy default, all traits in the OpenMP context selector have to match for\nit to be acceptable. Though, we sometimes want a single property out of\nmultiple to match (=any) or no match at all (=none). We offer these\nchoices as extensions via\n `implementation={extension(match_{all,any,none})}`\nto the user. The choice will affect the entire context selector not only\nthe traits following the match property.\n\nThe first user will be D75788. There we can replace\n```\n #pragma omp begin declare variant match(device={arch(nvptx64)})\n #define __CUDA__\n\n #include <__clang_cuda_cmath.h>\n\n // TODO: Hack until we support an extension to the match clause that allows \"or\".\n #undef __CLANG_CUDA_CMATH_H__\n\n #undef __CUDA__\n #pragma omp end declare variant\n\n #pragma omp begin declare variant match(device={arch(nvptx)})\n #define __CUDA__\n\n #include <__clang_cuda_cmath.h>\n\n #undef __CUDA__\n #pragma omp end declare variant\n```\nwith the much simpler\n```\n #pragma omp begin declare variant match(device={arch(nvptx, nvptx64)}, implementation={extension(match_any)})\n #define __CUDA__\n\n #include <__clang_cuda_cmath.h>\n\n #undef __CUDA__\n #pragma omp end declare variant\n```\n\nReviewed By: mikerice\n\nDifferential Revision: https://reviews.llvm.org/D77414"}, [b]={{L,981,"static bool checkExtensionProperty(Parser &P, SourceLocation Loc, OMPTraitProperty &TIProperty, OMPTraitSelector &TISelector, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n if (IsMatchExtension(TIProperty)) {\n for (OMPTraitProperty &SeenProp : TISelector.Properties)\n if (IsMatchExtension(SeenProp)) {\n P.Diag(Loc, diag::err_omp_variant_ctx_second_match_extension);"}}, [l]={ ["clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c"]={"clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:6:87: error: only a single match extension allowed per OpenMP context selector","clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:12:101: error: only a single match extension allowed per OpenMP context selector"} } }, ["err_omp_wrong_cancel_region"]={ [d]="err_omp_wrong_cancel_region", [e]="one of \'for\', \'parallel\', \'sections\' or \'taskgroup\' is expected", [i]="one of \'for\', \'parallel\', \'sections\' or \'taskgroup\' is expected", [j]=k, [c]="one of \'for\', \'parallel\', \'sections\' or \'taskgroup\' is expected", [h]=a, [g]=o, [f]={"6d4ed0583033",1435733861,"[OPENMP 4.0] Initial support for \'omp cancellation point\' construct.","[OPENMP 4.0] Initial support for \'omp cancellation point\' construct.\n\nAdd parsing and sema analysis for \'omp cancellation point\' directive.\n\nllvm-svn: 241145"}, [b]={{n,4959,"static bool checkCancelRegion(Sema &SemaRef, OpenMPDirectiveKind CurrentRegion, OpenMPDirectiveKind CancelRegion, SourceLocation StartLoc) {\n // ...\n SemaRef.Diag(StartLoc, diag::err_omp_wrong_cancel_region) << getOpenMPDirectiveName(CancelRegion);"}}, [l]={ ["clang/test/OpenMP/cancel_messages.cpp"]={"clang/test/OpenMP/cancel_messages.cpp:7:1: error: one of \'for\', \'parallel\', \'sections\' or \'taskgroup\' is expected","clang/test/OpenMP/cancel_messages.cpp:11:1: error: one of \'for\', \'parallel\', \'sections\' or \'taskgroup\' is expected","clang/test/OpenMP/cancel_messages.cpp:14:1: error: one of \'for\', \'parallel\', \'sections\' or \'taskgroup\' is expected","clang/test/OpenMP/cancel_messages.cpp:17:1: error: one of \'for\', \'parallel\', \'sections\' or \'taskgroup\' is expected"} } }, ["err_omp_wrong_dependency_iterator_type"]={ [d]={{nil,v,"err_omp_wrong_dependency_iterator_type"}}, [e]={{nil,v,"expected an integer or a pointer type of the outer loop counter \'%0\' for non-rectangular nests"}}, [i]={{nil,v,"expected an integer or a pointer type of the outer loop counter \'A\' for non-rectangular nests"}}, [j]=k, [c]="expected an integer or a pointer type of the outer loop counter \'(.*?)\' for non\\-rectangular nests", [h]=a, [g]={{nil,v,o}}, [f]={"5ddc6d180cd6",1556306917,"[OPENMP]Added check for non-random access types for the dependent loop","[OPENMP]Added check for non-random access types for the dependent loop\ncounters.\n\nAccording to the OpenMP 5.0, For any associated loop where the b or lb\nexpression is not loop invariant with respect to the outermost loop, the\nvar-outer that appears in the expression may not have a random access\niterator type.\n\nllvm-svn: 359340"}, [b]={{n,8072,"/// Checker for the non-rectangular loops. Checks if the initializer or\n/// condition expression references loop counter variable.\nclass LoopCounterRefChecker final : public ConstStmtVisitor<LoopCounterRefChecker, bool> {\n // ...\n bool checkDecl(const Expr *E, const ValueDecl *VD) {\n // ...\n // OpenMP, 2.9.1 Canonical Loop Form, Restrictions.\n // The type of the loop iterator on which we depend may not have a random\n // access iterator type.\n if (Data.first && VD->getType()->isRecordType()) {\n // ...\n SemaRef.Diag(E->getExprLoc(), diag::err_omp_wrong_dependency_iterator_type) << OS.str();"}}, [l]={ ["clang/test/OpenMP/for_loop_messages.cpp"]={"clang/test/OpenMP/for_loop_messages.cpp:617:19: error: expected an integer or a pointer type of the outer loop counter \'I\' for non-rectangular nests","clang/test/OpenMP/for_loop_messages.cpp:618:39: error: expected an integer or a pointer type of the outer loop counter \'I\' for non-rectangular nests"} } }, ["err_omp_wrong_device_function_call"]={ [d]={{nil,w,"err_omp_wrong_device_function_call"}}, [e]={{nil,w,"function with \'device_type(%0)\' is not available on %select{device|host}1"}}, [i]={{nil,w,{"function with \'device_type(A)\' is not available on ",{"device","host"}}}}, [j]=k, [c]="function with \'device_type\\((.*?)\\)\' is not available on (?:device|host)", [h]=a, [g]={{nil,w,o}}, [f]={"729e242a7972",1566576674,"[OPENMP5.0]Add support for device_type clause in declare target","[OPENMP5.0]Add support for device_type clause in declare target\nconstruct.\n\nOpenMP 5.0 introduced new clause for declare target directive, device_type clause, which may accept values host, nohost, and any. Host means\nthat the function must be emitted only for the host, nohost - only for\nthe device, and any - for both, device and the host.\n\nllvm-svn: 369775"}, [b]={{n,2720,"void Sema::finalizeOpenMPDelayedAnalysis(const FunctionDecl *Caller, const FunctionDecl *Callee, SourceLocation Loc) {\n // ...\n if (LangOpts.OpenMPIsTargetDevice && DevTy && *DevTy == OMPDeclareTargetDeclAttr::DT_Host) {\n // ...\n Diag(Loc, diag::err_omp_wrong_device_function_call) << HostDevTy << 0;"},{n,2749,"void Sema::finalizeOpenMPDelayedAnalysis(const FunctionDecl *Caller, const FunctionDecl *Callee, SourceLocation Loc) {\n // ...\n if (!LangOpts.OpenMPIsTargetDevice && !LangOpts.OpenMPOffloadMandatory && DevTy && *DevTy == OMPDeclareTargetDeclAttr::DT_NoHost) {\n // ...\n Diag(Loc, diag::err_omp_wrong_device_function_call) << NoHostDevTy << 1;"}}, [l]={ ["clang/test/OpenMP/declare_target_nohost_variant_messages.cpp"]={"clang/test/OpenMP/declare_target_nohost_variant_messages.cpp:21:39: error: function with \'device_type(nohost)\' is not available on host","clang/test/OpenMP/declare_target_nohost_variant_messages.cpp:16:29: error: function with \'device_type(nohost)\' is not available on host"} } }, ["err_omp_wrong_dsa"]={ [d]="err_omp_wrong_dsa", [e]="%0 variable cannot be %1", [i]="A variable cannot be B", [j]=k, [c]="(.*?) variable cannot be (.*?)", [h]=a, [g]=o, [f]={"d4183dabd7a9",1378212952,"OpenMP: Data-sharing attributes analysis and clause \'shared\'","OpenMP: Data-sharing attributes analysis and clause \'shared\'\n\nllvm-svn: 189795"}, [b]={{n,6976,"Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds, ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears, ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR) {\n // ...\n for (const Expr *E : Linears) {\n // ...\n if (const auto *DRE = dyn_cast<DeclRefExpr>(E))\n if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {\n // ...\n if (FD->getNumParams() > PVD->getFunctionScopeIndex() && FD->getParamDecl(PVD->getFunctionScopeIndex())->getCanonicalDecl() == CanonPVD) {\n // OpenMP [2.15.3.7, linear Clause, Restrictions]\n // A list-item cannot appear in more than one linear clause.\n if (LinearArgs.count(CanonPVD) > 0) {\n Diag(E->getExprLoc(), diag::err_omp_wrong_dsa) << getOpenMPClauseName(OMPC_linear) << getOpenMPClauseName(OMPC_linear) << E->getSourceRange();"},{n,6986,"Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds, ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears, ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR) {\n // ...\n for (const Expr *E : Linears) {\n // ...\n if (const auto *DRE = dyn_cast<DeclRefExpr>(E))\n if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {\n // ...\n if (FD->getNumParams() > PVD->getFunctionScopeIndex() && FD->getParamDecl(PVD->getFunctionScopeIndex())->getCanonicalDecl() == CanonPVD) {\n // ...\n // Each argument can appear in at most one uniform or linear clause.\n if (UniformedArgs.count(CanonPVD) > 0) {\n Diag(E->getExprLoc(), diag::err_omp_wrong_dsa) << getOpenMPClauseName(OMPC_linear) << getOpenMPClauseName(OMPC_uniform) << E->getSourceRange();"},{n,7007,"Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds, ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears, ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR) {\n // ...\n for (const Expr *E : Linears) {\n // ...\n if (isa<CXXThisExpr>(E)) {\n if (UniformedLinearThis) {\n Diag(E->getExprLoc(), diag::err_omp_wrong_dsa) << getOpenMPClauseName(OMPC_linear) << getOpenMPClauseName(IsUniformedThis ? OMPC_uniform : OMPC_linear) << E->getSourceRange();"},{n,18101,"OMPClause *Sema::ActOnOpenMPPrivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_private) {\n Diag(ELoc, diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind) << getOpenMPClauseName(OMPC_private);"},{n,18259,"OMPClause *Sema::ActOnOpenMPFirstprivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (!IsImplicitClause) {\n // ...\n // OpenMP [2.4.13, Data-sharing Attribute Clauses]\n // A list item that specifies a given variable may not appear in more\n // than one clause on the same directive, except that a variable may be\n // specified in both firstprivate and lastprivate clauses.\n // OpenMP 4.5 [2.10.8, Distribute Construct, p.3]\n // A list item may appear in a firstprivate or lastprivate clause but not\n // both.\n if (DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_firstprivate && (isOpenMPDistributeDirective(CurrDir) || DVar.CKind != OMPC_lastprivate) && DVar.RefExpr) {\n Diag(ELoc, diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind) << getOpenMPClauseName(OMPC_firstprivate);"},{n,18279,"OMPClause *Sema::ActOnOpenMPFirstprivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (!IsImplicitClause) {\n // ...\n // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced\n // in a Construct]\n // Variables with the predetermined data-sharing attributes may not be\n // listed in data-sharing attributes clauses, except for the cases\n // listed below. For these exceptions only, listing a predetermined\n // variable in a data-sharing attribute clause is allowed and overrides\n // the variable\'s predetermined data-sharing attributes.\n // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced\n // in a Construct, C/C++, p.2]\n // Variables with const-qualified type having no mutable member may be\n // listed in a firstprivate clause, even if they are static data members.\n if (!(IsConstant || (VD && VD->isStaticDataMember())) && !DVar.RefExpr && DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_shared) {\n Diag(ELoc, diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind) << getOpenMPClauseName(OMPC_firstprivate);"},{n,18566,"OMPClause *Sema::ActOnOpenMPLastprivateClause(ArrayRef<Expr *> VarList, OpenMPLastprivateModifier LPKind, SourceLocation LPKindLoc, SourceLocation ColonLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_lastprivate && (isOpenMPDistributeDirective(CurrDir) || DVar.CKind != OMPC_firstprivate) && (DVar.CKind != OMPC_private || DVar.RefExpr != nullptr)) {\n Diag(ELoc, diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind) << getOpenMPClauseName(OMPC_lastprivate);"},{n,18695,"OMPClause *Sema::ActOnOpenMPSharedClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_shared && DVar.RefExpr) {\n Diag(ELoc, diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind) << getOpenMPClauseName(OMPC_shared);"},{n,19372,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.9.3.6, Restrictions, C/C++, p.4]\n // If a list-item is a reference type then it must bind to the same object\n // for all threads of the team.\n if (!ASE && !OASE) {\n // ...\n if (DVar.CKind != OMPC_unknown) {\n S.Diag(ELoc, diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind) << getOpenMPClauseName(OMPC_reduction);"},{n,19400,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.9.3.6, Restrictions, C/C++, p.4]\n // If a list-item is a reference type then it must bind to the same object\n // for all threads of the team.\n if (!ASE && !OASE) {\n // ...\n } else {\n // ...\n if (DVar.CKind == OMPC_threadprivate) {\n S.Diag(ELoc, diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind) << getOpenMPClauseName(OMPC_reduction);"},{n,20056,"OMPClause *Sema::ActOnOpenMPLinearClause(ArrayRef<Expr *> VarList, Expr *Step, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind LinKind, SourceLocation LinLoc, SourceLocation ColonLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (DVar.RefExpr) {\n Diag(ELoc, diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind) << getOpenMPClauseName(OMPC_linear);"},{n,20461,"OMPClause *Sema::ActOnOpenMPCopyprivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.14.4.2, Restrictions, p.2]\n // A list item that appears in a copyprivate clause may not appear in a\n // private or firstprivate clause on the single construct.\n if (!VD || !DSAStack->isThreadPrivate(VD)) {\n // ...\n if (DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_copyprivate && DVar.RefExpr) {\n Diag(ELoc, diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind) << getOpenMPClauseName(OMPC_copyprivate);"},{n,22822,"OMPClause *Sema::ActOnOpenMPDetachClause(Expr *Evt, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n if (!Evt->isValueDependent() && !Evt->isTypeDependent() && !Evt->isInstantiationDependent() && !Evt->containsUnexpandedParameterPack()) {\n // ...\n if (DVar.CKind != OMPC_unknown && DVar.CKind != OMPC_firstprivate && DVar.RefExpr) {\n Diag(Evt->getExprLoc(), diag::err_omp_wrong_dsa) << getOpenMPClauseName(DVar.CKind) << getOpenMPClauseName(OMPC_firstprivate);"}}, [l]={ [Ab]={"clang/test/OpenMP/declare_simd_messages.cpp:200:33: error: linear variable cannot be uniform","clang/test/OpenMP/declare_simd_messages.cpp:197:45: error: linear variable cannot be uniform","clang/test/OpenMP/declare_simd_messages.cpp:190:43: error: linear variable cannot be linear","clang/test/OpenMP/declare_simd_messages.cpp:187:43: error: linear variable cannot be linear","clang/test/OpenMP/declare_simd_messages.cpp:223:85: error: linear variable cannot be uniform"} } }, ["err_omp_wrong_if_directive_name_modifier"]={ [d]="err_omp_wrong_if_directive_name_modifier", [e]="directive name modifier \'%0\' is not allowed for \'#pragma omp %1\'", [i]="directive name modifier \'A\' is not allowed for \'#pragma omp B\'", [j]=k, [c]="directive name modifier \'(.*?)\' is not allowed for \'\\#pragma omp (.*?)\'", [h]=a, [g]=o, [f]={"6b8046addfce",1441265028,"[OPENMP 4.1] Parsing/sema analysis for extended format of \'if\' clause.","[OPENMP 4.1] Parsing/sema analysis for extended format of \'if\' clause.\nOpenMP 4.1 added special \'directive-name-modifier\' to the \'if\' clause.\nFormat of \'if\' clause is as follows:\n```\nif([ directive-name-modifier :] scalar-logical-expression)\n```\n\nThe restriction rules are also changed.\n1. If any \'if\' clause on the directive includes a \'directive-name-modifier\' then all \'if\' clauses on the directive must include a \'directive-name-modifier\'.\n2. At most one \'if\' clause without a \'directive-name-modifier\' can appear on the directive.\n3. At most one \'if\' clause with some particular \'directive-name-modifier\' can appear on the directive.\n\n\'directive-name-modifier\' is important for combined directives and allows to separate conditions in \'if\' clause for simple sub-directives in combined directive. This \'directive-name-modifier\' identifies the sub-directive to which this \'if\' clause must be applied.\n\nllvm-svn: 246747"}, [b]={{n,5283,"static bool checkIfClauses(Sema &S, OpenMPDirectiveKind Kind, ArrayRef<OMPClause *> Clauses, ArrayRef<OpenMPDirectiveKind> AllowedNameModifiers) {\n // ...\n for (const OMPClause *C : Clauses) {\n if (const auto *IC = dyn_cast_or_null<OMPIfClause>(C)) {\n // ...\n // Check if the specified name modifier is allowed for the current\n // directive.\n // At most one if clause with the particular directive-name-modifier can\n // appear on the directive.\n if (!llvm::is_contained(AllowedNameModifiers, CurNM)) {\n S.Diag(IC->getNameModifierLoc(), diag::err_omp_wrong_if_directive_name_modifier) << getOpenMPDirectiveName(CurNM) << getOpenMPDirectiveName(Kind);"}}, [l]={ ["clang/test/OpenMP/target_data_if_messages.cpp"]={"clang/test/OpenMP/target_data_if_messages.cpp:36:65: error: directive name modifier \'for\' is not allowed for \'#pragma omp target data\'"} } }, ["err_omp_wrong_inscan_reduction"]={ [d]={{nil,p,"err_omp_wrong_inscan_reduction"}}, [e]={{nil,p,"\'inscan\' modifier can be used only in \'omp for\', \'omp simd\', \'omp for simd\', \'omp parallel for\', or \'omp parallel for simd\' directive"}}, [i]={{nil,p,"\'inscan\' modifier can be used only in \'omp for\', \'omp simd\', \'omp for simd\', \'omp parallel for\', or \'omp parallel for simd\' directive"}}, [j]=k, [c]="\'inscan\' modifier can be used only in \'omp for\', \'omp simd\', \'omp for simd\', \'omp parallel for\', or \'omp parallel for simd\' directive", [h]=a, [g]={{nil,p,o}}, [f]={W,1576908663,X,Y}, [b]={{n,19908,"OMPClause *Sema::ActOnOpenMPReductionClause(ArrayRef<Expr *> VarList, OpenMPReductionClauseModifier Modifier, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions) {\n // ...\n // OpenMP 5.0, 2.19.5.4 reduction Clause, Restrictions\n // A reduction clause with the inscan reduction-modifier may only appear on a\n // worksharing-loop construct, a worksharing-loop SIMD construct, a simd\n // construct, a parallel worksharing-loop construct or a parallel\n // worksharing-loop SIMD construct.\n if (Modifier == OMPC_REDUCTION_inscan && (DSAStack->getCurrentDirective() != OMPD_for && DSAStack->getCurrentDirective() != OMPD_for_simd && DSAStack->getCurrentDirective() != OMPD_simd && DSAStack->getCurrentDirective() != OMPD_parallel_for && DSAStack->getCurrentDirective() != OMPD_parallel_for_simd)) {\n Diag(ModifierLoc, diag::err_omp_wrong_inscan_reduction);"}}, [l]={ ["clang/test/OpenMP/parallel_reduction_messages.c"]={"clang/test/OpenMP/parallel_reduction_messages.c:17:32: error: \'inscan\' modifier can be used only in \'omp for\', \'omp simd\', \'omp for simd\', \'omp parallel for\', or \'omp parallel for simd\' directive"} } }, ["err_omp_wrong_linear_modifier"]={ [d]="err_omp_wrong_linear_modifier", [e]="expected %select{\'val\' modifier|one of \'ref\', val\' or \'uval\' modifiers}0", [i]={{nil,nil,{"expected ",{"\'val\' modifier","one of \'ref\', val\' or \'uval\' modifiers"}}}}, [j]=k, [c]="expected (?:\'val\' modifier|one of \'ref\', val\' or \'uval\' modifiers)", [h]=a, [g]=o, [f]={"182227bd5bdc",1440068079,"[OPENMP 4.1] Initial support for modifiers in \'linear\' clause.","[OPENMP 4.1] Initial support for modifiers in \'linear\' clause.\n\nOpenMP 4.1 adds 3 optional modifiers to \'linear\' clause.\nFormat of \'linear\' clause has changed to:\n```\nlinear(linear-list[ : linear-step])\n```\nwhere linear-list is one of the following\n```\nlist\nmodifier(list)\n```\nwhere modifier is one of the following:\n```\n ref (C++)\n val (C/C++)\n uval (C++)\n```\nPatch adds parsing and sema analysis for these modifiers.\n\nllvm-svn: 245550"}, [b]={{n,19972,"bool Sema::CheckOpenMPLinearModifier(OpenMPLinearClauseKind LinKind, SourceLocation LinLoc) {\n if ((!LangOpts.CPlusPlus && LinKind != OMPC_LINEAR_val) || LinKind == OMPC_LINEAR_unknown) {\n Diag(LinLoc, diag::err_omp_wrong_linear_modifier) << LangOpts.CPlusPlus;"}}, [l]={ [Ab]={"clang/test/OpenMP/declare_simd_messages.cpp:206:33: error: expected one of \'ref\', val\' or \'uval\' modifiers"} } }, ["err_omp_wrong_linear_modifier_non_reference"]={ [d]="err_omp_wrong_linear_modifier_non_reference", [e]="variable of non-reference type %0 can be used only with \'val\' modifier, but used with \'%1\'", [i]="variable of non-reference type A can be used only with \'val\' modifier, but used with \'B\'", [j]=k, [c]="variable of non\\-reference type (.*?) can be used only with \'val\' modifier, but used with \'(.*?)\'", [h]=a, [g]=o, [f]={"1185e193a486",1440072957,"[OPENMP 4.1] Allow to use \'uval\' and \'ref\' modifiers for reference types only.","[OPENMP 4.1] Allow to use \'uval\' and \'ref\' modifiers for reference types only.\nStandard allows to use \'uval\' and \'ref\' modifiers in \'linear\' clause for variables with reference types only. Added check for it and modified test.\n\nllvm-svn: 245556"}, [b]={{n,19987,"bool Sema::CheckOpenMPLinearDecl(const ValueDecl *D, SourceLocation ELoc, OpenMPLinearClauseKind LinKind, QualType Type, bool IsDeclareSimd) {\n // ...\n if ((LinKind == OMPC_LINEAR_uval || LinKind == OMPC_LINEAR_ref) && !Type->isReferenceType()) {\n Diag(ELoc, diag::err_omp_wrong_linear_modifier_non_reference) << Type << getOpenMPSimpleClauseTypeName(OMPC_linear, LinKind);"}}, [l]={ [Ab]={"clang/test/OpenMP/declare_simd_messages.cpp:204:37: error: variable of non-reference type \'int *\' can be used only with \'val\' modifier, but used with \'ref\'","clang/test/OpenMP/declare_simd_messages.cpp:202:38: error: variable of non-reference type \'int *\' can be used only with \'val\' modifier, but used with \'uval\'"} } }, ["err_omp_wrong_ordered_loop_count"]={ [d]="err_omp_wrong_ordered_loop_count", [e]="the parameter of the \'ordered\' clause must be greater than or equal to the parameter of the \'collapse\' clause", [i]="the parameter of the \'ordered\' clause must be greater than or equal to the parameter of the \'collapse\' clause", [j]=k, [c]="the parameter of the \'ordered\' clause must be greater than or equal to the parameter of the \'collapse\' clause", [h]=a, [g]=o, [f]={"7b6bc88c5aaf",1448524239,"[OPENMP 4.5] Fixed rules for \'ordered\' clause.","[OPENMP 4.5] Fixed rules for \'ordered\' clause.\nAccording to OpenMP 4.5 the parameter of \'ordered\' clause must be greater than or equal to the parameter of \'collapse\' clause. Patch adds this rule.\n\nllvm-svn: 254141"}, [b]={{n,9604,"/// Called on a for stmt to check itself and nested loops (if any).\n/// \\return Returns 0 if one of the collapsed stmts is not canonical for loop,\n/// number of collapsed loops otherwise.\nstatic unsigned checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr *CollapseLoopCountExpr, Expr *OrderedLoopCountExpr, Stmt *AStmt, Sema &SemaRef, DSAStackTy &DSA, Sema::VarsWithInheritedDSAType &VarsWithImplicitDSA, OMPLoopBasedDirective::HelperExprs &Built) {\n // ...\n if (OrderedLoopCountExpr) {\n // ...\n if (!OrderedLoopCountExpr->isValueDependent() && OrderedLoopCountExpr->EvaluateAsInt(EVResult, SemaRef.getASTContext())) {\n // ...\n if (Result.getLimitedValue() < NestedLoopCount) {\n SemaRef.Diag(OrderedLoopCountExpr->getExprLoc(), diag::err_omp_wrong_ordered_loop_count) << OrderedLoopCountExpr->getSourceRange();"}}, [l]={ ["clang/test/OpenMP/for_ordered_clause.cpp"]={"clang/test/OpenMP/for_ordered_clause.cpp:129:25: error: the parameter of the \'ordered\' clause must be greater than or equal to the parameter of the \'collapse\' clause","clang/test/OpenMP/for_ordered_clause.cpp:75:25: error: the parameter of the \'ordered\' clause must be greater than or equal to the parameter of the \'collapse\' clause"} } }, ["err_omp_wrong_simdlen_safelen_values"]={ [d]="err_omp_wrong_simdlen_safelen_values", [e]="the value of \'simdlen\' parameter must be less than or equal to the value of the \'safelen\' parameter", [i]="the value of \'simdlen\' parameter must be less than or equal to the value of the \'safelen\' parameter", [j]=k, [c]="the value of \'simdlen\' parameter must be less than or equal to the value of the \'safelen\' parameter", [h]=a, [g]=o, [f]={"66b15b505fe1",1440155656,"[OPENMP 4.1] Initial support for \'simdlen\' clause.","[OPENMP 4.1] Initial support for \'simdlen\' clause.\nAdd parsing/sema analysis for \'simdlen\' clause in simd directives. Also add check that if both \'safelen\' and \'simdlen\' clauses are specified, the value of \'simdlen\' parameter is less than the value of \'safelen\' parameter.\n\nllvm-svn: 245692"}, [b]={{n,10314,"static bool checkSimdlenSafelenSpecified(Sema &S, const ArrayRef<OMPClause *> Clauses) {\n // ...\n if (Simdlen && Safelen) {\n // ...\n // OpenMP 4.5 [2.8.1, simd Construct, Restrictions]\n // If both simdlen and safelen clauses are specified, the value of the\n // simdlen parameter must be less than or equal to the value of the safelen\n // parameter.\n if (SimdlenRes > SafelenRes) {\n S.Diag(SimdlenLength->getExprLoc(), diag::err_omp_wrong_simdlen_safelen_values) << SimdlenLength->getSourceRange() << SafelenLength->getSourceRange();"}}, [l]={ ["clang/test/OpenMP/target_simd_misc_messages.c"]={"clang/test/OpenMP/target_simd_misc_messages.c:482:33: error: the value of \'simdlen\' parameter must be less than or equal to the value of the \'safelen\' parameter","clang/test/OpenMP/target_simd_misc_messages.c:486:44: error: the value of \'simdlen\' parameter must be less than or equal to the value of the \'safelen\' parameter"} } }, ["err_omp_wrong_var_in_declare_reduction"]={ [d]="err_omp_wrong_var_in_declare_reduction", [e]="only %select{\'omp_priv\' or \'omp_orig\'|\'omp_in\' or \'omp_out\'}0 variables are allowed in %select{initializer|combiner}0 expression", [i]={{nil,nil,{"only ",{"\'omp_priv\' or \'omp_orig\'","\'omp_in\' or \'omp_out\'"}," variables are allowed in ",{"initializer","combiner"}," expression"}}}, [j]=k, [c]="only (?:\'omp_priv\' or \'omp_orig\'|\'omp_in\' or \'omp_out\') variables are allowed in (?:initializer|combiner) expression", [h]=a, [g]=o, [f]={"94a4f0cb5f8a",1456982499,"[OPENMP 4.0] Initial support for \'omp declare reduction\' construct.","[OPENMP 4.0] Initial support for \'omp declare reduction\' construct.\n\nAdd parsing, sema analysis and serialization/deserialization for \'declare reduction\' construct.\nUser-defined reductions are defined as\n\n#pragma omp declare reduction( reduction-identifier : typename-list : combiner ) [initializer ( initializer-expr )]\nThese custom reductions may be used in \'reduction\' clauses of OpenMP constructs. The combiner specifies how partial results can be combined into a single value. The\ncombiner can use the special variable identifiers omp_in and omp_out that are of the type of the variables being reduced with this reduction-identifier. Each of them will\ndenote one of the values to be combined before executing the combiner. It is assumed that the special omp_out identifier will refer to the storage that holds the resulting\ncombined value after executing the combiner.\nAs the initializer-expr value of a user-defined reduction is not known a priori the initializer-clause can be used to specify one. Then the contents of the initializer-clause\nwill be used as the initializer for private copies of reduction list items where the omp_priv identifier will refer to the storage to be initialized. The special identifier\nomp_orig can also appear in the initializer-clause and it will refer to the storage of the original variable to be reduced.\nDifferential Revision: http://reviews.llvm.org/D11182\n\nllvm-svn: 262582"}, [b]={{E,346,"/// Determine whether the use of this declaration is valid, and\n/// emit any corresponding diagnostics.\n///\n/// This routine diagnoses various problems with referencing\n/// declarations that can occur when using a declaration. For example,\n/// it might warn if a deprecated or unavailable declaration is being\n/// used, or produce an error (and return true) if a C++0x deleted\n/// function is being used.\n///\n/// \\returns true if there was an error (this declaration cannot be\n/// referenced), false otherwise.\n///\nbool Sema::DiagnoseUseOfDecl(NamedDecl *D, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks, ObjCInterfaceDecl *ClassReceiver, bool SkipTrailingRequiresClause) {\n // ...\n if (LangOpts.OpenMP && DRD && !CurContext->containsDecl(D) && isa<VarDecl>(D)) {\n Diag(Loc, diag::err_omp_wrong_var_in_declare_reduction) << getCurFunction()->HasOMPDeclareReductionCombiner;"}}, [l]={ ["clang/test/OpenMP/declare_reduction_messages.c"]={"clang/test/OpenMP/declare_reduction_messages.c:24:50: error: only \'omp_in\' or \'omp_out\' variables are allowed in combiner expression","clang/test/OpenMP/declare_reduction_messages.c:24:50: error: only \'omp_in\' or \'omp_out\' variables are allowed in combiner expression","clang/test/OpenMP/declare_reduction_messages.c:25:60: error: only \'omp_in\' or \'omp_out\' variables are allowed in combiner expression","clang/test/OpenMP/declare_reduction_messages.c:25:60: error: only \'omp_in\' or \'omp_out\' variables are allowed in combiner expression","clang/test/OpenMP/declare_reduction_messages.c:27:59: error: only \'omp_in\' or \'omp_out\' variables are allowed in combiner expression","clang/test/OpenMP/declare_reduction_messages.c:37:76: error: only \'omp_priv\' or \'omp_orig\' variables are allowed in initializer expression"} } }, ["err_only_annotate_after_access_spec"]={ [d]="err_only_annotate_after_access_spec", [e]="access specifier can only have annotation attributes", [i]="access specifier can only have annotation attributes", [j]=k, [c]="access specifier can only have annotation attributes", [h]=a, [g]=m, [f]={"ca98f2a63f94",1318498892,"Allow for annotate attributes after access specifiers. When such","Allow for annotate attributes after access specifiers. When such\nattributes are found, propagate them to subsequent declarations.\n\nllvm-svn: 141861"}, [b]={{Q,9600,"// Annotation attributes are the only attributes allowed after an access\n// specifier.\nbool Sema::ProcessAccessDeclAttributeList(AccessSpecDecl *ASDecl, const ParsedAttributesView &AttrList) {\n for (const ParsedAttr &AL : AttrList) {\n if (AL.getKind() == ParsedAttr::AT_Annotate) {\n // ...\n } else {\n Diag(AL.getLoc(), diag::err_only_annotate_after_access_spec);"}}, [l]={ ["clang/test/Parser/access-spec-attrs.cpp"]={"clang/test/Parser/access-spec-attrs.cpp:4:23: error: access specifier can only have annotation attributes"} } }, ["err_only_constructors_take_base_inits"]={ [d]="err_only_constructors_take_base_inits", [e]="only constructors take base initializers", [i]="only constructors take base initializers", [j]=k, [c]="only constructors take base initializers", [h]=a, [g]=m, [f]={"75fdaa465f4c",1237949897,"Improve handling of base initializers. We now parse initializers in out of line decls, such as:","Improve handling of base initializers. We now parse initializers in out of line decls, such as:\n\nclass C {\n C() { }\n \n int a;\n};\n\nC::C() : a(10) { }\n\nWe also diagnose when initializers are used on declarations that aren\'t constructors:\n\nt.cpp:1:10: error: only constructors take base initializers\nvoid f() : a(10) { }\n ^\n\nDoug and/or Sebastian: I\'d appreciate a review, especially the nested-name-spec test results (from the looks of it we now match gcc in that test.)\n\nllvm-svn: 67672"}, [b]={{y,5702,"/// ActOnMemInitializers - Handle the member initializers for a constructor.\nvoid Sema::ActOnMemInitializers(Decl *ConstructorDecl, SourceLocation ColonLoc, ArrayRef<CXXCtorInitializer *> MemInits, bool AnyErrors) {\n // ...\n if (!Constructor) {\n Diag(ColonLoc, diag::err_only_constructors_take_base_inits);"}}, [l]={ ["clang/test/Parser/cxx-invalid-function-decl.cpp"]={"clang/test/Parser/cxx-invalid-function-decl.cpp:7:11: error: only constructors take base initializers","clang/test/Parser/cxx-invalid-function-decl.cpp:10:11: error: only constructors take base initializers","clang/test/Parser/cxx-invalid-function-decl.cpp:14:11: error: only constructors take base initializers"} } }, ["err_only_enums_have_underlying_types"]={ [d]="err_only_enums_have_underlying_types", [e]="only enumeration types have underlying types", [i]="only enumeration types have underlying types", [j]=k, [c]="only enumeration types have underlying types", [h]=a, [g]=m, [f]={"4a2570792c75",1305783465,"Implement __underlying_type for libc++.","Implement __underlying_type for libc++.\n\nllvm-svn: 131633"}, [b]={{H,9522,"QualType Sema::BuiltinEnumUnderlyingType(QualType BaseType, SourceLocation Loc) {\n if (!BaseType->isEnumeralType()) {\n Diag(Loc, diag::err_only_enums_have_underlying_types);"}}, [l]={ ["clang/test/SemaCXX/underlying_type.cpp"]={"clang/test/SemaCXX/underlying_type.cpp:14:1: error: only enumeration types have underlying types","clang/test/SemaCXX/underlying_type.cpp:15:1: error: only enumeration types have underlying types","clang/test/SemaCXX/underlying_type.cpp:31:11: error: only enumeration types have underlying types"} } }, ["err_opencl_addrspace_scope"]={ [d]={{nil,q,"err_opencl_addrspace_scope"}}, [e]={{nil,q,"variables in the %0 address space can only be declared in the outermost scope of a kernel function"}}, [i]={{nil,q,"variables in the A address space can only be declared in the outermost scope of a kernel function"}}, [j]=k, [c]="variables in the (.*?) address space can only be declared in the outermost scope of a kernel function", [h]=a, [g]={{nil,q,m}}, [f]={"e437b6a52b7d",1497970245,"[OpenCL] Diagnose scoped address-space qualified variables","[OpenCL] Diagnose scoped address-space qualified variables\n\nProduce an error if variables qualified with a local or\na constant address space are not declared in the outermost\nscope of a kernel.\n\nPatch by Simon Perretta.\n\nDifferential Revision: https://reviews.llvm.org/D34024\n\nllvm-svn: 305798"}, [b]={{G,8624,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n // FIXME: Adding local AS in C++ for OpenCL might make sense.\n if (NewVD->isFileVarDecl() || NewVD->isStaticLocal() || NewVD->hasExternalStorage()) {\n // ...\n } else {\n // ...\n if (T.getAddressSpace() == LangAS::opencl_constant || T.getAddressSpace() == LangAS::opencl_local) {\n // ...\n // OpenCL v2.0 s6.5.2 and s6.5.3: local and constant variables must be\n // in the outermost scope of a kernel function.\n if (FD && FD->hasAttr<OpenCLKernelAttr>()) {\n if (!getCurScope()->isFunctionScope()) {\n if (T.getAddressSpace() == LangAS::opencl_constant)\n Diag(NewVD->getLocation(), diag::err_opencl_addrspace_scope) << \"constant\";"},{G,8627,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n // FIXME: Adding local AS in C++ for OpenCL might make sense.\n if (NewVD->isFileVarDecl() || NewVD->isStaticLocal() || NewVD->hasExternalStorage()) {\n // ...\n } else {\n // ...\n if (T.getAddressSpace() == LangAS::opencl_constant || T.getAddressSpace() == LangAS::opencl_local) {\n // ...\n // OpenCL v2.0 s6.5.2 and s6.5.3: local and constant variables must be\n // in the outermost scope of a kernel function.\n if (FD && FD->hasAttr<OpenCLKernelAttr>()) {\n if (!getCurScope()->isFunctionScope()) {\n if (T.getAddressSpace() == LangAS::opencl_constant)\n // ...\n else\n Diag(NewVD->getLocation(), diag::err_opencl_addrspace_scope) << \"local\";"}}, [l]={ ["clang/test/SemaOpenCL/storageclass.cl"]={"clang/test/SemaOpenCL/storageclass.cl:133:15: error: variables in the local address space can only be declared in the outermost scope of a kernel function","clang/test/SemaOpenCL/storageclass.cl:134:18: error: variables in the constant address space can only be declared in the outermost scope of a kernel function"} } }, ["err_opencl_atomic_init"]={ [d]={{nil,q,"err_opencl_atomic_init"}}, [e]={{nil,q,"atomic variable can be %select{assigned|initialized}0 to a variable only in global address space"}}, [i]={{nil,q,{"atomic variable can be ",{"assigned","initialized"}," to a variable only in global address space"}}}, [j]=k, [c]="atomic variable can be (?:assigned|initialized) to a variable only in global address space", [h]=a, [g]={{nil,q,m}}, [f]={"3bccec5da7e5",1491396430,"[OpenCL] Extended diagnostics for atomic initialization","[OpenCL] Extended diagnostics for atomic initialization\n\nSummary:\nI saw the same changes in the following review: https://reviews.llvm.org/D17438\n\nI don\'t know in that way I could determine that atomic variable was initialized by macro ATOMIC_VAR_INIT. Anyway I added check that atomic variables can be initialize only in global scope.\nI think that we can discuss this change.\n\nReviewers: Anastasia, cfe-commits\n\nReviewed By: Anastasia\n\nSubscribers: bader, yaxunl\n\nDifferential Revision: https://reviews.llvm.org/D30643\n\nllvm-svn: 299537"}, [b]={{E,15683,"/// CreateBuiltinBinOp - Creates a new built-in binary operation with\n/// operator @p Opc at location @c TokLoc. This routine only supports\n/// built-in operations; ActOnBinOp handles overloaded operators.\nExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n // OpenCLC v2.0 s6.13.11.1 allows atomic variables to be initialized by\n // the ATOMIC_VAR_INIT macro.\n if (LHSTy->isAtomicType() || RHSTy->isAtomicType()) {\n // ...\n if (BO_Assign == Opc)\n Diag(OpLoc, diag::err_opencl_atomic_init) << 0 << SR;"},{kb,8630,"ExprResult InitializationSequence::Perform(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType) {\n // ...\n if (S.getLangOpts().OpenCLVersion >= 200 && ETy->isAtomicType() && !HasGlobalAS && Entity.getKind() == InitializedEntity::EK_Variable && Args.size() > 0) {\n S.Diag(Args[0]->getBeginLoc(), diag::err_opencl_atomic_init) << 1 << SourceRange(Entity.getDecl()->getBeginLoc(), Args[0]->getEndLoc());"}}, [l]={ ["clang/test/SemaOpenCL/atomic-init.cl"]={"clang/test/SemaOpenCL/atomic-init.cl:6:6: error: atomic variable can be assigned to a variable only in global address space","clang/test/SemaOpenCL/atomic-init.cl:7:19: error: atomic variable can be initialized to a variable only in global address space","clang/test/SemaOpenCL/atomic-init.cl:8:27: error: atomic variable can be initialized to a variable only in global address space"} } }, ["err_opencl_bitfields"]={ [d]="err_opencl_bitfields", [e]="bit-fields are not supported in OpenCL", [i]="bit-fields are not supported in OpenCL", [j]=k, [c]="bit\\-fields are not supported in OpenCL", [h]=a, [g]=m, [f]={"1d58cdbf4e17",1358444100,"Add some semantic checks for OpenCL. Variadic macros, VLAs and bitfields are not supported.","Add some semantic checks for OpenCL. Variadic macros, VLAs and bitfields are not supported.\n\nllvm-svn: 172732"}, [b]={{G,18144,"/// 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 (LangOpts.OpenCL) {\n // ...\n // OpenCL v1.2 s6.9.c: bitfields are not supported, unless Clang extension\n // is enabled.\n if (BitWidth && !getOpenCLOptions().isAvailableOption(\"__cl_clang_bitfields\", LangOpts)) {\n Diag(Loc, diag::err_opencl_bitfields);"}}, [l]={ ["clang/test/SemaOpenCL/unsupported.cl"]={"clang/test/SemaOpenCL/unsupported.cl:9:7: error: bit-fields are not supported in OpenCL"} } }, ["err_opencl_block_ref_block"]={ [d]={{nil,q,"err_opencl_block_ref_block"}}, [e]={{nil,q,"cannot refer to a block inside block"}}, [i]={{nil,q,"cannot refer to a block inside block"}}, [j]=k, [c]="cannot refer to a block inside block", [h]=a, [g]={{nil,q,m}}, [f]={"9d98a316c5c3",1487243610,"[OpenCL] Disallow blocks capture other blocks (v2.0, s6.12.5)","[OpenCL] Disallow blocks capture other blocks (v2.0, s6.12.5)\n\nllvm-svn: 295307"}, [b]={{E,19208,"// Certain capturing entities (lambdas, blocks etc.) are not allowed to capture\n// certain types of variables (unnamed, variably modified types etc.)\n// so check for eligibility.\nstatic bool isVariableCapturable(CapturingScopeInfo *CSI, ValueDecl *Var, SourceLocation Loc, const bool Diagnose, Sema &S) {\n // ...\n // OpenCL v2.0 s6.12.5: Blocks cannot reference/capture other blocks\n if (S.getLangOpts().OpenCL && IsBlock && Var->getType()->isBlockPointerType()) {\n if (Diagnose)\n S.Diag(Loc, diag::err_opencl_block_ref_block);"}}, [l]={ [U]={"clang/test/SemaOpenCL/invalid-block.cl:84:13: error: cannot refer to a block inside block","clang/test/SemaOpenCL/invalid-block.cl:89:5: error: cannot refer to a block inside block"} } }, ["err_opencl_block_storage_type"]={ [d]="err_opencl_block_storage_type", [e]="the __block storage type is not permitted", [i]="the __block storage type is not permitted", [j]=k, [c]="the __block storage type is not permitted", [h]=a, [g]=m, [f]={yb,1457011999,xb,wb}, [b]={{G,8559,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n // OpenCL v2.0 s6.12.5 - The __block storage type is not supported.\n if (NewVD->hasAttr<BlocksAttr>()) {\n Diag(NewVD->getLocation(), diag::err_opencl_block_storage_type);"}}, [l]={ [U]={"clang/test/SemaOpenCL/invalid-block.cl:47:15: error: the __block storage type is not permitted"} } }, ["err_opencl_builtin_expected_type"]={ [d]={{nil,q,"err_opencl_builtin_expected_type"}}, [e]={{nil,q,"illegal call to %0, expected %1 argument type"}}, [i]={{nil,q,"illegal call to A, expected B argument type"}}, [j]=k, [c]="illegal call to (.*?), expected (.*?) argument type", [h]=a, [g]={{nil,q,m}}, [f]={"6b03d95f0ff7",1499169023,"[OpenCL] Rename err_opencl_enqueue_kernel_expected_type","[OpenCL] Rename err_opencl_enqueue_kernel_expected_type\n\nRename err_opencl_enqueue_kernel_expected_type so that other builtins\ncan use the same diagnostic.\n\nhttps://reviews.llvm.org/D34948\n\nllvm-svn: 307067"}, [b]={{A,1435,"static bool SemaOpenCLBuiltinNDRangeAndBlock(Sema &S, CallExpr *TheCall) {\n // ...\n if (NDRangeArg->getType().getUnqualifiedType().getAsString() != \"ndrange_t\") {\n S.Diag(NDRangeArg->getBeginLoc(), diag::err_opencl_builtin_expected_type) << TheCall->getDirectCallee() << \"\'ndrange_t\'\";"},{A,1442,"static bool SemaOpenCLBuiltinNDRangeAndBlock(Sema &S, CallExpr *TheCall) {\n // ...\n if (!isBlockPointer(BlockArg)) {\n S.Diag(BlockArg->getBeginLoc(), diag::err_opencl_builtin_expected_type) << TheCall->getDirectCallee() << \"block\";"},{A,1458,"/// OpenCL C v2.0, s6.13.17.6 - Check the argument to the\n/// get_kernel_work_group_size\n/// and get_kernel_preferred_work_group_size_multiple builtin functions.\nstatic bool SemaOpenCLBuiltinKernelWorkGroupSize(Sema &S, CallExpr *TheCall) {\n // ...\n if (!isBlockPointer(BlockArg)) {\n S.Diag(BlockArg->getBeginLoc(), diag::err_opencl_builtin_expected_type) << TheCall->getDirectCallee() << \"block\";"},{A,1546,"/// OpenCL C v2.0, s6.13.17 - Enqueue kernel function contains four different\n/// overload formats specified in Table 6.13.17.1.\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\nstatic bool SemaOpenCLBuiltinEnqueueKernel(Sema &S, CallExpr *TheCall) {\n // ...\n // First argument always needs to be a queue_t type.\n if (!Arg0->getType()->isQueueT()) {\n S.Diag(TheCall->getArg(0)->getBeginLoc(), diag::err_opencl_builtin_expected_type) << TheCall->getDirectCallee() << S.Context.OCLQueueTy;"},{A,1554,"/// OpenCL C v2.0, s6.13.17 - Enqueue kernel function contains four different\n/// overload formats specified in Table 6.13.17.1.\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\nstatic bool SemaOpenCLBuiltinEnqueueKernel(Sema &S, CallExpr *TheCall) {\n // ...\n // Second argument always needs to be a kernel_enqueue_flags_t enum value.\n if (!Arg1->getType()->isIntegerType()) {\n S.Diag(TheCall->getArg(1)->getBeginLoc(), diag::err_opencl_builtin_expected_type) << TheCall->getDirectCallee() << \"\'kernel_enqueue_flags_t\' (i.e. uint)\";"},{A,1562,"/// OpenCL C v2.0, s6.13.17 - Enqueue kernel function contains four different\n/// overload formats specified in Table 6.13.17.1.\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\nstatic bool SemaOpenCLBuiltinEnqueueKernel(Sema &S, CallExpr *TheCall) {\n // ...\n // Third argument is always an ndrange_t type.\n if (Arg2->getType().getUnqualifiedType().getAsString() != \"ndrange_t\") {\n S.Diag(TheCall->getArg(2)->getBeginLoc(), diag::err_opencl_builtin_expected_type) << TheCall->getDirectCallee() << \"\'ndrange_t\'\";"},{A,1572,"/// OpenCL C v2.0, s6.13.17 - Enqueue kernel function contains four different\n/// overload formats specified in Table 6.13.17.1.\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\nstatic bool SemaOpenCLBuiltinEnqueueKernel(Sema &S, CallExpr *TheCall) {\n // ...\n // With four arguments, there is only one form that the function could be\n // called in: no events and no variable arguments.\n if (NumArgs == 4) {\n // check that the last argument is the right block type.\n if (!isBlockPointer(Arg3)) {\n S.Diag(Arg3->getBeginLoc(), diag::err_opencl_builtin_expected_type) << TheCall->getDirectCallee() << \"block\";"},{A,1595,"/// OpenCL C v2.0, s6.13.17 - Enqueue kernel function contains four different\n/// overload formats specified in Table 6.13.17.1.\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\nstatic bool SemaOpenCLBuiltinEnqueueKernel(Sema &S, CallExpr *TheCall) {\n // ...\n // last two cases with either exactly 7 args or 7 args and varargs.\n if (NumArgs >= 7) {\n // ...\n if (!isBlockPointer(Arg6)) {\n S.Diag(Arg6->getBeginLoc(), diag::err_opencl_builtin_expected_type) << TheCall->getDirectCallee() << \"block\";"},{A,1605,"/// OpenCL C v2.0, s6.13.17 - Enqueue kernel function contains four different\n/// overload formats specified in Table 6.13.17.1.\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\nstatic bool SemaOpenCLBuiltinEnqueueKernel(Sema &S, CallExpr *TheCall) {\n // ...\n // last two cases with either exactly 7 args or 7 args and varargs.\n if (NumArgs >= 7) {\n // ...\n // Forth argument has to be any integer type.\n if (!Arg3->getType()->isIntegerType()) {\n S.Diag(TheCall->getArg(3)->getBeginLoc(), diag::err_opencl_builtin_expected_type) << TheCall->getDirectCallee() << \"integer\";"},{A,1618,"/// OpenCL C v2.0, s6.13.17 - Enqueue kernel function contains four different\n/// overload formats specified in Table 6.13.17.1.\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\nstatic bool SemaOpenCLBuiltinEnqueueKernel(Sema &S, CallExpr *TheCall) {\n // ...\n // last two cases with either exactly 7 args or 7 args and varargs.\n if (NumArgs >= 7) {\n // ...\n // Fifth argument is always passed as a pointer to clk_event_t.\n if (!Arg4->isNullPointerConstant(S.Context, Expr::NPC_ValueDependentIsNotNull) && !Arg4->getType()->getPointeeOrArrayElementType()->isClkEventT()) {\n S.Diag(TheCall->getArg(4)->getBeginLoc(), diag::err_opencl_builtin_expected_type) << TheCall->getDirectCallee() << S.Context.getPointerType(S.Context.OCLClkEventTy);"},{A,1630,"/// OpenCL C v2.0, s6.13.17 - Enqueue kernel function contains four different\n/// overload formats specified in Table 6.13.17.1.\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\nstatic bool SemaOpenCLBuiltinEnqueueKernel(Sema &S, CallExpr *TheCall) {\n // ...\n // last two cases with either exactly 7 args or 7 args and varargs.\n if (NumArgs >= 7) {\n // ...\n // Sixth argument is always passed as a pointer to clk_event_t.\n if (!Arg5->isNullPointerConstant(S.Context, Expr::NPC_ValueDependentIsNotNull) && !(Arg5->getType()->isPointerType() && Arg5->getType()->getPointeeType()->isClkEventT())) {\n S.Diag(TheCall->getArg(5)->getBeginLoc(), diag::err_opencl_builtin_expected_type) << TheCall->getDirectCallee() << S.Context.getPointerType(S.Context.OCLClkEventTy);"}}, [l]={ [lb]={"clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:28:18: error: illegal call to \'enqueue_kernel\', expected \'queue_t\' argument type","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:32:33: error: illegal call to \'enqueue_kernel\', expected \'kernel_enqueue_flags_t\' (i.e. uint) argument type","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:36:40: error: illegal call to \'enqueue_kernel\', expected \'ndrange_t\' argument type","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:40:49: error: illegal call to \'enqueue_kernel\', expected block argument type","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:55:49: error: illegal call to \'enqueue_kernel\', expected integer argument type","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:59:52: error: illegal call to \'enqueue_kernel\', expected \'clk_event_t *\' argument type","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:64:70: error: illegal call to \'enqueue_kernel\', expected \'clk_event_t *\' argument type","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:69:76: error: illegal call to \'enqueue_kernel\', expected block argument type","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:200:37: error: illegal call to \'get_kernel_work_group_size\', expected block argument type","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:217:56: error: illegal call to \'get_kernel_preferred_work_group_size_multiple\', expected block argument type","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:227:54: error: illegal call to \'get_kernel_max_sub_group_size_for_ndrange\', expected \'ndrange_t\' argument type","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:228:57: error: illegal call to \'get_kernel_max_sub_group_size_for_ndrange\', expected block argument type","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:235:51: error: illegal call to \'get_kernel_sub_group_count_for_ndrange\', expected \'ndrange_t\' argument type","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:236:54: error: illegal call to \'get_kernel_sub_group_count_for_ndrange\', expected block argument type"} } }, ["err_opencl_builtin_pipe_arg_num"]={ [d]="err_opencl_builtin_pipe_arg_num", [e]="invalid number of arguments to function: %0", [i]="invalid number of arguments to function: A", [j]=k, [c]="invalid number of arguments to function\\: (.*?)", [h]=a, [g]=m, [f]={"3a9952c9e7d0",1453773964,"[OpenCL] Pipe builtin functions","[OpenCL] Pipe builtin functions\n\nSummary:\nSupport for the pipe built-in functions for OpenCL 2.0.\nThe pipe builtin functions may have infinite kinds of element types, one approach\nwould be to just generate calls that would always use generic types such as void*.\nThis patch is based on bader\'s opencl support patch on SPIR-V branch.\n\nReviewers: Anastasia, pekka.jaaskelainen\n\nSubscribers: keryell, bader, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D15914\n\nllvm-svn: 258773"}, [b]={{A,1769,"// Performs semantic analysis for the read/write_pipe call.\n// \\param S Reference to the semantic analyzer.\n// \\param Call A pointer to the builtin call.\n// \\return True if a semantic error has been found, false otherwise.\nstatic bool SemaBuiltinRWPipe(Sema &S, CallExpr *Call) {\n // ...\n default:\n S.Diag(Call->getBeginLoc(), diag::err_opencl_builtin_pipe_arg_num) << Call->getDirectCallee() << Call->getSourceRange();"}}, [l]={ ["clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl"]={"clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:13:3: error: invalid number of arguments to function: \'read_pipe\'","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:42:3: error: invalid number of arguments to function: \'write_pipe\'"} } }, ["err_opencl_builtin_pipe_first_arg"]={ [d]="err_opencl_builtin_pipe_first_arg", [e]="first argument to %0 must be a pipe type", [i]="first argument to A must be a pipe type", [j]=k, [c]="first argument to (.*?) must be a pipe type", [h]=a, [g]=m, [f]={"3a9952c9e7d0",1453773964,"[OpenCL] Pipe builtin functions","[OpenCL] Pipe builtin functions\n\nSummary:\nSupport for the pipe built-in functions for OpenCL 2.0.\nThe pipe builtin functions may have infinite kinds of element types, one approach\nwould be to just generate calls that would always use generic types such as void*.\nThis patch is based on bader\'s opencl support patch on SPIR-V branch.\n\nReviewers: Anastasia, pekka.jaaskelainen\n\nSubscribers: keryell, bader, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D15914\n\nllvm-svn: 258773"}, [b]={{A,1658,"/// Returns true if pipe element type is different from the pointer.\nstatic bool checkOpenCLPipeArg(Sema &S, CallExpr *Call) {\n // ...\n // First argument type should always be pipe.\n if (!Arg0->getType()->isPipeType()) {\n S.Diag(Call->getBeginLoc(), diag::err_opencl_builtin_pipe_first_arg) << Call->getDirectCallee() << Arg0->getSourceRange();"},{A,1839,"// Performs a semantic analysis on the call to built-in Pipe\n// Query Functions.\n// \\param S Reference to the semantic analyzer.\n// \\param Call The call to the builtin function to be analyzed.\n// \\return True if a semantic error was found, false otherwise.\nstatic bool SemaBuiltinPipePackets(Sema &S, CallExpr *Call) {\n // ...\n if (!Call->getArg(0)->getType()->isPipeType()) {\n S.Diag(Call->getBeginLoc(), diag::err_opencl_builtin_pipe_first_arg) << Call->getDirectCallee() << Call->getArg(0)->getSourceRange();"}}, [l]={ ["clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl"]={"clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:12:3: error: first argument to \'read_pipe\' must be a pipe type","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:24:3: error: first argument to \'work_group_reserve_read_pipe\' must be a pipe type","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:29:3: error: first argument to \'commit_read_pipe\' must be a pipe type","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:41:3: error: first argument to \'write_pipe\' must be a pipe type","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:53:3: error: first argument to \'work_group_reserve_write_pipe\' must be a pipe type","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:58:3: error: first argument to \'commit_write_pipe\' must be a pipe type","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:65:3: error: first argument to \'get_pipe_num_packets\' must be a pipe type","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:66:3: error: first argument to \'get_pipe_max_packets\' must be a pipe type"} } }, ["err_opencl_builtin_pipe_invalid_access_modifier"]={ [d]="err_opencl_builtin_pipe_invalid_access_modifier", [e]="invalid pipe access modifier (expecting %0)", [i]="invalid pipe access modifier (expecting A)", [j]=k, [c]="invalid pipe access modifier \\(expecting (.*?)\\)", [h]=a, [g]=m, [f]={"3a9952c9e7d0",1453773964,"[OpenCL] Pipe builtin functions","[OpenCL] Pipe builtin functions\n\nSummary:\nSupport for the pipe built-in functions for OpenCL 2.0.\nThe pipe builtin functions may have infinite kinds of element types, one approach\nwould be to just generate calls that would always use generic types such as void*.\nThis patch is based on bader\'s opencl support patch on SPIR-V branch.\n\nReviewers: Anastasia, pekka.jaaskelainen\n\nSubscribers: keryell, bader, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D15914\n\nllvm-svn: 258773"}, [b]={{A,1678,"/// Returns true if pipe element type is different from the pointer.\nstatic bool checkOpenCLPipeArg(Sema &S, CallExpr *Call) {\n // ...\n case Builtin::BIread_pipe:\n case Builtin::BIreserve_read_pipe:\n case Builtin::BIcommit_read_pipe:\n case Builtin::BIwork_group_reserve_read_pipe:\n case Builtin::BIsub_group_reserve_read_pipe:\n case Builtin::BIwork_group_commit_read_pipe:\n case Builtin::BIsub_group_commit_read_pipe:\n if (!(!AccessQual || AccessQual->isReadOnly())) {\n S.Diag(Arg0->getBeginLoc(), diag::err_opencl_builtin_pipe_invalid_access_modifier) << \"read_only\" << Arg0->getSourceRange();"},{A,1692,"/// Returns true if pipe element type is different from the pointer.\nstatic bool checkOpenCLPipeArg(Sema &S, CallExpr *Call) {\n // ...\n case Builtin::BIwrite_pipe:\n case Builtin::BIreserve_write_pipe:\n case Builtin::BIcommit_write_pipe:\n case Builtin::BIwork_group_reserve_write_pipe:\n case Builtin::BIsub_group_reserve_write_pipe:\n case Builtin::BIwork_group_commit_write_pipe:\n case Builtin::BIsub_group_commit_write_pipe:\n if (!(AccessQual && AccessQual->isWriteOnly())) {\n S.Diag(Arg0->getBeginLoc(), diag::err_opencl_builtin_pipe_invalid_access_modifier) << \"write_only\" << Arg0->getSourceRange();"}}, [l]={ ["clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl"]={"clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:18:14: error: invalid pipe access modifier (expecting write_only)","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:19:14: error: invalid pipe access modifier (expecting write_only)","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:25:32: error: invalid pipe access modifier (expecting write_only)","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:31:31: error: invalid pipe access modifier (expecting write_only)","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:47:13: error: invalid pipe access modifier (expecting read_only)","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:48:13: error: invalid pipe access modifier (expecting read_only)","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:54:31: error: invalid pipe access modifier (expecting read_only)","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:60:30: error: invalid pipe access modifier (expecting read_only)"} } }, ["err_opencl_builtin_pipe_invalid_arg"]={ [d]="err_opencl_builtin_pipe_invalid_arg", [e]="invalid argument type to function %0 (expecting %1 having %2)", [i]="invalid argument type to function A (expecting B having C)", [j]=k, [c]="invalid argument type to function (.*?) \\(expecting (.*?) having (.*?)\\)", [h]=a, [g]=m, [f]={"3a9952c9e7d0",1453773964,"[OpenCL] Pipe builtin functions","[OpenCL] Pipe builtin functions\n\nSummary:\nSupport for the pipe built-in functions for OpenCL 2.0.\nThe pipe builtin functions may have infinite kinds of element types, one approach\nwould be to just generate calls that would always use generic types such as void*.\nThis patch is based on bader\'s opencl support patch on SPIR-V branch.\n\nReviewers: Anastasia, pekka.jaaskelainen\n\nSubscribers: keryell, bader, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D15914\n\nllvm-svn: 258773"}, [b]={{A,1715,"/// Returns true if pipe element type is different from the pointer.\nstatic bool checkOpenCLPipePacketType(Sema &S, CallExpr *Call, unsigned Idx) {\n // ...\n // The Idx argument should be a pointer and the type of the pointer and\n // the type of pipe element should also be the same.\n if (!ArgTy || !S.Context.hasSameType(EltTy, ArgTy->getPointeeType()->getCanonicalTypeInternal())) {\n S.Diag(Call->getBeginLoc(), diag::err_opencl_builtin_pipe_invalid_arg) << Call->getDirectCallee() << S.Context.getPointerType(EltTy) << ArgIdx->getType() << ArgIdx->getSourceRange();"},{A,1748,"// Performs semantic analysis for the read/write_pipe call.\n// \\param S Reference to the semantic analyzer.\n// \\param Call A pointer to the builtin call.\n// \\return True if a semantic error has been found, false otherwise.\nstatic bool SemaBuiltinRWPipe(Sema &S, CallExpr *Call) {\n // ...\n case 4: {\n // ...\n // The call with 4 arguments should be\n // read/write_pipe(pipe T, reserve_id_t, uint, T*).\n // Check reserve_id_t.\n if (!Call->getArg(1)->getType()->isReserveIDT()) {\n S.Diag(Call->getBeginLoc(), diag::err_opencl_builtin_pipe_invalid_arg) << Call->getDirectCallee() << S.Context.OCLReserveIDTy << Call->getArg(1)->getType() << Call->getArg(1)->getSourceRange();"},{A,1758,"// Performs semantic analysis for the read/write_pipe call.\n// \\param S Reference to the semantic analyzer.\n// \\param Call A pointer to the builtin call.\n// \\return True if a semantic error has been found, false otherwise.\nstatic bool SemaBuiltinRWPipe(Sema &S, CallExpr *Call) {\n // ...\n case 4: {\n // ...\n if (!Arg2->getType()->isIntegerType() && !Arg2->getType()->isUnsignedIntegerType()) {\n S.Diag(Call->getBeginLoc(), diag::err_opencl_builtin_pipe_invalid_arg) << Call->getDirectCallee() << S.Context.UnsignedIntTy << Arg2->getType() << Arg2->getSourceRange();"},{A,1792,"// Performs a semantic analysis on the {work_group_/sub_group_\n// /_}reserve_{read/write}_pipe\n// \\param S Reference to the semantic analyzer.\n// \\param Call The call to the builtin function to be analyzed.\n// \\return True if a semantic error was found, false otherwise.\nstatic bool SemaBuiltinReserveRWPipe(Sema &S, CallExpr *Call) {\n // ...\n // Check the reserve size.\n if (!Call->getArg(1)->getType()->isIntegerType() && !Call->getArg(1)->getType()->isUnsignedIntegerType()) {\n S.Diag(Call->getBeginLoc(), diag::err_opencl_builtin_pipe_invalid_arg) << Call->getDirectCallee() << S.Context.UnsignedIntTy << Call->getArg(1)->getType() << Call->getArg(1)->getSourceRange();"},{A,1820,"// Performs a semantic analysis on {work_group_/sub_group_\n// /_}commit_{read/write}_pipe\n// \\param S Reference to the semantic analyzer.\n// \\param Call The call to the builtin function to be analyzed.\n// \\return True if a semantic error was found, false otherwise.\nstatic bool SemaBuiltinCommitRWPipe(Sema &S, CallExpr *Call) {\n // ...\n // Check reserve_id_t.\n if (!Call->getArg(1)->getType()->isReserveIDT()) {\n S.Diag(Call->getBeginLoc(), diag::err_opencl_builtin_pipe_invalid_arg) << Call->getDirectCallee() << S.Context.OCLReserveIDTy << Call->getArg(1)->getType() << Call->getArg(1)->getSourceRange();"}}, [l]={ ["clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl"]={"clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:15:3: error: invalid argument type to function \'read_pipe\' (expecting \'reserve_id_t\' having \'__private int\')","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:16:3: error: invalid argument type to function \'read_pipe\' (expecting \'unsigned int\' having \'__private reserve_id_t\')","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:17:3: error: invalid argument type to function \'read_pipe\' (expecting \'int *\' having \'__private int\')","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:23:3: error: invalid argument type to function \'reserve_read_pipe\' (expecting \'unsigned int\' having \'__global int *__private\')","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:30:3: error: invalid argument type to function \'work_group_commit_read_pipe\' (expecting \'reserve_id_t\' having \'__private int\')","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:44:3: error: invalid argument type to function \'write_pipe\' (expecting \'reserve_id_t\' having \'__private int\')","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:45:3: error: invalid argument type to function \'write_pipe\' (expecting \'unsigned int\' having \'__private reserve_id_t\')","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:46:3: error: invalid argument type to function \'write_pipe\' (expecting \'int *\' having \'__private int\')","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:52:3: error: invalid argument type to function \'reserve_write_pipe\' (expecting \'unsigned int\' having \'__global int *__private\')","clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl:59:3: error: invalid argument type to function \'work_group_commit_write_pipe\' (expecting \'reserve_id_t\' having \'__private int\')"} } }, ["err_opencl_builtin_to_addr_invalid_arg"]={ [d]="err_opencl_builtin_to_addr_invalid_arg", [e]="invalid argument %0 to function: %1, expecting a generic pointer argument", [i]="invalid argument A to function: B, expecting a generic pointer argument", [j]=k, [c]="invalid argument (.*?) to function\\: (.*?), expecting a generic pointer argument", [h]=a, [g]=m, [f]={"f7449a179b53",1463774078,"[OpenCL] Add to_{global|local|private} builtin functions.","[OpenCL] Add to_{global|local|private} builtin functions.\n\nOpenCL builtin functions to_{global|local|private} accepts argument of pointer type to arbitrary pointee type, and return a pointer to the same pointee type in different addr space, i.e.\n\nglobal gentype *to_global(gentype *p);\nIt is not desirable to declare it as\n\nglobal void *to_global(void *);\nin opencl header file since it misses diagnostics.\n\nThis patch implements these builtin functions as Clang builtin functions. In the builtin def file they are defined to have signature void*(void*). When handling call expressions, their declarations are re-written to have correct parameter type and return type corresponding to the call argument.\n\nIn codegen call to addr void *to_addr(void*) is generated with addrcasts or bitcasts to facilitate implementation in builtin library.\n\nDifferential Revision: http://reviews.llvm.org/D19932\n\nllvm-svn: 270261"}, [b]={{A,1861,"// OpenCL v2.0 s6.13.9 - Address space qualifier functions.\n// Performs semantic analysis for the to_global/local/private call.\n// \\param S Reference to the semantic analyzer.\n// \\param BuiltinID ID of the builtin function.\n// \\param Call A pointer to the builtin call.\n// \\return True if a semantic error has been found, false otherwise.\nstatic bool SemaOpenCLBuiltinToAddr(Sema &S, unsigned BuiltinID, CallExpr *Call) {\n // ...\n if (!RT->isPointerType() || RT->getPointeeType().getAddressSpace() == LangAS::opencl_constant) {\n S.Diag(Call->getBeginLoc(), diag::err_opencl_builtin_to_addr_invalid_arg) << Call->getArg(0) << Call->getDirectCallee() << Call->getSourceRange();"}}, [l]={ ["clang/test/SemaOpenCL/to_addr_builtin.cl"]={"clang/test/SemaOpenCL/to_addr_builtin.cl:23:10: error: invalid argument x to function: \'to_global\', expecting a generic pointer argument","clang/test/SemaOpenCL/to_addr_builtin.cl:30:20: error: invalid argument con to function: \'to_global\', expecting a generic pointer argument","clang/test/SemaOpenCL/to_addr_builtin.cl:37:20: error: invalid argument con_typedef to function: \'to_global\', expecting a generic pointer argument"} } }, ["err_opencl_cast_non_zero_to_event_t"]={ [d]="err_opencl_cast_non_zero_to_event_t", [e]="cannot cast non-zero value \'%0\' to \'event_t\'", [i]="cannot cast non-zero value \'A\' to \'event_t\'", [j]=k, [c]="cannot cast non\\-zero value \'(.*?)\' to \'event_t\'", [h]=a, [g]=m, [f]={"f881267db9a9",1480718311,"Mass-rename the handful of error_* diagnostics to err_*.","Mass-rename the handful of error_* diagnostics to err_*.\n\nllvm-svn: 288545"}, [b]={{cb,3039,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n if (!DestType->isScalarType() && !DestType->isVectorType() && !DestType->isMatrixType()) {\n // ...\n // OpenCL v2.0 s6.13.10 - Allow casts from \'0\' to event_t type.\n if (Self.getLangOpts().OpenCL && DestType->isEventT()) {\n // ...\n if (SrcExpr.get()->EvaluateAsInt(Result, Self.Context)) {\n // ...\n Self.Diag(OpRange.getBegin(), diag::err_opencl_cast_non_zero_to_event_t) << toString(CastInt, 10) << SrcExpr.get()->getSourceRange();"}}, [l]={ ["clang/test/SemaOpenCL/event_t.cl"]={"clang/test/SemaOpenCL/event_t.cl:17:7: error: cannot cast non-zero value \'1\' to \'event_t\'"} } }, ["err_opencl_cast_to_half"]={ [d]="err_opencl_cast_to_half", [e]="casting to type %0 is not allowed", [i]="casting to type A is not allowed", [j]=k, [c]="casting to type (.*?) is not allowed", [h]=a, [g]=m, [f]={"dd7f4566b1a8",1358942180,"Add a new LangOpt NativeHalfType. This option allows for native half/fp16","Add a new LangOpt NativeHalfType. This option allows for native half/fp16\noperations (as opposed to storage only half/fp16).\n\nAlso add some semantic checks for OpenCL half types.\n\nllvm-svn: 173254"}, [b]={{cb,3184,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n if (Self.getLangOpts().OpenCL && !Self.getOpenCLOptions().isAvailableOption(\"cl_khr_fp16\", Self.getLangOpts())) {\n if (DestType->isHalfType()) {\n Self.Diag(SrcExpr.get()->getBeginLoc(), diag::err_opencl_cast_to_half) << DestType << SrcExpr.get()->getSourceRange();"}}, [l]={ ["clang/test/SemaOpenCL/half.cl"]={"clang/test/SemaOpenCL/half.cl:17:14: error: casting to type \'half\' is not allowed"} } }, ["err_opencl_constant_no_init"]={ [d]="err_opencl_constant_no_init", [e]="variable in constant address space must be initialized", [i]="variable in constant address space must be initialized", [j]=k, [c]="variable in constant address space must be initialized", [h]=a, [g]=m, [f]={"96b94e610b84",1388758615,"[OpenCL] Variables in the constant address space must be initialized.","[OpenCL] Variables in the constant address space must be initialized.\n\nllvm-svn: 198417"}, [b]={{G,13714,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n // ...\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n // ...\n // OpenCL v1.1 s6.5.3: variables declared in the constant address space must\n // be initialized.\n if (!Var->isInvalidDecl() && Var->getType().getAddressSpace() == LangAS::opencl_constant && Var->getStorageClass() != SC_Extern && !Var->getInit()) {\n // ...\n if (!HasConstExprDefaultConstructor) {\n Diag(Var->getLocation(), diag::err_opencl_constant_no_init);"}}, [l]={ ["clang/test/SemaOpenCLCXX/addrspace-constructors.clcpp"]={"clang/test/SemaOpenCLCXX/addrspace-constructors.clcpp:3:16: error: variable in constant address space must be initialized","clang/test/SemaOpenCLCXX/addrspace-constructors.clcpp:38:16: error: variable in constant address space must be initialized"} } }, ["err_opencl_enqueue_kernel_blocks_no_args"]={ [d]="err_opencl_enqueue_kernel_blocks_no_args", [e]="blocks in this form of device side enqueue call are expected to have have no parameters", [i]="blocks in this form of device side enqueue call are expected to have have no parameters", [j]=k, [c]="blocks with parameters are not accepted in this prototype of enqueue_kernel call", [h]=a, [g]=m, [f]={Ib,1467718284,Gb,Hb}, [b]={{A,1581,"/// OpenCL C v2.0, s6.13.17 - Enqueue kernel function contains four different\n/// overload formats specified in Table 6.13.17.1.\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\nstatic bool SemaOpenCLBuiltinEnqueueKernel(Sema &S, CallExpr *TheCall) {\n // ...\n // With four arguments, there is only one form that the function could be\n // called in: no events and no variable arguments.\n if (NumArgs == 4) {\n // ...\n if (BPT->getPointeeType()->castAs<FunctionProtoType>()->getNumParams() > 0) {\n S.Diag(Arg3->getBeginLoc(), diag::err_opencl_enqueue_kernel_blocks_no_args);"}}, [l]={ [lb]={"clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:42:49: error: blocks with parameters are not accepted in this prototype of enqueue_kernel call"} } }, ["err_opencl_enqueue_kernel_blocks_non_local_void_args"]={ [d]="err_opencl_enqueue_kernel_blocks_non_local_void_args", [e]="blocks used in device side enqueue are expected to have parameters of type \'local void*\'", [i]="blocks used in device side enqueue are expected to have parameters of type \'local void*\'", [j]=k, [c]="blocks used in enqueue_kernel call are expected to have parameters of type \'local void\\*\'", [h]=a, [g]=m, [f]={Ib,1467718284,Gb,Hb}, [b]={{A,1402,"/// OpenCL C v2.0, s6.13.17.2 - Checks that the block parameters are all local\n/// void*, which is a requirement of device side enqueue.\nstatic bool checkOpenCLBlockArgs(Sema &S, Expr *BlockArg) {\n // ...\n // Iterate through the block parameters until either one is found that is not\n // a local void*, or the block is valid.\n for (ArrayRef<QualType>::iterator I = Params.begin(), E = Params.end(); I != E; ++I, ++ArgCounter) {\n if (!(*I)->isPointerType() || !(*I)->getPointeeType()->isVoidType() || (*I)->getPointeeType().getQualifiers().getAddressSpace() != LangAS::opencl_local) {\n // ...\n S.Diag(ErrorLoc, diag::err_opencl_enqueue_kernel_blocks_non_local_void_args);"}}, [l]={ [lb]={"clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:123:49: error: blocks used in enqueue_kernel call are expected to have parameters of type \'local void*\'","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:191:39: error: blocks used in enqueue_kernel call are expected to have parameters of type \'local void*\'","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:194:37: error: blocks used in enqueue_kernel call are expected to have parameters of type \'local void*\'","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:195:37: error: blocks used in enqueue_kernel call are expected to have parameters of type \'local void*\'","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:196:39: error: blocks used in enqueue_kernel call are expected to have parameters of type \'local void*\'","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:208:58: error: blocks used in enqueue_kernel call are expected to have parameters of type \'local void*\'","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:211:58: error: blocks used in enqueue_kernel call are expected to have parameters of type \'local void*\'","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:214:56: error: blocks used in enqueue_kernel call are expected to have parameters of type \'local void*\'","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:215:56: error: blocks used in enqueue_kernel call are expected to have parameters of type \'local void*\'"} } }, ["err_opencl_enqueue_kernel_incorrect_args"]={ [d]="err_opencl_enqueue_kernel_incorrect_args", [e]="illegal call to enqueue_kernel, incorrect argument types", [i]="illegal call to enqueue_kernel, incorrect argument types", [j]=k, [c]="illegal call to enqueue_kernel, incorrect argument types", [h]=a, [g]=m, [f]={Ib,1467718284,Gb,Hb}, [b]={{A,1644,"/// OpenCL C v2.0, s6.13.17 - Enqueue kernel function contains four different\n/// overload formats specified in Table 6.13.17.1.\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(void))\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\n/// int enqueue_kernel(queue_t queue,\n/// kernel_enqueue_flags_t flags,\n/// const ndrange_t ndrange,\n/// uint num_events_in_wait_list,\n/// clk_event_t *event_wait_list,\n/// clk_event_t *event_ret,\n/// void (^block)(local void*, ...),\n/// uint size0, ...)\nstatic bool SemaOpenCLBuiltinEnqueueKernel(Sema &S, CallExpr *TheCall) {\n // ...\n S.Diag(TheCall->getBeginLoc(), diag::err_opencl_enqueue_kernel_incorrect_args);"}}, [l]={ [lb]={"clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:164:3: error: illegal call to enqueue_kernel, incorrect argument types","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:166:3: error: illegal call to enqueue_kernel, incorrect argument types"} } }, ["err_opencl_enqueue_kernel_invalid_local_size_type"]={ [d]="err_opencl_enqueue_kernel_invalid_local_size_type", [e]="illegal call to enqueue_kernel, parameter needs to be specified as integer type", [i]="illegal call to enqueue_kernel, parameter needs to be specified as integer type", [j]=k, [c]="illegal call to enqueue_kernel, parameter needs to be specified as integer type", [h]=a, [g]=m, [f]={Ib,1467718284,Gb,Hb}, [b]={{A,15377,"/// Diagnose integer type and any valid implicit conversion to it.\nstatic bool checkOpenCLEnqueueIntType(Sema &S, Expr *E, const QualType &IntT) {\n // Taking into account implicit conversions,\n // allow any integer.\n if (!E->getType()->isIntegerType()) {\n S.Diag(E->getBeginLoc(), diag::err_opencl_enqueue_kernel_invalid_local_size_type);"}}, [l]={ [lb]={"clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:136:18: error: illegal call to enqueue_kernel, parameter needs to be specified as integer type","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:136:36: error: illegal call to enqueue_kernel, parameter needs to be specified as integer type","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:142:18: error: illegal call to enqueue_kernel, parameter needs to be specified as integer type"} } }, ["err_opencl_enqueue_kernel_local_size_args"]={ [d]="err_opencl_enqueue_kernel_local_size_args", [e]="mismatch in number of block parameters and local size arguments passed", [i]="mismatch in number of block parameters and local size arguments passed", [j]=k, [c]="mismatch in number of block parameters and local size arguments passed", [h]=a, [g]=m, [f]={Ib,1467718284,Gb,Hb}, [b]={{A,1493,"/// OpenCL v2.0, s6.13.17.1 - Check that sizes are provided for all\n/// \'local void*\' parameter of passed block.\nstatic bool checkOpenCLEnqueueVariadicArgs(Sema &S, CallExpr *TheCall, Expr *BlockArg, unsigned NumNonVarArgs) {\n // ...\n // For each argument passed to the block, a corresponding uint needs to\n // be passed to describe the size of the local memory.\n if (TotalNumArgs != NumBlockParams + NumNonVarArgs) {\n S.Diag(TheCall->getBeginLoc(), diag::err_opencl_enqueue_kernel_local_size_args);"}}, [l]={ [lb]={"clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:125:3: error: mismatch in number of block parameters and local size arguments passed","clang/test/SemaOpenCL/cl20-device-side-enqueue.cl:157:3: error: mismatch in number of block parameters and local size arguments passed"} } }, ["err_opencl_ext_vector_component_invalid_length"]={ [d]={{nil,q,"err_opencl_ext_vector_component_invalid_length"}}, [e]={{nil,q,"vector component access has invalid length %0. Supported: 1,2,3,4,8,16."}}, [i]={{nil,q,"vector component access has invalid length A. Supported: 1,2,3,4,8,16."}}, [j]=k, [c]="vector component access has invalid length (.*?)\\. Supported\\: 1,2,3,4,8,16\\.", [h]=a, [g]={{nil,q,m}}, [f]={"392a507103f3",1490102457,"[OpenCL] Added diagnostic for checking length of vector","[OpenCL] Added diagnostic for checking length of vector\n\nReviewers: Anastasia, cfe-commits\n\nReviewed By: Anastasia\n\nSubscribers: bader, yaxunl\n\nDifferential Revision: https://reviews.llvm.org/D30937\n\nllvm-svn: 298369"}, [b]={{"clang/lib/Sema/SemaExprMember.cpp",398,"/// 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 // OpenCL mode requires swizzle length to be in accordance with accepted\n // sizes. Clang however supports arbitrary lengths for other languages.\n if (S.getLangOpts().OpenCL && !HalvingSwizzle) {\n // ...\n if (IsValidOpenCLComponentSwizzleLength(SwizzleLength) == false) {\n S.Diag(OpLoc, diag::err_opencl_ext_vector_component_invalid_length) << SwizzleLength << SourceRange(CompLoc);"}}, [l]={ ["clang/test/SemaOpenCL/vector_swizzle_length.cl"]={"clang/test/SemaOpenCL/vector_swizzle_length.cl:8:7: error: vector component access has invalid length 5. Supported: 1,2,3,4,8,16.","clang/test/SemaOpenCL/vector_swizzle_length.cl:9:7: error: vector component access has invalid length 5. Supported: 1,2,3,4,8,16."} } }, ["err_opencl_extension_and_feature_differs"]={ [d]={{nil,C,"err_opencl_extension_and_feature_differs"}}, [e]={{nil,C,"options %0 and %1 are set to different values"}}, [i]={{nil,C,"options A and B are set to different values"}}, [j]=k, [c]="options (.*?) and (.*?) are set to different values", [h]=a, [g]={{nil,C,V}}, [f]={"826905787ae4",1621595243,"[OpenCL] Add support of OpenCL C 3.0 __opencl_c_fp64","[OpenCL] Add support of OpenCL C 3.0 __opencl_c_fp64\n\nThere already exists cl_khr_fp64 extension. So OpenCL C 3.0\nand higher should use the feature, earlier versions still\nuse the extension. OpenCL C 3.0 API spec states that extension\nwill be not described in the option string if corresponding\noptional functionality is not supported (see 4.2. Querying Devices).\nDue to that fact the usage of features for OpenCL C 3.0 must\nbe as follows:\n\n```\n$ clang -Xclang -cl-ext=+cl_khr_fp64,+__opencl_c_fp64 ...\n\n$ clang -Xclang -cl-ext=-cl_khr_fp64,-__opencl_c_fp64 ...\n```\n\ne.g. the feature and the equivalent extension (if exists)\nmust be set to the same values\n\nReviewed By: Anastasia\n\nDifferential Revision: https://reviews.llvm.org/D96524"}, [b]={{"clang/lib/Basic/OpenCLOptions.cpp",149,"bool OpenCLOptions::diagnoseFeatureExtensionDifferences(const TargetInfo &TI, DiagnosticsEngine &Diags) {\n // ...\n for (auto &ExtAndFeat : FeatureExtensionMap)\n if (TI.hasFeatureEnabled(OpenCLFeaturesMap, ExtAndFeat.first) != TI.hasFeatureEnabled(OpenCLFeaturesMap, ExtAndFeat.second)) {\n // ...\n Diags.Report(diag::err_opencl_extension_and_feature_differs) << ExtAndFeat.first << ExtAndFeat.second;"}} }, ["err_opencl_extern_block_declaration"]={ [d]="err_opencl_extern_block_declaration", [e]="invalid block variable declaration - using \'extern\' storage class is disallowed", [i]="invalid block variable declaration - using \'extern\' storage class is disallowed", [j]=k, [c]="invalid block variable declaration \\- using \'extern\' storage class is disallowed", [h]=a, [g]=m, [f]={yb,1457011999,xb,wb}, [b]={{G,8573,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n if (T->isBlockPointerType()) {\n // ...\n if (NewVD->hasExternalStorage()) {\n Diag(NewVD->getLocation(), diag::err_opencl_extern_block_declaration);"}}, [l]={ [U]={"clang/test/SemaOpenCL/invalid-block.cl:20:14: error: invalid block variable declaration - using \'extern\' storage class is disallowed","clang/test/SemaOpenCL/invalid-block.cl:24:16: error: invalid block variable declaration - using \'extern\' storage class is disallowed"} } }, ["err_opencl_feature_requires"]={ [d]={{nil,C,"err_opencl_feature_requires"}}, [e]={{nil,C,"feature %0 requires support of %1 feature"}}, [i]={{nil,C,"feature A requires support of B feature"}}, [j]=k, [c]="feature (.*?) requires support of (.*?) feature", [h]=a, [g]={{nil,C,V}}, [f]={"ff13189c5d0d",1624436334,"[RISCV] Unify the arch string parsing logic to to RISCVISAInfo.","[RISCV] Unify the arch string parsing logic to to RISCVISAInfo.\n\nHow many place you need to modify when implementing a new extension for RISC-V?\n\nAt least 7 places as I know:\n\n- Add new SubtargetFeature at RISCV.td\n- -march parser in RISCV.cpp\n- RISCVTargetInfo::initFeatureMap@RISCV.cpp for handling feature vector.\n- RISCVTargetInfo::getTargetDefines@RISCV.cpp for pre-define marco.\n- Arch string parser for ELF attribute in RISCVAsmParser.cpp\n- ELF attribute emittion in RISCVAsmParser.cpp, and make sure it\'s in\n canonical order...\n- ELF attribute emittion in RISCVTargetStreamer.cpp, and again, must in\n canonical order...\n\nAnd now, this patch provide an unified infrastructure for handling (almost)\neverything of RISC-V arch string.\n\nAfter this patch, you only need to update 2 places for implement an extension\nfor RISC-V:\n- Add new SubtargetFeature at RISCV.td, hmmm, it\'s hard to avoid.\n- Add new entry to RISCVSupportedExtension@RISCVISAInfo.cpp or\n SupportedExperimentalExtensions@RISCVISAInfo.cpp .\n\nMost codes are come from existing -march parser, but with few new feature/bug\nfixes:\n- Accept version for -march, e.g. -march=rv32i2p0.\n- Reject version info with `p` but without minor version number like `rv32i2p`.\n\nDifferential Revision: https://reviews.llvm.org/D105168"}, [b]={{"clang/lib/Basic/OpenCLOptions.cpp",134,"bool OpenCLOptions::diagnoseUnsupportedFeatureDependencies(const TargetInfo &TI, DiagnosticsEngine &Diags) {\n // ...\n for (auto &FeaturePair : DependentFeaturesList) {\n // ...\n if (TI.hasFeatureEnabled(OpenCLFeaturesMap, Feature) && !TI.hasFeatureEnabled(OpenCLFeaturesMap, Dep)) {\n // ...\n Diags.Report(diag::err_opencl_feature_requires) << Feature << Dep;"}} }, ["err_opencl_function_pointer"]={ [d]={{nil,q,"err_opencl_function_pointer"}}, [e]={{nil,C,"%select{pointers|references}0 to functions are not allowed"},{hb,q,"pointers to functions are not allowed"}}, [i]={{nil,C,{{"pointers","references"}," to functions are not allowed"}},{hb,q,"pointers to functions are not allowed"}}, [j]=k, [c]="(?:pointers|references) to functions are not allowed", [h]=a, [g]={{nil,q,m}}, [f]={"037dbe9535c9",1496426938,"[OpenCL] Harden function pointer diagnostics.","[OpenCL] Harden function pointer diagnostics.\n\nSummary: Improve OpenCL type checking by rejecting function pointer types.\n\nReviewers: Anastasia, yaxunl\n\nReviewed By: Anastasia\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D33821\n\nllvm-svn: 304575"}, [b]={{G,7347,"/// Returns true if there hasn\'t been any invalid type diagnosed.\nstatic bool diagnoseOpenCLTypes(Sema &Se, VarDecl *NewVD) {\n // ...\n // OpenCL v1.0 s6.8.a.3: Pointers to functions are not allowed.\n if (!Se.getOpenCLOptions().isAvailableOption(\"__cl_clang_function_pointers\", Se.getLangOpts())) {\n // ...\n while (NR->isPointerType() || NR->isMemberFunctionPointerType() || NR->isReferenceType()) {\n if (NR->isFunctionPointerType() || NR->isMemberFunctionPointerType() || NR->isFunctionReferenceType()) {\n Se.Diag(NewVD->getLocation(), diag::err_opencl_function_pointer) << NR->isReferenceType();"},{H,2185,"/// Build a pointer type.\n///\n/// \\param T The type to which we\'ll be building a pointer.\n///\n/// \\param Loc The location of the entity whose type involves this\n/// pointer type or, if there is no such entity, the location of the\n/// type that will have pointer type.\n///\n/// \\param Entity The name of the entity that involves the pointer\n/// type, if known.\n///\n/// \\returns A suitable pointer type, if there are no\n/// errors. Otherwise, returns a NULL type.\nQualType Sema::BuildPointerType(QualType T, SourceLocation Loc, DeclarationName Entity) {\n // ...\n if (T->isFunctionType() && getLangOpts().OpenCL && !getOpenCLOptions().isAvailableOption(\"__cl_clang_function_pointers\", getLangOpts())) {\n Diag(Loc, diag::err_opencl_function_pointer) << /*pointer*/ 0;"},{H,2285,"/// Build a reference type.\n///\n/// \\param T The type to which we\'ll be building a reference.\n///\n/// \\param Loc The location of the entity whose type involves this\n/// reference type or, if there is no such entity, the location of the\n/// type that will have reference type.\n///\n/// \\param Entity The name of the entity that involves the reference\n/// type, if known.\n///\n/// \\returns A suitable reference type, if there are no\n/// errors. Otherwise, returns a NULL type.\nQualType Sema::BuildReferenceType(QualType T, bool SpelledAsLValue, SourceLocation Loc, DeclarationName Entity) {\n // ...\n if (T->isFunctionType() && getLangOpts().OpenCL && !getOpenCLOptions().isAvailableOption(\"__cl_clang_function_pointers\", getLangOpts())) {\n Diag(Loc, diag::err_opencl_function_pointer) << /*reference*/ 1;"},{H,3103,"/// Build a member pointer type \\c T Class::*.\n///\n/// \\param T the type to which the member pointer refers.\n/// \\param Class the class type into which the member pointer points.\n/// \\param Loc the location where this type begins\n/// \\param Entity the name of the entity that will have this member pointer type\n///\n/// \\returns a member pointer type, if successful, or a NULL type if there was\n/// an error.\nQualType Sema::BuildMemberPointerType(QualType T, QualType Class, SourceLocation Loc, DeclarationName Entity) {\n // ...\n if (T->isFunctionType() && getLangOpts().OpenCL && !getOpenCLOptions().isAvailableOption(\"__cl_clang_function_pointers\", getLangOpts())) {\n Diag(Loc, diag::err_opencl_function_pointer) << /*pointer*/ 0;"}}, [l]={ ["clang/test/SemaOpenCLCXX/members.clcpp"]={"clang/test/SemaOpenCLCXX/members.clcpp:15:15: error: pointers to functions are not allowed","clang/test/SemaOpenCLCXX/members.clcpp:21:9: error: pointers to functions are not allowed"} } }, ["err_opencl_function_variable"]={ [d]="err_opencl_function_variable", [e]="%select{non-kernel function|function scope}0 variable cannot be declared in %1 address space", [i]={{nil,nil,{{"non-kernel function","function scope"}," variable cannot be declared in B address space"}}}, [j]=k, [c]="(?:non\\-kernel function|function scope) variable cannot be declared in (.*?) address space", [h]=a, [g]=m, [f]={"782d5f43ca4e",1457030320,"[OpenCL] Improve diagnostics of address spaces for variables in function","[OpenCL] Improve diagnostics of address spaces for variables in function\n\n - Prevent local variables to be declared in global AS\n - Diagnose AS of local variables with an extern storage class\n as if they would be in a program scope\n\nReview: http://reviews.llvm.org/D17345\nllvm-svn: 262641"}, [b]={{G,8599,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n // FIXME: Adding local AS in C++ for OpenCL might make sense.\n if (NewVD->isFileVarDecl() || NewVD->isStaticLocal() || NewVD->hasExternalStorage()) {\n // ...\n } else {\n if (T.getAddressSpace() == LangAS::opencl_global) {\n Diag(NewVD->getLocation(), diag::err_opencl_function_variable) << 1 /*is any function*/ << \"global\";"},{G,8611,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n // FIXME: Adding local AS in C++ for OpenCL might make sense.\n if (NewVD->isFileVarDecl() || NewVD->isStaticLocal() || NewVD->hasExternalStorage()) {\n // ...\n } else {\n // ...\n if (T.getAddressSpace() == LangAS::opencl_constant || T.getAddressSpace() == LangAS::opencl_local) {\n // ...\n // OpenCL v1.1 s6.5.2 and s6.5.3: no local or constant variables\n // in functions.\n if (FD && !FD->hasAttr<OpenCLKernelAttr>()) {\n if (T.getAddressSpace() == LangAS::opencl_constant)\n Diag(NewVD->getLocation(), diag::err_opencl_function_variable) << 0 /*non-kernel only*/ << \"constant\";"},{G,8614,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n // FIXME: Adding local AS in C++ for OpenCL might make sense.\n if (NewVD->isFileVarDecl() || NewVD->isStaticLocal() || NewVD->hasExternalStorage()) {\n // ...\n } else {\n // ...\n if (T.getAddressSpace() == LangAS::opencl_constant || T.getAddressSpace() == LangAS::opencl_local) {\n // ...\n // OpenCL v1.1 s6.5.2 and s6.5.3: no local or constant variables\n // in functions.\n if (FD && !FD->hasAttr<OpenCLKernelAttr>()) {\n if (T.getAddressSpace() == LangAS::opencl_constant)\n // ...\n else\n Diag(NewVD->getLocation(), diag::err_opencl_function_variable) << 0 /*non-kernel only*/ << \"local\";"}}, [l]={ ["clang/test/SemaOpenCL/atomic-init.cl"]={"clang/test/SemaOpenCL/atomic-init.cl:10:21: error: function scope variable cannot be declared in global address space"} } }, ["err_opencl_global_invalid_addr_space"]={ [d]="err_opencl_global_invalid_addr_space", [e]="%select{program scope|static local|extern}0 variable must reside in %1 address space", [i]={{nil,nil,{{"program scope","static local","extern"}," variable must reside in B address space"}}}, [j]=k, [c]="(?:program scope|static local|extern) variable must reside in (.*?) address space", [h]=a, [g]=m, [f]={"9812634c5243",1365118571,"Add an error to check that all program scope variables are in the constant address space in OpenCL.","Add an error to check that all program scope variables are in the constant address space in OpenCL.\n\nllvm-svn: 178811"}, [b]={{G,8589,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n // FIXME: Adding local AS in C++ for OpenCL might make sense.\n if (NewVD->isFileVarDecl() || NewVD->isStaticLocal() || NewVD->hasExternalStorage()) {\n if (!T->isSamplerT() && !T->isDependentType() && !(T.getAddressSpace() == LangAS::opencl_constant || (T.getAddressSpace() == LangAS::opencl_global && getOpenCLOptions().areProgramScopeVariablesSupported(getLangOpts())))) {\n // ...\n if (getOpenCLOptions().areProgramScopeVariablesSupported(getLangOpts()))\n Diag(NewVD->getLocation(), diag::err_opencl_global_invalid_addr_space) << Scope << \"global or constant\";"},{G,8592,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n // FIXME: Adding local AS in C++ for OpenCL might make sense.\n if (NewVD->isFileVarDecl() || NewVD->isStaticLocal() || NewVD->hasExternalStorage()) {\n if (!T->isSamplerT() && !T->isDependentType() && !(T.getAddressSpace() == LangAS::opencl_constant || (T.getAddressSpace() == LangAS::opencl_global && getOpenCLOptions().areProgramScopeVariablesSupported(getLangOpts())))) {\n // ...\n if (getOpenCLOptions().areProgramScopeVariablesSupported(getLangOpts()))\n // ...\n else\n Diag(NewVD->getLocation(), diag::err_opencl_global_invalid_addr_space) << Scope << \"constant\";"}}, [l]={ ["clang/test/Parser/opencl-storage-class.cl"]={"clang/test/Parser/opencl-storage-class.cl:11:14: error: static local variable must reside in constant address space","clang/test/Parser/opencl-storage-class.cl:13:14: error: extern variable must reside in constant address space"} } }, ["err_opencl_half_declaration"]={ [d]="err_opencl_half_declaration", [e]="declaring variable of type %0 is not allowed", [i]="declaring variable of type A is not allowed", [j]=k, [c]="declaring variable of type (.*?) is not allowed", [h]=a, [g]=m, [f]={"dd7f4566b1a8",1358942180,"Add a new LangOpt NativeHalfType. This option allows for native half/fp16","Add a new LangOpt NativeHalfType. This option allows for native half/fp16\noperations (as opposed to storage only half/fp16).\n\nAlso add some semantic checks for OpenCL half types.\n\nllvm-svn: 173254"}, [b]={{G,7361,"/// Returns true if there hasn\'t been any invalid type diagnosed.\nstatic bool diagnoseOpenCLTypes(Sema &Se, VarDecl *NewVD) {\n // ...\n if (!Se.getOpenCLOptions().isAvailableOption(\"cl_khr_fp16\", Se.getLangOpts())) {\n // OpenCL v1.2 s6.1.1.1: reject declaring variables of the half and\n // half array type (unless the cl_khr_fp16 extension is enabled).\n if (Se.Context.getBaseElementType(R)->isHalfType()) {\n Se.Diag(NewVD->getLocation(), diag::err_opencl_half_declaration) << R;"}}, [l]={ ["clang/test/SemaOpenCLCXX/template-opencl-types.clcpp"]={"clang/test/SemaOpenCLCXX/template-opencl-types.clcpp:22:8: error: declaring variable of type \'__private half\' is not allowed","clang/test/SemaOpenCLCXX/template-opencl-types.clcpp:10:5: error: declaring variable of type \'__private half\' is not allowed"} } }, ["err_opencl_half_load_store"]={ [d]="err_opencl_half_load_store", [e]="%select{loading directly from|assigning directly to}0 pointer to type %1 requires cl_khr_fp16. Use vector data %select{load|store}0 builtin functions instead", [i]={{nil,nil,{{"loading directly from","assigning directly to"}," pointer to type B requires cl_khr_fp16. Use vector data ",{"load","store"}," builtin functions instead"}}}, [j]=k, [c]="(?:loading directly from|assigning directly to) pointer to type (.*?) requires cl_khr_fp16\\. Use vector data (?:load|store) builtin functions instead", [h]=a, [g]=m, [f]={"6ced97aaae91",1360632583,"Diagnose loads of \'half\' l-values in OpenCL.","Diagnose loads of \'half\' l-values in OpenCL.\nPatch by Joey Gouly!\n\nllvm-svn: 174928"}, [b]={{E,681,"ExprResult Sema::DefaultLvalueConversion(Expr *E) {\n // ...\n // OpenCL usually rejects direct accesses to values of \'half\' type.\n if (getLangOpts().OpenCL && !getOpenCLOptions().isAvailableOption(\"cl_khr_fp16\", getLangOpts()) && T->isHalfType()) {\n Diag(E->getExprLoc(), diag::err_opencl_half_load_store) << 0 << T;"},{E,14458,"// C99 6.5.16.1\nQualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType, BinaryOperatorKind Opc) {\n // ...\n // OpenCL v1.2 s6.1.1.1 p2:\n // The half data type can only be used to declare a pointer to a buffer that\n // contains half values\n if (getLangOpts().OpenCL && !getOpenCLOptions().isAvailableOption(\"cl_khr_fp16\", getLangOpts()) && LHSType->isHalfType()) {\n Diag(Loc, diag::err_opencl_half_load_store) << 1 << LHSType.getUnqualifiedType();"}}, [l]={ ["clang/test/SemaOpenCLCXX/half.clcpp"]={"clang/test/SemaOpenCLCXX/half.clcpp:8:12: error: loading directly from pointer to type \'__private half\' requires cl_khr_fp16. Use vector data load builtin functions instead"} } }, ["err_opencl_implicit_vector_conversion"]={ [d]="err_opencl_implicit_vector_conversion", [e]="implicit conversions between vector types (%0 and %1) are not permitted", [i]="implicit conversions between vector types (A and B) are not permitted", [j]=k, [c]="implicit conversions between vector types \\((.*?) and (.*?)\\) are not permitted", [h]=a, [g]=m, [f]={"f961e755b1a9",1440957999,"[OpenCL] Improve diagnostics detecting implicit vector conversion.","[OpenCL] Improve diagnostics detecting implicit vector conversion.\n\nReviewers: pekka.jaaskelainen\n\nDifferential Revision: http://reviews.llvm.org/D12470\n\nllvm-svn: 246393"}, [b]={{E,11162,"QualType Sema::CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversions, bool AllowBoolOperation, bool ReportInvalid) {\n // ...\n // OpenCL V1.1 6.2.6.p1:\n // If the operands are of more than one vector type, then an error shall\n // occur. Implicit conversions between vector types are not permitted, per\n // section 6.2.1.\n if (getLangOpts().OpenCL && RHSVecType && isa<ExtVectorType>(RHSVecType) && LHSVecType && isa<ExtVectorType>(LHSVecType)) {\n Diag(Loc, diag::err_opencl_implicit_vector_conversion) << LHSType << RHSType;"}}, [l]={ ["clang/test/SemaOpenCL/cond.cl"]={"clang/test/SemaOpenCL/cond.cl:87:12: error: implicit conversions between vector types (\'int2\' (vector of 2 \'int\' values) and \'float2\' (vector of 2 \'float\' values)) are not permitted","clang/test/SemaOpenCL/cond.cl:118:12: error: implicit conversions between vector types (\'char3\' (vector of 3 \'char\' values) and \'char2\' (vector of 2 \'char\' values)) are not permitted"} } }, ["err_opencl_invalid_access_qualifier"]={ [d]="err_opencl_invalid_access_qualifier", [e]="access qualifier can only be used for pipe and image type", [i]="access qualifier can only be used for pipe and image type", [j]=k, [c]="access qualifier can only be used for pipe and image type", [h]=a, [g]=m, [f]={"11e13f60ea8d",1456456383,"[OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr","[OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr\n\nSummary:\nOpenCL access qualifiers are now not only used for image types, refine it to avoid misleading,\n\nAdd semacheck for OpenCL access qualifier as well as test caees.\n\nReviewers: pekka.jaaskelainen, Anastasia, aaron.ballman\n\nSubscribers: aaron.ballman, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D16040\n\nllvm-svn: 261961"}, [b]={{H,8401,"/// Handle OpenCL Access Qualifier Attribute.\nstatic void HandleOpenCLAccessAttr(QualType &CurType, const ParsedAttr &Attr, Sema &S) {\n // OpenCL v2.0 s6.6 - Access qualifier can be used only for image and pipe type.\n if (!(CurType->isImageType() || CurType->isPipeType())) {\n S.Diag(Attr.getLoc(), diag::err_opencl_invalid_access_qualifier);"}}, [l]={ ["clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl"]={"clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl:5:10: error: access qualifier can only be used for pipe and image type"} } }, ["err_opencl_invalid_block_declaration"]={ [d]="err_opencl_invalid_block_declaration", [e]="invalid block variable declaration - must be %select{const qualified|initialized}0", [i]={{nil,nil,{"invalid block variable declaration - must be ",{"const qualified","initialized"}}}}, [j]=k, [c]="invalid block variable declaration \\- must be (?:const qualified|initialized)", [h]=a, [g]=m, [f]={yb,1457011999,xb,wb}, [b]={{G,8567,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n if (T->isBlockPointerType()) {\n // OpenCL v2.0 s6.12.5 - Any block declaration must be const qualified and\n // can\'t use \'extern\' storage class.\n if (!T.isConstQualified()) {\n Diag(NewVD->getLocation(), diag::err_opencl_invalid_block_declaration) << 0 /*const*/;"},{G,14031,"void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {\n // ...\n if (getLangOpts().OpenCL) {\n // OpenCL v2.0 s6.12.5 - Every block variable declaration must have an\n // initialiser\n if (var->getTypeSourceInfo()->getType()->isBlockPointerType() && !var->hasInit()) {\n Diag(var->getLocation(), diag::err_opencl_invalid_block_declaration) << 1 /*Init*/;"}}, [l]={ [U]={"clang/test/SemaOpenCL/invalid-block.cl:16:15: error: invalid block variable declaration - must be initialized"} } }, ["err_opencl_invalid_param"]={ [d]={{nil,p,"err_opencl_invalid_param"}}, [e]={{nil,p,"declaring function parameter of type %0 is not allowed%select{; did you forget * ?|}1"}}, [i]={{nil,p,{"declaring function parameter of type A is not allowed",{"; did you forget * ?",a}}}}, [j]=k, [c]="declaring function parameter of type (.*?) is not allowed(?:; did you forget \\* \\?|)", [h]=a, [g]={{nil,p,m}}, [f]={"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"}, [b]={{H,5525,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // OpenCL disallows functions without a prototype, but it doesn\'t enforce\n // strict prototypes as in C2x because it allows a function definition to\n // have an identifier list. See OpenCL 3.0 6.11/g for more details.\n if (!FTI.NumParams && !FTI.isVariadic && !LangOpts.requiresStrictPrototypes() && !LangOpts.OpenCL) {\n // ...\n } else {\n // ...\n for (unsigned i = 0, e = FTI.NumParams; i != e; ++i) {\n // ...\n // Look for \'void\'. void is allowed only as a single parameter to a\n // function with no other parameters (C99 6.7.5.3p10). We record\n // int(void) as a FunctionProtoType with an empty parameter list.\n if (ParamTy->isVoidType()) {\n // ...\n } else if (ParamTy->isHalfType()) {\n // Disallow half FP parameters.\n // FIXME: This really should be in BuildFunctionType.\n if (S.getLangOpts().OpenCL) {\n if (!S.getOpenCLOptions().isAvailableOption(\"cl_khr_fp16\", S.getLangOpts())) {\n S.Diag(Param->getLocation(), diag::err_opencl_invalid_param) << ParamTy << 0;"},{H,5548,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // OpenCL disallows functions without a prototype, but it doesn\'t enforce\n // strict prototypes as in C2x because it allows a function definition to\n // have an identifier list. See OpenCL 3.0 6.11/g for more details.\n if (!FTI.NumParams && !FTI.isVariadic && !LangOpts.requiresStrictPrototypes() && !LangOpts.OpenCL) {\n // ...\n } else {\n // ...\n for (unsigned i = 0, e = FTI.NumParams; i != e; ++i) {\n // ...\n // Look for \'void\'. void is allowed only as a single parameter to a\n // function with no other parameters (C99 6.7.5.3p10). We record\n // int(void) as a FunctionProtoType with an empty parameter list.\n if (ParamTy->isVoidType()) {\n // ...\n } else if (ParamTy->isHalfType()) {\n // ...\n } else if (!FTI.hasPrototype) {\n // ...\n } else if (S.getLangOpts().OpenCL && ParamTy->isBlockPointerType()) {\n // ...\n S.Diag(Param->getLocation(), diag::err_opencl_invalid_param) << ParamTy << 1 /*hint off*/;"}}, [l]={ ["clang/test/SemaCXX/GH61441.cpp"]={"clang/test/SemaCXX/GH61441.cpp:7:22: error: declaring function parameter of type \'__private half\' is not allowed; did you forget * ?","clang/test/SemaCXX/GH61441.cpp:8:22: error: declaring function parameter of type \'void (__generic ^const __private)(__private int)\' is not allowed"} } }, ["err_opencl_invalid_read_write"]={ [d]="err_opencl_invalid_read_write", [e]={{nil,C,"access qualifier %0 can not be used for %1 %select{|prior to OpenCL C version 2.0 or in version 3.0 and without __opencl_c_read_write_images feature}2"},{hb,nil,"access qualifier %0 can not be used for %1 %select{|prior to OpenCL version 2.0}2"}}, [i]={{nil,C,{"access qualifier A can not be used for B ",{a,"prior to OpenCL C version 2.0 or in version 3.0 and without __opencl_c_read_write_images feature"}}},{hb,nil,{"access qualifier A can not be used for B ",{a,"prior to OpenCL version 2.0"}}}}, [j]=k, [c]="access qualifier (.*?) can not be used for (.*?) (?:|prior to OpenCL C version 2\\.0 or in version 3\\.0 and without __opencl_c_read_write_images feature)", [h]=a, [g]=m, [f]={"11e13f60ea8d",1456456383,"[OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr","[OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr\n\nSummary:\nOpenCL access qualifiers are now not only used for image types, refine it to avoid misleading,\n\nAdd semacheck for OpenCL access qualifier as well as test caees.\n\nReviewers: pekka.jaaskelainen, Anastasia, aaron.ballman\n\nSubscribers: aaron.ballman, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D16040\n\nllvm-svn: 261961"}, [b]={{Q,8324,"static void handleOpenCLAccessAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n // OpenCL v2.0 s6.6 - read_write can be used for image types to specify that\n // an image object can be read and written. OpenCL v2.0 s6.13.6 - A kernel\n // cannot read from and write to the same pipe object. Using the read_write\n // (or __read_write) qualifier with the pipe qualifier is a compilation error.\n // OpenCL v3.0 s6.8 - For OpenCL C 2.0, or with the\n // __opencl_c_read_write_images feature, image objects specified as arguments\n // to a kernel can additionally be declared to be read-write.\n // C++ for OpenCL 1.0 inherits rule from OpenCL C v2.0.\n // C++ for OpenCL 2021 inherits rule from OpenCL C v3.0.\n if (const auto *PDecl = dyn_cast<ParmVarDecl>(D)) {\n // ...\n if (AL.getAttrName()->getName().contains(\"read_write\")) {\n // ...\n if (ReadWriteImagesUnsupported || DeclTy->isPipeType()) {\n S.Diag(AL.getLoc(), diag::err_opencl_invalid_read_write) << AL << PDecl->getType() << DeclTy->isImageType();"}}, [l]={ ["clang/test/SemaOpenCL/access-qualifier.cl"]={"clang/test/SemaOpenCL/access-qualifier.cl:39:18: error: access qualifier \'read_write\' can not be used for \'__read_write image1d_t\' prior to OpenCL C version 2.0 or in version 3.0 and without __opencl_c_read_write_images feature","clang/test/SemaOpenCL/access-qualifier.cl:99:17: error: access qualifier \'__read_write\' can not be used for \'__read_write image1d_t\' prior to OpenCL C version 2.0 or in version 3.0 and without __opencl_c_read_write_images feature"} } }, ["err_opencl_invalid_return"]={ [d]="err_opencl_invalid_return", [e]="declaring function return value of type %0 is not allowed %select{; did you forget * ?|}1", [i]={{nil,nil,{"declaring function return value of type A is not allowed ",{"; did you forget * ?",a}}}}, [j]=k, [c]="declaring function return value of type (.*?) is not allowed (?:; did you forget \\* \\?|)", [h]=a, [g]=m, [f]={yb,1457011999,xb,wb}, [b]={{H,5285,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // Do not allow returning half FP value.\n // FIXME: This really should be in BuildFunctionType.\n if (T->isHalfType()) {\n if (S.getLangOpts().OpenCL) {\n if (!S.getOpenCLOptions().isAvailableOption(\"cl_khr_fp16\", S.getLangOpts())) {\n S.Diag(D.getIdentifierLoc(), diag::err_opencl_invalid_return) << T << 0 /*pointer hint*/;"},{H,5302,"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 if (LangOpts.OpenCL) {\n // OpenCL v2.0 s6.12.5 - A block cannot be the return value of a\n // function.\n if (T->isBlockPointerType() || T->isImageType() || T->isSamplerT() || T->isPipeType()) {\n S.Diag(D.getIdentifierLoc(), diag::err_opencl_invalid_return) << T << 1 /*hint off*/;"}}, [l]={ ["clang/test/SemaOpenCLCXX/half.clcpp"]={"clang/test/SemaOpenCLCXX/half.clcpp:7:6: error: declaring function return value of type \'half\' is not allowed ; did you forget * ?"} } }, ["err_opencl_invalid_type_array"]={ [d]="err_opencl_invalid_type_array", [e]="array of %0 type is invalid in OpenCL", [i]="array of A type is invalid in OpenCL", [j]=k, [c]="array of (.*?) type is invalid in OpenCL", [h]=a, [g]=m, [f]={"89307aa3e9fc",1456288176,"[OpenCL] Add Sema checks for OpenCL 2.0 block","[OpenCL] Add Sema checks for OpenCL 2.0 block\n\nSummary:\nAdd Sema checks for opencl 2.0 new features: Block.\nThis patch is partitioned from http://reviews.llvm.org/D16047\n\nReviewers: Anastasia\n\nSubscribers: pekka.jaaskelainen, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D17436\n\nllvm-svn: 261719"}, [b]={{H,2692,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n // ...\n // OpenCL v2.0 s6.12.5 - Arrays of blocks are not supported.\n // OpenCL v2.0 s6.16.13.1 - Arrays of pipe type are not supported.\n // OpenCL v2.0 s6.9.b - Arrays of image/sampler type are not supported.\n if (getLangOpts().OpenCL) {\n // ...\n if (ArrType->isBlockPointerType() || ArrType->isPipeType() || ArrType->isSamplerT() || ArrType->isImageType()) {\n Diag(Loc, diag::err_opencl_invalid_type_array) << ArrType;"}}, [l]={ [U]={"clang/test/SemaOpenCL/invalid-block.cl:65:12: error: array of \'bl2_t\' (aka \'int (__generic ^const)(__private int)\') type is invalid in OpenCL"} } }, ["err_opencl_kernel_attr"]={ [d]="err_opencl_kernel_attr", [e]={{nil,z,"attribute %0 can only be applied to an OpenCL kernel function"},{F,nil,"attribute %0 can only be applied to a kernel function"}}, [i]={{nil,z,"attribute A can only be applied to an OpenCL kernel function"},{F,nil,"attribute A can only be applied to a kernel function"}}, [j]=k, [c]="attribute (.*?) can only be applied to an OpenCL kernel function", [h]=a, [g]=m, [f]={"2cd9db1cefbb",1386951328,"[OpenCL] Produce an error when the work group and vec type hint attributes","[OpenCL] Produce an error when the work group and vec type hint attributes\nare used on non-kernel functions.\n\nReviewed by Aaron over IRC!\n\nllvm-svn: 197243"}, [b]={{Q,9531,"/// ProcessDeclAttributeList - Apply all the decl attributes in the specified\n/// attribute list to the specified decl, ignoring any type attributes.\nvoid Sema::ProcessDeclAttributeList(Scope *S, Decl *D, const ParsedAttributesView &AttrList, const ProcessDeclAttributeOptions &Options) {\n // ...\n // FIXME: We should be able to handle this in TableGen as well. It would be\n // good to have a way to specify \"these attributes must appear as a group\",\n // for these. Additionally, it would be good to have a way to specify \"these\n // attribute must never appear as a group\" for attributes like cold and hot.\n if (!D->hasAttr<OpenCLKernelAttr>()) {\n // These attributes cannot be applied to a non-kernel function.\n if (const auto *A = D->getAttr<ReqdWorkGroupSizeAttr>()) {\n // ...\n Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A;"},{Q,9534,"/// ProcessDeclAttributeList - Apply all the decl attributes in the specified\n/// attribute list to the specified decl, ignoring any type attributes.\nvoid Sema::ProcessDeclAttributeList(Scope *S, Decl *D, const ParsedAttributesView &AttrList, const ProcessDeclAttributeOptions &Options) {\n // ...\n // FIXME: We should be able to handle this in TableGen as well. It would be\n // good to have a way to specify \"these attributes must appear as a group\",\n // for these. Additionally, it would be good to have a way to specify \"these\n // attribute must never appear as a group\" for attributes like cold and hot.\n if (!D->hasAttr<OpenCLKernelAttr>()) {\n // These attributes cannot be applied to a non-kernel function.\n if (const auto *A = D->getAttr<ReqdWorkGroupSizeAttr>()) {\n // ...\n } else if (const auto *A = D->getAttr<WorkGroupSizeHintAttr>()) {\n Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A;"},{Q,9537,"/// ProcessDeclAttributeList - Apply all the decl attributes in the specified\n/// attribute list to the specified decl, ignoring any type attributes.\nvoid Sema::ProcessDeclAttributeList(Scope *S, Decl *D, const ParsedAttributesView &AttrList, const ProcessDeclAttributeOptions &Options) {\n // ...\n // FIXME: We should be able to handle this in TableGen as well. It would be\n // good to have a way to specify \"these attributes must appear as a group\",\n // for these. Additionally, it would be good to have a way to specify \"these\n // attribute must never appear as a group\" for attributes like cold and hot.\n if (!D->hasAttr<OpenCLKernelAttr>()) {\n // These attributes cannot be applied to a non-kernel function.\n if (const auto *A = D->getAttr<ReqdWorkGroupSizeAttr>()) {\n // ...\n } else if (const auto *A = D->getAttr<WorkGroupSizeHintAttr>()) {\n // ...\n } else if (const auto *A = D->getAttr<VecTypeHintAttr>()) {\n Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A;"},{Q,9540,"/// ProcessDeclAttributeList - Apply all the decl attributes in the specified\n/// attribute list to the specified decl, ignoring any type attributes.\nvoid Sema::ProcessDeclAttributeList(Scope *S, Decl *D, const ParsedAttributesView &AttrList, const ProcessDeclAttributeOptions &Options) {\n // ...\n // FIXME: We should be able to handle this in TableGen as well. It would be\n // good to have a way to specify \"these attributes must appear as a group\",\n // for these. Additionally, it would be good to have a way to specify \"these\n // attribute must never appear as a group\" for attributes like cold and hot.\n if (!D->hasAttr<OpenCLKernelAttr>()) {\n // These attributes cannot be applied to a non-kernel function.\n if (const auto *A = D->getAttr<ReqdWorkGroupSizeAttr>()) {\n // ...\n } else if (const auto *A = D->getAttr<WorkGroupSizeHintAttr>()) {\n // ...\n } else if (const auto *A = D->getAttr<VecTypeHintAttr>()) {\n // ...\n } else if (const auto *A = D->getAttr<OpenCLIntelReqdSubGroupSizeAttr>()) {\n Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A;"}}, [l]={ ["clang/test/SemaCUDA/amdgpu-attrs.cu"]={"clang/test/SemaCUDA/amdgpu-attrs.cu:68:17: error: attribute \'reqd_work_group_size\' can only be applied to an OpenCL kernel function","clang/test/SemaCUDA/amdgpu-attrs.cu:72:17: error: attribute \'work_group_size_hint\' can only be applied to an OpenCL kernel function","clang/test/SemaCUDA/amdgpu-attrs.cu:76:17: error: attribute \'vec_type_hint\' can only be applied to an OpenCL kernel function","clang/test/SemaCUDA/amdgpu-attrs.cu:80:17: error: attribute \'intel_reqd_sub_group_size\' can only be applied to an OpenCL kernel function"} } }, ["err_opencl_logical_exclusive_or"]={ [d]="err_opencl_logical_exclusive_or", [e]="^^ is a reserved operator in OpenCL", [i]="^^ is a reserved operator in OpenCL", [j]=k, [c]="\\^\\^ is a reserved operator in OpenCL", [h]=a, [g]=K, [f]={"735c6cdebdcd",1454512634,"[OpenCL] Adding reserved operator logical xor for OpenCL","[OpenCL] Adding reserved operator logical xor for OpenCL\n\nThis patch adds the reserved operator ^^ when compiling for OpenCL (spec v1.1 s6.3.g),\nwhich results in a more meaningful error message.\n\nPatch by Neil Hickey!\n\nReview: http://reviews.llvm.org/D13280\n\nM test/SemaOpenCL/unsupported.cl\nM include/clang/Basic/TokenKinds.def\nM include/clang/Basic/DiagnosticParseKinds.td\nM lib/Basic/OperatorPrecedence.cpp\nM lib/Lex/Lexer.cpp\nM lib/Parse/ParseExpr.cpp\n\nllvm-svn: 259651"}, [b]={{"clang/lib/Parse/ParseExpr.cpp",420,"/// 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 (OpToken.is(tok::caretcaret)) {\n return ExprError(Diag(Tok, diag::err_opencl_logical_exclusive_or));"}}, [l]={ ["clang/test/SemaOpenCL/unsupported.cl"]={"clang/test/SemaOpenCL/unsupported.cl:20:21: error: ^^ is a reserved operator in OpenCL"} } }, ["err_opencl_multiple_access_qualifiers"]={ [d]="err_opencl_multiple_access_qualifiers", [e]="multiple access qualifiers", [i]="multiple access qualifiers", [j]=k, [c]="multiple access qualifiers", [h]=a, [g]=m, [f]={"11e13f60ea8d",1456456383,"[OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr","[OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr\n\nSummary:\nOpenCL access qualifiers are now not only used for image types, refine it to avoid misleading,\n\nAdd semacheck for OpenCL access qualifier as well as test caees.\n\nReviewers: pekka.jaaskelainen, Anastasia, aaron.ballman\n\nSubscribers: aaron.ballman, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D16040\n\nllvm-svn: 261961"}, [b]={{Q,8299,"static void handleOpenCLAccessAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n // Check if there is only one access qualifier.\n if (D->hasAttr<OpenCLAccessAttr>()) {\n if (D->getAttr<OpenCLAccessAttr>()->getSemanticSpelling() == AL.getSemanticSpelling()) {\n // ...\n } else {\n S.Diag(AL.getLoc(), diag::err_opencl_multiple_access_qualifiers) << D->getSourceRange();"},{H,8439,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // ...\n if (PrevAccessQual == AttrName.ltrim(\"_\")) {\n // ...\n } else {\n // ...\n S.Diag(Attr.getLoc(), diag::err_opencl_multiple_access_qualifiers);"}}, [l]={ ["clang/test/SemaOpenCL/access-qualifier.cl"]={"clang/test/SemaOpenCL/access-qualifier.cl:84:16: error: multiple access qualifiers","clang/test/SemaOpenCL/access-qualifier.cl:86:16: error: multiple access qualifiers","clang/test/SemaOpenCL/access-qualifier.cl:92:27: error: multiple access qualifiers"} } }, ["err_opencl_no_main"]={ [d]="err_opencl_no_main", [e]="%select{function|kernel}0 cannot be called \'main\'", [i]={{nil,nil,{{"function","kernel"}," cannot be called \'main\'"}}}, [j]=k, [c]="(?:function|kernel) cannot be called \'main\'", [h]=a, [g]=m, [f]={"a7310a8cfa9e",1383654639,"Do not allow functions or kernels called \'main\' in OpenCL.","Do not allow functions or kernels called \'main\' in OpenCL.\n\nllvm-svn: 194068"}, [b]={{G,12097,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n // ...\n if (getLangOpts().OpenCL) {\n Diag(FD->getLocation(), diag::err_opencl_no_main) << FD->hasAttr<OpenCLKernelAttr>();"}}, [l]={ ["clang/test/SemaOpenCL/invalid-kernel.cl"]={"clang/test/SemaOpenCL/invalid-kernel.cl:8:13: error: kernel cannot be called \'main\'","clang/test/SemaOpenCL/invalid-kernel.cl:12:5: error: function cannot be called \'main\'"} } }, ["err_opencl_nonconst_global_sampler"]={ [d]={{nil,q,"err_opencl_nonconst_global_sampler"}}, [e]={{nil,q,"global sampler requires a const or constant address space qualifier"}}, [i]={{nil,q,"global sampler requires a const or constant address space qualifier"}}, [j]=k, [c]="global sampler requires a const or constant address space qualifier", [h]=a, [g]={{nil,q,m}}, [f]={"511f0b8d02ae",1494235746,"[OpenCL] Check that global samplers are const","[OpenCL] Check that global samplers are const\n\nPatch by Simon Perretta.\n\nDifferential Revision: https://reviews.llvm.org/D32856\n\nllvm-svn: 302411"}, [b]={{G,7394,"/// Returns true if there hasn\'t been any invalid type diagnosed.\nstatic bool diagnoseOpenCLTypes(Sema &Se, VarDecl *NewVD) {\n // ...\n if (R->isSamplerT()) {\n // ...\n // OpenCL v1.2 s6.12.14.1:\n // A global sampler must be declared with either the constant address\n // space qualifier or with the const qualifier.\n if (DC->isTranslationUnit() && !(R.getAddressSpace() == LangAS::opencl_constant || R.isConstQualified())) {\n Se.Diag(NewVD->getLocation(), diag::err_opencl_nonconst_global_sampler);"}}, [l]={ ["clang/test/SemaOpenCL/sampler_t.cl"]={"clang/test/SemaOpenCL/sampler_t.cl:18:18: error: global sampler requires a const or constant address space qualifier","clang/test/SemaOpenCL/sampler_t.cl:50:11: error: global sampler requires a const or constant address space qualifier"} } }, ["err_opencl_pointer_to_type"]={ [d]="err_opencl_pointer_to_type", [e]="pointer to type %0 is invalid in OpenCL", [i]="pointer to type A is invalid in OpenCL", [j]=k, [c]="pointer to type (.*?) is invalid in OpenCL", [h]=a, [g]=m, [f]={"379554ac5b15",1456371260,"[OpenCL] Add Sema checks for types","[OpenCL] Add Sema checks for types\n\nSummary:\nAdd Sema checks for opencl type: image, pipe....\nThis patch is partitioned from http://reviews.llvm.org/D16047\n\nReviewers: Anastasia, yaxunl\n\nSubscribers: pekka.jaaskelainen, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D17437\n\nllvm-svn: 261818"}, [b]={{H,5077,"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::Pointer:\n // ...\n // OpenCL v2.0 s6.9b - Pointer to image/sampler cannot be used.\n // OpenCL v2.0 s6.13.16.1 - Pointer to pipe cannot be used.\n // OpenCL v2.0 s6.12.5 - Pointers to Blocks are not allowed.\n if (LangOpts.OpenCL) {\n if (T->isImageType() || T->isSamplerT() || T->isPipeType() || T->isBlockPointerType()) {\n S.Diag(D.getIdentifierLoc(), diag::err_opencl_pointer_to_type) << T;"}}, [l]={ [U]={"clang/test/SemaOpenCL/invalid-block.cl:70:16: error: pointer to type \'bl2_t\' (aka \'int (__generic ^const)(__private int)\') is invalid in OpenCL","clang/test/SemaOpenCL/invalid-block.cl:74:10: error: pointer to type \'bl2_t\' (aka \'int (__generic ^const)(__private int)\') is invalid in OpenCL"} } }, ["err_opencl_ptrptr_kernel_param"]={ [d]="err_opencl_ptrptr_kernel_param", [e]="kernel parameter cannot be declared as a pointer to a pointer", [i]="kernel parameter cannot be declared as a pointer to a pointer", [j]=k, [c]="kernel parameter cannot be declared as a pointer to a pointer", [h]=a, [g]=m, [f]={"efb38192b0b2",1374542616,"Error on more illegal kernel argument types for OpenCL","Error on more illegal kernel argument types for OpenCL\n\nbool, half, pointers and structs / unions containing any\nof these are not allowed. Does not yet reject size_t and\nrelated integer types that are also disallowed.\n\nllvm-svn: 186908"}, [b]={{G,9454,"static void checkIsValidOpenCLKernelParameter(Sema &S, Declarator &D, ParmVarDecl *Param, llvm::SmallPtrSetImpl<const Type *> &ValidTypes) {\n // ...\n case PtrPtrKernelParam:\n // ...\n S.Diag(Param->getLocation(), diag::err_opencl_ptrptr_kernel_param);"}}, [l]={ ["clang/test/SemaOpenCL/invalid-kernel-parameters.cl"]={"clang/test/SemaOpenCL/invalid-kernel-parameters.cl:13:44: error: kernel parameter cannot be declared as a pointer to a pointer","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:14:47: error: kernel parameter cannot be declared as a pointer to a pointer","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:15:56: error: kernel parameter cannot be declared as a pointer to a pointer"} } }, ["err_opencl_requires_extension"]={ [d]="err_opencl_requires_extension", [e]="use of %select{type |declaration}0%1 requires %2 extension to be enabled", [i]={{nil,C,{"use of ",{"type","declaration"}," B requires C support"}},{hb,q,{"use of ",{"type","declaration"}," B requires C extension to be enabled"}},{nil,nil,{"use of ",{"type ","declaration"},"B requires C extension to be enabled"}}}, [j]=k, [c]="use of (?:type|declaration) (.*?) requires (.*?) support", [h]=a, [g]=m, [f]={"2e8331cab616",1481916128,"[OpenCL] Allow disabling types and declarations associated with extensions","[OpenCL] Allow disabling types and declarations associated with extensions\n\nAdded a map to associate types and declarations with extensions.\n\nRefactored existing diagnostic for disabled types associated with extensions and extended it to declarations for generic situation.\n\nFixed some bugs for types associated with extensions.\n\nAllow users to use pragma to declare types and functions for supported extensions, e.g.\n\n#pragma OPENCL EXTENSION the_new_extension_name : begin\n// declare types and functions associated with the extension here\n#pragma OPENCL EXTENSION the_new_extension_name : end\n\nDifferential Revision: https://reviews.llvm.org/D21698\n\nllvm-svn: 289979"}, [b]={{A,1417,"static bool checkOpenCLSubgroupExt(Sema &S, CallExpr *Call) {\n // OpenCL device can support extension but not the feature as extension\n // requires subgroup independent forward progress, but subgroup independent\n // forward progress is optional in OpenCL C 3.0 __opencl_c_subgroups feature.\n if (!S.getOpenCLOptions().isSupported(\"cl_khr_subgroups\", S.getLangOpts()) && !S.getOpenCLOptions().isSupported(\"__opencl_c_subgroups\", S.getLangOpts())) {\n S.Diag(Call->getBeginLoc(), diag::err_opencl_requires_extension) << 1 << Call->getDirectCallee() << \"cl_khr_subgroups or __opencl_c_subgroups\";"},{H,1540,"/// Convert the specified declspec to the appropriate type\n/// object.\n/// \\param state Specifies the declarator containing the declaration specifier\n/// to be converted, along with other associated processing state.\n/// \\returns The type described by the declaration specifiers. This function\n/// never returns null.\nstatic QualType ConvertDeclSpecToType(TypeProcessingState &state) {\n // ...\n case DeclSpec::TST_double:\n // ...\n if (S.getLangOpts().OpenCL) {\n if (!S.getOpenCLOptions().isSupported(\"cl_khr_fp64\", S.getLangOpts()))\n S.Diag(DS.getTypeSpecTypeLoc(), diag::err_opencl_requires_extension) << 0 << Result << (S.getLangOpts().getOpenCLCompatibleVersion() == 300 ? \"cl_khr_fp64 and __opencl_c_fp64\" : \"cl_khr_fp64\");"},{H,1763,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // ...\n if (S.getLangOpts().OpenCL) {\n // ...\n // OpenCL C v3.0 s6.3.3 - OpenCL image types require __opencl_c_images\n // support.\n // OpenCL C v3.0 s6.2.1 - OpenCL 3d image write types requires support\n // for OpenCL C 2.0, or OpenCL C 3.0 or newer and the\n // __opencl_c_3d_image_writes feature. OpenCL C v3.0 API s4.2 - For devices\n // that support OpenCL 3.0, cl_khr_3d_image_writes must be returned when and\n // only when the optional feature is supported\n if ((Result->isImageType() || Result->isSamplerT()) && (IsOpenCLC30Compatible && !OpenCLOptions.isSupported(\"__opencl_c_images\", S.getLangOpts()))) {\n S.Diag(DS.getTypeSpecTypeLoc(), diag::err_opencl_requires_extension) << 0 << Result << \"__opencl_c_images\";"},{H,1769,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // ...\n if (S.getLangOpts().OpenCL) {\n // ...\n // OpenCL C v3.0 s6.3.3 - OpenCL image types require __opencl_c_images\n // support.\n // OpenCL C v3.0 s6.2.1 - OpenCL 3d image write types requires support\n // for OpenCL C 2.0, or OpenCL C 3.0 or newer and the\n // __opencl_c_3d_image_writes feature. OpenCL C v3.0 API s4.2 - For devices\n // that support OpenCL 3.0, cl_khr_3d_image_writes must be returned when and\n // only when the optional feature is supported\n if ((Result->isImageType() || Result->isSamplerT()) && (IsOpenCLC30Compatible && !OpenCLOptions.isSupported(\"__opencl_c_images\", S.getLangOpts()))) {\n // ...\n } else if (Result->isOCLImage3dWOType() && !OpenCLOptions.isSupported(\"cl_khr_3d_image_writes\", S.getLangOpts())) {\n S.Diag(DS.getTypeSpecTypeLoc(), diag::err_opencl_requires_extension) << 0 << Result << (IsOpenCLC30Compatible ? \"cl_khr_3d_image_writes and __opencl_c_3d_image_writes\" : \"cl_khr_3d_image_writes\");"}}, [l]={ ["clang/test/SemaOpenCL/unsupported-image.cl"]={"clang/test/SemaOpenCL/unsupported-image.cl:67:24: error: use of type \'__write_only image3d_t\' requires cl_khr_3d_image_writes and __opencl_c_3d_image_writes support"} } }, ["err_opencl_scalar_type_rank_greater_than_vector_type"]={ [d]={{nil,q,"err_opencl_scalar_type_rank_greater_than_vector_type"}}, [e]={{nil,q,"scalar operand type has greater rank than the type of the vector element. (%0 and %1)"}}, [i]={{nil,q,"scalar operand type has greater rank than the type of the vector element. (A and B)"}}, [j]=k, [c]="scalar operand type has greater rank than the type of the vector element\\. \\((.*?) and (.*?)\\)", [h]=a, [g]={{nil,q,m}}, [f]={"1adf2652873d",1495805426,"[OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector ele...","[OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element\n\nReviewers: Anastasia\n\nReviewed By: Anastasia\n\nSubscribers: cfe-commits, bader, yaxunl\n\nDifferential Revision: https://reviews.llvm.org/D33353\n\nllvm-svn: 303986"}, [b]={{E,10706,"/// Try to convert a value of non-vector type to a vector type by converting\n/// the type to the element type of the vector and then performing a splat.\n/// If the language is OpenCL, we only use conversions that promote scalar\n/// rank; for C, Obj-C, and C++ we allow any real scalar conversion except\n/// for float->int.\n///\n/// OpenCL V2.0 6.2.6.p2:\n/// An error shall occur if any scalar operand type has greater rank\n/// than the type of the vector element.\n///\n/// \\param scalar - if non-null, actually perform the conversions\n/// \\return true if the operation fails (but without diagnosing the failure)\nstatic bool tryVectorConvertAndSplat(Sema &S, ExprResult *scalar, QualType scalarTy, QualType vectorEltTy, QualType vectorTy, unsigned &DiagID) {\n // ...\n if (vectorEltTy->isIntegralType(S.Context)) {\n if (S.getLangOpts().OpenCL && (scalarTy->isRealFloatingType() || (scalarTy->isIntegerType() && S.Context.getIntegerTypeOrder(vectorEltTy, scalarTy) < 0))) {\n DiagID = diag::err_opencl_scalar_type_rank_greater_than_vector_type;"},{E,11022,"/// Try to convert a value of non-vector type to a vector type by converting\n/// the type to the element type of the vector and then performing a splat.\n/// If the language is OpenCL, we only use conversions that promote scalar\n/// rank; for C, Obj-C, and C++ we allow any real scalar conversion except\n/// for float->int.\n///\n/// OpenCL V2.0 6.2.6.p2:\n/// An error shall occur if any scalar operand type has greater rank\n/// than the type of the vector element.\n///\n/// \\param scalar - if non-null, actually perform the conversions\n/// \\return true if the operation fails (but without diagnosing the failure)\nstatic bool tryVectorConvertAndSplat(Sema &S, ExprResult *scalar, QualType scalarTy, QualType vectorEltTy, QualType vectorTy, unsigned &DiagID) {\n // ...\n if (vectorEltTy->isIntegralType(S.Context)) {\n // ...\n } else if (vectorEltTy->isRealFloatingType()) {\n if (scalarTy->isRealFloatingType()) {\n if (S.getLangOpts().OpenCL && S.Context.getFloatingTypeOrder(vectorEltTy, scalarTy) < 0) {\n DiagID = diag::err_opencl_scalar_type_rank_greater_than_vector_type;"}}, [l]={ ["clang/test/SemaOpenCL/cond.cl"]={"clang/test/SemaOpenCL/cond.cl:92:12: error: scalar operand type has greater rank than the type of the vector element. (\'int2\' (vector of 2 \'int\' values) and \'float\')"} } }, ["err_opencl_sizeof_alignof_type"]={ [d]="err_opencl_sizeof_alignof_type", [e]={{nil,p,"invalid application of \'%0\' to a void type"},{w,u,"invalid application of \'%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align|__alignof}0\' to a void type"},{Kb,nil,"invalid application of \'%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align}0\' to a void type"}}, [i]={{nil,p,"invalid application of \'A\' to a void type"},{w,u,{"invalid application of \'",{"sizeof","alignof","vec_step","__builtin_omp_required_simd_align","__alignof"},"\' to a void type"}},{Kb,nil,{"invalid application of \'",{"sizeof","alignof","vec_step","__builtin_omp_required_simd_align"},"\' to a void type"}}}, [j]=k, [c]="invalid application of \'(.*?)\' to a void type", [h]=a, [g]=m, [f]={"4ba0f1e2d772",1388504869,"[OpenCL] Produce an error, instead of a warning, for sizeof(void) in OpenCL.","[OpenCL] Produce an error, instead of a warning, for sizeof(void) in OpenCL.\n\nPatch by joey.gouly@arm.com\n\nllvm-svn: 198264"}, [b]={{E,4311,"static bool CheckExtensionTraitOperandType(Sema &S, QualType T, SourceLocation Loc, SourceRange ArgRange, UnaryExprOrTypeTrait TraitKind) {\n // ...\n // Allow sizeof(void)/alignof(void) as an extension, unless in OpenCL where\n // this is an error (OpenCL v1.1 s6.3.k)\n if (T->isVoidType()) {\n unsigned DiagID = S.LangOpts.OpenCL ? diag::err_opencl_sizeof_alignof_type : diag::ext_sizeof_alignof_void_type;"}}, [l]={ ["clang/test/SemaOpenCL/sizeof.cl"]={"clang/test/SemaOpenCL/sizeof.cl:4:12: error: invalid application of \'sizeof\' to a void type"} } }, ["err_opencl_taking_address_capture"]={ [d]={{nil,F,"err_opencl_taking_address_capture"}}, [e]={{nil,F,"taking address of a capture is not allowed"}}, [i]={{nil,F,"taking address of a capture is not allowed"}}, [j]=k, [c]="taking address of a capture is not allowed", [h]=a, [g]={{nil,F,m}}, [f]={"257132a019c1",1504803633,"[OpenCL] Handle taking an address of block captures.","[OpenCL] Handle taking an address of block captures.\n\nBlock captures can have different physical locations\nin memory segments depending on the use case (as a function\ncall or as a kernel enqueue) and in different vendor\nimplementations.\n\nTherefore it\'s unclear how to add address space to capture\naddresses uniformly. Currently it has been decided to disallow\ntaking addresses of captured variables until further\nclarifications in the spec.\n\nDifferential Revision: https://reviews.llvm.org/D36410\n\nllvm-svn: 312728"}, [b]={{E,14934,"/// CheckAddressOfOperand - The operand of & must be either a function\n/// designator or an lvalue designating an object. If it is an lvalue, the\n/// object cannot be declared with storage class register or be a bit field.\n/// Note: The usual conversions are *not* applied to the operand of the &\n/// operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue.\n/// In C++, the operand might be an overloaded function name, in which case\n/// we allow the \'&\' but retain the overloaded-function type.\nQualType Sema::CheckAddressOfOperand(ExprResult &OrigOp, SourceLocation OpLoc) {\n // ...\n // In OpenCL captures for blocks called as lambda functions\n // are located in the private address space. Blocks used in\n // enqueue_kernel can be located in a different address space\n // depending on a vendor implementation. Thus preventing\n // taking an address of the capture to avoid invalid AS casts.\n if (LangOpts.OpenCL) {\n // ...\n if (VarRef && VarRef->refersToEnclosingVariableOrCapture()) {\n Diag(op->getExprLoc(), diag::err_opencl_taking_address_capture);"}}, [l]={ [U]={"clang/test/SemaOpenCL/invalid-block.cl:100:6: error: taking address of a capture is not allowed","clang/test/SemaOpenCL/invalid-block.cl:101:6: error: taking address of a capture is not allowed"} } }, ["err_opencl_taking_function_address_parser"]={ [d]="err_opencl_taking_function_address_parser", [e]="taking address of function is not allowed", [i]="taking address of function is not allowed", [j]=k, [c]="taking address of function is not allowed", [h]=a, [g]=K, [f]={"cf04d04ccf68",1452004767,"[OpenCL] Disallow taking an address of a function.","[OpenCL] Disallow taking an address of a function.\n\nAn undecorated function designator implies taking the address of a function,\nwhich is illegal in OpenCL. Implementing a check for this earlier to allow\nthe error to be reported even in the presence of other more obvious errors.\n\nPatch by Neil Hickey!\n\nhttp://reviews.llvm.org/D15691\n\nllvm-svn: 256838"}, [b]={{"clang/lib/Parse/ParseExpr.cpp",1861,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n if (getLangOpts().OpenCL && !getActions().getOpenCLOptions().isAvailableOption(\"__cl_clang_function_pointers\", getLangOpts()))\n if (Expr *PostfixExpr = Res.get()) {\n // ...\n if (!Ty.isNull() && Ty->isFunctionType()) {\n Diag(PostfixExpr->getExprLoc(), diag::err_opencl_taking_function_address_parser);"}}, [l]={ ["clang/test/SemaOpenCL/cond.cl"]={"clang/test/SemaOpenCL/cond.cl:131:29: error: taking address of function is not allowed","clang/test/SemaOpenCL/cond.cl:131:36: error: taking address of function is not allowed"} } }, ["err_opencl_ternary_with_block"]={ [d]="err_opencl_ternary_with_block", [e]="block type cannot be used as expression in ternary expression in OpenCL", [i]="block type cannot be used as expression in ternary expression in OpenCL", [j]=k, [c]="block type cannot be used as expression in ternary expression in OpenCL", [h]=a, [g]=m, [f]={"89307aa3e9fc",1456288176,"[OpenCL] Add Sema checks for OpenCL 2.0 block","[OpenCL] Add Sema checks for OpenCL 2.0 block\n\nSummary:\nAdd Sema checks for opencl 2.0 new features: Block.\nThis patch is partitioned from http://reviews.llvm.org/D16047\n\nReviewers: Anastasia\n\nSubscribers: pekka.jaaskelainen, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D17436\n\nllvm-svn: 261719"}, [b]={{E,9115,"/// Return true if the Expr is block type\nstatic bool checkBlockType(Sema &S, const Expr *E) {\n if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {\n // ...\n if (Ty->isBlockPointerType()) {\n S.Diag(E->getExprLoc(), diag::err_opencl_ternary_with_block);"}}, [l]={ [U]={"clang/test/SemaOpenCL/invalid-block.cl:66:17: error: block type cannot be used as expression in ternary expression in OpenCL","clang/test/SemaOpenCL/invalid-block.cl:67:17: error: block type cannot be used as expression in ternary expression in OpenCL"} } }, ["err_opencl_type_can_only_be_used_as_function_parameter"]={ [d]="err_opencl_type_can_only_be_used_as_function_parameter", [e]="type %0 can only be used as a function parameter in OpenCL", [i]="type A can only be used as a function parameter in OpenCL", [j]=k, [c]="type (.*?) can only be used as a function parameter in OpenCL", [h]=a, [g]=m, [f]={"379554ac5b15",1456371260,"[OpenCL] Add Sema checks for types","[OpenCL] Add Sema checks for types\n\nSummary:\nAdd Sema checks for opencl type: image, pipe....\nThis patch is partitioned from http://reviews.llvm.org/D16047\n\nReviewers: Anastasia, yaxunl\n\nSubscribers: pekka.jaaskelainen, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D17437\n\nllvm-svn: 261818"}, [b]={{G,7318,"/// Returns true if there hasn\'t been any invalid type diagnosed.\nstatic bool diagnoseOpenCLTypes(Sema &Se, VarDecl *NewVD) {\n // ...\n // OpenCL v2.0 s6.9.b - Image type can only be used as a function argument.\n // OpenCL v2.0 s6.13.16.1 - Pipe type can only be used as a function\n // argument.\n if (R->isImageType() || R->isPipeType()) {\n Se.Diag(NewVD->getLocation(), diag::err_opencl_type_can_only_be_used_as_function_parameter) << R;"}}, [l]={ ["clang/test/SemaOpenCLCXX/template-opencl-types.clcpp"]={"clang/test/SemaOpenCLCXX/template-opencl-types.clcpp:21:13: error: type \'__private __read_only image1d_t\' can only be used as a function parameter in OpenCL","clang/test/SemaOpenCLCXX/template-opencl-types.clcpp:10:5: error: type \'__private __read_only image1d_t\' can only be used as a function parameter in OpenCL"} } }, ["err_opencl_type_not_found"]={ [d]={{nil,C,"err_opencl_type_not_found"}}, [e]={{nil,C,"%0 type %1 not found; include the base header with -finclude-default-header"}}, [i]={{nil,C,"A type B not found; include the base header with -finclude-default-header"}}, [j]=k, [c]="(.*?) type (.*?) not found; include the base header with \\-finclude\\-default\\-header", [h]=a, [g]={{nil,C,m}}, [f]={"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"}, [b]={{"clang/lib/Sema/SemaLookup.cpp",689,"/// Diagnose a missing builtin type.\nstatic QualType diagOpenCLBuiltinTypeError(Sema &S, llvm::StringRef TypeClass, llvm::StringRef Name) {\n S.Diag(SourceLocation(), diag::err_opencl_type_not_found) << TypeClass << Name;"}}, [l]={ ["clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl"]={"error: typedef type cl_mem_fence_flags not found; include the base header with -finclude-default-header"} } }, ["err_opencl_type_struct_or_union_field"]={ [d]="err_opencl_type_struct_or_union_field", [e]="the %0 type cannot be used to declare a structure or union field", [i]="the A type cannot be used to declare a structure or union field", [j]=k, [c]="the (.*?) type cannot be used to declare a structure or union field", [h]=a, [g]=m, [f]={yb,1457011999,xb,wb}, [b]={{G,18136,"/// 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 (LangOpts.OpenCL) {\n // OpenCL v1.2 s6.9b,r & OpenCL v2.0 s6.12.5 - The following types cannot be\n // used as structure or union field: image, sampler, event or block types.\n if (T->isEventT() || T->isImageType() || T->isSamplerT() || T->isBlockPointerType()) {\n Diag(Loc, diag::err_opencl_type_struct_or_union_field) << T;"}}, [l]={ ["clang/test/SemaOpenCL/event_t.cl"]={"clang/test/SemaOpenCL/event_t.cl:6:11: error: the \'event_t\' type cannot be used to declare a structure or union field"} } }, ["err_opencl_unknown_type_specifier"]={ [d]="err_opencl_unknown_type_specifier", [e]={{nil,M,"%0 does not support the \'%1\' %select{type qualifier|storage class specifier}2"},{C,v,"%select{OpenCL C|C++ for OpenCL}0 version %1 does not support the \'%2\' %select{type qualifier|storage class specifier}3"},{u,z,"OpenCL %select{C|C++}0 version %1 does not support the \'%2\' %select{type qualifier|storage class specifier}3"},{F,nil,"OpenCL version %0 does not support the \'%1\' %select{type qualifier|storage class specifier}2"}}, [i]={{nil,M,{"A does not support the \'B\' ",{"type qualifier","storage class specifier"}}},{C,v,{{"OpenCL C","C++ for OpenCL"}," version B does not support the \'C\' ",{"type qualifier","storage class specifier"}}},{u,z,{"OpenCL ",{"C","C++"}," version B does not support the \'C\' ",{"type qualifier","storage class specifier"}}},{F,nil,{"OpenCL version A does not support the \'B\' ",{"type qualifier","storage class specifier"}}}}, [j]=k, [c]="(.*?) does not support the \'(.*?)\' (?:type qualifier|storage class specifier)", [h]=a, [g]={{nil,u,V},{Kb,nil,m}}, [f]={"2c8dcfbae603",1417011006,"[OpenCL] Generic address space has been added in OpenCL v2.0.","[OpenCL] Generic address space has been added in OpenCL v2.0.\n\nTo support it in the frontend, the following has been added: \n- generic address space type attribute;\n- documentation for the OpenCL address space attributes;\n- parsing of __generic(generic) keyword;\n- test code for the parser and diagnostics.\n\nllvm-svn: 222831"}, [b]={{ib,4294,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::kw_pipe:\n if (!getLangOpts().OpenCL || getLangOpts().getOpenCLCompatibleVersion() < 200) {\n // ...\n } else if (!getLangOpts().OpenCLPipes) {\n DiagID = diag::err_opencl_unknown_type_specifier;"},{ib,4426,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n // OpenCL address space qualifiers:\n case tok::kw___generic:\n // generic address space is introduced only in OpenCL v2.0\n // see OpenCL C Spec v2.0 s6.5.5\n // OpenCL v3.0 introduces __opencl_c_generic_address_space\n // feature macro to indicate if generic address space is supported\n if (!Actions.getLangOpts().OpenCLGenericAddressSpace) {\n DiagID = diag::err_opencl_unknown_type_specifier;"},{ib,4493,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n // If the specifier wasn\'t legal, issue a diagnostic.\n if (isInvalid) {\n // ...\n else if (DiagID == diag::err_opencl_unknown_type_specifier) {"},{"clang/lib/Sema/DeclSpec.cpp",646,"bool DeclSpec::SetStorageClassSpec(Sema &S, SCS SC, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy) {\n // OpenCL v1.1 s6.8g: \"The extern, static, auto and register storage-class\n // specifiers are not supported.\n // It seems sensible to prohibit private_extern too\n // The cl_clang_storage_class_specifiers extension enables support for\n // these storage-class specifiers.\n // OpenCL v1.2 s6.8 changes this to \"The auto and register storage-class\n // specifiers are not supported.\"\n if (S.getLangOpts().OpenCL && !S.getOpenCLOptions().isAvailableOption(\"cl_clang_storage_class_specifiers\", S.getLangOpts())) {\n // ...\n case SCS_extern:\n case SCS_private_extern:\n case SCS_static:\n if (S.getLangOpts().getOpenCLCompatibleVersion() < 120) {\n DiagID = diag::err_opencl_unknown_type_specifier;"},{"clang/lib/Sema/DeclSpec.cpp",653,"bool DeclSpec::SetStorageClassSpec(Sema &S, SCS SC, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy) {\n // OpenCL v1.1 s6.8g: \"The extern, static, auto and register storage-class\n // specifiers are not supported.\n // It seems sensible to prohibit private_extern too\n // The cl_clang_storage_class_specifiers extension enables support for\n // these storage-class specifiers.\n // OpenCL v1.2 s6.8 changes this to \"The auto and register storage-class\n // specifiers are not supported.\"\n if (S.getLangOpts().OpenCL && !S.getOpenCLOptions().isAvailableOption(\"cl_clang_storage_class_specifiers\", S.getLangOpts())) {\n // ...\n case SCS_auto:\n case SCS_register:\n DiagID = diag::err_opencl_unknown_type_specifier;"},{G,7866,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n if (TSC != TSCS_unspecified) {\n Diag(D.getDeclSpec().getThreadStorageClassSpecLoc(), diag::err_opencl_unknown_type_specifier) << getLangOpts().getOpenCLVersionString() << DeclSpec::getSpecifierName(TSC) << 1;"}}, [l]={ ["clang/test/Parser/opencl-storage-class.cl"]={"clang/test/Parser/opencl-storage-class.cl:5:3: error: OpenCL C version 1.0 does not support the \'static\' storage class specifier","clang/test/Parser/opencl-storage-class.cl:6:3: error: OpenCL C version 1.0 does not support the \'register\' storage class specifier","clang/test/Parser/opencl-storage-class.cl:7:3: error: OpenCL C version 1.0 does not support the \'extern\' storage class specifier","clang/test/Parser/opencl-storage-class.cl:8:3: error: OpenCL C version 1.0 does not support the \'auto\' storage class specifier"} } }, ["err_opencl_variadic_function"]={ [d]="err_opencl_variadic_function", [e]="invalid prototype, variadic arguments are not allowed in OpenCL", [i]="invalid prototype, variadic arguments are not allowed in OpenCL", [j]=k, [c]="invalid prototype, variadic arguments are not allowed in OpenCL", [h]=a, [g]=m, [f]={"7c3053336233",1477659579,"[OpenCL] Diagnose variadic arguments","[OpenCL] Diagnose variadic arguments\n\nOpenCL disallows using variadic arguments (s6.9.e and s6.12.5 OpenCL v2.0)\napart from some exceptions:\n- printf\n- enqueue_kernel\n\nThis change adds error diagnostic for variadic functions but accepts printf\nand any compiler internal function (which should cover __enqueue_kernel_XXX cases).\n\nIt also unifies diagnostic with block prototype and adds missing uncaught cases for blocks.\n\nllvm-svn: 285395"}, [b]={{H,5316,"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 if (LangOpts.OpenCL) {\n // ...\n // OpenCL doesn\'t support variadic functions and blocks\n // (s6.9.e and s6.12.5 OpenCL v2.0) except for printf.\n // We also allow here any toolchain reserved identifiers.\n if (FTI.isVariadic && !S.getOpenCLOptions().isAvailableOption(\"__cl_clang_variadic_functions\", S.getLangOpts()) && !(D.getIdentifier() && ((D.getIdentifier()->getName() == \"printf\" && LangOpts.getOpenCLCompatibleVersion() >= 120) || D.getIdentifier()->getName().startswith(\"__\")))) {\n S.Diag(D.getIdentifierLoc(), diag::err_opencl_variadic_function);"}}, [l]={ [U]={"clang/test/SemaOpenCL/invalid-block.cl:51:7: error: invalid prototype, variadic arguments are not allowed in OpenCL","clang/test/SemaOpenCL/invalid-block.cl:51:28: error: invalid prototype, variadic arguments are not allowed in OpenCL","clang/test/SemaOpenCL/invalid-block.cl:54:15: error: invalid prototype, variadic arguments are not allowed in OpenCL"} } }, ["err_opencl_vla"]={ [d]="err_opencl_vla", [e]="variable length arrays are not supported in OpenCL", [i]="variable length arrays are not supported in OpenCL", [j]=k, [c]="variable length arrays are not supported in OpenCL", [h]=a, [g]=m, [f]={"1d58cdbf4e17",1358444100,"Add some semantic checks for OpenCL. Variadic macros, VLAs and bitfields are not supported.","Add some semantic checks for OpenCL. Variadic macros, VLAs and bitfields are not supported.\n\nllvm-svn: 172732"}, [b]={{H,2580,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n VLADiag = diag::err_opencl_vla;"}}, [l]={ ["clang/test/SemaOpenCL/unsupported.cl"]={"clang/test/SemaOpenCL/unsupported.cl:16:9: error: variable length arrays are not supported in OpenCL"} } }, ["err_openclcxx_not_supported"]={ [d]={{nil,z,"err_openclcxx_not_supported"}}, [e]={{nil,v,"\'%0\' is not supported in C++ for OpenCL"},{u,z,"\'%0\' is not supported in OpenCL C++"}}, [i]={{nil,v,"\'A\' is not supported in C++ for OpenCL"},{u,z,"\'A\' is not supported in OpenCL C++"}}, [j]=k, [c]="\'(.*?)\' is not supported in C\\+\\+ for OpenCL", [h]=a, [g]={{nil,z,V}}, [f]={"2ca6ba1045c9",1525871777,"[OpenCL] Restrict various keywords in OpenCL C++ mode","[OpenCL] Restrict various keywords in OpenCL C++ mode\n\nRestrict the following keywords in the OpenCL C++ language mode,\naccording to Sections 2.2 & 2.9 of the OpenCL C++ 1.0 Specification.\n\n - dynamic_cast\n - typeid\n - register (already restricted in OpenCL C, update the diagnostic)\n - thread_local\n - exceptions (try/catch/throw)\n - access qualifiers read_only, write_only, read_write\n\nSupport the `__global`, `__local`, `__constant`, `__private`, and\n`__generic` keywords in OpenCL C++. Leave the unprefixed address\nspace qualifiers such as global available, i.e., do not mark them as\nreserved keywords in OpenCL C++. libclcxx provides explicit address\nspace pointer classes such as `global_ptr` and `global<T>` that are\nimplemented using the `__`-prefixed qualifiers.\n\nDifferential Revision: https://reviews.llvm.org/D46022\n\nllvm-svn: 331874"}, [b]={{cb,344,"ExprResult Sema::BuildCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, TypeSourceInfo *DestTInfo, Expr *E, SourceRange AngleBrackets, SourceRange Parens) {\n // ...\n case tok::kw_dynamic_cast: {\n // dynamic_cast is not supported in C++ for OpenCL.\n if (getLangOpts().OpenCLCPlusPlus) {\n return ExprError(Diag(OpLoc, diag::err_openclcxx_not_supported) << \"dynamic_cast\");"},{N,655,"/// ActOnCXXTypeidOfType - Parse typeid( type-id ) or typeid (expression);\nExprResult Sema::ActOnCXXTypeid(SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc) {\n // typeid is not supported in OpenCL.\n if (getLangOpts().OpenCLCPlusPlus) {\n return ExprError(Diag(OpLoc, diag::err_openclcxx_not_supported) << \"typeid\");"},{N,2719,"bool Sema::FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range, AllocationFunctionScope NewScope, AllocationFunctionScope DeleteScope, QualType AllocType, bool IsArray, bool &PassAlignment, MultiExprArg PlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete, bool Diagnose) {\n // ...\n // Find the allocation function.\n {\n // ...\n if (getLangOpts().OpenCLCPlusPlus && R.empty()) {\n if (PlaceArgs.empty()) {\n Diag(StartLoc, diag::err_openclcxx_not_supported) << \"default new\";"},{N,3752,"/// ActOnCXXDelete - Parsed a C++ \'delete\' expression (C++ 5.3.5), as in:\n/// @code ::delete ptr; @endcode\n/// or\n/// @code delete [] ptr; @endcode\nExprResult Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *ExE) {\n // ...\n if (!Ex.get()->isTypeDependent()) {\n // ...\n if (!OperatorDelete) {\n if (getLangOpts().OpenCLCPlusPlus) {\n Diag(StartLoc, diag::err_openclcxx_not_supported) << \"default delete\";"}}, [l]={ ["clang/test/SemaOpenCLCXX/restricted.clcpp"]={"clang/test/SemaOpenCLCXX/restricted.clcpp:13:36: error: \'typeid\' is not supported in C++ for OpenCL","clang/test/SemaOpenCLCXX/restricted.clcpp:27:10: error: \'dynamic_cast\' is not supported in C++ for OpenCL"} } }, ["err_openclcxx_placement_new"]={ [d]={{nil,v,"err_openclcxx_placement_new"}}, [e]={{nil,v,"use of placement new requires explicit declaration"}}, [i]={{nil,v,"use of placement new requires explicit declaration"}}, [j]=k, [c]="use of placement new requires explicit declaration", [h]=a, [g]={{nil,v,m}}, [f]={"1006a068c63f",1561555884,"[OpenCL] Improve diagnostic for placement new","[OpenCL] Improve diagnostic for placement new\n\nWithout an explicit declaration for placement new, clang would reject\nuses of placement new with \"\'default new\' is not supported in OpenCL\nC++\". This may mislead users into thinking that placement new is not\nsupported, see e.g. PR42060.\n\nClarify that placement new requires an explicit declaration.\n\nDifferential Revision: https://reviews.llvm.org/D63561\n\nllvm-svn: 364423"}, [b]={{N,2721,"bool Sema::FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range, AllocationFunctionScope NewScope, AllocationFunctionScope DeleteScope, QualType AllocType, bool IsArray, bool &PassAlignment, MultiExprArg PlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete, bool Diagnose) {\n // ...\n // Find the allocation function.\n {\n // ...\n if (getLangOpts().OpenCLCPlusPlus && R.empty()) {\n if (PlaceArgs.empty()) {\n // ...\n } else {\n Diag(StartLoc, diag::err_openclcxx_placement_new);"}}, [l]={ ["clang/test/SemaOpenCLCXX/newdelete.clcpp"]={"clang/test/SemaOpenCLCXX/newdelete.clcpp:24:9: error: use of placement new requires explicit declaration"} } }, ["err_openclcxx_virtual_function"]={ [d]={{nil,z,"err_openclcxx_virtual_function"}}, [e]={{nil,v,"virtual functions are not supported in C++ for OpenCL"},{u,z,"virtual functions are not supported in OpenCL C++"}}, [i]={{nil,v,"virtual functions are not supported in C++ for OpenCL"},{u,z,"virtual functions are not supported in OpenCL C++"}}, [j]=k, [c]="virtual functions are not supported in C\\+\\+ for OpenCL", [h]=a, [g]={{nil,z,K}}, [f]={"49ffffbccdef",1524482627,"[OpenCL] Reject virtual functions for OpenCL C++","[OpenCL] Reject virtual functions for OpenCL C++\n\nDifferential Revision: https://reviews.llvm.org/D45873\n\nllvm-svn: 330579"}, [b]={{ib,4031,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::kw_virtual:\n // C++ for OpenCL does not allow virtual function qualifier, to avoid\n // function pointers restricted in OpenCL v2.0 s6.9.a.\n if (getLangOpts().OpenCLCPlusPlus && !getActions().getOpenCLOptions().isAvailableOption(\"__cl_clang_function_pointers\", getLangOpts())) {\n DiagID = diag::err_openclcxx_virtual_function;"}}, [l]={ ["clang/test/Parser/opencl-cxx-virtual.cl"]={"clang/test/Parser/opencl-cxx-virtual.cl:12:3: error: virtual functions are not supported in C++ for OpenCL","clang/test/Parser/opencl-cxx-virtual.cl:17:3: error: virtual functions are not supported in C++ for OpenCL","clang/test/Parser/opencl-cxx-virtual.cl:26:3: error: virtual functions are not supported in C++ for OpenCL"} } }, ["err_openmp_default_simd_align_expr"]={ [d]="err_openmp_default_simd_align_expr", [e]="invalid application of \'__builtin_omp_required_simd_align\' to an expression, only type is allowed", [i]="invalid application of \'__builtin_omp_required_simd_align\' to an expression, only type is allowed", [j]=k, [c]="invalid application of \'__builtin_omp_required_simd_align\' to an expression, only type is allowed", [h]=a, [g]=m, [f]={"003965130462",1435808419,"[OPENMP] Introduced type trait \"__builtin_omp_required_simd_align\" for default simd alignment.","[OPENMP] Introduced type trait \"__builtin_omp_required_simd_align\" for default simd alignment.\n\nAdds type trait \"__builtin_omp_required_simd_align\" after discussions here http://reviews.llvm.org/D9894\nDifferential Revision: http://reviews.llvm.org/D10597\n\nllvm-svn: 241237"}, [b]={{E,4785,"/// Build a sizeof or alignof expression given an expression\n/// operand.\nExprResult Sema::CreateUnaryExprOrTypeTraitExpr(Expr *E, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind) {\n // ...\n if (E->isTypeDependent()) {\n // ...\n } else if (ExprKind == UETT_AlignOf || ExprKind == UETT_PreferredAlignOf) {\n // ...\n } else if (ExprKind == UETT_VecStep) {\n // ...\n } else if (ExprKind == UETT_OpenMPRequiredSimdAlign) {\n Diag(E->getExprLoc(), diag::err_openmp_default_simd_align_expr);"}}, [l]={ ["clang/test/SemaCXX/openmp_default_simd_align.cpp"]={"clang/test/SemaCXX/openmp_default_simd_align.cpp:5:61: error: invalid application of \'__builtin_omp_required_simd_align\' to an expression, only type is allowed"} } }, ["err_openmp_vla_in_task_untied"]={ [d]={{nil,J,"err_openmp_vla_in_task_untied"}}, [e]={{nil,J,"variable length arrays are not supported in OpenMP tasking regions with \'untied\' clause"}}, [i]={{nil,J,"variable length arrays are not supported in OpenMP tasking regions with \'untied\' clause"}}, [j]=k, [c]="variable length arrays are not supported in OpenMP tasking regions with \'untied\' clause", [h]=a, [g]={{nil,J,o}}, [f]={"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"}, [b]={{H,2589,"/// Build an array type.\n///\n/// \\param T The type of each element in the array.\n///\n/// \\param ASM C99 array size modifier (e.g., \'*\', \'static\').\n///\n/// \\param ArraySize Expression describing the size of the array.\n///\n/// \\param Brackets The range from the opening \'[\' to the closing \']\'.\n///\n/// \\param Entity The name of the entity that involves the array\n/// type, if known.\n///\n/// \\returns A suitable array type, if there are no errors. Otherwise,\n/// returns a NULL type.\nQualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n } else if (getLangOpts().C99) {\n // ...\n } else if (isSFINAEContext()) {\n // ...\n } else if (getLangOpts().OpenMP && isInOpenMPTaskUntiedContext()) {\n VLADiag = diag::err_openmp_vla_in_task_untied;"}}, [l]={ ["clang/test/OpenMP/task_messages.cpp"]={"clang/test/OpenMP/task_messages.cpp:337:15: error: variable length arrays are not supported in OpenMP tasking regions with \'untied\' clause"} } }, ["err_operator_arrow_circular"]={ [d]="err_operator_arrow_circular", [e]="circular pointer delegation detected", [i]="circular pointer delegation detected", [j]=k, [c]="circular pointer delegation detected", [h]=a, [g]=m, [f]={"10ce958550c7",1254269981,"self-referecing operator \'->\' member function was causing","self-referecing operator \'->\' member function was causing\ninfinit recursion. This patch fixes it. [13.3.1.2]-p2\n\nllvm-svn: 83124"}, [b]={{N,7630,"ExprResult Sema::ActOnStartCXXMemberReference(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor) {\n // ...\n // C++ [over.match.oper]p8:\n // [...] When operator->returns, the operator-> is applied to the value\n // returned, with the original second operand.\n if (OpKind == tok::arrow) {\n // ...\n while (BaseType->isRecordType()) {\n // ...\n if (!CTypes.insert(CBaseType).second) {\n Diag(OpLoc, diag::err_operator_arrow_circular) << StartingType;"}}, [l]={ ["clang/test/SemaCXX/overloaded-operator.cpp"]={"clang/test/SemaCXX/overloaded-operator.cpp:275:4: error: circular pointer delegation detected","clang/test/SemaCXX/overloaded-operator.cpp:291:4: error: circular pointer delegation detected"} } }, ["err_operator_arrow_depth_exceeded"]={ [d]="err_operator_arrow_depth_exceeded", [e]="use of \'operator->\' on type %0 would invoke a sequence of more than %1 \'operator->\' calls", [i]="use of \'operator->\' on type A would invoke a sequence of more than B \'operator->\' calls", [j]=k, [c]="use of \'operator\\-\\>\' on type (.*?) would invoke a sequence of more than (.*?) \'operator\\-\\>\' calls", [h]=a, [g]=m, [f]={"79c927bfe9fc",1383766311,"Add a limit to the length of a sequence of \'operator->\' functions we will","Add a limit to the length of a sequence of \'operator->\' functions we will\nfollow when building a class member access expression. Based on a patch by\nRahul Jain!\n\nllvm-svn: 194161"}, [b]={{N,7588,"ExprResult Sema::ActOnStartCXXMemberReference(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor) {\n // ...\n // C++ [over.match.oper]p8:\n // [...] When operator->returns, the operator-> is applied to the value\n // returned, with the original second operand.\n if (OpKind == tok::arrow) {\n // ...\n while (BaseType->isRecordType()) {\n if (OperatorArrows.size() >= getLangOpts().ArrowDepth) {\n Diag(OpLoc, diag::err_operator_arrow_depth_exceeded) << StartingType << getLangOpts().ArrowDepth << Base->getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/operator-arrow-depth.cpp"]={"clang/test/SemaCXX/operator-arrow-depth.cpp:25:12: error: use of \'operator->\' on type \'B<10 / 2 + 1>\' would invoke a sequence of more than 10 \'operator->\' calls"} } }, ["err_operator_delete_dependent_param_type"]={ [d]="err_operator_delete_dependent_param_type", [e]="%0 cannot take a dependent type as first parameter; use %1 instead", [i]="A cannot take a dependent type as first parameter; use B instead", [j]=k, [c]="(.*?) cannot take a dependent type as first parameter; use (.*?) instead", [h]=a, [g]=m, [f]={"c0b2ce14cdc1",1260576962,"More work on improving the operator delete diagnostics.","More work on improving the operator delete diagnostics.\n\nllvm-svn: 91187"}, [b]={{y,16101,"static bool CheckOperatorDeleteDeclaration(Sema &SemaRef, FunctionDecl *FnDecl) {\n // ...\n if (CheckOperatorNewDeleteTypes(SemaRef, FnDecl, SemaRef.Context.VoidTy, ExpectedFirstParamType, diag::err_operator_delete_dependent_param_type, diag::err_operator_delete_param_type))"}}, [l]={ ["clang/test/SemaCXX/cxx2a-destroying-delete.cpp"]={"clang/test/SemaCXX/cxx2a-destroying-delete.cpp:141:10: error: \'operator delete\' cannot take a dependent type as first parameter; use \'D<T> *\' instead"} } }, ["err_operator_delete_param_type"]={ [d]="err_operator_delete_param_type", [e]="first parameter of %0 must have type %1", [i]="first parameter of A must have type B", [j]=k, [c]="first parameter of (.*?) must have type (.*?)", [h]=a, [g]=m, [f]={Jb,1260573802,Fb,Db}, [b]={{y,16102,"static bool CheckOperatorDeleteDeclaration(Sema &SemaRef, FunctionDecl *FnDecl) {\n // ...\n if (CheckOperatorNewDeleteTypes(SemaRef, FnDecl, SemaRef.Context.VoidTy, ExpectedFirstParamType, diag::err_operator_delete_dependent_param_type, diag::err_operator_delete_param_type))"}}, [l]={ ["clang/test/SemaCXX/cxx2a-destroying-delete.cpp"]={"clang/test/SemaCXX/cxx2a-destroying-delete.cpp:19:6: error: first parameter of \'operator delete\' must have type \'void *\'","clang/test/SemaCXX/cxx2a-destroying-delete.cpp:30:8: error: first parameter of \'operator delete\' must have type \'A *\'"} } }, ["err_operator_new_default_arg"]={ [d]="err_operator_new_default_arg", [e]="parameter of %0 cannot have a default argument", [i]="parameter of A cannot have a default argument", [j]=k, [c]="parameter of (.*?) cannot have a default argument", [h]=a, [g]=m, [f]={"7e0b207e5478",1260726823,"More improvements to checking allocation and deallocation functions.","More improvements to checking allocation and deallocation functions.\n\nllvm-svn: 91244"}, [b]={{y,16070,"static bool CheckOperatorNewDeclaration(Sema &SemaRef, const FunctionDecl *FnDecl) {\n // ...\n // C++ [basic.stc.dynamic.allocation]p1:\n // The first parameter shall not have an associated default argument.\n if (FnDecl->getParamDecl(0)->hasDefaultArg())\n return SemaRef.Diag(FnDecl->getLocation(), diag::err_operator_new_default_arg) << FnDecl->getDeclName() << FnDecl->getParamDecl(0)->getDefaultArgRange();"}}, [l]={ [ub]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp:28:9: error: parameter of \'operator new\' cannot have a default argument"} } }, ["err_operator_new_delete_declared_in_namespace"]={ [d]="err_operator_new_delete_declared_in_namespace", [e]="%0 cannot be declared inside a namespace", [i]="A cannot be declared inside a namespace", [j]=k, [c]="(.*?) cannot be declared inside a namespace", [h]=a, [g]=m, [f]={Jb,1260573802,Fb,Db}, [b]={{y,15951,"static inline bool CheckOperatorNewDeleteDeclarationScope(Sema &SemaRef, const FunctionDecl *FnDecl) {\n // ...\n if (isa<NamespaceDecl>(DC)) {\n return SemaRef.Diag(FnDecl->getLocation(), diag::err_operator_new_delete_declared_in_namespace) << FnDecl->getDeclName();"}}, [l]={ ["clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp"]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp:8:8: error: \'operator delete\' cannot be declared inside a namespace"} } }, ["err_operator_new_delete_declared_static"]={ [d]="err_operator_new_delete_declared_static", [e]="%0 cannot be declared static in global scope", [i]="A cannot be declared static in global scope", [j]=k, [c]="(.*?) cannot be declared static in global scope", [h]=a, [g]=m, [f]={Jb,1260573802,Fb,Db}, [b]={{y,15958,"static inline bool CheckOperatorNewDeleteDeclarationScope(Sema &SemaRef, const FunctionDecl *FnDecl) {\n // ...\n if (isa<TranslationUnitDecl>(DC) && FnDecl->getStorageClass() == SC_Static) {\n return SemaRef.Diag(FnDecl->getLocation(), diag::err_operator_new_delete_declared_static) << FnDecl->getDeclName();"}}, [l]={ ["clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp"]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp:12:13: error: \'operator delete\' cannot be declared static in global scope"} } }, ["err_operator_new_delete_dependent_result_type"]={ [d]="err_operator_new_delete_dependent_result_type", [e]="%0 cannot have a dependent return type; use %1 instead", [i]="A cannot have a dependent return type; use B instead", [j]=k, [c]="(.*?) cannot have a dependent return type; use (.*?) instead", [h]=a, [g]=m, [f]={"c0b2ce14cdc1",1260576962,"More work on improving the operator delete diagnostics.","More work on improving the operator delete diagnostics.\n\nllvm-svn: 91187"}, [b]={{y,16000,"static inline bool CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, CanQualType ExpectedResultType, CanQualType ExpectedFirstParamType, unsigned DependentParamTypeDiag, unsigned InvalidParamTypeDiag) {\n // ...\n // Check that the result type is what we expect.\n if (SemaRef.Context.getCanonicalType(ResultType) != ExpectedResultType) {\n // ...\n return SemaRef.Diag(FnDecl->getLocation(), ResultType->isDependentType() ? diag::err_operator_new_delete_dependent_result_type : diag::err_operator_new_delete_invalid_result_type) << FnDecl->getDeclName() << ExpectedResultType;"}}, [l]={ [ub]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp:36:26: error: \'operator new\' cannot have a dependent return type; use \'void *\' instead"} } }, ["err_operator_new_delete_invalid_result_type"]={ [d]="err_operator_new_delete_invalid_result_type", [e]="%0 must return type %1", [i]="A must return type B", [j]=k, [c]="(.*?) must return type (.*?)", [h]=a, [g]=m, [f]={Jb,1260573802,Fb,Db}, [b]={{y,16001,"static inline bool CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, CanQualType ExpectedResultType, CanQualType ExpectedFirstParamType, unsigned DependentParamTypeDiag, unsigned InvalidParamTypeDiag) {\n // ...\n // Check that the result type is what we expect.\n if (SemaRef.Context.getCanonicalType(ResultType) != ExpectedResultType) {\n // ...\n return SemaRef.Diag(FnDecl->getLocation(), ResultType->isDependentType() ? diag::err_operator_new_delete_dependent_result_type : diag::err_operator_new_delete_invalid_result_type) << FnDecl->getDeclName() << ExpectedResultType;"}}, [l]={ [ub]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp:16:8: error: \'operator new\' must return type \'void *\'"} } }, ["err_operator_new_delete_template_too_few_parameters"]={ [d]="err_operator_new_delete_template_too_few_parameters", [e]="%0 template must have at least two parameters", [i]="A template must have at least two parameters", [j]=k, [c]="(.*?) template must have at least two parameters", [h]=a, [g]=m, [f]={"c0b2ce14cdc1",1260576962,"More work on improving the operator delete diagnostics.","More work on improving the operator delete diagnostics.\n\nllvm-svn: 91187"}, [b]={{y,16008,"static inline bool CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, CanQualType ExpectedResultType, CanQualType ExpectedFirstParamType, unsigned DependentParamTypeDiag, unsigned InvalidParamTypeDiag) {\n // ...\n // A function template must have at least 2 parameters.\n if (FnDecl->getDescribedFunctionTemplate() && FnDecl->getNumParams() < 2)\n return SemaRef.Diag(FnDecl->getLocation(), diag::err_operator_new_delete_template_too_few_parameters) << FnDecl->getDeclName();"}}, [l]={ [ub]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp:44:30: error: \'operator new\' template must have at least two parameters"} } }, ["err_operator_new_delete_too_few_parameters"]={ [d]="err_operator_new_delete_too_few_parameters", [e]="%0 must have at least one parameter", [i]="A must have at least one parameter", [j]=k, [c]="(.*?) must have at least one parameter", [h]=a, [g]=m, [f]={Jb,1260573802,Fb,Db}, [b]={{y,16014,"static inline bool CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, CanQualType ExpectedResultType, CanQualType ExpectedFirstParamType, unsigned DependentParamTypeDiag, unsigned InvalidParamTypeDiag) {\n // ...\n // The function decl must have at least 1 parameter.\n if (FnDecl->getNumParams() == 0)\n return SemaRef.Diag(FnDecl->getLocation(), diag::err_operator_new_delete_too_few_parameters) << FnDecl->getDeclName();"}}, [l]={ ["clang/test/SemaCXX/PR12778.cpp"]={"clang/test/SemaCXX/PR12778.cpp:3:6: error: \'operator delete\' must have at least one parameter"} } }, ["err_operator_new_dependent_param_type"]={ [d]="err_operator_new_dependent_param_type", [e]="%0 cannot take a dependent type as first parameter; use size_t (%1) instead", [i]="A cannot take a dependent type as first parameter; use size_t (B) instead", [j]=k, [c]="(.*?) cannot take a dependent type as first parameter; use size_t \\((.*?)\\) instead", [h]=a, [g]=m, [f]={"c0b2ce14cdc1",1260576962,"More work on improving the operator delete diagnostics.","More work on improving the operator delete diagnostics.\n\nllvm-svn: 91187"}, [b]={{y,16062,"static bool CheckOperatorNewDeclaration(Sema &SemaRef, const FunctionDecl *FnDecl) {\n // ...\n if (CheckOperatorNewDeleteTypes(SemaRef, FnDecl, SemaRef.Context.VoidPtrTy, SizeTy, diag::err_operator_new_dependent_param_type, diag::err_operator_new_param_type))"}}, [l]={ [ub]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp:40:30: error: \'operator new\' cannot take a dependent type as first parameter; use size_t (\'unsigned long\') instead"} } }, ["err_operator_new_param_type"]={ [d]="err_operator_new_param_type", [e]="%0 takes type size_t (%1) as first parameter", [i]="A takes type size_t (B) as first parameter", [j]=k, [c]="(.*?) takes type size_t \\((.*?)\\) as first parameter", [h]=a, [g]=m, [f]={"4e088941ad99",1257896838,"Diagnose illegally typed operator new/new[].","Diagnose illegally typed operator new/new[].\n\nllvm-svn: 86755"}, [b]={{y,16063,"static bool CheckOperatorNewDeclaration(Sema &SemaRef, const FunctionDecl *FnDecl) {\n // ...\n if (CheckOperatorNewDeleteTypes(SemaRef, FnDecl, SemaRef.Context.VoidPtrTy, SizeTy, diag::err_operator_new_dependent_param_type, diag::err_operator_new_param_type))"}}, [l]={ [ub]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp:24:9: error: \'operator new\' takes type size_t (\'unsigned long\') as first parameter"} } }, ["err_operator_overload_default_arg"]={ [d]="err_operator_overload_default_arg", [e]="parameter of overloaded %0 cannot have a default argument", [i]="parameter of overloaded A cannot have a default argument", [j]=k, [c]="parameter of overloaded (.*?) cannot have a default argument", [h]=a, [g]=m, [f]={eb,1237025389,db,bb}, [b]={{y,16198,"/// CheckOverloadedOperatorDeclaration - Check whether the declaration\n/// of this overloaded operator is well-formed. If so, returns false;\n/// otherwise, emits appropriate diagnostics and returns true.\nbool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {\n // ...\n // C++ [over.oper]p8:\n // An operator function cannot have default arguments (8.3.6),\n // except where explicitly stated below.\n //\n // Only the function-call operator (C++ [over.call]p1) and the subscript\n // operator (CWG2507) allow default arguments.\n if (Op != OO_Call) {\n // ...\n if (FirstDefaultedParam) {\n if (Op == OO_Subscript) {\n // ...\n } else {\n return Diag(FirstDefaultedParam->getLocation(), diag::err_operator_overload_default_arg) << FnDecl->getDeclName() << FirstDefaultedParam->getDefaultArgRange();"}}, [l]={ [gb]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:25:18: error: parameter of overloaded \'operator*\' cannot have a default argument"} } }, ["err_operator_overload_must_be"]={ [d]="err_operator_overload_must_be", [e]="overloaded %0 must be a %select{unary|binary|unary or binary}2 operator (has %1 parameter%s1)", [i]={{nil,nil,{"overloaded A must be a ",{"unary","binary","unary or binary"}," operator (has B parameterB)"}}}, [j]=k, [c]="overloaded (.*?) must be a (?:unary|binary|unary or binary) operator \\(has (.*?) parameter(.*?)\\)", [h]=a, [g]=m, [f]={eb,1237025389,db,bb}, [b]={{y,16237,"#include \"clang/Basic/OperatorKinds.def\"\n // ...\n if (Op != OO_Call && Op != OO_Subscript && ((NumParams == 1 && !CanBeUnaryOperator) || (NumParams == 2 && !CanBeBinaryOperator) || (NumParams < 1) || (NumParams > 2))) {\n // ...\n return Diag(FnDecl->getLocation(), diag::err_operator_overload_must_be) << FnDecl->getDeclName() << NumParams << ErrorKind;"}}, [l]={ [gb]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:29:3: error: overloaded \'operator%\' must be a binary operator (has 1 parameter)"} } }, ["err_operator_overload_must_be_member"]={ [d]="err_operator_overload_must_be_member", [e]="overloaded %0 must be a non-static member function", [i]="overloaded A must be a non-static member function", [j]=k, [c]="overloaded (.*?) must be a non\\-static member function", [h]=a, [g]=m, [f]={eb,1237025389,db,bb}, [b]={{y,16259,"#include \"clang/Basic/OperatorKinds.def\"\n // ...\n // Some operators must be member functions.\n if (MustBeMemberOperator && !isa<CXXMethodDecl>(FnDecl)) {\n return Diag(FnDecl->getLocation(), diag::err_operator_overload_must_be_member) << FnDecl->getDeclName();"}}, [l]={ [gb]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:31:6: error: overloaded \'operator()\' must be a non-static member function"} } }, ["err_operator_overload_needs_class_or_enum"]={ [d]="err_operator_overload_needs_class_or_enum", [e]="overloaded %0 must have at least one parameter of class or enumeration type", [i]="overloaded A must have at least one parameter of class or enumeration type", [j]=k, [c]="overloaded (.*?) must have at least one parameter of class or enumeration type", [h]=a, [g]=m, [f]={eb,1237025389,db,bb}, [b]={{y,16171,"/// CheckOverloadedOperatorDeclaration - Check whether the declaration\n/// of this overloaded operator is well-formed. If so, returns false;\n/// otherwise, emits appropriate diagnostics and returns true.\nbool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {\n // ...\n // C++ [over.oper]p7:\n // An operator function shall either be a member function or\n // be a non-member function and have at least one parameter\n // whose type is a class, a reference to a class, an enumeration,\n // or a reference to an enumeration.\n // Note: Before C++23, a member function could not be static. The only member\n // function allowed to be static is the call operator function.\n if (CXXMethodDecl *MethodDecl = dyn_cast<CXXMethodDecl>(FnDecl)) {\n // ...\n } else {\n // ...\n if (!ClassOrEnumParam)\n return Diag(FnDecl->getLocation(), diag::err_operator_overload_needs_class_or_enum) << FnDecl->getDeclName();"}}, [l]={ [gb]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:23:3: error: overloaded \'operator+\' must have at least one parameter of class or enumeration type"} } }, ["err_operator_overload_post_incdec_must_be_int"]={ [d]="err_operator_overload_post_incdec_must_be_int", [e]="parameter of overloaded post-%select{increment|decrement}1 operator must have type \'int\' (not %0)", [i]={{nil,nil,{"parameter of overloaded post-",{"increment","decrement"}," operator must have type \'int\' (not A)"}}}, [j]=k, [c]="parameter of overloaded post\\-(?:increment|decrement) operator must have type \'int\' \\(not (.*?)\\)", [h]=a, [g]=m, [f]={eb,1237025389,db,bb}, [b]={{y,16280,"#include \"clang/Basic/OperatorKinds.def\"\n // ...\n // C++ [over.inc]p1:\n // The user-defined function called operator++ implements the\n // prefix and postfix ++ operator. If this function is a member\n // function with no parameters, or a non-member function with one\n // parameter of class or enumeration type, it defines the prefix\n // increment operator ++ for objects of that type. If the function\n // is a member function with one parameter (which shall be of type\n // int) or a non-member function with two parameters (the second\n // of which shall be of type int), it defines the postfix\n // increment operator ++ for objects of that type.\n if ((Op == OO_PlusPlus || Op == OO_MinusMinus) && NumParams == 2) {\n // ...\n if (!ParamType->isSpecificBuiltinType(BuiltinType::Int) && !ParamType->isDependentType())\n return Diag(LastParam->getLocation(), diag::err_operator_overload_post_incdec_must_be_int) << LastParam->getType() << (Op == OO_MinusMinus);"}}, [l]={ [gb]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:37:23: error: parameter of overloaded post-increment operator must have type \'int\' (not \'FLOAT\' (aka \'float\'))"} } }, ["err_operator_overload_static"]={ [d]="err_operator_overload_static", [e]="overloaded %0 cannot be a static member function", [i]="overloaded A cannot be a static member function", [j]=k, [c]="overloaded (.*?) cannot be a static member function", [h]=a, [g]=m, [f]={eb,1237025389,db,bb}, [b]={{y,16155,"/// CheckOverloadedOperatorDeclaration - Check whether the declaration\n/// of this overloaded operator is well-formed. If so, returns false;\n/// otherwise, emits appropriate diagnostics and returns true.\nbool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {\n // ...\n // C++ [over.oper]p7:\n // An operator function shall either be a member function or\n // be a non-member function and have at least one parameter\n // whose type is a class, a reference to a class, an enumeration,\n // or a reference to an enumeration.\n // Note: Before C++23, a member function could not be static. The only member\n // function allowed to be static is the call operator function.\n if (CXXMethodDecl *MethodDecl = dyn_cast<CXXMethodDecl>(FnDecl)) {\n if (MethodDecl->isStatic()) {\n if (Op == OO_Call || Op == OO_Subscript)\n // ...\n else\n return Diag(FnDecl->getLocation(), diag::err_operator_overload_static) << FnDecl;"}}, [l]={ [gb]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:15:14: error: overloaded \'operator+\' cannot be a static member function"} } }, ["err_operator_overload_variadic"]={ [d]="err_operator_overload_variadic", [e]="overloaded %0 cannot be variadic", [i]="overloaded A cannot be variadic", [j]=k, [c]="overloaded (.*?) cannot be variadic", [h]=a, [g]=m, [f]={eb,1237025389,db,bb}, [b]={{y,16252,"#include \"clang/Basic/OperatorKinds.def\"\n // ...\n // Overloaded operators other than operator() and operator[] cannot be\n // variadic.\n if (Op != OO_Call && FnDecl->getType()->castAs<FunctionProtoType>()->isVariadic()) {\n return Diag(FnDecl->getLocation(), diag::err_operator_overload_variadic) << FnDecl->getDeclName();"}}, [l]={ [gb]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:27:3: error: overloaded \'operator/\' cannot be variadic"} } }, ["err_opt_not_valid_on_target"]={ [d]={{nil,z,"err_opt_not_valid_on_target"}}, [e]={{nil,z,"option \'%0\' cannot be specified on this target"}}, [i]={{nil,z,"option \'A\' cannot be specified on this target"}}, [j]=k, [c]="option \'(.*?)\' cannot be specified on this target", [h]=a, [g]={{nil,z,V}}, [f]={"0fb8c877c4a3",1526644581,"This patch aims to match the changes introduced","This patch aims to match the changes introduced\nin gcc by https://gcc.gnu.org/ml/gcc-cvs/2018-04/msg00534.html.\nThe -mibt feature flag is being removed, and the -fcf-protection\noption now also defines a CET macro and causes errors when used\non non-X86 targets, while X86 targets no longer check for -mibt\nand -mshstk to determine if -fcf-protection is supported. -mshstk\nis now used only to determine availability of shadow stack intrinsics.\n\nComes with an LLVM patch (D46882).\n\nPatch by mike.dvoretsky\n\nDifferential Revision: https://reviews.llvm.org/D46881\n\nllvm-svn: 332704"}, [b]={{"clang/lib/Basic/TargetInfo.cpp",197,"bool TargetInfo::checkCFProtectionBranchSupported(DiagnosticsEngine &Diags) const {\n Diags.Report(diag::err_opt_not_valid_on_target) << \"cf-protection=branch\";"},{"clang/lib/Basic/TargetInfo.cpp",203,"bool TargetInfo::checkCFProtectionReturnSupported(DiagnosticsEngine &Diags) const {\n Diags.Report(diag::err_opt_not_valid_on_target) << \"cf-protection=return\";"},{"clang/lib/Basic/TargetInfo.cpp",511,"/// adjust - Set forced language options.\n/// Apply changes to the target information with respect to certain\n/// language options which change the target configuration and adjust\n/// the language based on the target options where applicable.\nvoid TargetInfo::adjust(DiagnosticsEngine &Diags, LangOptions &Opts) {\n // ...\n if (Opts.ProtectParens && !checkArithmeticFenceSupported()) {\n Diags.Report(diag::err_opt_not_valid_on_target) << \"-fprotect-parens\";"},{"clang/lib/CodeGen/CodeGenFunction.cpp",1098,"#include \"clang/Basic/Sanitizers.def\"\n // ...\n if (CGM.getCodeGenOpts().PackedStack) {\n if (getContext().getTargetInfo().getTriple().getArch() != llvm::Triple::systemz)\n CGM.getDiags().Report(diag::err_opt_not_valid_on_target) << \"-mpacked-stack\";"}} }, ["err_opt_not_valid_with_opt"]={ [d]="err_opt_not_valid_with_opt", [e]="option \'%0\' cannot be specified with \'%1\'", [i]="option \'A\' cannot be specified with \'B\'", [j]=k, [c]="option \'(.*?)\' cannot be specified with \'(.*?)\'", [h]=a, [g]=V, [f]={"26c3534b84f2",1436533894,"Add missing builtins to altivec.h for ABI compliance (vol. 3)","Add missing builtins to altivec.h for ABI compliance (vol. 3)\n\nThis patch corresponds to review:\nhttp://reviews.llvm.org/D10972\n\nFix for the handling of dependent features that are enabled by default\non some CPU\'s (such as -mvsx, -mpower8-vector).\n\nAlso provides a number of new interfaces or fixes existing ones in\naltivec.h.\n\nChanged signatures to conform to ABI:\nvector short vec_perm(vector signed short, vector signed short, vector unsigned char)\nvector int vec_perm(vector signed int, vector signed int, vector unsigned char)\nvector long long vec_perm(vector signed long long, vector signed long long, vector unsigned char)\nvector signed char vec_sld(vector signed char, vector signed char, const int)\nvector unsigned char vec_sld(vector unsigned char, vector unsigned char, const int)\nvector bool char vec_sld(vector bool char, vector bool char, const int)\nvector unsigned short vec_sld(vector unsigned short, vector unsigned short, const int)\nvector signed short vec_sld(vector signed short, vector signed short, const int)\nvector signed int vec_sld(vector signed int, vector signed int, const int)\nvector unsigned int vec_sld(vector unsigned int, vector unsigned int, const int)\nvector float vec_sld(vector float, vector float, const int)\nvector signed char vec_splat(vector signed char, const int)\nvector unsigned char vec_splat(vector unsigned char, const int)\nvector bool char vec_splat(vector bool char, const int)\nvector signed short vec_splat(vector signed short, const int)\nvector unsigned short vec_splat(vector unsigned short, const int)\nvector bool short vec_splat(vector bool short, const int)\nvector pixel vec_splat(vector pixel, const int)\nvector signed int vec_splat(vector signed int, const int)\nvector unsigned int vec_splat(vector unsigned int, const int)\nvector bool int vec_splat(vector bool int, const int)\nvector float vec_splat(vector float, const int)\n\nAdded a VSX path to:\nvector float vec_round(vector float)\n\nAdded interfaces:\nvector signed char vec_eqv(vector signed char, vector signed char)\nvector signed char vec_eqv(vector bool char, vector signed char)\nvector signed char vec_eqv(vector signed char, vector bool char)\nvector unsigned char vec_eqv(vector unsigned char, vector unsigned char)\nvector unsigned char vec_eqv(vector bool char, vector unsigned char)\nvector unsigned char vec_eqv(vector unsigned char, vector bool char)\nvector signed short vec_eqv(vector signed short, vector signed short)\nvector signed short vec_eqv(vector bool short, vector signed short)\nvector signed short vec_eqv(vector signed short, vector bool short)\nvector unsigned short vec_eqv(vector unsigned short, vector unsigned short)\nvector unsigned short vec_eqv(vector bool short, vector unsigned short)\nvector unsigned short vec_eqv(vector unsigned short, vector bool short)\nvector signed int vec_eqv(vector signed int, vector signed int)\nvector signed int vec_eqv(vector bool int, vector signed int)\nvector signed int vec_eqv(vector signed int, vector bool int)\nvector unsigned int vec_eqv(vector unsigned int, vector unsigned int)\nvector unsigned int vec_eqv(vector bool int, vector unsigned int)\nvector unsigned int vec_eqv(vector unsigned int, vector bool int)\nvector signed long long vec_eqv(vector signed long long, vector signed long long)\nvector signed long long vec_eqv(vector bool long long, vector signed long long)\nvector signed long long vec_eqv(vector signed long long, vector bool long long)\nvector unsigned long long vec_eqv(vector unsigned long long, vector unsigned long long)\nvector unsigned long long vec_eqv(vector bool long long, vector unsigned long long)\nvector unsigned long long vec_eqv(vector unsigned long long, vector bool long long)\nvector float vec_eqv(vector float, vector float)\nvector float vec_eqv(vector bool int, vector float)\nvector float vec_eqv(vector float, vector bool int)\nvector double vec_eqv(vector double, vector double)\nvector double vec_eqv(vector bool long long, vector double)\nvector double vec_eqv(vector double, vector bool long long)\nvector bool long long vec_perm(vector bool long long, vector bool long long, vector unsigned char)\nvector double vec_round(vector double)\nvector double vec_splat(vector double, const int)\nvector bool long long vec_splat(vector bool long long, const int)\nvector signed long long vec_splat(vector signed long long, const int)\nvector unsigned long long vec_splat(vector unsigned long long,\nvector bool int vec_sld(vector bool int, vector bool int, const int)\nvector bool short vec_sld(vector bool short, vector bool short, const int)\n\nllvm-svn: 241904"}, [b]={{"clang/lib/Basic/Targets/Mips.cpp",258,"bool MipsTargetInfo::validateTarget(DiagnosticsEngine &Diags) const {\n // ...\n // -mfp32 and n32/n64 ABIs are incompatible\n if (FPMode != FP64 && FPMode != FPXX && !IsSingleFloat && (ABI == \"n32\" || ABI == \"n64\")) {\n Diags.Report(diag::err_opt_not_valid_with_opt) << \"-mfpxx\" << CPU;"},{"clang/lib/Basic/Targets/Mips.cpp",264,"bool MipsTargetInfo::validateTarget(DiagnosticsEngine &Diags) const {\n // ...\n // Mips revision 6 and -mfp32 are incompatible\n if (FPMode != FP64 && FPMode != FPXX && (CPU == \"mips32r6\" || CPU == \"mips64r6\")) {\n Diags.Report(diag::err_opt_not_valid_with_opt) << \"-mfp32\" << CPU;"},{Z,459,"// Handle explicit options being passed to the compiler here: if we\'ve\n// explicitly turned off vsx and turned on any of:\n// - power8-vector\n// - direct-move\n// - float128\n// - power9-vector\n// - paired-vector-memops\n// - mma\n// - power10-vector\n// then go ahead and error since the customer has expressed an incompatible\n// set of options.\nstatic bool ppcUserFeaturesCheck(DiagnosticsEngine &Diags, const std::vector<std::string> &FeaturesVec) {\n // ...\n auto FindVSXSubfeature = [&](StringRef Feature, StringRef Option) {\n if (llvm::is_contained(FeaturesVec, Feature)) {\n Diags.Report(diag::err_opt_not_valid_with_opt) << Option << \"-mno-vsx\";"},{Z,593,"bool PPCTargetInfo::initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector<std::string> &FeaturesVec) const {\n // ...\n if (!(ArchDefs & ArchDefinePwr7) && (ArchDefs & ArchDefinePpcgr) && llvm::is_contained(FeaturesVec, \"+float128\")) {\n // ...\n Diags.Report(diag::err_opt_not_valid_with_opt) << \"-mfloat128\" << CPU;"},{Z,600,"bool PPCTargetInfo::initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector<std::string> &FeaturesVec) const {\n // ...\n if (!(ArchDefs & ArchDefinePwr10)) {\n if (llvm::is_contained(FeaturesVec, \"+mma\")) {\n // ...\n Diags.Report(diag::err_opt_not_valid_with_opt) << \"-mmma\" << CPU;"},{Z,629,"bool PPCTargetInfo::initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector<std::string> &FeaturesVec) const {\n // ...\n if (!(ArchDefs & ArchDefinePwr8) && llvm::is_contained(FeaturesVec, \"+rop-protect\")) {\n // ...\n Diags.Report(diag::err_opt_not_valid_with_opt) << \"-mrop-protect\" << CPU;"},{Z,635,"bool PPCTargetInfo::initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector<std::string> &FeaturesVec) const {\n // ...\n if (!(ArchDefs & ArchDefinePwr8) && llvm::is_contained(FeaturesVec, \"+privileged\")) {\n Diags.Report(diag::err_opt_not_valid_with_opt) << \"-mprivileged\" << CPU;"},{"clang/lib/Basic/Targets/WebAssembly.cpp",265,"bool WebAssemblyTargetInfo::handleTargetFeatures(std::vector<std::string> &Features, DiagnosticsEngine &Diags) {\n for (const auto &Feature : Features) {\n // ...\n Diags.Report(diag::err_opt_not_valid_with_opt) << Feature << \"-target-feature\";"},{"clang/lib/Driver/Driver.cpp",3158,"/// Provides a convenient interface for different programming models to generate\n/// the required device actions.\nclass OffloadingActionBuilder final {\n // ...\n /// Base class for CUDA/HIP action builder. It injects device code in\n /// the host backend action.\n class CudaActionBuilderBase : public DeviceActionBuilder {\n // ...\n bool initialize() override {\n // ...\n // --offload and --offload-arch options are mutually exclusive.\n if (Args.hasArgNoClaim(options::OPT_offload_EQ) && Args.hasArgNoClaim(options::OPT_offload_arch_EQ, options::OPT_no_offload_arch_EQ)) {\n C.getDriver().Diag(diag::err_opt_not_valid_with_opt) << \"--offload-arch\""},{"clang/lib/Driver/Driver.cpp",3383,"/// Provides a convenient interface for different programming models to generate\n/// the required device actions.\nclass OffloadingActionBuilder final {\n // ...\n /// \\brief HIP action builder. It injects device code in the host backend\n /// action.\n class HIPActionBuilder final : public CudaActionBuilderBase {\n // ...\n HIPActionBuilder(Compilation &C, DerivedArgList &Args, const Driver::InputList &Inputs) : CudaActionBuilderBase(C, Args, Inputs, Action::OFK_HIP) {\n // ...\n if (Args.hasArg(options::OPT_fhip_emit_relocatable, options::OPT_fno_hip_emit_relocatable)) {\n // ...\n if (*EmitReloc) {\n if (Relocatable) {\n C.getDriver().Diag(diag::err_opt_not_valid_with_opt) << \"-fhip-emit-relocatable\""},{"clang/lib/Driver/Driver.cpp",4411,"llvm::DenseSet<StringRef> Driver::getOffloadArchs(Compilation &C, const llvm::opt::DerivedArgList &Args, Action::OffloadKind Kind, const ToolChain *TC, bool SuppressError) const {\n // ...\n // --offload and --offload-arch options are mutually exclusive.\n if (Args.hasArgNoClaim(options::OPT_offload_EQ) && Args.hasArgNoClaim(options::OPT_offload_arch_EQ, options::OPT_no_offload_arch_EQ)) {\n C.getDriver().Diag(diag::err_opt_not_valid_with_opt) << \"--offload\" << (Args.hasArgNoClaim(options::OPT_offload_arch_EQ) ? \"--offload-arch\" : \"--no-offload-arch\");"},{"clang/lib/Driver/ToolChains/Arch/ARM.cpp",851,"llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features, bool ForAS, bool ForMultilib) {\n // ...\n // Generate execute-only output (no data access to code sections).\n // This only makes sense for the compiler, not for the assembler.\n // It\'s not needed for multilib selection and may hide an unused\n // argument diagnostic if the code is always run.\n if (!ForAS && !ForMultilib) {\n // Supported only on ARMv6T2 and ARMv7 and above.\n // Cannot be combined with -mno-movt.\n if (Arg *A = Args.getLastArg(options::OPT_mexecute_only, options::OPT_mno_execute_only)) {\n if (A->getOption().matches(options::OPT_mexecute_only)) {\n if (getARMSubArchVersionNumber(Triple) < 7 && llvm::ARM::parseArch(Triple.getArchName()) != llvm::ARM::ArchKind::ARMV6T2)\n // ...\n else if (Arg *B = Args.getLastArg(options::OPT_mno_movt))\n D.Diag(diag::err_opt_not_valid_with_opt) << A->getAsString(Args) << B->getAsString(Args);"}} }, ["err_opt_not_valid_without_opt"]={ [d]={{nil,z,"err_opt_not_valid_without_opt"}}, [e]={{nil,z,"option \'%0\' cannot be specified without \'%1\'"}}, [i]={{nil,z,"option \'A\' cannot be specified without \'B\'"}}, [j]=k, [c]="option \'(.*?)\' cannot be specified without \'(.*?)\'", [h]=a, [g]={{nil,z,V}}, [f]={"57cc1a5d77d8",1515488039,"Added Control Flow Protection Flag","Added Control Flow Protection Flag\n\nCf-protection is a target independent flag that instructs the back-end to instrument control flow mechanisms like: Branch, Return, etc.\nFor example in X86 this flag will be used to instrument Indirect Branch Tracking instructions.\n\nDifferential Revision: https://reviews.llvm.org/D40478\n\nChange-Id: I5126e766c0e6b84118cae0ee8a20fe78cc373dea\nllvm-svn: 322063"}, [b]={{Z,606,"bool PPCTargetInfo::initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector<std::string> &FeaturesVec) const {\n // ...\n if (!(ArchDefs & ArchDefinePwr10)) {\n // ...\n if (llvm::is_contained(FeaturesVec, \"+pcrel\")) {\n // ...\n Diags.Report(diag::err_opt_not_valid_without_opt) << \"-mpcrel\""},{Z,613,"bool PPCTargetInfo::initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector<std::string> &FeaturesVec) const {\n // ...\n if (!(ArchDefs & ArchDefinePwr10)) {\n // ...\n if (llvm::is_contained(FeaturesVec, \"+prefixed\")) {\n // ...\n Diags.Report(diag::err_opt_not_valid_without_opt) << \"-mprefixed\""},{Z,619,"bool PPCTargetInfo::initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector<std::string> &FeaturesVec) const {\n // ...\n if (!(ArchDefs & ArchDefinePwr10)) {\n // ...\n if (llvm::is_contained(FeaturesVec, \"+paired-vector-memops\")) {\n // ...\n Diags.Report(diag::err_opt_not_valid_without_opt) << \"-mpaired-vector-memops\""},{"clang/lib/CodeGen/CodeGenFunction.cpp",1081,"#include \"clang/Basic/Sanitizers.def\"\n // ...\n // Since emitting the mcount call here impacts optimizations such as function\n // inlining, we just add an attribute to insert a mcount call in backend.\n // The attribute \"counting-function\" is set to mcount function name which is\n // architecture dependent.\n if (CGM.getCodeGenOpts().InstrumentForProfiling) {\n // Calls to fentry/mcount should not be generated if function has\n // the no_instrument_function attribute.\n if (!CurFuncDecl || !CurFuncDecl->hasAttr<NoInstrumentFunctionAttr>()) {\n // ...\n if (CGM.getCodeGenOpts().MNopMCount) {\n if (!CGM.getCodeGenOpts().CallFEntry)\n CGM.getDiags().Report(diag::err_opt_not_valid_without_opt) << \"-mnop-mcount\""},{"clang/lib/CodeGen/CodeGenFunction.cpp",1088,"#include \"clang/Basic/Sanitizers.def\"\n // ...\n // Since emitting the mcount call here impacts optimizations such as function\n // inlining, we just add an attribute to insert a mcount call in backend.\n // The attribute \"counting-function\" is set to mcount function name which is\n // architecture dependent.\n if (CGM.getCodeGenOpts().InstrumentForProfiling) {\n // Calls to fentry/mcount should not be generated if function has\n // the no_instrument_function attribute.\n if (!CurFuncDecl || !CurFuncDecl->hasAttr<NoInstrumentFunctionAttr>()) {\n // ...\n if (CGM.getCodeGenOpts().RecordMCount) {\n if (!CGM.getCodeGenOpts().CallFEntry)\n CGM.getDiags().Report(diag::err_opt_not_valid_without_opt) << \"-mrecord-mcount\""},{"clang/lib/Driver/Driver.cpp",3389,"/// Provides a convenient interface for different programming models to generate\n/// the required device actions.\nclass OffloadingActionBuilder final {\n // ...\n /// \\brief HIP action builder. It injects device code in the host backend\n /// action.\n class HIPActionBuilder final : public CudaActionBuilderBase {\n // ...\n HIPActionBuilder(Compilation &C, DerivedArgList &Args, const Driver::InputList &Inputs) : CudaActionBuilderBase(C, Args, Inputs, Action::OFK_HIP) {\n // ...\n if (Args.hasArg(options::OPT_fhip_emit_relocatable, options::OPT_fno_hip_emit_relocatable)) {\n // ...\n if (*EmitReloc) {\n // ...\n if (!CompileDeviceOnly) {\n C.getDriver().Diag(diag::err_opt_not_valid_without_opt) << \"-fhip-emit-relocatable\""},{"clang/lib/Driver/ToolChains/Arch/ARM.cpp",807,"llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features, bool ForAS, bool ForMultilib) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mfix_cmse_cve_2021_35465, options::OPT_mno_fix_cmse_cve_2021_35465)) {\n if (!Args.getLastArg(options::OPT_mcmse))\n D.Diag(diag::err_opt_not_valid_without_opt) << A->getOption().getName() << \"-mcmse\";"}} }, ["err_os_log_argument_too_big"]={ [d]="err_os_log_argument_too_big", [e]="os_log() argument %0 is too big (%1 bytes, max %2)", [i]="os_log() argument A is too big (B bytes, max C)", [j]=k, [c]="os_log\\(\\) argument (.*?) is too big \\((.*?) bytes, max (.*?)\\)", [h]=a, [g]=m, [f]={"29034362ae87",1477328183,"Add support for __builtin_os_log_format[_buffer_size]","Add support for __builtin_os_log_format[_buffer_size]\n\nThese new builtins support a mechanism for logging OS events, using a\nprintf-like format string to specify the layout of data in a buffer.\nThe _buffer_size version of the builtin can be used to determine the size\nof the buffer to allocate to hold the data, and then __builtin_os_log_format\ncan write data into that buffer. This implements format checking to report\nmismatches between the format string and the data arguments. Most of this\ncode was written by Chris Willmore.\n\nDifferential Revision: https://reviews.llvm.org/D25888\n\nllvm-svn: 284990"}, [b]={{A,8743,"bool Sema::SemaBuiltinOSLogFormat(CallExpr *TheCall) {\n // ...\n while (i < NumArgs) {\n // ...\n if (ArgSize.getQuantity() >= 0x100) {\n return Diag(Arg.get()->getEndLoc(), diag::err_os_log_argument_too_big) << i << (int)ArgSize.getQuantity() << 0xff << TheCall->getSourceRange();"}}, [l]={ ["clang/test/SemaObjC/format-strings-oslog.m"]={"clang/test/SemaObjC/format-strings-oslog.m:41:38: error: os_log() argument 2 is too big (256 bytes, max 255)"} } }, ["err_os_log_format_not_string_constant"]={ [d]="err_os_log_format_not_string_constant", [e]="os_log() format argument is not a string constant", [i]="os_log() format argument is not a string constant", [j]=k, [c]="os_log\\(\\) format argument is not a string constant", [h]=a, [g]=m, [f]={"29034362ae87",1477328183,"Add support for __builtin_os_log_format[_buffer_size]","Add support for __builtin_os_log_format[_buffer_size]\n\nThese new builtins support a mechanism for logging OS events, using a\nprintf-like format string to specify the layout of data in a buffer.\nThe _buffer_size version of the builtin can be used to determine the size\nof the buffer to allocate to hold the data, and then __builtin_os_log_format\ncan write data into that buffer. This implements format checking to report\nmismatches between the format string and the data arguments. Most of this\ncode was written by Chris Willmore.\n\nDifferential Revision: https://reviews.llvm.org/D25888\n\nllvm-svn: 284990"}, [b]={{A,8014,"/// CheckObjCString - Checks that the format string argument to the os_log()\n/// and os_trace() functions is correct, and converts it to const char *.\nExprResult Sema::CheckOSLogFormatStringArg(Expr *Arg) {\n // ...\n if (!Literal || (!Literal->isOrdinary() && !Literal->isUTF8())) {\n return ExprError(Diag(Arg->getBeginLoc(), diag::err_os_log_format_not_string_constant) << Arg->getSourceRange());"}}, [l]={ ["clang/test/SemaObjC/format-strings-oslog.m"]={"clang/test/SemaObjC/format-strings-oslog.m:23:32: error: os_log() format argument is not a string constant"} } }, ["err_out_of_line_constructor_template_id"]={ [d]="err_out_of_line_constructor_template_id", [e]="out-of-line constructor for %0 cannot have template arguments", [i]="out-of-line constructor for A cannot have template arguments", [j]=k, [c]="out\\-of\\-line constructor for (.*?) cannot have template arguments", [h]=a, [g]=K, [f]={"9de54ea41bdc",1263403896,"Reimplement constructor declarator parsing to cope with template-ids","Reimplement constructor declarator parsing to cope with template-ids\nthat name constructors, the endless joys of out-of-line constructor\ndefinitions, and various other corner cases that the previous hack\nnever imagined. Fixes PR5688 and tightens up semantic analysis for\nconstructor names.\n\nAdditionally, fixed a problem where we wouldn\'t properly enter the\ndeclarator scope of a parenthesized declarator. We were entering the\nscope, then leaving it when we saw the \")\"; now, we re-enter the\ndeclarator scope before parsing the parameter list.\n\nNote that we are forced to perform some tentative parsing within a\nclass (call it C) to tell the difference between\n\n C(int); // constructor\n\nand\n\n C (f)(int); // member function\n\nwhich is rather unfortunate. And, although it isn\'t necessary for\ncorrectness, we use the same tentative-parsing mechanism for\nout-of-line constructors to improve diagnostics in icky cases like:\n\n C::C C::f(int); // error: C::C refers to the constructor name, but\n // we complain nicely and recover by treating it as\n // a type.\n\nllvm-svn: 93322"}, [b]={{"clang/lib/Parse/ParseExprCXX.cpp",2964,"/// Parse a C++ unqualified-id (or a C identifier), which describes the\n/// name of an entity.\n///\n/// \\code\n/// unqualified-id: [C++ expr.prim.general]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// [C++0x] literal-operator-id [TODO]\n/// ~ class-name\n/// template-id\n///\n/// \\endcode\n///\n/// \\param SS The nested-name-specifier that preceded this unqualified-id. If\n/// non-empty, then we are parsing the unqualified-id of a qualified-id.\n///\n/// \\param ObjectType if this unqualified-id occurs within a member access\n/// expression, the type of the base object whose member is being accessed.\n///\n/// \\param ObjectHadErrors if this unqualified-id occurs within a member access\n/// expression, indicates whether the original subexpressions had any errors.\n/// When true, diagnostics for missing \'template\' keyword will be supressed.\n///\n/// \\param EnteringContext whether we are entering the scope of the\n/// nested-name-specifier.\n///\n/// \\param AllowDestructorName whether we allow parsing of a destructor name.\n///\n/// \\param AllowConstructorName whether we allow parsing a constructor name.\n///\n/// \\param AllowDeductionGuide whether we allow parsing a deduction guide name.\n///\n/// \\param Result on a successful parse, contains the parsed unqualified-id.\n///\n/// \\returns true if parsing fails, false otherwise.\nbool Parser::ParseUnqualifiedId(CXXScopeSpec &SS, ParsedType ObjectType, bool ObjectHadErrors, bool EnteringContext, bool AllowDestructorName, bool AllowConstructorName, bool AllowDeductionGuide, SourceLocation *TemplateKWLoc, UnqualifiedId &Result) {\n // ...\n // unqualified-id:\n // template-id (already parsed and annotated)\n if (Tok.is(tok::annot_template_id)) {\n // ...\n // If the template-name names the current class, then this is a constructor\n if (AllowConstructorName && TemplateId->Name && Actions.isCurrentClassName(*TemplateId->Name, getCurScope(), &SS)) {\n if (SS.isSet()) {\n // ...\n Diag(TemplateId->TemplateNameLoc, diag::err_out_of_line_constructor_template_id) << TemplateId->Name << FixItHint::CreateRemoval(SourceRange(TemplateId->LAngleLoc, TemplateId->RAngleLoc));"}}, [l]={ ["clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:26:29: error: out-of-line constructor for \'X1\' cannot have template arguments","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:27:30: error: out-of-line constructor for \'X1\' cannot have template arguments"} } }, ["err_out_of_line_default_deletes"]={ [d]="err_out_of_line_default_deletes", [e]="defaulting this %select{default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor}0 would delete it after its first declaration", [i]={{nil,nil,{"defaulting this ",{"default constructor","copy constructor","move constructor","copy assignment operator","move assignment operator","destructor"}," would delete it after its first declaration"}}}, [j]=k, [c]="defaulting this (?:default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor) would delete it after its first declaration", [h]=a, [g]=m, [f]={"b315302bf94a",1305172308,"Implement deletion of explicitly defaulted default constructors.","Implement deletion of explicitly defaulted default constructors.\n\nWe still don\'t parse out-of-line defaults correctly, which is needed to\nget the full effect out of this patch.\n\nllvm-svn: 131223"}, [b]={{y,7790,"bool Sema::CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM, SourceLocation DefaultLoc) {\n // ...\n if (ShouldDeleteForTypeMismatch || ShouldDeleteSpecialMember(MD, CSM)) {\n if (First) {\n // ...\n } else {\n // ...\n Diag(MD->getLocation(), diag::err_out_of_line_default_deletes) << CSM;"}}, [l]={ ["clang/test/CXX/special/class.copy/p11.0x.copy.cpp"]={"clang/test/CXX/special/class.copy/p11.0x.copy.cpp:167:6: error: defaulting this copy constructor would delete it after its first declaration"} } }, ["err_out_of_line_qualified_id_type_names_constructor"]={ [d]={{nil,q,"err_out_of_line_qualified_id_type_names_constructor"}}, [e]={{nil,q,"qualified reference to %0 is a constructor name rather than a %select{template name|type}1 in this context"}}, [i]={{nil,q,{"qualified reference to A is a constructor name rather than a ",{"template name","type"}," in this context"}}}, [j]=k, [c]="qualified reference to (.*?) is a constructor name rather than a (?:template name|type) in this context", [h]=a, [g]={{nil,q,m}}, [f]={"74f02347ca16",1484859613,"PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310).","PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310).\n\nUnder this defect resolution, the injected-class-name of a class or class\ntemplate cannot be used except in very limited circumstances (when declaring a\nconstructor, in a nested-name-specifier, in a base-specifier, or in an\nelaborated-type-specifier). This is apparently done to make parsing easier, but\nit\'s a pain for us since we don\'t know whether a template-id using the\ninjected-class-name is valid at the point when we annotate it (we don\'t yet\nknow whether the template-id will become part of an elaborated-type-specifier).\n\nAs a tentative resolution to a perceived language defect, mem-initializer-ids\nare added to the list of exceptions here (they generally follow the same rules\nas base-specifiers).\n\nWhen the reference to the injected-class-name uses the \'typename\' or \'template\'\nkeywords, we permit it to be used to name a type or template as an extension;\nother compilers also accept some cases in this area. There are also a couple of\ncorner cases with dependent template names that we do not yet diagnose, but\nwhich will also get this treatment.\n\nllvm-svn: 292518"}, [b]={{G,548,"/// If the identifier refers to a type name within this scope,\n/// return the declaration of that type.\n///\n/// This routine performs ordinary name lookup of the identifier II\n/// within the given scope, with optional C++ scope specifier SS, to\n/// determine whether the name refers to a type. If so, returns an\n/// opaque pointer (actually a QualType) corresponding to that\n/// type. Otherwise, returns NULL.\nParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS, bool isClassName, bool HasTrailingDot, ParsedType ObjectTypePtr, bool IsCtorOrDtorName, bool WantNontrivialTypeSourceInfo, bool IsClassTemplateDeductionContext, ImplicitTypenameContext AllowImplicitTypename, IdentifierInfo **CorrectedII) {\n // ...\n if (TypeDecl *TD = dyn_cast<TypeDecl>(IIDecl)) {\n // ...\n if (!isClassName && !IsCtorOrDtorName && LookupRD && FoundRD && FoundRD->isInjectedClassName() && declaresSameEntity(LookupRD, cast<Decl>(FoundRD->getParent())))\n Diag(NameLoc, diag::err_out_of_line_qualified_id_type_names_constructor) << &II << /*Type*/ 1;"},{fb,4172,"TypeResult Sema::ActOnTemplateIdType(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc, bool IsCtorOrDtorName, bool IsClassName, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n if (!IsCtorOrDtorName && !IsClassName && SS.isSet()) {\n // ...\n if (LookupRD && LookupRD->getIdentifier() == TemplateII) {\n Diag(TemplateIILoc, TemplateKWLoc.isInvalid() ? diag::err_out_of_line_qualified_id_type_names_constructor : diag::ext_out_of_line_qualified_id_type_names_constructor) << TemplateII << 0 /*injected-class-name used as template name*/"}}, [l]={ ["clang/test/SemaTemplate/injected-class-name.cpp"]={"clang/test/SemaTemplate/injected-class-name.cpp:14:11: error: qualified reference to \'X\' is a constructor name rather than a template name in this context","clang/test/SemaTemplate/injected-class-name.cpp:16:13: error: qualified reference to \'X\' is a constructor name rather than a template name in this context"} } }, ["err_overflow_builtin_bit_int_max_size"]={ [d]={{nil,M,"err_overflow_builtin_bit_int_max_size"}}, [e]={{nil,M,"__builtin_mul_overflow does not support \'signed _BitInt\' operands of more than %0 bits"}}, [i]={{nil,M,"__builtin_mul_overflow does not support \'signed _BitInt\' operands of more than A bits"}}, [j]=k, [c]="__builtin_mul_overflow does not support \'signed _BitInt\' operands of more than (.*?) bits", [h]=a, [g]={{nil,M,m}}, [f]={"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"}, [b]={{A,417,"static bool SemaBuiltinOverflow(Sema &S, CallExpr *TheCall, unsigned BuiltinID) {\n // ...\n // Disallow signed bit-precise integer args larger than 128 bits to mul\n // function until we improve backend support.\n if (BuiltinID == Builtin::BI__builtin_mul_overflow) {\n for (unsigned I = 0; I < 3; ++I) {\n // ...\n if (Ty->isBitIntType() && Ty->isSignedIntegerType() && S.getASTContext().getIntWidth(Ty) > 128)\n return S.Diag(Arg->getBeginLoc(), diag::err_overflow_builtin_bit_int_max_size) << 128;"}}, [l]={ ["clang/test/Sema/builtins-overflow.c"]={"clang/test/Sema/builtins-overflow.c:40:43: error: __builtin_mul_overflow does not support \'signed _BitInt\' operands of more than 128 bits"} } }, ["err_overflow_builtin_must_be_int"]={ [d]="err_overflow_builtin_must_be_int", [e]="operand argument to overflow builtin must be an integer (%0 invalid)", [i]="operand argument to overflow builtin must be an integer (A invalid)", [j]=k, [c]="operand argument to overflow builtin must be an integer \\((.*?) invalid\\)", [h]=a, [g]=m, [f]={"03107a4ef015",1446151681,"Add support for __builtin_{add,sub,mul}_overflow.","Add support for __builtin_{add,sub,mul}_overflow.\n\nPatch by David Grayson!\n\nllvm-svn: 251651"}, [b]={{A,381,"static bool SemaBuiltinOverflow(Sema &S, CallExpr *TheCall, unsigned BuiltinID) {\n // ...\n // First two arguments should be integers.\n for (unsigned I = 0; I < 2; ++I) {\n // ...\n if (!Ty->isIntegerType()) {\n S.Diag(Arg.get()->getBeginLoc(), diag::err_overflow_builtin_must_be_int) << Ty << Arg.get()->getSourceRange();"}}, [l]={ ["clang/test/Sema/builtins-overflow.c"]={"clang/test/Sema/builtins-overflow.c:17:26: error: operand argument to overflow builtin must be an integer (\'const char *\' invalid)","clang/test/Sema/builtins-overflow.c:18:29: error: operand argument to overflow builtin must be an integer (\'const char *\' invalid)"} } }, ["err_overflow_builtin_must_be_ptr_int"]={ [d]="err_overflow_builtin_must_be_ptr_int", [e]="result argument to overflow builtin must be a pointer to a non-const integer (%0 invalid)", [i]="result argument to overflow builtin must be a pointer to a non-const integer (A invalid)", [j]=k, [c]="result argument to overflow builtin must be a pointer to a non\\-const integer \\((.*?) invalid\\)", [h]=a, [g]=m, [f]={"03107a4ef015",1446151681,"Add support for __builtin_{add,sub,mul}_overflow.","Add support for __builtin_{add,sub,mul}_overflow.\n\nPatch by David Grayson!\n\nllvm-svn: 251651"}, [b]={{A,401,"static bool SemaBuiltinOverflow(Sema &S, CallExpr *TheCall, unsigned BuiltinID) {\n // ...\n // Third argument should be a pointer to a non-const integer.\n // IRGen correctly handles volatile, restrict, and address spaces, and\n // the other qualifiers aren\'t possible.\n {\n // ...\n if (!PtrTy || !PtrTy->getPointeeType()->isIntegerType() || PtrTy->getPointeeType().isConstQualified()) {\n S.Diag(Arg.get()->getBeginLoc(), diag::err_overflow_builtin_must_be_ptr_int) << Ty << Arg.get()->getSourceRange();"}}, [l]={ ["clang/test/Sema/builtins-overflow.c"]={"clang/test/Sema/builtins-overflow.c:19:32: error: result argument to overflow builtin must be a pointer to a non-const integer (\'int\' invalid)","clang/test/Sema/builtins-overflow.c:20:32: error: result argument to overflow builtin must be a pointer to a non-const integer (\'float *\' invalid)","clang/test/Sema/builtins-overflow.c:21:32: error: result argument to overflow builtin must be a pointer to a non-const integer (\'const unsigned int *\' invalid)"} } }, ["err_override_control_interface"]={ [d]="err_override_control_interface", [e]="\'%0\' keyword not permitted with interface types", [i]="\'A\' keyword not permitted with interface types", [j]=k, [c]="\'(.*?)\' keyword not permitted with interface types", [h]=a, [g]=K, [f]={"db632ac004ae",1348558359,"Fix for r163013 regression and further __interface enhancement.","Fix for r163013 regression and further __interface enhancement.\nPatch by Andy Gibbs!\n\nllvm-svn: 164590"}, [b]={{"clang/lib/Parse/ParseDeclCXX.cpp",2462,"/// ParseOptionalCXX11VirtSpecifierSeq - Parse a virt-specifier-seq.\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\nvoid Parser::ParseOptionalCXX11VirtSpecifierSeq(VirtSpecifiers &VS, bool IsInterface, SourceLocation FriendLoc) {\n while (true) {\n // ...\n if (IsInterface && (Specifier == VirtSpecifiers::VS_Final || Specifier == VirtSpecifiers::VS_Sealed)) {\n Diag(Tok.getLocation(), diag::err_override_control_interface) << VirtSpecifiers::getSpecifierName(Specifier);"},{"clang/lib/Parse/ParseDeclCXX.cpp",3524,"/// ParseCXXMemberSpecification - Parse the class definition.\n///\n/// member-specification:\n/// member-declaration member-specification[opt]\n/// access-specifier \':\' member-specification[opt]\n///\nvoid Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AttrFixitLoc, ParsedAttributes &Attrs, unsigned TagType, Decl *TagDecl) {\n // ...\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n // ...\n if (TagType == DeclSpec::TST_interface)\n Diag(FinalLoc, diag::err_override_control_interface) << VirtSpecifiers::getSpecifierName(Specifier);"}}, [l]={ ["clang/test/SemaCXX/ms-interface.cpp"]={"clang/test/SemaCXX/ms-interface.cpp:41:16: error: \'final\' keyword not permitted with interface types","clang/test/SemaCXX/ms-interface.cpp:47:14: error: \'final\' keyword not permitted with interface types"} } }, ["err_override_exception_spec"]={ [d]="err_override_exception_spec", [e]="exception specification of overriding function is more lax than base version", [i]="exception specification of overriding function is more lax than base version", [j]=k, [c]="exception specification of overriding function is more lax than base version", [h]=a, [g]=m, [f]={"86be854fa869",1246998597,"Implement checking of exception spec compatibility for overriding virtual functions.","Implement checking of exception spec compatibility for overriding virtual functions.\n\nllvm-svn: 74943"}, [b]={{"clang/lib/Sema/SemaExceptionSpec.cpp",990,"bool Sema::CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n unsigned DiagID = diag::err_override_exception_spec;"}}, [l]={ ["clang/test/CXX/except/except.spec/p5-delayed.cpp"]={"clang/test/CXX/except/except.spec/p5-delayed.cpp:13:10: error: exception specification of overriding function is more lax than base version"} } }, ["err_ovl_ambiguous_call"]={ [d]="err_ovl_ambiguous_call", [e]="call to %0 is ambiguous", [i]="call to A is ambiguous", [j]=k, [c]="call to (.*?) is ambiguous", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{N,2617,"static bool resolveAllocationOverload(Sema &S, LookupResult &R, SourceRange Range, SmallVectorImpl<Expr *> &Args, bool &PassAlignment, FunctionDecl *&Operator, OverloadCandidateSet *AlignedCandidates, Expr *AlignArg, bool Diagnose) {\n // ...\n case OR_Ambiguous:\n if (Diagnose) {\n Candidates.NoteCandidates(PartialDiagnosticAt(R.getNameLoc(), S.PDiag(diag::err_ovl_ambiguous_call) << R.getLookupName() << Range), S, OCD_AmbiguousCandidates, Args);"},{N,3881,"static bool resolveBuiltinNewDeleteOverload(Sema &S, CallExpr *TheCall, bool IsDelete, FunctionDecl *&Operator) {\n // ...\n case OR_Ambiguous:\n Candidates.NoteCandidates(PartialDiagnosticAt(R.getNameLoc(), S.PDiag(diag::err_ovl_ambiguous_call) << R.getLookupName() << Range), S, OCD_AmbiguousCandidates, Args);"},{"clang/lib/Sema/SemaLookup.cpp",3764,"/// LookupLiteralOperator - Determine which literal operator should be used for\n/// a user-defined literal, per C++11 [lex.ext].\n///\n/// Normal overload resolution is not used to select which literal operator to\n/// call for a user-defined literal. Look up the provided literal operator name,\n/// and filter the results to the appropriate set for the given argument types.\nSema::LiteralOperatorLookupResult Sema::LookupLiteralOperator(Scope *S, LookupResult &R, ArrayRef<QualType> ArgTys, bool AllowRaw, bool AllowTemplate, bool AllowStringTemplatePack, bool DiagnoseMissing, StringLiteral *StringLit) {\n // ...\n // C++11 [lex.ext]p3, p4: S shall contain a raw literal operator or a literal\n // operator template, but not both.\n if (FoundRaw && FoundTemplate) {\n Diag(R.getNameLoc(), diag::err_ovl_ambiguous_call) << R.getLookupName();"},{B,13536,"/// FinishOverloadedCallExpr - given an OverloadCandidateSet, builds and returns\n/// the completed call expression. If overload resolution fails, emits\n/// diagnostics and returns ExprError()\nstatic ExprResult FinishOverloadedCallExpr(Sema &SemaRef, Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, OverloadCandidateSet *CandidateSet, OverloadCandidateSet::iterator *Best, OverloadingResult OverloadResult, bool AllowTypoCorrection) {\n // ...\n case OR_Ambiguous:\n CandidateSet->NoteCandidates(PartialDiagnosticAt(Fn->getBeginLoc(), SemaRef.PDiag(diag::err_ovl_ambiguous_call) << ULE->getName() << Fn->getSourceRange()), SemaRef, OCD_AmbiguousCandidates, Args);"},{B,15371,"/// BuildLiteralOperatorCall - Build a UserDefinedLiteral by creating a call to\n/// a literal operator described by the provided lookup results.\nExprResult Sema::BuildLiteralOperatorCall(LookupResult &R, DeclarationNameInfo &SuffixInfo, ArrayRef<Expr *> Args, SourceLocation LitEndLoc, TemplateArgumentListInfo *TemplateArgs) {\n // ...\n case OR_Ambiguous:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(R.getNameLoc(), PDiag(diag::err_ovl_ambiguous_call) << R.getLookupName()), *this, OCD_AmbiguousCandidates, Args);"}}, [l]={ ["clang/test/Sema/overloadable-complex.c"]={"clang/test/Sema/overloadable-complex.c:34:14: error: call to \'promote_or_convert\' is ambiguous","clang/test/Sema/overloadable-complex.c:35:14: error: call to \'promote_or_convert\' is ambiguous"} } }, ["err_ovl_ambiguous_conversion_in_cast"]={ [d]="err_ovl_ambiguous_conversion_in_cast", [e]={{nil,p,"ambiguous conversion for %select{|static_cast|reinterpret_cast|dynamic_cast|C-style cast|functional-style cast|}0 from %1 to %2"},{w,nil,"ambiguous conversion for %select{|static_cast|reinterpret_cast|dynamic_cast|C-style cast|functional-style cast}0 from %1 to %2"}}, [i]={{nil,p,{"ambiguous conversion for ",{a,qb,tb,sb,mb,rb,a}," from B to C"}},{w,nil,{"ambiguous conversion for ",{a,qb,tb,sb,mb,rb}," from B to C"}}}, [j]=k, [c]="ambiguous conversion for (?:|static_cast|reinterpret_cast|dynamic_cast|C\\-style cast|functional\\-style cast|) from (.*?) to (.*?)", [h]=a, [g]=m, [f]={"909acf820969",1297708450,"Provide overload diagnostics when explicit casts involving class types fail.","Provide overload diagnostics when explicit casts involving class types fail.\nPR8626.\n\nllvm-svn: 125506"}, [b]={{cb,498,"/// Try to diagnose a failed overloaded cast. Returns true if\n/// diagnostics were emitted.\nstatic bool tryDiagnoseOverloadedCast(Sema &S, CastType CT, SourceRange range, Expr *src, QualType destType, bool listInitialization) {\n // ...\n case OR_Ambiguous:\n msg = diag::err_ovl_ambiguous_conversion_in_cast;"}}, [l]={ ["clang/test/SemaCXX/cast-conversion.cpp"]={"clang/test/SemaCXX/cast-conversion.cpp:73:10: error: ambiguous conversion for static_cast from \'AmbiguousCast\' to \'long long\'"} } }, ["err_ovl_ambiguous_init"]={ [d]="err_ovl_ambiguous_init", [e]="call to constructor of %0 is ambiguous", [i]="call to constructor of A is ambiguous", [j]=k, [c]="call to constructor of (.*?) is ambiguous", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{kb,9857,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ListConstructorOverloadFailed:\n case FK_ConstructorOverloadFailed: {\n // ...\n case OR_Ambiguous:\n FailedCandidateSet.NoteCandidates(PartialDiagnosticAt(Kind.getLocation(), S.PDiag(diag::err_ovl_ambiguous_init) << DestType << ArgsRange), S, OCD_AmbiguousCandidates, Args);"}}, [l]={ ["clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p15.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p15.cpp:15:4: error: call to constructor of \'D1\' is ambiguous","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p15.cpp:93:7: error: call to constructor of \'D\' is ambiguous"} } }, ["err_ovl_ambiguous_member_call"]={ [d]="err_ovl_ambiguous_member_call", [e]="call to member function %0 is ambiguous", [i]="call to member function A is ambiguous", [j]=k, [c]="call to member function (.*?) is ambiguous", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{B,14831,"/// BuildCallToMemberFunction - Build a call to a member\n/// function. MemExpr is the expression that refers to the member\n/// function (and includes the object parameter), Args/NumArgs are the\n/// arguments to the function call (not including the object\n/// parameter). The caller needs to validate that the member\n/// expression refers to a non-static member function or an overloaded\n/// member function.\nExprResult Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n if (isa<MemberExpr>(NakedMemExpr)) {\n // ...\n } else {\n // ...\n case OR_Ambiguous:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(UnresExpr->getMemberLoc(), PDiag(diag::err_ovl_ambiguous_member_call) << DeclName << MemExprE->getSourceRange()), *this, OCD_AmbiguousCandidates, Args);"}}, [l]={ ["clang/test/SemaTemplate/concepts-using-decl.cpp"]={"clang/test/SemaTemplate/concepts-using-decl.cpp:91:9: error: call to member function \'foo\' is ambiguous","clang/test/SemaTemplate/concepts-using-decl.cpp:127:10: error: call to member function \'foo1\' is ambiguous","clang/test/SemaTemplate/concepts-using-decl.cpp:128:10: error: call to member function \'foo2\' is ambiguous","clang/test/SemaTemplate/concepts-using-decl.cpp:129:10: error: call to member function \'foo3\' is ambiguous","clang/test/SemaTemplate/concepts-using-decl.cpp:130:10: error: call to member function \'foo1\' is ambiguous","clang/test/SemaTemplate/concepts-using-decl.cpp:131:10: error: call to member function \'foo2\' is ambiguous","clang/test/SemaTemplate/concepts-using-decl.cpp:132:10: error: call to member function \'foo3\' is ambiguous"} } }, ["err_ovl_ambiguous_object_call"]={ [d]="err_ovl_ambiguous_object_call", [e]="call to object of type %0 is ambiguous", [i]="call to object of type A is ambiguous", [j]=k, [c]="call to object of type (.*?) is ambiguous", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{B,15081,"/// BuildCallToObjectOfClassType - Build a call to an object of class\n/// type (C++ [over.call.object]), which can end up invoking an\n/// overloaded function call operator (@c operator()) or performing a\n/// user-defined conversion on the object argument.\nExprResult Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc) {\n // ...\n case OR_Ambiguous:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(Object.get()->getBeginLoc(), PDiag(diag::err_ovl_ambiguous_object_call) << Object.get()->getType() << Object.get()->getSourceRange()), *this, OCD_AmbiguousCandidates, Args);"}}, [l]={ ["clang/test/SemaCXX/overloaded-operator.cpp"]={"clang/test/SemaCXX/overloaded-operator.cpp:211:3: error: call to object of type \'ConvertToFunc\' is ambiguous","clang/test/SemaCXX/overloaded-operator.cpp:216:3: error: call to object of type \'ConvertToFuncDerived\' is ambiguous"} } }, ["err_ovl_ambiguous_oper_binary"]={ [d]="err_ovl_ambiguous_oper_binary", [e]="use of overloaded operator \'%0\' is ambiguous (with operand types %1 and %2)", [i]="use of overloaded operator \'A\' is ambiguous (with operand types B and C)", [j]=k, [c]="use of overloaded operator \'(.*?)\' is ambiguous \\(with operand types (.*?) and (.*?)\\)", [h]=a, [g]=m, [f]={"052caec1f3ff",1289678798,"When complaining about ambiguous overload resolution for a unary or","When complaining about ambiguous overload resolution for a unary or\nbinary operator, provide the types.\n\nllvm-svn: 119008"}, [b]={{B,14284,"/// Create a binary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'+\').\n///\n/// \\param Opc The BinaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedBinOp().\n///\n/// \\param LHS Left-hand argument.\n/// \\param RHS Right-hand argument.\n/// \\param PerformADL Whether to consider operator candidates found by ADL.\n/// \\param AllowRewrittenCandidates Whether to consider candidates found by\n/// C++20 operator rewrites.\n/// \\param DefaultedFn If we are synthesizing a defaulted operator function,\n/// the function in question. Such a function is never a candidate in\n/// our overload resolution. This also enables synthesizing a three-way\n/// comparison from < and == as described in C++20 [class.spaceship]p1.\nExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool PerformADL, bool AllowRewrittenCandidates, FunctionDecl *DefaultedFn) {\n // ...\n case OR_Ambiguous:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(OpLoc, PDiag(diag::err_ovl_ambiguous_oper_binary) << BinaryOperator::getOpcodeStr(Opc) << Args[0]->getType() << Args[1]->getType() << Args[0]->getSourceRange() << Args[1]->getSourceRange()), *this, OCD_AmbiguousCandidates, Args, BinaryOperator::getOpcodeStr(Opc), OpLoc);"},{B,14618,"ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, SourceLocation RLoc, Expr *Base, MultiExprArg ArgExpr) {\n // ...\n case OR_Ambiguous:\n if (Args.size() == 2) {\n CandidateSet.NoteCandidates(PartialDiagnosticAt(LLoc, PDiag(diag::err_ovl_ambiguous_oper_binary) << \"[]\" << Args[0]->getType() << Args[1]->getType() << Args[0]->getSourceRange() << Range), *this, OCD_AmbiguousCandidates, Args, \"[]\", LLoc);"}}, [l]={ ["clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp"]={"clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp:43:19: error: use of overloaded operator \'->*\' is ambiguous (with operand types \'C1\' and \'int E::*\')"} } }, ["err_ovl_ambiguous_oper_unary"]={ [d]="err_ovl_ambiguous_oper_unary", [e]="use of overloaded operator \'%0\' is ambiguous (operand type %1)", [i]="use of overloaded operator \'A\' is ambiguous (operand type B)", [j]=k, [c]="use of overloaded operator \'(.*?)\' is ambiguous \\(operand type (.*?)\\)", [h]=a, [g]=m, [f]={"052caec1f3ff",1289678798,"When complaining about ambiguous overload resolution for a unary or","When complaining about ambiguous overload resolution for a unary or\nbinary operator, provide the types.\n\nllvm-svn: 119008"}, [b]={{B,13796,"/// Create a unary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'*\').\n///\n/// \\param Opc The UnaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedUnaryOp().\n///\n/// \\param Input The input argument.\nExprResult Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *Input, bool PerformADL) {\n // ...\n case OR_Ambiguous:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(OpLoc, PDiag(diag::err_ovl_ambiguous_oper_unary) << UnaryOperator::getOpcodeStr(Opc) << Input->getType() << Input->getSourceRange()), *this, OCD_AmbiguousCandidates, ArgsArray, UnaryOperator::getOpcodeStr(Opc), OpLoc);"},{B,15289,"/// BuildOverloadedArrowExpr - Build a call to an overloaded @c operator->\n/// (if one exists), where @c Base is an expression of class type and\n/// @c Member is the name of the member we\'re trying to find.\nExprResult Sema::BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound) {\n // ...\n case OR_Ambiguous:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(OpLoc, PDiag(diag::err_ovl_ambiguous_oper_unary) << \"->\" << Base->getType() << Base->getSourceRange()), *this, OCD_AmbiguousCandidates, Base);"}}, [l]={ ["clang/test/SemaCXX/ambiguous-builtin-unary-operator.cpp"]={"clang/test/SemaCXX/ambiguous-builtin-unary-operator.cpp:16:3: error: use of overloaded operator \'++\' is ambiguous (operand type \'C\')","clang/test/SemaCXX/ambiguous-builtin-unary-operator.cpp:30:3: error: use of overloaded operator \'++\' is ambiguous (operand type \'C1\')"} } }, ["err_ovl_ambiguous_subscript_call"]={ [d]={{nil,J,"err_ovl_ambiguous_subscript_call"}}, [e]={{nil,J,"call to subscript operator of type %0 is ambiguous"}}, [i]={{nil,J,"call to subscript operator of type A is ambiguous"}}, [j]=k, [c]="call to subscript operator of type (.*?) is ambiguous", [h]=a, [g]={{nil,J,m}}, [f]={"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"}, [b]={{B,14625,"ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, SourceLocation RLoc, Expr *Base, MultiExprArg ArgExpr) {\n // ...\n case OR_Ambiguous:\n if (Args.size() == 2) {\n // ...\n } else {\n CandidateSet.NoteCandidates(PartialDiagnosticAt(LLoc, PDiag(diag::err_ovl_ambiguous_subscript_call) << Args[0]->getType() << Args[0]->getSourceRange() << Range), *this, OCD_AmbiguousCandidates, Args, \"[]\", LLoc);"}}, [l]={ ["clang/test/SemaCXX/cxx2b-overloaded-operator.cpp"]={"clang/test/SemaCXX/cxx2b-overloaded-operator.cpp:51:20: error: call to subscript operator of type \'S\' is ambiguous"} } }, ["err_ovl_deleted_call"]={ [d]="err_ovl_deleted_call", [e]={{nil,v,"call to deleted function %0"},{u,nil,"call to %select{unavailable|deleted}0 function %1%2"}}, [i]={{nil,v,"call to deleted function A"},{u,nil,{"call to ",{Lb,Eb}," function BC"}}}, [j]=k, [c]="call to deleted function (.*?)", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{"clang/lib/ARCMigrate/TransGCCalls.cpp",56,"class GCCollectableCallsChecker : public RecursiveASTVisitor<GCCollectableCallsChecker> {\n // ...\n bool VisitCallExpr(CallExpr *E) {\n // ...\n if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(CEE)) {\n if (FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(DRE->getDecl())) {\n // ...\n if (FD->getIdentifier() == NSMakeCollectableII) {\n // ...\n TA.clearDiagnostic(diag::err_unavailable, diag::err_unavailable_message,\n diag::err_ovl_deleted_call, // ObjC++"},{N,2627,"static bool resolveAllocationOverload(Sema &S, LookupResult &R, SourceRange Range, SmallVectorImpl<Expr *> &Args, bool &PassAlignment, FunctionDecl *&Operator, OverloadCandidateSet *AlignedCandidates, Expr *AlignArg, bool Diagnose) {\n // ...\n case OR_Deleted: {\n if (Diagnose) {\n Candidates.NoteCandidates(PartialDiagnosticAt(R.getNameLoc(), S.PDiag(diag::err_ovl_deleted_call) << R.getLookupName() << Range), S, OCD_AllCandidates, Args);"},{N,3888,"static bool resolveBuiltinNewDeleteOverload(Sema &S, CallExpr *TheCall, bool IsDelete, FunctionDecl *&Operator) {\n // ...\n case OR_Deleted: {\n Candidates.NoteCandidates(PartialDiagnosticAt(R.getNameLoc(), S.PDiag(diag::err_ovl_deleted_call) << R.getLookupName() << Range), S, OCD_AllCandidates, Args);"},{B,13544,"/// FinishOverloadedCallExpr - given an OverloadCandidateSet, builds and returns\n/// the completed call expression. If overload resolution fails, emits\n/// diagnostics and returns ExprError()\nstatic ExprResult FinishOverloadedCallExpr(Sema &SemaRef, Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, OverloadCandidateSet *CandidateSet, OverloadCandidateSet::iterator *Best, OverloadingResult OverloadResult, bool AllowTypoCorrection) {\n // ...\n case OR_Deleted: {\n CandidateSet->NoteCandidates(PartialDiagnosticAt(Fn->getBeginLoc(), SemaRef.PDiag(diag::err_ovl_deleted_call) << ULE->getName() << Fn->getSourceRange()), SemaRef, OCD_AllCandidates, Args);"}}, [l]={ ["clang/test/CXX/over/over.match/over.match.best/over.best.ics/over.ics.scs/p3.cpp"]={"clang/test/CXX/over/over.match/over.match.best/over.best.ics/over.ics.scs/p3.cpp:10:3: error: call to deleted function \'f\'"} } }, ["err_ovl_deleted_comparison"]={ [d]={{nil,w,"err_ovl_deleted_comparison"}}, [e]={{nil,w,"object of type %0 cannot be compared because its %1 is implicitly deleted"}}, [i]={{nil,w,"object of type A cannot be compared because its B is implicitly deleted"}}, [j]=k, [c]="object of type (.*?) cannot be compared because its (.*?) is implicitly deleted", [h]=a, [g]={{nil,w,m}}, [f]={"5253d9138eb3",1573070592,"[c++20] Determine whether a defaulted comparison should be deleted or","[c++20] Determine whether a defaulted comparison should be deleted or\nconstexpr."}, [b]={{B,14303,"/// Create a binary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'+\').\n///\n/// \\param Opc The BinaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedBinOp().\n///\n/// \\param LHS Left-hand argument.\n/// \\param RHS Right-hand argument.\n/// \\param PerformADL Whether to consider operator candidates found by ADL.\n/// \\param AllowRewrittenCandidates Whether to consider candidates found by\n/// C++20 operator rewrites.\n/// \\param DefaultedFn If we are synthesizing a defaulted operator function,\n/// the function in question. Such a function is never a candidate in\n/// our overload resolution. This also enables synthesizing a three-way\n/// comparison from < and == as described in C++20 [class.spaceship]p1.\nExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool PerformADL, bool AllowRewrittenCandidates, FunctionDecl *DefaultedFn) {\n // ...\n case OR_Deleted:\n if (isImplicitlyDeleted(Best->Function)) {\n // ...\n if (DFK.isSpecialMember()) {\n // ...\n } else {\n // ...\n Diag(OpLoc, diag::err_ovl_deleted_comparison) << Args[0]->getType() << DeletedFD;"}}, [l]={ ["clang/test/CXX/class/class.compare/class.compare.default/p2.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:24:10: error: object of type \'A1\' cannot be compared because its \'operator==\' is implicitly deleted","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:25:10: error: object of type \'A1\' cannot be compared because its \'operator==\' is implicitly deleted","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:26:10: error: object of type \'A1\' cannot be compared because its \'operator<=>\' is implicitly deleted","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:27:10: error: object of type \'A1\' cannot be compared because its \'operator<=>\' is implicitly deleted","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:28:10: error: object of type \'A1\' cannot be compared because its \'operator<=>\' is implicitly deleted","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:29:10: error: object of type \'A1\' cannot be compared because its \'operator<=>\' is implicitly deleted","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:30:10: error: object of type \'A1\' cannot be compared because its \'operator<=>\' is implicitly deleted"} } }, ["err_ovl_deleted_conversion_in_cast"]={ [d]="err_ovl_deleted_conversion_in_cast", [e]={{nil,p,"%select{|static_cast|reinterpret_cast|dynamic_cast|C-style cast|functional-style cast|}0 from %1 to %2 uses deleted function"},{w,nil,"%select{|static_cast|reinterpret_cast|dynamic_cast|C-style cast|functional-style cast}0 from %1 to %2 uses deleted function"}}, [i]={{nil,p,{{a,qb,tb,sb,mb,rb,a}," from B to C uses deleted function"}},{w,nil,{{a,qb,tb,sb,mb,rb}," from B to C uses deleted function"}}}, [j]=k, [c]="(?:|static_cast|reinterpret_cast|dynamic_cast|C\\-style cast|functional\\-style cast|) from (.*?) to (.*?) uses deleted function", [h]=a, [g]=m, [f]={"909acf820969",1297708450,"Provide overload diagnostics when explicit casts involving class types fail.","Provide overload diagnostics when explicit casts involving class types fail.\nPR8626.\n\nllvm-svn: 125506"}, [b]={{cb,503,"/// Try to diagnose a failed overloaded cast. Returns true if\n/// diagnostics were emitted.\nstatic bool tryDiagnoseOverloadedCast(Sema &S, CastType CT, SourceRange range, Expr *src, QualType destType, bool listInitialization) {\n // ...\n case OR_Deleted:\n msg = diag::err_ovl_deleted_conversion_in_cast;"}}, [l]={ ["clang/test/SemaCXX/deleted-function.cpp"]={"clang/test/SemaCXX/deleted-function.cpp:78:15: error: C-style cast from \'int\' to \'DelCtor\' uses deleted function","clang/test/SemaCXX/deleted-function.cpp:79:15: error: functional-style cast from \'int\' to \'DelCtor\' uses deleted function"} } }, ["err_ovl_deleted_init"]={ [d]="err_ovl_deleted_init", [e]={{nil,v,"call to deleted constructor of %0"},{u,nil,"call to %select{unavailable|deleted}0 constructor of %1"}}, [i]={{nil,v,"call to deleted constructor of A"},{u,nil,{"call to ",{Lb,Eb}," constructor of B"}}}, [j]=k, [c]="call to deleted constructor of (.*?)", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{kb,9922,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ListConstructorOverloadFailed:\n case FK_ConstructorOverloadFailed: {\n // ...\n case OR_Deleted: {\n // ...\n if (Ovl != OR_Deleted) {\n S.Diag(Kind.getLocation(), diag::err_ovl_deleted_init) << DestType << ArgsRange;"},{kb,9936,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ListConstructorOverloadFailed:\n case FK_ConstructorOverloadFailed: {\n // ...\n case OR_Deleted: {\n // ...\n // If this is a defaulted or implicitly-declared function, then\n // it was implicitly deleted. Make it clear that the deletion was\n // implicit.\n if (S.isImplicitlyDeleted(Best->Function))\n // ...\n else\n S.Diag(Kind.getLocation(), diag::err_ovl_deleted_init) << DestType << ArgsRange;"}}, [l]={ ["clang/test/SemaCXX/cxx11-call-to-deleted-constructor.cpp"]={"clang/test/SemaCXX/cxx11-call-to-deleted-constructor.cpp:37:12: error: call to deleted constructor of \'Matrix<double> &&\'"} } }, ["err_ovl_deleted_member_call"]={ [d]="err_ovl_deleted_member_call", [e]={{nil,v,"call to deleted member function %0"},{u,nil,"call to %select{unavailable|deleted}0 member function %1%2"}}, [i]={{nil,v,"call to deleted member function A"},{u,nil,{"call to ",{Lb,Eb}," member function BC"}}}, [j]=k, [c]="call to deleted member function (.*?)", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{B,14838,"/// BuildCallToMemberFunction - Build a call to a member\n/// function. MemExpr is the expression that refers to the member\n/// function (and includes the object parameter), Args/NumArgs are the\n/// arguments to the function call (not including the object\n/// parameter). The caller needs to validate that the member\n/// expression refers to a non-static member function or an overloaded\n/// member function.\nExprResult Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n if (isa<MemberExpr>(NakedMemExpr)) {\n // ...\n } else {\n // ...\n case OR_Deleted:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(UnresExpr->getMemberLoc(), PDiag(diag::err_ovl_deleted_member_call) << DeclName << MemExprE->getSourceRange()), *this, OCD_AllCandidates, Args);"}}, [l]={ ["clang/test/SemaCXX/co_await-range-for.cpp"]={"clang/test/SemaCXX/co_await-range-for.cpp:53:23: error: call to deleted member function \'await_transform\'","clang/test/SemaCXX/co_await-range-for.cpp:75:23: error: call to deleted member function \'await_transform\'","clang/test/SemaCXX/co_await-range-for.cpp:82:23: error: call to deleted member function \'await_transform\'"} } }, ["err_ovl_deleted_object_call"]={ [d]="err_ovl_deleted_object_call", [e]={{nil,v,"call to deleted function call operator in type %0"},{u,nil,"call to %select{unavailable|deleted}0 function call operator in type %1%2"}}, [i]={{nil,v,"call to deleted function call operator in type A"},{u,nil,{"call to ",{Lb,Eb}," function call operator in type BC"}}}, [j]=k, [c]="call to deleted function call operator in type (.*?)", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{B,15090,"/// BuildCallToObjectOfClassType - Build a call to an object of class\n/// type (C++ [over.call.object]), which can end up invoking an\n/// overloaded function call operator (@c operator()) or performing a\n/// user-defined conversion on the object argument.\nExprResult Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc) {\n // ...\n case OR_Deleted:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(Object.get()->getBeginLoc(), PDiag(diag::err_ovl_deleted_object_call) << Object.get()->getType() << Object.get()->getSourceRange()), *this, OCD_AllCandidates, Args);"}} }, ["err_ovl_deleted_oper"]={ [d]="err_ovl_deleted_oper", [e]={{nil,v,"overload resolution selected deleted operator \'%0\'"},{u,nil,"overload resolution selected %select{unavailable|deleted}0 operator \'%1\'%2"}}, [i]={{nil,v,"overload resolution selected deleted operator \'A\'"},{u,nil,{"overload resolution selected ",{Lb,Eb}," operator \'B\'C"}}}, [j]=k, [c]="overload resolution selected deleted operator \'(.*?)\'", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{B,13805,"/// Create a unary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'*\').\n///\n/// \\param Opc The UnaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedUnaryOp().\n///\n/// \\param Input The input argument.\nExprResult Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *Input, bool PerformADL) {\n // ...\n case OR_Deleted:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(OpLoc, PDiag(diag::err_ovl_deleted_oper) << UnaryOperator::getOpcodeStr(Opc) << Input->getSourceRange()), *this, OCD_AllCandidates, ArgsArray, UnaryOperator::getOpcodeStr(Opc), OpLoc);"},{B,14314,"/// Create a binary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'+\').\n///\n/// \\param Opc The BinaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedBinOp().\n///\n/// \\param LHS Left-hand argument.\n/// \\param RHS Right-hand argument.\n/// \\param PerformADL Whether to consider operator candidates found by ADL.\n/// \\param AllowRewrittenCandidates Whether to consider candidates found by\n/// C++20 operator rewrites.\n/// \\param DefaultedFn If we are synthesizing a defaulted operator function,\n/// the function in question. Such a function is never a candidate in\n/// our overload resolution. This also enables synthesizing a three-way\n/// comparison from < and == as described in C++20 [class.spaceship]p1.\nExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool PerformADL, bool AllowRewrittenCandidates, FunctionDecl *DefaultedFn) {\n // ...\n case OR_Deleted:\n // ...\n CandidateSet.NoteCandidates(PartialDiagnosticAt(OpLoc, PDiag(diag::err_ovl_deleted_oper) << getOperatorSpelling(Best->Function->getDeclName().getCXXOverloadedOperator()) << Args[0]->getSourceRange() << Args[1]->getSourceRange()), *this, OCD_AllCandidates, Args, BinaryOperator::getOpcodeStr(Opc), OpLoc);"},{B,14634,"ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, SourceLocation RLoc, Expr *Base, MultiExprArg ArgExpr) {\n // ...\n case OR_Deleted:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(LLoc, PDiag(diag::err_ovl_deleted_oper) << \"[]\" << Args[0]->getSourceRange() << Range), *this, OCD_AllCandidates, Args, \"[]\", LLoc);"},{B,15297,"/// BuildOverloadedArrowExpr - Build a call to an overloaded @c operator->\n/// (if one exists), where @c Base is an expression of class type and\n/// @c Member is the name of the member we\'re trying to find.\nExprResult Sema::BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound) {\n // ...\n case OR_Deleted:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(OpLoc, PDiag(diag::err_ovl_deleted_oper) << \"->\" << Base->getSourceRange()), *this, OCD_AllCandidates, Base);"}}, [l]={ ["clang/test/SemaCXX/rval-references-examples.cpp"]={"clang/test/SemaCXX/rval-references-examples.cpp:80:6: error: overload resolution selected deleted operator \'=\'"} } }, ["err_ovl_deleted_special_init"]={ [d]="err_ovl_deleted_special_init", [e]="call to implicitly-deleted %select{default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor|function}0 of %1", [i]={{nil,nil,{"call to implicitly-deleted ",{"default constructor","copy constructor","move constructor","copy assignment operator","move assignment operator","destructor","function"}," of B"}}}, [j]=k, [c]="call to implicitly\\-deleted (?:default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor|function) of (.*?)", [h]=a, [g]=m, [f]={"74f7d50f6a5b",1329334432,"When overload resolution picks an implicitly-deleted special member","When overload resolution picks an implicitly-deleted special member\nfunction, provide a specialized diagnostic that indicates the kind of\nspecial member function (default constructor, copy assignment\noperator, etc.) and that it was implicitly deleted. Add a hook where\nwe can provide more detailed information later.\n\nllvm-svn: 150611"}, [b]={{kb,9932,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ListConstructorOverloadFailed:\n case FK_ConstructorOverloadFailed: {\n // ...\n case OR_Deleted: {\n // ...\n // If this is a defaulted or implicitly-declared function, then\n // it was implicitly deleted. Make it clear that the deletion was\n // implicit.\n if (S.isImplicitlyDeleted(Best->Function))\n S.Diag(Kind.getLocation(), diag::err_ovl_deleted_special_init) << S.getSpecialMember(cast<CXXMethodDecl>(Best->Function)) << DestType << ArgsRange;"}}, [l]={ ["clang/test/SemaCXX/dr1301.cpp"]={"clang/test/SemaCXX/dr1301.cpp:17:9: error: call to implicitly-deleted default constructor of \'C\'","clang/test/SemaCXX/dr1301.cpp:23:9: error: call to implicitly-deleted default constructor of \'D\'","clang/test/SemaCXX/dr1301.cpp:40:9: error: call to implicitly-deleted default constructor of \'G\'","clang/test/SemaCXX/dr1301.cpp:52:9: error: call to implicitly-deleted default constructor of \'I\'","clang/test/SemaCXX/dr1301.cpp:66:10: error: call to implicitly-deleted default constructor of \'K\'","clang/test/SemaCXX/dr1301.cpp:67:10: error: call to implicitly-deleted default constructor of \'K\'"} } }, ["err_ovl_deleted_special_oper"]={ [d]="err_ovl_deleted_special_oper", [e]="object of type %0 cannot be %select{constructed|copied|moved|assigned|assigned|destroyed}1 because its %select{default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor}1 is implicitly deleted", [i]={{nil,nil,{"object of type A cannot be ",{"constructed","copied","moved","assigned","assigned","destroyed"}," because its ",{"default constructor","copy constructor","move constructor","copy assignment operator","move assignment operator","destructor"}," is implicitly deleted"}}}, [j]=k, [c]="object of type (.*?) cannot be (?:constructed|copied|moved|assigned|assigned|destroyed) because its (?:default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor) is implicitly deleted", [h]=a, [g]=m, [f]={"74f7d50f6a5b",1329334432,"When overload resolution picks an implicitly-deleted special member","When overload resolution picks an implicitly-deleted special member\nfunction, provide a specialized diagnostic that indicates the kind of\nspecial member function (default constructor, copy assignment\noperator, etc.) and that it was implicitly deleted. Add a hook where\nwe can provide more detailed information later.\n\nllvm-svn: 150611"}, [b]={{B,14299,"/// Create a binary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'+\').\n///\n/// \\param Opc The BinaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedBinOp().\n///\n/// \\param LHS Left-hand argument.\n/// \\param RHS Right-hand argument.\n/// \\param PerformADL Whether to consider operator candidates found by ADL.\n/// \\param AllowRewrittenCandidates Whether to consider candidates found by\n/// C++20 operator rewrites.\n/// \\param DefaultedFn If we are synthesizing a defaulted operator function,\n/// the function in question. Such a function is never a candidate in\n/// our overload resolution. This also enables synthesizing a three-way\n/// comparison from < and == as described in C++20 [class.spaceship]p1.\nExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool PerformADL, bool AllowRewrittenCandidates, FunctionDecl *DefaultedFn) {\n // ...\n case OR_Deleted:\n if (isImplicitlyDeleted(Best->Function)) {\n // ...\n if (DFK.isSpecialMember()) {\n Diag(OpLoc, diag::err_ovl_deleted_special_oper) << Args[0]->getType() << DFK.asSpecialMember();"}}, [l]={ ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:16:11: error: object of type \'(lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:10:18)\' cannot be assigned because its copy assignment operator is implicitly deleted","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:19:11: error: object of type \'(lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:10:18)\' cannot be assigned because its copy assignment operator is implicitly deleted"} } }, ["err_ovl_diff_return_type"]={ [d]="err_ovl_diff_return_type", [e]="functions that differ only in their return type cannot be overloaded", [i]="functions that differ only in their return type cannot be overloaded", [j]=k, [c]="functions that differ only in their return type cannot be overloaded", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{G,3939,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n if (!Context.hasSameType(OldDeclaredReturnType, NewDeclaredReturnType) && canFullyTypeCheckRedeclaration(New, Old, NewDeclaredReturnType, OldDeclaredReturnType)) {\n // ...\n if (ResQT.isNull()) {\n if (New->isCXXClassMember() && New->isOutOfLine())\n // ...\n else\n Diag(New->getLocation(), diag::err_ovl_diff_return_type) << New->getReturnTypeSourceRange();"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:163:14: error: functions that differ only in their return type cannot be overloaded","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:174:9: error: functions that differ only in their return type cannot be overloaded"} } }, ["err_ovl_no_conversion_in_cast"]={ [d]="err_ovl_no_conversion_in_cast", [e]="cannot convert %1 to %2 without a conversion operator", [i]="cannot convert B to C without a conversion operator", [j]=k, [c]="cannot convert (.*?) to (.*?) without a conversion operator", [h]=a, [g]=m, [f]={"909acf820969",1297708450,"Provide overload diagnostics when explicit casts involving class types fail.","Provide overload diagnostics when explicit casts involving class types fail.\nPR8626.\n\nllvm-svn: 125506"}, [b]={{cb,491,"/// Try to diagnose a failed overloaded cast. Returns true if\n/// diagnostics were emitted.\nstatic bool tryDiagnoseOverloadedCast(Sema &S, CastType CT, SourceRange range, Expr *src, QualType destType, bool listInitialization) {\n // ...\n case OR_No_Viable_Function:\n if (candidates.empty())\n msg = diag::err_ovl_no_conversion_in_cast;"}}, [l]={ ["clang/test/SemaObjCXX/cstyle-cast.mm"]={"clang/test/SemaObjCXX/cstyle-cast.mm:21:3: error: cannot convert \'X\' to \'id\' without a conversion operator"} } }, ["err_ovl_no_oper"]={ [d]="err_ovl_no_oper", [e]="type %0 does not provide a %select{subscript|call}1 operator", [i]={{nil,nil,{"type A does not provide a ",{"subscript","call"}," operator"}}}, [j]=k, [c]="type (.*?) does not provide a (?:subscript|call) operator", [h]=a, [g]=m, [f]={"0237485287e9",1262829855,"Improve the lead diagnostic for C++ object subscript expressions with","Improve the lead diagnostic for C++ object subscript expressions with\nno viable overloads. Use a different message when the class provides\nno operator[] overloads at all; use it for operator(), too.\n\nPartially addresses PR 5900.\n\nllvm-svn: 92894"}, [b]={{B,14604,"ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, SourceLocation RLoc, Expr *Base, MultiExprArg ArgExpr) {\n // ...\n case OR_No_Viable_Function: {\n PartialDiagnostic PD = CandidateSet.empty() ? (PDiag(diag::err_ovl_no_oper) << Args[0]->getType() << /*subscript*/ 0 << Args[0]->getSourceRange() << Range) : (PDiag(diag::err_ovl_no_viable_subscript) << Args[0]->getType() << Args[0]->getSourceRange() << Range);"},{B,15068,"/// BuildCallToObjectOfClassType - Build a call to an object of class\n/// type (C++ [over.call.object]), which can end up invoking an\n/// overloaded function call operator (@c operator()) or performing a\n/// user-defined conversion on the object argument.\nExprResult Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc) {\n // ...\n case OR_No_Viable_Function: {\n PartialDiagnostic PD = CandidateSet.empty() ? (PDiag(diag::err_ovl_no_oper) << Object.get()->getType() << /*call*/ 1 << Object.get()->getSourceRange()) : (PDiag(diag::err_ovl_no_viable_object_call) << Object.get()->getType() << Object.get()->getSourceRange());"}}, [l]={ ["clang/test/SemaCXX/cxx2b-overloaded-operator.cpp"]={"clang/test/SemaCXX/cxx2b-overloaded-operator.cpp:101:13: error: type \'int[3]\' does not provide a subscript operator","clang/test/SemaCXX/cxx2b-overloaded-operator.cpp:101:13: error: type \'int[3]\' does not provide a subscript operator"} } }, ["err_ovl_no_viable_conversion_in_cast"]={ [d]="err_ovl_no_viable_conversion_in_cast", [e]={{nil,p,"no matching conversion for %select{|static_cast|reinterpret_cast|dynamic_cast|C-style cast|functional-style cast|}0 from %1 to %2"},{w,nil,"no matching conversion for %select{|static_cast|reinterpret_cast|dynamic_cast|C-style cast|functional-style cast}0 from %1 to %2"}}, [i]={{nil,p,{"no matching conversion for ",{a,qb,tb,sb,mb,rb,a}," from B to C"}},{w,nil,{"no matching conversion for ",{a,qb,tb,sb,mb,rb}," from B to C"}}}, [j]=k, [c]="no matching conversion for (?:|static_cast|reinterpret_cast|dynamic_cast|C\\-style cast|functional\\-style cast|) from (.*?) to (.*?)", [h]=a, [g]=m, [f]={"909acf820969",1297708450,"Provide overload diagnostics when explicit casts involving class types fail.","Provide overload diagnostics when explicit casts involving class types fail.\nPR8626.\n\nllvm-svn: 125506"}, [b]={{cb,493,"/// Try to diagnose a failed overloaded cast. Returns true if\n/// diagnostics were emitted.\nstatic bool tryDiagnoseOverloadedCast(Sema &S, CastType CT, SourceRange range, Expr *src, QualType destType, bool listInitialization) {\n // ...\n case OR_No_Viable_Function:\n if (candidates.empty())\n // ...\n else\n msg = diag::err_ovl_no_viable_conversion_in_cast;"}}, [l]={ ["clang/test/SemaCXX/vector-casts.cpp"]={"clang/test/SemaCXX/vector-casts.cpp:36:9: error: no matching conversion for C-style cast from \'__v2si\' (vector of 2 \'int\' values) to \'S\'"} } }, ["err_ovl_no_viable_function_in_call"]={ [d]="err_ovl_no_viable_function_in_call", [e]="no matching function for call to %0", [i]="no matching function for call to A", [j]=k, [c]="no matching function for call to (.*?)", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{E,6910,"static void checkDirectCallValidity(Sema &S, const Expr *Fn, FunctionDecl *Callee, MultiExprArg ArgExprs) {\n // ...\n if (const EnableIfAttr *Attr = S.CheckEnableIf(Callee, Fn->getBeginLoc(), ArgExprs, true)) {\n S.Diag(Fn->getBeginLoc(), isa<CXXMethodDecl>(Callee) ? diag::err_ovl_no_viable_member_function_in_call : diag::err_ovl_no_viable_function_in_call) << Callee << Callee->getSourceRange();"},{N,2604,"static bool resolveAllocationOverload(Sema &S, LookupResult &R, SourceRange Range, SmallVectorImpl<Expr *> &Args, bool &PassAlignment, FunctionDecl *&Operator, OverloadCandidateSet *AlignedCandidates, Expr *AlignArg, bool Diagnose) {\n // ...\n case OR_No_Viable_Function:\n // ...\n if (Diagnose) {\n // ...\n S.Diag(R.getNameLoc(), diag::err_ovl_no_viable_function_in_call) << R.getLookupName() << Range;"},{N,3873,"static bool resolveBuiltinNewDeleteOverload(Sema &S, CallExpr *TheCall, bool IsDelete, FunctionDecl *&Operator) {\n // ...\n case OR_No_Viable_Function:\n Candidates.NoteCandidates(PartialDiagnosticAt(R.getNameLoc(), S.PDiag(diag::err_ovl_no_viable_function_in_call) << R.getLookupName() << Range), S, OCD_AllCandidates, Args);"},{B,13527,"/// FinishOverloadedCallExpr - given an OverloadCandidateSet, builds and returns\n/// the completed call expression. If overload resolution fails, emits\n/// diagnostics and returns ExprError()\nstatic ExprResult FinishOverloadedCallExpr(Sema &SemaRef, Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, OverloadCandidateSet *CandidateSet, OverloadCandidateSet::iterator *Best, OverloadingResult OverloadResult, bool AllowTypoCorrection) {\n // ...\n case OR_No_Viable_Function: {\n // ...\n CandidateSet->NoteCandidates(PartialDiagnosticAt(Fn->getBeginLoc(), SemaRef.PDiag(diag::err_ovl_no_viable_function_in_call) << ULE->getName() << Fn->getSourceRange()), SemaRef, OCD_AllCandidates, Args);"},{B,15364,"/// BuildLiteralOperatorCall - Build a UserDefinedLiteral by creating a call to\n/// a literal operator described by the provided lookup results.\nExprResult Sema::BuildLiteralOperatorCall(LookupResult &R, DeclarationNameInfo &SuffixInfo, ArrayRef<Expr *> Args, SourceLocation LitEndLoc, TemplateArgumentListInfo *TemplateArgs) {\n // ...\n case OR_No_Viable_Function:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(UDSuffixLoc, PDiag(diag::err_ovl_no_viable_function_in_call) << R.getLookupName()), *this, OCD_AllCandidates, Args);"}}, [l]={ ["clang/test/SemaOpenCL/queue_t_overload.cl"]={"clang/test/SemaOpenCL/queue_t_overload.cl:10:3: error: no matching function for call to \'foo\'","clang/test/SemaOpenCL/queue_t_overload.cl:11:3: error: no matching function for call to \'foo\'"} } }, ["err_ovl_no_viable_function_in_init"]={ [d]="err_ovl_no_viable_function_in_init", [e]="no matching constructor for initialization of %0", [i]="no matching constructor for initialization of A", [j]=k, [c]="no matching constructor for initialization of (.*?)", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{kb,9912,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ListConstructorOverloadFailed:\n case FK_ConstructorOverloadFailed: {\n // ...\n case OR_No_Viable_Function:\n // ...\n FailedCandidateSet.NoteCandidates(PartialDiagnosticAt(Kind.getLocation(), S.PDiag(diag::err_ovl_no_viable_function_in_init) << DestType << ArgsRange), S, OCD_AllCandidates, Args);"}}, [l]={ ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:13:21: error: no matching constructor for initialization of \'decltype(lambda1)\' (aka \'(lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:10:18)\')"} } }, ["err_ovl_no_viable_literal_operator"]={ [d]="err_ovl_no_viable_literal_operator", [e]="no matching literal operator for call to %0%select{| with argument of type %2| with arguments of types %2 and %3}1%select{| or \'const char *\'}4%select{|, and no matching literal operator template}5", [i]={{nil,nil,{"no matching literal operator for call to A",{a," with argument of type C"," with arguments of types C and D"},{a," or \'const char *\'"},{a,", and no matching literal operator template"}}}}, [j]=k, [c]="no matching literal operator for call to (.*?)(?:| with argument of type (.*?)| with arguments of types (.*?) and (.*?))(?:| or \'const char \\*\')(?:|, and no matching literal operator template)", [h]=a, [g]=m, [f]={"bcc22fc4e1b2",1331280036,"Support for raw and template forms of numeric user-defined literals,","Support for raw and template forms of numeric user-defined literals,\nand lots of tidying up.\n\nllvm-svn: 152392"}, [b]={{"clang/lib/Sema/SemaLookup.cpp",3781,"/// LookupLiteralOperator - Determine which literal operator should be used for\n/// a user-defined literal, per C++11 [lex.ext].\n///\n/// Normal overload resolution is not used to select which literal operator to\n/// call for a user-defined literal. Look up the provided literal operator name,\n/// and filter the results to the appropriate set for the given argument types.\nSema::LiteralOperatorLookupResult Sema::LookupLiteralOperator(Scope *S, LookupResult &R, ArrayRef<QualType> ArgTys, bool AllowRaw, bool AllowTemplate, bool AllowStringTemplatePack, bool DiagnoseMissing, StringLiteral *StringLit) {\n // ...\n // Didn\'t find anything we could use.\n if (DiagnoseMissing) {\n Diag(R.getNameLoc(), diag::err_ovl_no_viable_literal_operator) << R.getLookupName() << (int)ArgTys.size() << ArgTys[0] << (ArgTys.size() == 2 ? ArgTys[1] : QualType()) << AllowRaw << (AllowTemplate || AllowStringTemplatePack);"}}, [l]={ ["clang/test/Lexer/half-literal.cpp"]={"clang/test/Lexer/half-literal.cpp:2:14: error: no matching literal operator for call to \'operator\"\"h\' with argument of type \'long double\' or \'const char *\', and no matching literal operator template"} } }, ["err_ovl_no_viable_member_function_in_call"]={ [d]="err_ovl_no_viable_member_function_in_call", [e]="no matching member function for call to %0", [i]="no matching member function for call to A", [j]=k, [c]="no matching member function for call to (.*?)", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{E,6907,"static void checkDirectCallValidity(Sema &S, const Expr *Fn, FunctionDecl *Callee, MultiExprArg ArgExprs) {\n // ...\n if (const EnableIfAttr *Attr = S.CheckEnableIf(Callee, Fn->getBeginLoc(), ArgExprs, true)) {\n S.Diag(Fn->getBeginLoc(), isa<CXXMethodDecl>(Callee) ? diag::err_ovl_no_viable_member_function_in_call : diag::err_ovl_no_viable_function_in_call) << Callee << Callee->getSourceRange();"},{B,14824,"/// BuildCallToMemberFunction - Build a call to a member\n/// function. MemExpr is the expression that refers to the member\n/// function (and includes the object parameter), Args/NumArgs are the\n/// arguments to the function call (not including the object\n/// parameter). The caller needs to validate that the member\n/// expression refers to a non-static member function or an overloaded\n/// member function.\nExprResult Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n if (isa<MemberExpr>(NakedMemExpr)) {\n // ...\n } else {\n // ...\n case OR_No_Viable_Function:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(UnresExpr->getMemberLoc(), PDiag(diag::err_ovl_no_viable_member_function_in_call) << DeclName << MemExprE->getSourceRange()), *this, OCD_AllCandidates, Args);"},{B,14903,"/// BuildCallToMemberFunction - Build a call to a member\n/// function. MemExpr is the expression that refers to the member\n/// function (and includes the object parameter), Args/NumArgs are the\n/// arguments to the function call (not including the object\n/// parameter). The caller needs to validate that the member\n/// expression refers to a non-static member function or an overloaded\n/// member function.\nExprResult Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n // In the case the method to call was not selected by the overloading\n // resolution process, we still need to handle the enable_if attribute. Do\n // that here, so it will not hide previous -- and more relevant -- errors.\n if (auto *MemE = dyn_cast<MemberExpr>(NakedMemExpr)) {\n if (const EnableIfAttr *Attr = CheckEnableIf(Method, LParenLoc, Args, true)) {\n Diag(MemE->getMemberLoc(), diag::err_ovl_no_viable_member_function_in_call) << Method << Method->getSourceRange();"}}, [l]={ ["clang/test/SemaOpenCLCXX/method-overload-address-space.clcpp"]={"clang/test/SemaOpenCLCXX/method-overload-address-space.clcpp:19:10: error: no matching member function for call to \'m1\'"} } }, ["err_ovl_no_viable_object_call"]={ [d]="err_ovl_no_viable_object_call", [e]="no matching function for call to object of type %0", [i]="no matching function for call to object of type A", [j]=k, [c]="no matching function for call to object of type (.*?)", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{B,15071,"/// BuildCallToObjectOfClassType - Build a call to an object of class\n/// type (C++ [over.call.object]), which can end up invoking an\n/// overloaded function call operator (@c operator()) or performing a\n/// user-defined conversion on the object argument.\nExprResult Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc) {\n // ...\n case OR_No_Viable_Function: {\n PartialDiagnostic PD = CandidateSet.empty() ? (PDiag(diag::err_ovl_no_oper) << Object.get()->getType() << /*call*/ 1 << Object.get()->getSourceRange()) : (PDiag(diag::err_ovl_no_viable_object_call) << Object.get()->getType() << Object.get()->getSourceRange());"}}, [l]={ ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:31:3: error: no matching function for call to object of type \'const decltype(ml)\' (aka \'const (lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:27:13)\')","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:36:3: error: no matching function for call to object of type \'volatile decltype(l)\' (aka \'volatile (lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:22:12)\')","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:37:3: error: no matching function for call to object of type \'volatile decltype(ml)\' (aka \'volatile (lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:27:13)\')"} } }, ["err_ovl_no_viable_oper"]={ [d]="err_ovl_no_viable_oper", [e]="no viable overloaded \'%0\'", [i]="no viable overloaded \'A\'", [j]=k, [c]="no viable overloaded \'(.*?)\'", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{B,14256,"/// Create a binary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'+\').\n///\n/// \\param Opc The BinaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedBinOp().\n///\n/// \\param LHS Left-hand argument.\n/// \\param RHS Right-hand argument.\n/// \\param PerformADL Whether to consider operator candidates found by ADL.\n/// \\param AllowRewrittenCandidates Whether to consider candidates found by\n/// C++20 operator rewrites.\n/// \\param DefaultedFn If we are synthesizing a defaulted operator function,\n/// the function in question. Such a function is never a candidate in\n/// our overload resolution. This also enables synthesizing a three-way\n/// comparison from < and == as described in C++20 [class.spaceship]p1.\nExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool PerformADL, bool AllowRewrittenCandidates, FunctionDecl *DefaultedFn) {\n // ...\n case OR_No_Viable_Function: {\n // ...\n if (Args[0]->getType()->isRecordType() && Opc >= BO_Assign && Opc <= BO_OrAssign) {\n Diag(OpLoc, diag::err_ovl_no_viable_oper) << BinaryOperator::getOpcodeStr(Opc) << Args[0]->getSourceRange() << Args[1]->getSourceRange();"},{B,15282,"/// BuildOverloadedArrowExpr - Build a call to an overloaded @c operator->\n/// (if one exists), where @c Base is an expression of class type and\n/// @c Member is the name of the member we\'re trying to find.\nExprResult Sema::BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound) {\n // ...\n case OR_No_Viable_Function: {\n // ...\n if (CandidateSet.empty()) {\n // ...\n } else\n Diag(OpLoc, diag::err_ovl_no_viable_oper) << \"operator->\" << Base->getSourceRange();"}}, [l]={ ["clang/test/SemaCUDA/implicit-member-target-inherited.cu"]={"clang/test/SemaCUDA/implicit-member-target-inherited.cu:172:6: error: no viable overloaded \'=\'","clang/test/SemaCUDA/implicit-member-target-inherited.cu:204:6: error: no viable overloaded \'=\'"} } }, ["err_ovl_no_viable_subscript"]={ [d]="err_ovl_no_viable_subscript", [e]="no viable overloaded operator[] for type %0", [i]="no viable overloaded operator[] for type A", [j]=k, [c]="no viable overloaded operator\\[\\] for type (.*?)", [h]=a, [g]=m, [f]={"0237485287e9",1262829855,"Improve the lead diagnostic for C++ object subscript expressions with","Improve the lead diagnostic for C++ object subscript expressions with\nno viable overloads. Use a different message when the class provides\nno operator[] overloads at all; use it for operator(), too.\n\nPartially addresses PR 5900.\n\nllvm-svn: 92894"}, [b]={{B,14607,"ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, SourceLocation RLoc, Expr *Base, MultiExprArg ArgExpr) {\n // ...\n case OR_No_Viable_Function: {\n PartialDiagnostic PD = CandidateSet.empty() ? (PDiag(diag::err_ovl_no_oper) << Args[0]->getType() << /*subscript*/ 0 << Args[0]->getSourceRange() << Range) : (PDiag(diag::err_ovl_no_viable_subscript) << Args[0]->getType() << Args[0]->getSourceRange() << Range);"}}, [l]={ ["clang/test/SemaCXX/cxx2b-overloaded-operator.cpp"]={"clang/test/SemaCXX/cxx2b-overloaded-operator.cpp:11:6: error: no viable overloaded operator[] for type \'S\'","clang/test/SemaCXX/cxx2b-overloaded-operator.cpp:20:20: error: no viable overloaded operator[] for type \'S\'","clang/test/SemaCXX/cxx2b-overloaded-operator.cpp:65:29: error: no viable overloaded operator[] for type \'T1<int, int>\'"} } }, ["err_ovl_rewrite_equalequal_not_bool"]={ [d]={{nil,w,"err_ovl_rewrite_equalequal_not_bool"}}, [e]={{nil,w,"return type %0 of selected \'operator==\' function for rewritten \'%1\' comparison is not \'bool\'"}}, [i]={{nil,w,"return type A of selected \'operator==\' function for rewritten \'B\' comparison is not \'bool\'"}}, [j]=k, [c]="return type (.*?) of selected \'operator\\=\\=\' function for rewritten \'(.*?)\' comparison is not \'bool\'", [h]=a, [g]={{nil,w,m}}, [f]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias)).","[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a name of your choice (say\n`foo`), but have clang treat it as if it were a builtin function (say\n`__builtin_foo`), by writing\n\n static __inline__ __attribute__((__clang_arm_mve_alias(__builtin_foo)))\n int foo(args);\n\nI\'m intending to use this for the ACLE intrinsics for MVE, which have\nto be polymorphic on their argument types and also need to be\nimplemented by builtins. To avoid having to implement the polymorphism\nwith several layers of nested _Generic and make error reporting\nhideous, I want to make all the user-facing intrinsics correspond\ndirectly to clang builtins, so that after clang resolves\n__attribute__((overloadable)) polymorphism it\'s already holding the\nright BuiltinID for the intrinsic it selected.\n\nHowever, this commit itself just introduces the new attribute, and\ndoesn\'t use it for anything.\n\nTo avoid unanticipated side effects if this attribute is used to make\naliases to other builtins, there\'s a restriction mechanism: only\n(BuiltinID, alias) pairs that are approved by the function\nArmMveAliasValid() will be permitted. At present, that function\ndoesn\'t permit anything, because the Tablegen that will generate its\nlist of valid pairs isn\'t yet implemented. So the only test of this\nfacility is one that checks that an unapproved builtin _can\'t_ be\naliased.\n\nReviewers: dmgreen, miyuki, ostannard\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D67159"}, [b]={{B,14011,"/// Create a binary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'+\').\n///\n/// \\param Opc The BinaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedBinOp().\n///\n/// \\param LHS Left-hand argument.\n/// \\param RHS Right-hand argument.\n/// \\param PerformADL Whether to consider operator candidates found by ADL.\n/// \\param AllowRewrittenCandidates Whether to consider candidates found by\n/// C++20 operator rewrites.\n/// \\param DefaultedFn If we are synthesizing a defaulted operator function,\n/// the function in question. Such a function is never a candidate in\n/// our overload resolution. This also enables synthesizing a three-way\n/// comparison from < and == as described in C++20 [class.spaceship]p1.\nExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool PerformADL, bool AllowRewrittenCandidates, FunctionDecl *DefaultedFn) {\n // ...\n case OR_Success: {\n // ...\n if (FnDecl) {\n // ...\n // C++2a [over.match.oper]p9:\n // If a rewritten operator== candidate is selected by overload\n // resolution for an operator@, its return type shall be cv bool\n if (Best->RewriteKind && ChosenOp == OO_EqualEqual && !FnDecl->getReturnType()->isBooleanType()) {\n // ...\n Diag(OpLoc, IsExtension ? diag::ext_ovl_rewrite_equalequal_not_bool : diag::err_ovl_rewrite_equalequal_not_bool) << FnDecl->getReturnType() << BinaryOperator::getOpcodeStr(Opc) << Args[0]->getSourceRange() << Args[1]->getSourceRange();"}}, [l]={ ["clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp"]={"clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp:9:14: error: return type \'double\' of selected \'operator==\' function for rewritten \'==\' comparison is not \'bool\'","clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp:10:14: error: return type \'double\' of selected \'operator==\' function for rewritten \'!=\' comparison is not \'bool\'","clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp:11:14: error: return type \'double\' of selected \'operator==\' function for rewritten \'!=\' comparison is not \'bool\'","clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp:18:14: error: return type \'double\' of selected \'operator==\' function for rewritten \'!=\' comparison is not \'bool\'"} } }, ["err_ovl_static_nonstatic_member"]={ [d]="err_ovl_static_nonstatic_member", [e]="static and non-static member functions with the same parameter types cannot be overloaded", [i]="static and non-static member functions with the same parameter types cannot be overloaded", [j]=k, [c]="static and non\\-static member functions with the same parameter types cannot be overloaded", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{G,3987,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n if (OldMethod && NewMethod) {\n // ...\n if (!isFriend && NewMethod->getLexicalDeclContext()->isRecord() && !IsClassScopeExplicitSpecialization) {\n // -- Member function declarations with the same name and the\n // same parameter types cannot be overloaded if any of them\n // is a static member function declaration.\n if (OldMethod->isStatic() != NewMethod->isStatic()) {\n Diag(New->getLocation(), diag::err_ovl_static_nonstatic_member);"}}, [l]={ ["clang/test/SemaCXX/overload-decl.cpp"]={"clang/test/SemaCXX/overload-decl.cpp:30:15: error: static and non-static member functions with the same parameter types cannot be overloaded"} } }, ["err_ovl_unresolvable"]={ [d]="err_ovl_unresolvable", [e]={{nil,z,"reference to %select{overloaded|multiversioned}1 function could not be resolved; did you mean to call it%select{| with no arguments}0?"},{F,nil,"reference to overloaded function could not be resolved; did you mean to call it%select{| with no arguments}0?"}}, [i]={{nil,z,{"reference to ",{"overloaded","multiversioned"}," function could not be resolved; did you mean to call it",{a," with no arguments"},"?"}},{F,nil,{"reference to overloaded function could not be resolved; did you mean to call it",{a," with no arguments"},"?"}}}, [j]=k, [c]="reference to (?:overloaded|multiversioned) function could not be resolved; did you mean to call it(?:| with no arguments)\\?", [h]=a, [g]=m, [f]={"36226621f600",1286849357,"Progress.","Progress.\n\nllvm-svn: 116287"}, [b]={{E,21546,"/// Check for operands with placeholder types and complain if found.\n/// Returns ExprError() if there was an error and no recovery was possible.\nExprResult Sema::CheckPlaceholderExpr(Expr *E) {\n // ...\n // Overloaded expressions.\n case BuiltinType::Overload: {\n // ...\n tryToRecoverWithCall(Result, PDiag(diag::err_ovl_unresolvable),"}}, [l]={ ["clang/test/Sema/PR28181.c"]={"clang/test/Sema/PR28181.c:12:21: error: reference to overloaded function could not be resolved; did you mean to call it?"} } }, ["err_ownership_returns_index_mismatch"]={ [d]="err_ownership_returns_index_mismatch", [e]="\'ownership_returns\' attribute index does not match; here it is %0", [i]="\'ownership_returns\' attribute index does not match; here it is A", [j]=k, [c]="\'ownership_returns\' attribute index does not match; here it is (.*?)", [h]=a, [g]=m, [f]={"ef7aef8fe5d3",1406839466,"Implemented a diagnostic to handle multiple, distinct ownership_return attributes on the same declar...","Implemented a diagnostic to handle multiple, distinct ownership_return attributes on the same declaration. This removes a FIXME from the code.\n\nllvm-svn: 214436"}, [b]={{Q,1895,"static void handleOwnershipAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n for (unsigned i = 1; i < AL.getNumArgs(); ++i) {\n // ...\n // Check we don\'t have a conflict with another ownership attribute.\n for (const auto *I : D->specific_attrs<OwnershipAttr>()) {\n // Cannot have two ownership attributes of different kinds for the same\n // index.\n if (I->getOwnKind() != K && llvm::is_contained(I->args(), Idx)) {\n // ...\n } else if (K == OwnershipAttr::Returns && I->getOwnKind() == OwnershipAttr::Returns) {\n // A returns attribute conflicts with any other returns attribute using\n // a different index.\n if (!llvm::is_contained(I->args(), Idx)) {\n S.Diag(I->getLocation(), diag::err_ownership_returns_index_mismatch) << I->args_begin()->getSourceIndex();"}}, [l]={ ["clang/test/Sema/attr-ownership.cpp"]={"clang/test/Sema/attr-ownership.cpp:5:22: error: \'ownership_returns\' attribute index does not match; here it is 2"} } }, ["err_ownership_type"]={ [d]="err_ownership_type", [e]="%0 attribute only applies to %select{pointer|integer}1 arguments", [i]={{nil,nil,{"A attribute only applies to ",{"pointer","integer"}," arguments"}}}, [j]=k, [c]="(.*?) attribute only applies to (?:pointer|integer) arguments", [h]=a, [g]=m, [f]={"d21139a34f51",1280541131,"After a lengthy design discussion, add support for \"ownership attributes\" for malloc/free checking. ...","After a lengthy design discussion, add support for \"ownership attributes\" for malloc/free checking. Patch by Andrew McGregor!\n\nllvm-svn: 109939"}, [b]={{Q,1875,"static void handleOwnershipAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n for (unsigned i = 1; i < AL.getNumArgs(); ++i) {\n // ...\n if (-1 != Err) {\n S.Diag(AL.getLoc(), diag::err_ownership_type) << AL << Err << Ex->getSourceRange();"}}, [l]={ ["clang/test/Sema/attr-ownership.c"]={"clang/test/Sema/attr-ownership.c:15:35: error: \'ownership_returns\' attribute only applies to integer arguments","clang/test/Sema/attr-ownership.c:16:57: error: \'ownership_returns\' attribute only applies to integer arguments"} } }, ["err_pack_expansion_length_conflict"]={ [d]="err_pack_expansion_length_conflict", [e]="pack expansion contains parameter packs %0 and %1 that have different lengths (%2 vs. %3)", [i]="pack expansion contains parameter packs A and B that have different lengths (C vs. D)", [j]=k, [c]="pack expansion contains parameter packs (.*?) and (.*?) that have different lengths \\((.*?) vs\\. (.*?)\\)", [h]=a, [g]=m, [f]={"840bd6cce5ac",1292882700,"Implement basic support for template instantiation of pack expansions","Implement basic support for template instantiation of pack expansions\nwhose patterns are template arguments. We can now instantiate, e.g.,\n\n typedef tuple<pair<OuterTypes, InnerTypes>...> type;\n\nwhere OuterTypes and InnerTypes are template type parameter packs.\n\nThere is a horrible inefficiency in\nTemplateArgumentLoc::getPackExpansionPattern(), where we need to\ncreate copies of TypeLoc data because our interfaces traffic in\nTypeSourceInfo pointers where they should traffic in TypeLocs\ninstead. I\'ve isolated in efficiency in this one routine; once we\nrefactor our interfaces to traffic in TypeLocs, we can eliminate it.\n\nllvm-svn: 122278"}, [b]={{ab,770,"bool Sema::CheckParameterPacksForExpansion(SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef<UnexpandedParameterPack> Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, std::optional<unsigned> &NumExpansions) {\n // ...\n for (UnexpandedParameterPack ParmPack : Unexpanded) {\n // ...\n if (NewPackSize != *NumExpansions) {\n // C++0x [temp.variadic]p5:\n // All of the parameter packs expanded by a pack expansion shall have\n // the same number of arguments specified.\n if (HaveFirstPack)\n Diag(EllipsisLoc, diag::err_pack_expansion_length_conflict) << FirstPack.first << Name << *NumExpansions << NewPackSize << SourceRange(FirstPack.second) << SourceRange(ParmPack.second);"}}, [l]={ ["clang/test/SemaCXX/attr-cxx0x.cpp"]={"clang/test/SemaCXX/attr-cxx0x.cpp:28:35: error: pack expansion contains parameter packs \'A\' and \'B\' that have different lengths (1 vs. 2)"} } }, ["err_pack_expansion_length_conflict_multilevel"]={ [d]="err_pack_expansion_length_conflict_multilevel", [e]="pack expansion contains parameter pack %0 that has a different length (%1 vs. %2) from outer parameter packs", [i]="pack expansion contains parameter pack A that has a different length (B vs. C) from outer parameter packs", [j]=k, [c]="pack expansion contains parameter pack (.*?) that has a different length \\((.*?) vs\\. (.*?)\\) from outer parameter packs", [h]=a, [g]=m, [f]={"0dca5fdb4e03",1295024684,"Keep track of the number of expansions to be produced from a type pack","Keep track of the number of expansions to be produced from a type pack\nexpansion, when it is known due to the substitution of an out\nparameter pack. This allows us to properly handle substitution into\npack expansions that involve multiple parameter packs at different\ntemplate parameter levels, even when this substitution happens one\nlevel at a time (as with partial specializations of member class\ntemplates and the signatures of member function templates).\n\nNote that the diagnostic we provide when there is an arity mismatch\nbetween an outer parameter pack and an inner parameter pack in this\ncase isn\'t as clear as the normal diagnostic for an arity\nmismatch. However, this doesn\'t matter because these cases are very,\nvery rare and (even then) only typically occur in a SFINAE context.\n\nThe other kinds of pack expansions (expression, template, etc.) still\nneed to support optional tracking of the number of expansions, and we\nneed the moral equivalent of SubstTemplateTypeParmPackType for\nsubstituted argument packs of template template and non-type template\nparameters.\n\nllvm-svn: 123448"}, [b]={{ab,774,"bool Sema::CheckParameterPacksForExpansion(SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef<UnexpandedParameterPack> Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, std::optional<unsigned> &NumExpansions) {\n // ...\n for (UnexpandedParameterPack ParmPack : Unexpanded) {\n // ...\n if (NewPackSize != *NumExpansions) {\n // C++0x [temp.variadic]p5:\n // All of the parameter packs expanded by a pack expansion shall have\n // the same number of arguments specified.\n if (HaveFirstPack)\n // ...\n else\n Diag(EllipsisLoc, diag::err_pack_expansion_length_conflict_multilevel) << Name << *NumExpansions << NewPackSize << SourceRange(ParmPack.second);"}}, [l]={ ["clang/test/SemaTemplate/cxx1z-fold-expressions.cpp"]={"clang/test/SemaTemplate/cxx1z-fold-expressions.cpp:100:61: error: pack expansion contains parameter pack \'Js\' that has a different length (1 vs. 2) from outer parameter packs"} } }, ["err_pack_expansion_length_conflict_partial"]={ [d]={{nil,z,"err_pack_expansion_length_conflict_partial"}}, [e]={{nil,z,"pack expansion contains parameter pack %0 that has a different length (at least %1 vs. %2) from outer parameter packs"}}, [i]={{nil,z,"pack expansion contains parameter pack A that has a different length (at least B vs. C) from outer parameter packs"}}, [j]=k, [c]="pack expansion contains parameter pack (.*?) that has a different length \\(at least (.*?) vs\\. (.*?)\\) from outer parameter packs", [h]=a, [g]={{nil,z,m}}, [f]={"4a8f3518cb14",1532026837,"Fix template argument deduction when a parameter pack has a value","Fix template argument deduction when a parameter pack has a value\nprovided by an outer template.\n\nWe made the incorrect assumption in various places that the only way we\ncan have any arguments already provided for a pack during template\nargument deduction was from a partially-specified pack. That\'s not true;\nwe can also have arguments from an enclosing already-instantiated\ntemplate, and that can even result in the function template\'s own pack\nparameters having a fixed length and not being packs for the purposes of\ntemplate argument deduction.\n\nllvm-svn: 337481"}, [b]={{ab,794,"bool Sema::CheckParameterPacksForExpansion(SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef<UnexpandedParameterPack> Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, std::optional<unsigned> &NumExpansions) {\n // ...\n // If we\'re performing a partial expansion but we also have a full expansion,\n // expand to the number of common arguments. For example, given:\n //\n // template<typename ...T> struct A {\n // template<typename ...U> void f(pair<T, U>...);\n // };\n //\n // ... a call to \'A<int, int>().f<int>\' should expand the pack once and\n // retain an expansion.\n if (NumPartialExpansions) {\n if (NumExpansions && *NumExpansions < *NumPartialExpansions) {\n // ...\n Diag(EllipsisLoc, diag::err_pack_expansion_length_conflict_partial) << PartialPack << *NumPartialExpansions << *NumExpansions << SourceRange(PartiallySubstitutedPackLoc);"}} }, ["err_pack_expansion_member_init"]={ [d]="err_pack_expansion_member_init", [e]="pack expansion for initialization of member %0", [i]="pack expansion for initialization of member A", [j]=k, [c]="pack expansion for initialization of member (.*?)", [h]=a, [g]=m, [f]={"44e7df67d963",1294101176,"Implement pack expansion of base initializers, so that we can","Implement pack expansion of base initializers, so that we can\ninitialize those lovely mixins that come from pack expansions of base\nspecifiers.\n\nllvm-svn: 122793"}, [b]={{y,4392,"/// Handle a C++ member initializer.\nMemInitResult Sema::BuildMemInitializer(Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc) {\n // ...\n // Look for a member, first.\n if (ValueDecl *Member = tryLookupCtorInitMemberDecl(ClassDecl, SS, TemplateTypeTy, MemberOrBase)) {\n if (EllipsisLoc.isValid())\n Diag(EllipsisLoc, diag::err_pack_expansion_member_init) << MemberOrBase << SourceRange(IdLoc, Init->getSourceRange().getEnd());"}}, [l]={ ["clang/test/CXX/temp/temp.decls/temp.variadic/p4.cpp"]={"clang/test/CXX/temp/temp.decls/temp.variadic/p4.cpp:144:17: error: pack expansion for initialization of member \'member\'"} } }, ["err_pack_expansion_without_parameter_packs"]={ [d]="err_pack_expansion_without_parameter_packs", [e]="pack expansion does not contain any unexpanded parameter packs", [i]="pack expansion does not contain any unexpanded parameter packs", [j]=k, [c]="pack expansion does not contain any unexpanded parameter packs", [h]=a, [g]=m, [f]={"d2fa766ad03e",1292811851,"Introduce a new type, PackExpansionType, to capture types that are","Introduce a new type, PackExpansionType, to capture types that are\npack expansions, e.g. given\n\n template<typename... Types> struct tuple;\n\n template<typename... Types>\n struct tuple_of_refs {\n typedef tuple<Types&...> types;\n };\n\nthe type of the \"types\" typedef is a PackExpansionType whose pattern\nis Types&. \n\nThis commit introduces support for creating pack expansions for\ntemplate type arguments, as above, but not for any other kind of pack\nexpansion, nor for any form of instantiation.\n\nllvm-svn: 122223"}, [b]={{Q,4358,"static void handleAlignedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.hasParsedType()) {\n // ...\n if (AL.isPackExpansion() && !TInfo->getType()->containsUnexpandedParameterPack()) {\n S.Diag(AL.getEllipsisLoc(), diag::err_pack_expansion_without_parameter_packs);"},{Q,4385,"static void handleAlignedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (AL.isPackExpansion() && !E->containsUnexpandedParameterPack()) {\n S.Diag(AL.getEllipsisLoc(), diag::err_pack_expansion_without_parameter_packs);"},{y,2670,"/// Check the validity of a C++ base class specifier.\n///\n/// \\returns a new CXXBaseSpecifier if well-formed, emits diagnostics\n/// and returns NULL otherwise.\nCXXBaseSpecifier *Sema::CheckBaseSpecifier(CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) {\n // ...\n if (EllipsisLoc.isValid() && !TInfo->getType()->containsUnexpandedParameterPack()) {\n Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << TInfo->getTypeLoc().getSourceRange();"},{y,4705,"MemInitResult Sema::BuildBaseInitializer(QualType BaseType, TypeSourceInfo *BaseTInfo, Expr *Init, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc) {\n // ...\n if (EllipsisLoc.isValid()) {\n // This is a pack expansion.\n if (!BaseType->containsUnexpandedParameterPack()) {\n Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << SourceRange(BaseLoc, InitRange.getEnd());"},{y,12080,"Decl *Sema::ActOnUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList) {\n // ...\n if (EllipsisLoc.isInvalid()) {\n // ...\n } else {\n if (!SS.getScopeRep()->containsUnexpandedParameterPack() && !TargetNameInfo.containsUnexpandedParameterPack()) {\n Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << SourceRange(SS.getBeginLoc(), TargetNameInfo.getEndLoc());"},{"clang/lib/Sema/SemaExprObjC.cpp",1110,"ExprResult Sema::BuildObjCDictionaryLiteral(SourceRange SR, MutableArrayRef<ObjCDictionaryElement> Elements) {\n // ...\n for (ObjCDictionaryElement &Element : Elements) {\n // ...\n if (!Element.Key->containsUnexpandedParameterPack() && !Element.Value->containsUnexpandedParameterPack()) {\n Diag(Element.EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << SourceRange(Element.Key->getBeginLoc(), Element.Value->getEndLoc());"},{"clang/lib/Sema/SemaLambda.cpp",1198,"void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, Scope *CurrentScope) {\n // ...\n for (auto C = Intro.Captures.begin(), E = Intro.Captures.end(); C != E; PrevCaptureLoc = C->Loc, ++C) {\n // ...\n if (C->EllipsisLoc.isValid()) {\n if (Var->isParameterPack()) {\n // ...\n } else {\n Diag(C->EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << (C->Init.isUsable() ? C->Init.get()->getSourceRange() : SourceRange(C->Loc));"},{ab,582,"ParsedTemplateArgument Sema::ActOnPackExpansion(const ParsedTemplateArgument &Arg, SourceLocation EllipsisLoc) {\n // ...\n case ParsedTemplateArgument::Template:\n if (!Arg.getAsTemplate().get().containsUnexpandedParameterPack()) {\n // ...\n Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << R;"},{ab,637,"QualType Sema::CheckPackExpansion(QualType Pattern, SourceRange PatternRange, SourceLocation EllipsisLoc, std::optional<unsigned> NumExpansions) {\n // C++11 [temp.variadic]p5:\n // The pattern of a pack expansion shall name one or more\n // parameter packs that are not expanded by a nested pack\n // expansion.\n //\n // A pattern containing a deduced type can\'t occur \"naturally\" but arises in\n // the desugaring of an init-capture pack.\n if (!Pattern->containsUnexpandedParameterPack() && !Pattern->getContainedDeducedType()) {\n Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << PatternRange;"},{ab,660,"ExprResult Sema::CheckPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc, std::optional<unsigned> NumExpansions) {\n // ...\n // C++0x [temp.variadic]p5:\n // The pattern of a pack expansion shall name one or more\n // parameter packs that are not expanded by a nested pack\n // expansion.\n if (!Pattern->containsUnexpandedParameterPack()) {\n Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << Pattern->getSourceRange();"},{ab,1214,"ExprResult Sema::ActOnCXXFoldExpr(Scope *S, SourceLocation LParenLoc, Expr *LHS, tok::TokenKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc) {\n // ...\n // [expr.prim.fold]p3:\n // In a binary fold, op1 and op2 shall be the same fold-operator, and\n // either e1 shall contain an unexpanded parameter pack or e2 shall contain\n // an unexpanded parameter pack, but not both.\n if (LHS && RHS && LHS->containsUnexpandedParameterPack() == RHS->containsUnexpandedParameterPack()) {\n // ...\n return Diag(EllipsisLoc, LHS->containsUnexpandedParameterPack() ? diag::err_fold_expression_packs_both_sides : diag::err_pack_expansion_without_parameter_packs) << LHS->getSourceRange() << RHS->getSourceRange();"},{ab,1226,"ExprResult Sema::ActOnCXXFoldExpr(Scope *S, SourceLocation LParenLoc, Expr *LHS, tok::TokenKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc) {\n // ...\n // [expr.prim.fold]p2:\n // In a unary fold, the cast-expression shall contain an unexpanded\n // parameter pack.\n if (!LHS || !RHS) {\n // ...\n if (!Pack->containsUnexpandedParameterPack()) {\n // ...\n return Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << Pack->getSourceRange();"}}, [l]={ ["clang/test/SemaTemplate/stmt-expr.cpp"]={"clang/test/SemaTemplate/stmt-expr.cpp:9:8: error: pack expansion does not contain any unexpanded parameter packs"} } }, ["err_param_default_argument"]={ [d]="err_param_default_argument", [e]="C does not support default arguments", [i]="C does not support default arguments", [j]=k, [c]="C does not support default arguments", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{y,341,"/// ActOnParamDefaultArgument - Check whether the default argument\n/// provided for a function parameter is well-formed. If so, attach it\n/// to the parameter declaration.\nvoid Sema::ActOnParamDefaultArgument(Decl *param, SourceLocation EqualLoc, Expr *DefaultArg) {\n // ...\n // Default arguments are only permitted in C++\n if (!getLangOpts().CPlusPlus) {\n Diag(EqualLoc, diag::err_param_default_argument) << DefaultArg->getSourceRange();"}}, [l]={ ["clang/test/Sema/default1.c"]={"clang/test/Sema/default1.c:2:14: error: C does not support default arguments"} } }, ["err_param_default_argument_member_template_redecl"]={ [d]="err_param_default_argument_member_template_redecl", [e]="default arguments cannot be added to an out-of-line definition of a member of a %select{class template|class template partial specialization|nested class in a template}0", [i]={{nil,nil,{"default arguments cannot be added to an out-of-line definition of a member of a ",{"class template","class template partial specialization","nested class in a template"}}}}, [j]=k, [c]="default arguments cannot be added to an out\\-of\\-line definition of a member of a (?:class template|class template partial specialization|nested class in a template)", [h]=a, [g]=m, [f]={"c732aba9a98c",1252694672,"Cleanup and test C++ default arguments. Improvements include:","Cleanup and test C++ default arguments. Improvements include:\n\n - Diagnose attempts to add default arguments to templates (or member\n functions of templates) after the initial declaration (DR217).\n - Improve diagnostics when a default argument is redefined. Now, the\n note will always point at the place where the default argument was\n previously defined, rather than pointing to the most recent\n declaration of the function.\n\nllvm-svn: 81548"}, [b]={{y,644,"/// MergeCXXFunctionDecl - Merge two declarations of the same C++\n/// function, once we already know that they have the same\n/// type. Subroutine of MergeFunctionDecl. Returns true if there was an\n/// error, false otherwise.\nbool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S) {\n // ...\n // C++ [dcl.fct.default]p4:\n // For non-template functions, default arguments can be added in\n // later declarations of a function in the same\n // scope. Declarations in different scopes have completely\n // distinct sets of default arguments. That is, declarations in\n // inner scopes do not acquire default arguments from\n // declarations in outer scopes, and vice versa. In a given\n // function declaration, all parameters subsequent to a\n // parameter with a default argument shall have default\n // arguments supplied in this or previous declarations. A\n // default argument shall not be redefined by a later\n // declaration (not even to the same value).\n //\n // C++ [dcl.fct.default]p6:\n // Except for member functions of class templates, the default arguments\n // in a member function definition that appears outside of the class\n // definition are added to the set of default arguments provided by the\n // member function declaration in the class definition.\n for (unsigned p = 0, NumParams = PrevForDefaultArgs ? PrevForDefaultArgs->getNumParams() : 0; p < NumParams; ++p) {\n // ...\n if (OldParamHasDfl && NewParamHasDfl) {\n // ...\n } else if (OldParamHasDfl) {\n // ...\n } else if (NewParamHasDfl) {\n if (New->getDescribedFunctionTemplate()) {\n // ...\n } else if (New->getTemplateSpecializationKind() != TSK_ImplicitInstantiation && New->getTemplateSpecializationKind() != TSK_Undeclared) {\n // ...\n } else if (New->getDeclContext()->isDependentContext()) {\n // ...\n Diag(NewParam->getLocation(), diag::err_param_default_argument_member_template_redecl) << WhichKind << NewParam->getDefaultArgRange();"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp:29:19: error: default arguments cannot be added to an out-of-line definition of a member of a class template","clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp:33:26: error: default arguments cannot be added to an out-of-line definition of a member of a nested class in a template"} } }, ["err_param_default_argument_missing"]={ [d]="err_param_default_argument_missing", [e]="missing default argument on parameter", [i]="missing default argument on parameter", [j]=k, [c]="missing default argument on parameter", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{y,1659,"/// CheckCXXDefaultArguments - Verify that the default arguments for a\n/// function declaration are well-formed according to C++\n/// [dcl.fct.default].\nvoid Sema::CheckCXXDefaultArguments(FunctionDecl *FD) {\n // ...\n // C++20 [dcl.fct.default]p4:\n // In a given function declaration, each parameter subsequent to a parameter\n // with a default argument shall have a default argument supplied in this or\n // a previous declaration, unless the parameter was expanded from a\n // parameter pack, or shall be a function parameter pack.\n for (; ParamIdx < NumParams; ++ParamIdx) {\n // ...\n if (!Param->hasDefaultArg() && !Param->isParameterPack() && !(CurrentInstantiationScope && CurrentInstantiationScope->isLocalPackExpansion(Param))) {\n if (Param->isInvalidDecl())\n // ...\n else if (Param->getIdentifier())\n // ...\n else\n Diag(Param->getLocation(), diag::err_param_default_argument_missing);"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp:40:24: error: missing default argument on parameter"} } }, ["err_param_default_argument_missing_name"]={ [d]="err_param_default_argument_missing_name", [e]="missing default argument on parameter %0", [i]="missing default argument on parameter A", [j]=k, [c]="missing default argument on parameter (.*?)", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{y,1655,"/// CheckCXXDefaultArguments - Verify that the default arguments for a\n/// function declaration are well-formed according to C++\n/// [dcl.fct.default].\nvoid Sema::CheckCXXDefaultArguments(FunctionDecl *FD) {\n // ...\n // C++20 [dcl.fct.default]p4:\n // In a given function declaration, each parameter subsequent to a parameter\n // with a default argument shall have a default argument supplied in this or\n // a previous declaration, unless the parameter was expanded from a\n // parameter pack, or shall be a function parameter pack.\n for (; ParamIdx < NumParams; ++ParamIdx) {\n // ...\n if (!Param->hasDefaultArg() && !Param->isParameterPack() && !(CurrentInstantiationScope && CurrentInstantiationScope->isLocalPackExpansion(Param))) {\n if (Param->isInvalidDecl())\n // ...\n else if (Param->getIdentifier())\n Diag(Param->getLocation(), diag::err_param_default_argument_missing_name) << Param->getIdentifier();"}}, [l]={ ["clang/test/CXX/expr/expr.post/expr.call/p4.cpp"]={"clang/test/CXX/expr/expr.post/expr.call/p4.cpp:3:23: error: missing default argument on parameter \'y\'"} } }, ["err_param_default_argument_nonfunc"]={ [d]="err_param_default_argument_nonfunc", [e]="default arguments can only be specified for parameters in a function declaration", [i]="default arguments can only be specified for parameters in a function declaration", [j]=k, [c]="default arguments can only be specified for parameters in a function declaration", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{y,441,"/// CheckExtraCXXDefaultArguments - Check for any extra default\n/// arguments in the declarator, which is not a function declaration\n/// or definition and therefore is not permitted to have default\n/// arguments. This routine should be invoked for every declarator\n/// that is not a function declaration or definition.\nvoid Sema::CheckExtraCXXDefaultArguments(Declarator &D) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n if (chunk.Kind == DeclaratorChunk::Function) {\n // ...\n for (unsigned argIdx = 0, e = chunk.Fun.NumParams; argIdx != e; ++argIdx) {\n // ...\n if (Param->hasUnparsedDefaultArg()) {\n // ...\n Diag(Param->getLocation(), diag::err_param_default_argument_nonfunc) << SR;"},{y,444,"/// CheckExtraCXXDefaultArguments - Check for any extra default\n/// arguments in the declarator, which is not a function declaration\n/// or definition and therefore is not permitted to have default\n/// arguments. This routine should be invoked for every declarator\n/// that is not a function declaration or definition.\nvoid Sema::CheckExtraCXXDefaultArguments(Declarator &D) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n if (chunk.Kind == DeclaratorChunk::Function) {\n // ...\n for (unsigned argIdx = 0, e = chunk.Fun.NumParams; argIdx != e; ++argIdx) {\n // ...\n if (Param->hasUnparsedDefaultArg()) {\n // ...\n } else if (Param->getDefaultArg()) {\n Diag(Param->getLocation(), diag::err_param_default_argument_nonfunc) << Param->getDefaultArg()->getSourceRange();"}}, [l]={ ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:13:22: error: default arguments can only be specified for parameters in a function declaration"} } }, ["err_param_default_argument_on_parameter_pack"]={ [d]="err_param_default_argument_on_parameter_pack", [e]="parameter pack cannot have a default argument", [i]="parameter pack cannot have a default argument", [j]=k, [c]="parameter pack cannot have a default argument", [h]=a, [g]=m, [f]={"3b8044c02d33",1427464711,"[Sema] Diagnose default argument on a parameter pack.","[Sema] Diagnose default argument on a parameter pack.\n\nThis is ill-formed (and cannot be used anyways).\n\nPR23028.\n\nllvm-svn: 233376"}, [b]={{y,355,"/// ActOnParamDefaultArgument - Check whether the default argument\n/// provided for a function parameter is well-formed. If so, attach it\n/// to the parameter declaration.\nvoid Sema::ActOnParamDefaultArgument(Decl *param, SourceLocation EqualLoc, Expr *DefaultArg) {\n // ...\n // C++11 [dcl.fct.default]p3\n // A default argument expression [...] shall not be specified for a\n // parameter pack.\n if (Param->isParameterPack()) {\n Diag(EqualLoc, diag::err_param_default_argument_on_parameter_pack) << DefaultArg->getSourceRange();"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p3.cpp:19:24: error: parameter pack cannot have a default argument"} } }, ["err_param_default_argument_redefinition"]={ [d]="err_param_default_argument_redefinition", [e]="redefinition of default argument", [i]="redefinition of default argument", [j]=k, [c]="redefinition of default argument", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{y,538,"/// MergeCXXFunctionDecl - Merge two declarations of the same C++\n/// function, once we already know that they have the same\n/// type. Subroutine of MergeFunctionDecl. Returns true if there was an\n/// error, false otherwise.\nbool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S) {\n // ...\n // C++ [dcl.fct.default]p4:\n // For non-template functions, default arguments can be added in\n // later declarations of a function in the same\n // scope. Declarations in different scopes have completely\n // distinct sets of default arguments. That is, declarations in\n // inner scopes do not acquire default arguments from\n // declarations in outer scopes, and vice versa. In a given\n // function declaration, all parameters subsequent to a\n // parameter with a default argument shall have default\n // arguments supplied in this or previous declarations. A\n // default argument shall not be redefined by a later\n // declaration (not even to the same value).\n //\n // C++ [dcl.fct.default]p6:\n // Except for member functions of class templates, the default arguments\n // in a member function definition that appears outside of the class\n // definition are added to the set of default arguments provided by the\n // member function declaration in the class definition.\n for (unsigned p = 0, NumParams = PrevForDefaultArgs ? PrevForDefaultArgs->getNumParams() : 0; p < NumParams; ++p) {\n // ...\n if (OldParamHasDfl && NewParamHasDfl) {\n unsigned DiagDefaultParamID = diag::err_param_default_argument_redefinition;"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp:9:15: error: redefinition of default argument"} } }, ["err_param_default_argument_references_local"]={ [d]="err_param_default_argument_references_local", [e]="default argument references local variable %0 of enclosing function", [i]="default argument references local variable A of enclosing function", [j]=k, [c]="default argument references local variable (.*?) of enclosing function", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{y,128,"/// VisitDeclRefExpr - Visit a reference to a declaration, to\n/// determine whether this declaration can be used in the default\n/// argument expression.\nbool CheckDefaultArgumentVisitor::VisitDeclRefExpr(const DeclRefExpr *DRE) {\n // ...\n if (const auto *Param = dyn_cast<ParmVarDecl>(Decl)) {\n // ...\n } else if (auto *VD = Decl->getPotentiallyDecomposedVarDecl()) {\n // C++ [dcl.fct.default]p7:\n // Local variables shall not be used in default argument\n // expressions.\n //\n // C++17 [dcl.fct.default]p7 (by CWG 2082):\n // A local variable shall not appear as a potentially-evaluated\n // expression in a default argument.\n //\n // C++20 [dcl.fct.default]p7 (DR as part of P0588R1, see also CWG 2346):\n // Note: A local variable cannot be odr-used (6.3) in a default\n // argument.\n //\n if (VD->isLocalVarDecl() && !DRE->isNonOdrUse())\n return S.Diag(DRE->getBeginLoc(), diag::err_param_default_argument_references_local) << Decl << DefaultArg->getSourceRange();"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp:5:26: error: default argument references local variable \'i1\' of enclosing function","clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp:13:34: error: default argument references local variable \'i3\' of enclosing function","clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp:24:24: error: default argument references local variable \'\' of enclosing function","clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp:30:24: error: default argument references local variable \'x\' of enclosing function"} } }, ["err_param_default_argument_references_param"]={ [d]="err_param_default_argument_references_param", [e]="default argument references parameter %0", [i]="default argument references parameter A", [j]=k, [c]="default argument references parameter (.*?)", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{y,111,"/// VisitDeclRefExpr - Visit a reference to a declaration, to\n/// determine whether this declaration can be used in the default\n/// argument expression.\nbool CheckDefaultArgumentVisitor::VisitDeclRefExpr(const DeclRefExpr *DRE) {\n // ...\n if (const auto *Param = dyn_cast<ParmVarDecl>(Decl)) {\n // C++ [dcl.fct.default]p9:\n // [...] parameters of a function shall not be used in default\n // argument expressions, even if they are not evaluated. [...]\n //\n // C++17 [dcl.fct.default]p9 (by CWG 2082):\n // [...] A parameter shall not appear as a potentially-evaluated\n // expression in a default argument. [...]\n //\n if (DRE->isNonOdrUse() != NOUR_Unevaluated)\n return S.Diag(DRE->getBeginLoc(), diag::err_param_default_argument_references_param) << Param->getDeclName() << DefaultArg->getSourceRange();"}}, [l]={ ["clang/test/CXX/basic/basic.lookup/basic.lookup.unqual/p11.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.unqual/p11.cpp:6:17: error: default argument references parameter \'a\'"} } }, ["err_param_default_argument_references_this"]={ [d]="err_param_default_argument_references_this", [e]="default argument references \'this\'", [i]="default argument references \'this\'", [j]=k, [c]="default argument references \'this\'", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{y,140,"/// VisitCXXThisExpr - Visit a C++ \"this\" expression.\nbool CheckDefaultArgumentVisitor::VisitCXXThisExpr(const CXXThisExpr *ThisE) {\n // ...\n return S.Diag(ThisE->getBeginLoc(), diag::err_param_default_argument_references_this) << ThisE->getSourceRange();"}}, [l]={ ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p8.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p8.cpp:13:23: error: default argument references \'this\'"} } }, ["err_param_default_argument_template_redecl"]={ [d]="err_param_default_argument_template_redecl", [e]="default arguments cannot be added to a function template that has already been declared", [i]="default arguments cannot be added to a function template that has already been declared", [j]=k, [c]="default arguments cannot be added to a function template that has already been declared", [h]=a, [g]=m, [f]={"c732aba9a98c",1252694672,"Cleanup and test C++ default arguments. Improvements include:","Cleanup and test C++ default arguments. Improvements include:\n\n - Diagnose attempts to add default arguments to templates (or member\n functions of templates) after the initial declaration (DR217).\n - Improve diagnostics when a default argument is redefined. Now, the\n note will always point at the place where the default argument was\n previously defined, rather than pointing to the most recent\n declaration of the function.\n\nllvm-svn: 81548"}, [b]={{y,601,"/// MergeCXXFunctionDecl - Merge two declarations of the same C++\n/// function, once we already know that they have the same\n/// type. Subroutine of MergeFunctionDecl. Returns true if there was an\n/// error, false otherwise.\nbool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S) {\n // ...\n // C++ [dcl.fct.default]p4:\n // For non-template functions, default arguments can be added in\n // later declarations of a function in the same\n // scope. Declarations in different scopes have completely\n // distinct sets of default arguments. That is, declarations in\n // inner scopes do not acquire default arguments from\n // declarations in outer scopes, and vice versa. In a given\n // function declaration, all parameters subsequent to a\n // parameter with a default argument shall have default\n // arguments supplied in this or previous declarations. A\n // default argument shall not be redefined by a later\n // declaration (not even to the same value).\n //\n // C++ [dcl.fct.default]p6:\n // Except for member functions of class templates, the default arguments\n // in a member function definition that appears outside of the class\n // definition are added to the set of default arguments provided by the\n // member function declaration in the class definition.\n for (unsigned p = 0, NumParams = PrevForDefaultArgs ? PrevForDefaultArgs->getNumParams() : 0; p < NumParams; ++p) {\n // ...\n if (OldParamHasDfl && NewParamHasDfl) {\n // ...\n } else if (OldParamHasDfl) {\n // ...\n } else if (NewParamHasDfl) {\n if (New->getDescribedFunctionTemplate()) {\n // ...\n Diag(NewParam->getLocation(), diag::err_param_default_argument_template_redecl) << NewParam->getDefaultArgRange();"}}, [l]={ ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p21.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p21.cpp:19:25: error: default arguments cannot be added to a function template that has already been declared"} } }, ["err_param_redefinition"]={ [d]="err_param_redefinition", [e]="redefinition of parameter %0", [i]="redefinition of parameter A", [j]=k, [c]="redefinition of parameter (.*?)", [h]=a, [g]=K, [f]={t,1236199783,r,s}, [b]={{ib,7241,"/// ParseFunctionDeclaratorIdentifierList - While parsing a function declarator\n/// we found a K&R-style identifier list instead of a typed parameter list.\n///\n/// After returning, ParamInfo will hold the parsed parameters.\n///\n/// identifier-list: [C99 6.7.5]\n/// identifier\n/// identifier-list \',\' identifier\n///\nvoid Parser::ParseFunctionDeclaratorIdentifierList(Declarator &D, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo) {\n // ...\n do {\n // ...\n // Verify that the argument identifier has not already been mentioned.\n if (!ParamsSoFar.insert(ParmII).second) {\n Diag(Tok, diag::err_param_redefinition) << ParmII;"},{"clang/lib/Parse/Parser.cpp",1573,"/// ParseKNRParamDeclarations - Parse \'declaration-list[opt]\' which provides\n/// types for a function with a K&R-style identifier list for arguments.\nvoid Parser::ParseKNRParamDeclarations(Declarator &D) {\n // ...\n // Read all the argument declarations.\n while (isDeclarationSpecifier(ImplicitTypenameContext::No)) {\n // ...\n // Handle the full declarator list.\n while (true) {\n // ...\n if (Param &&\n // ...\n // Scan the argument list looking for the correct param to apply this\n // type.\n for (unsigned i = 0;; ++i) {\n // ...\n if (FTI.Params[i].Ident == ParmDeclarator.getIdentifier()) {\n // Reject redefinitions of parameters.\n if (FTI.Params[i].Param) {\n Diag(ParmDeclarator.getIdentifierLoc(), diag::err_param_redefinition) << ParmDeclarator.getIdentifier();"},{G,14782,"/// ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator()\n/// to introduce parameters into function prototype scope.\nDecl *Sema::ActOnParamDeclarator(Scope *S, Declarator &D) {\n // ...\n if (II) {\n // ...\n if (R.isSingleResult()) {\n // ...\n if (PrevDecl->isTemplateParameter()) {\n // ...\n } else if (S->isDeclScope(PrevDecl)) {\n Diag(D.getIdentifierLoc(), diag::err_param_redefinition) << II;"}}, [l]={ ["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:34:15: error: redefinition of parameter \'x\'"} } }, ["err_param_with_void_type"]={ [d]="err_param_with_void_type", [e]="argument may not have \'void\' type", [i]="argument may not have \'void\' type", [j]=k, [c]="argument may not have \'void\' type", [h]=a, [g]=m, [f]={t,1236199783,r,s}, [b]={{"clang/lib/Sema/SemaTemplateInstantiate.cpp",2853,"ParmVarDecl *Sema::SubstParmVarDecl(ParmVarDecl *OldParm, const MultiLevelTemplateArgumentList &TemplateArgs, int indexAdjustment, std::optional<unsigned> NumExpansions, bool ExpectParameterPack, bool EvaluateConstraint) {\n // ...\n if (NewDI->getType()->isVoidType()) {\n Diag(OldParm->getLocation(), diag::err_param_with_void_type);"},{H,3025,"QualType Sema::BuildFunctionType(QualType T, MutableArrayRef<QualType> ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI) {\n // ...\n for (unsigned Idx = 0, Cnt = ParamTypes.size(); Idx < Cnt; ++Idx) {\n // ...\n if (ParamType->isVoidType()) {\n Diag(Loc, diag::err_param_with_void_type);"},{H,5508,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // OpenCL disallows functions without a prototype, but it doesn\'t enforce\n // strict prototypes as in C2x because it allows a function definition to\n // have an identifier list. See OpenCL 3.0 6.11/g for more details.\n if (!FTI.NumParams && !FTI.isVariadic && !LangOpts.requiresStrictPrototypes() && !LangOpts.OpenCL) {\n // ...\n } else {\n // ...\n for (unsigned i = 0, e = FTI.NumParams; i != e; ++i) {\n // ...\n // Look for \'void\'. void is allowed only as a single parameter to a\n // function with no other parameters (C99 6.7.5.3p10). We record\n // int(void) as a FunctionProtoType with an empty parameter list.\n if (ParamTy->isVoidType()) {\n // If this is something like \'float(int, void)\', reject it. \'void\'\n // is an incomplete type (C99 6.2.5p19) and function decls cannot\n // have parameters of incomplete type.\n if (FTI.NumParams != 1 || FTI.isVariadic) {\n // ...\n } else if (FTI.Params[i].Ident) {\n // ...\n S.Diag(FTI.Params[i].IdentLoc, diag::err_param_with_void_type);"}}, [l]={ ["clang/test/Sema/void_arg.c"]={"clang/test/Sema/void_arg.c:9:24: error: argument may not have \'void\' type","clang/test/Sema/void_arg.c:13:24: error: argument may not have \'void\' type"} } }, ["err_parameter_shadow_capture"]={ [d]={{nil,u,"err_parameter_shadow_capture"}}, [e]={{nil,u,"a lambda parameter cannot shadow an explicitly captured entity"}}, [i]={{nil,u,"a lambda parameter cannot shadow an explicitly captured entity"}}, [j]=k, [c]="a lambda parameter cannot shadow an explicitly captured entity", [h]=a, [g]={{nil,u,"Lambda Issue"}}, [f]={"3cde5e4a4c69",1540498503,"[C++17] Reject shadowing of capture by parameter in lambda","[C++17] Reject shadowing of capture by parameter in lambda\n\nSummary:\nThis change rejects the shadowing of a capture by a parameter in lambdas in C++17.\n\n```\nint main() {\n int a;\n auto f = [a](int a) { return a; };\n}\n```\n\nresults in:\n\n```\nmain.cpp:3:20: error: a lambda parameter cannot shadow an explicitly captured entity\n auto f = [a](int a) { return a; };\n ^\nmain.cpp:3:13: note: variable a is explicitly captured here\n auto f = [a](int a) { return a; };\n ^\n```\n\nReviewers: rsmith\n\nReviewed By: rsmith\n\nSubscribers: lebedev.ri, erik.pilkington, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D53595\n\nllvm-svn: 345308"}, [b]={{"clang/lib/Sema/SemaLambda.cpp",1351,"void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, Declarator &ParamInfo, const DeclSpec &DS) {\n // ...\n auto CheckRedefinition = [&](ParmVarDecl *Param) {\n for (const auto &Capture : Intro.Captures) {\n if (Capture.Id == Param->getIdentifier()) {\n Diag(Param->getLocation(), diag::err_parameter_shadow_capture);"}}, [l]={ ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.capture/p5.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.capture/p5.cpp:5:20: error: a lambda parameter cannot shadow an explicitly captured entity"} } }, ["err_parameters_retval_cannot_have_fp16_type"]={ [d]="err_parameters_retval_cannot_have_fp16_type", [e]="%select{parameters|function return value}0 cannot have __fp16 type; did you forget * ?", [i]={{nil,nil,{{"parameters","function return value"}," cannot have __fp16 type; did you forget * ?"}}}, [j]=k, [c]="(?:parameters|function return value) cannot have __fp16 type; did you forget \\* \\?", [h]=a, [g]=m, [f]={"f0c267e6e05c",1318634595,"Provide half floating point support as a storage only type.","Provide half floating point support as a storage only type.\nLack of half FP was a regression compared to llvm-gcc.\n\nllvm-svn: 142016"}, [b]={{H,2920,"bool Sema::CheckFunctionReturnType(QualType T, SourceLocation Loc) {\n // ...\n // Functions cannot return half FP.\n if (T->isHalfType() && !getLangOpts().NativeHalfArgsAndReturns && !Context.getTargetInfo().allowHalfArgsAndReturns()) {\n Diag(Loc, diag::err_parameters_retval_cannot_have_fp16_type) << 1 << FixItHint::CreateInsertion(Loc, \"*\");"},{H,3030,"QualType Sema::BuildFunctionType(QualType T, MutableArrayRef<QualType> ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI) {\n // ...\n for (unsigned Idx = 0, Cnt = ParamTypes.size(); Idx < Cnt; ++Idx) {\n // ...\n if (ParamType->isVoidType()) {\n // ...\n } else if (ParamType->isHalfType() && !getLangOpts().NativeHalfArgsAndReturns && !Context.getTargetInfo().allowHalfArgsAndReturns()) {\n // ...\n Diag(Loc, diag::err_parameters_retval_cannot_have_fp16_type) << 0 << FixItHint::CreateInsertion(Loc, \"*\");"},{H,5292,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // Do not allow returning half FP value.\n // FIXME: This really should be in BuildFunctionType.\n if (T->isHalfType()) {\n if (S.getLangOpts().OpenCL) {\n // ...\n } else if (!S.getLangOpts().NativeHalfArgsAndReturns && !S.Context.getTargetInfo().allowHalfArgsAndReturns()) {\n S.Diag(D.getIdentifierLoc(), diag::err_parameters_retval_cannot_have_fp16_type) << 1;"},{H,5533,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // OpenCL disallows functions without a prototype, but it doesn\'t enforce\n // strict prototypes as in C2x because it allows a function definition to\n // have an identifier list. See OpenCL 3.0 6.11/g for more details.\n if (!FTI.NumParams && !FTI.isVariadic && !LangOpts.requiresStrictPrototypes() && !LangOpts.OpenCL) {\n // ...\n } else {\n // ...\n for (unsigned i = 0, e = FTI.NumParams; i != e; ++i) {\n // ...\n // Look for \'void\'. void is allowed only as a single parameter to a\n // function with no other parameters (C99 6.7.5.3p10). We record\n // int(void) as a FunctionProtoType with an empty parameter list.\n if (ParamTy->isVoidType()) {\n // ...\n } else if (ParamTy->isHalfType()) {\n // Disallow half FP parameters.\n // FIXME: This really should be in BuildFunctionType.\n if (S.getLangOpts().OpenCL) {\n // ...\n } else if (!S.getLangOpts().NativeHalfArgsAndReturns && !S.Context.getTargetInfo().allowHalfArgsAndReturns()) {\n S.Diag(Param->getLocation(), diag::err_parameters_retval_cannot_have_fp16_type) << 0;"}}, [l]={ ["clang/test/Sema/fp16-sema.c"]={"clang/test/Sema/fp16-sema.c:5:22: error: parameters cannot have __fp16 type; did you forget * ?","clang/test/Sema/fp16-sema.c:8:26: error: parameters cannot have __fp16 type; did you forget * ?","clang/test/Sema/fp16-sema.c:11:26: error: parameters cannot have __fp16 type; did you forget * ?","clang/test/Sema/fp16-sema.c:15:9: error: parameters cannot have __fp16 type; did you forget * ?","clang/test/Sema/fp16-sema.c:23:15: error: function return value cannot have __fp16 type; did you forget * ?","clang/test/Sema/fp16-sema.c:26:17: error: function return value cannot have __fp16 type; did you forget * ?","clang/test/Sema/fp16-sema.c:29:18: error: function return value cannot have __fp16 type; did you forget * ?"} } }, ["err_paren_sizeof_parameter_pack"]={ [d]="err_paren_sizeof_parameter_pack", [e]="missing parentheses around the size of parameter pack %0", [i]="missing parentheses around the size of parameter pack A", [j]=k, [c]="missing parentheses around the size of parameter pack (.*?)", [h]=a, [g]=K, [f]={"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"}, [b]={{"clang/lib/Parse/ParseExpr.cpp",2472,"/// Parse a sizeof or alignof expression.\n///\n/// \\verbatim\n/// unary-expression: [C99 6.5.3]\n/// \'sizeof\' unary-expression\n/// \'sizeof\' \'(\' type-name \')\'\n/// [C++11] \'sizeof\' \'...\' \'(\' identifier \')\'\n/// [GNU] \'__alignof\' unary-expression\n/// [GNU] \'__alignof\' \'(\' type-name \')\'\n/// [C11] \'_Alignof\' \'(\' type-name \')\'\n/// [C++11] \'alignof\' \'(\' type-id \')\'\n/// \\endverbatim\nExprResult Parser::ParseUnaryExprOrTypeTraitExpression() {\n // ...\n // [C++11] \'sizeof\' \'...\' \'(\' identifier \')\'\n if (Tok.is(tok::ellipsis) && OpTok.is(tok::kw_sizeof)) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n Diag(LParenLoc, diag::err_paren_sizeof_parameter_pack) << Name << FixItHint::CreateInsertion(LParenLoc, \"(\") << FixItHint::CreateInsertion(RParenLoc, \")\");"}}, [l]={ ["clang/test/CXX/expr/expr.unary/expr.sizeof/p5-0x.cpp"]={"clang/test/CXX/expr/expr.unary/expr.sizeof/p5-0x.cpp:35:42: error: missing parentheses around the size of parameter pack \'Type\'"} } }, ["err_parens_pointer_member_function"]={ [d]="err_parens_pointer_member_function", [e]="cannot parenthesize the name of a method when forming a member pointer", [i]="cannot parenthesize the name of a method when forming a member pointer", [j]=k, [c]="cannot parenthesize the name of a method when forming a member pointer", [h]=a, [g]=m, [f]={"8d08b9b408ca",1282900108,"Propagate whether an id-expression is the immediate argument of","Propagate whether an id-expression is the immediate argument of\nan \'&\' expression from the second caller of ActOnIdExpression.\n\nTeach template argument deduction that an overloaded id-expression\ndoesn\'t give a valid type for deduction purposes to a non-static\nmember function unless the expression has the correct syntactic\nform.\n\nTeach ActOnIdExpression that it shouldn\'t try to create implicit\nmember expressions for \'&function\', because this isn\'t a \npermitted form of use for member functions.\n\nTeach CheckAddressOfOperand to diagnose these more carefully.\nSome of these cases aren\'t reachable right now because earlier\ndiagnostics interrupt them.\n\nllvm-svn: 112258"}, [b]={{E,14965,"/// CheckAddressOfOperand - The operand of & must be either a function\n/// designator or an lvalue designating an object. If it is an lvalue, the\n/// object cannot be declared with storage class register or be a bit field.\n/// Note: The usual conversions are *not* applied to the operand of the &\n/// operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue.\n/// In C++, the operand might be an overloaded function name, in which case\n/// we allow the \'&\' but retain the overloaded-function type.\nQualType Sema::CheckAddressOfOperand(ExprResult &OrigOp, SourceLocation OpLoc) {\n // ...\n if (lval == Expr::LV_ClassTemporary || lval == Expr::LV_ArrayTemporary) {\n // ...\n } else if (isa<ObjCSelectorExpr>(op)) {\n // ...\n } else if (lval == Expr::LV_MemberFunction) {\n // ...\n // The id-expression was parenthesized.\n if (OrigOp.get() != DRE) {\n Diag(OpLoc, diag::err_parens_pointer_member_function) << OrigOp.get()->getSourceRange();"}} }, ["err_partial_spec_args_match_primary_template"]={ [d]="err_partial_spec_args_match_primary_template", [e]="%select{class|variable}0 template partial specialization does not specialize any template argument; to %select{declare|define}1 the primary template, remove the template argument list", [i]={{nil,nil,{{"class","variable"}," template partial specialization does not specialize any template argument; to ",{"declare","define"}," the primary template, remove the template argument list"}}}, [j]=k, [c]="(?:class|variable) template partial specialization does not specialize any template argument; to (?:declare|define) the primary template, remove the template argument list", [h]=a, [g]=m, [f]={"09a3023e65d1",1244844486,"Diagnose C++ [temp.class.spec]p9b3, where a class template partial","Diagnose C++ [temp.class.spec]p9b3, where a class template partial\nspecialization\'s arguments are identical to the implicit template\narguments of the primary template. Typically, this is meant to be a\ndeclaration/definition of the primary template, so we give that\nadvice.\n\nllvm-svn: 73259"}, [b]={{fb,4588,"DeclResult Sema::ActOnVarTemplateSpecialization(Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization) {\n // ...\n // Find the variable template (partial) specialization declaration that\n // corresponds to these arguments.\n if (IsPartialSpecialization) {\n // ...\n if (isSameAsPrimaryTemplate(VarTemplate->getTemplateParameters(), CanonicalConverted) && (!Context.getLangOpts().CPlusPlus20 || !TemplateParams->hasAssociatedConstraints())) {\n // ...\n Diag(TemplateNameLoc, diag::err_partial_spec_args_match_primary_template) << /*variable template*/ 1 << /*is definition*/ (SC != SC_Extern && !CurContext->isRecord()) << FixItHint::CreateRemoval(SourceRange(LAngleLoc, RAngleLoc));"},{fb,8799,"DeclResult Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody) {\n // ...\n if (isPartialSpecialization) {\n // ...\n if (Context.hasSameType(CanonType, ClassTemplate->getInjectedClassNameSpecialization()) && (!Context.getLangOpts().CPlusPlus20 || !TemplateParams->hasAssociatedConstraints())) {\n // ...\n Diag(TemplateNameLoc, diag::err_partial_spec_args_match_primary_template) << /*class template*/ 0 << (TUK == TUK_Definition) << FixItHint::CreateRemoval(SourceRange(LAngleLoc, RAngleLoc));"}}, [l]={ ["clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp:33:6: error: variable template partial specialization does not specialize any template argument; to define the primary template, remove the template argument list","clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp:39:6: error: variable template partial specialization does not specialize any template argument; to define the primary template, remove the template argument list"} } }, ["err_partial_spec_fully_specialized"]={ [d]="err_partial_spec_fully_specialized", [e]="partial specialization of %0 does not use any of its template parameters", [i]="partial specialization of A does not use any of its template parameters", [j]=k, [c]="partial specialization of (.*?) does not use any of its template parameters", [h]=a, [g]=m, [f]={"92354b6b552e",1265675852,"Implement a specific diagnostic when a class template partial","Implement a specific diagnostic when a class template partial\nspecialization does not use any of its template parameters, then\nrecover far more gracefully. Fixes PR6181.\n\nllvm-svn: 95629"}, [b]={{fb,4575,"DeclResult Sema::ActOnVarTemplateSpecialization(Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization) {\n // ...\n // Find the variable template (partial) specialization declaration that\n // corresponds to these arguments.\n if (IsPartialSpecialization) {\n // ...\n // FIXME: Move these checks to CheckTemplatePartialSpecializationArgs so we\n // also do them during instantiation.\n if (!Name.isDependent() && !TemplateSpecializationType::anyDependentTemplateArguments(TemplateArgs, CanonicalConverted)) {\n Diag(TemplateNameLoc, diag::err_partial_spec_fully_specialized) << VarTemplate->getDeclName();"},{fb,8754,"DeclResult Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody) {\n // ...\n // Find the class template (partial) specialization declaration that\n // corresponds to these arguments.\n if (isPartialSpecialization) {\n // ...\n // FIXME: Move this to CheckTemplatePartialSpecializationArgs so we\n // also do it during instantiation.\n if (!Name.isDependent() && !TemplateSpecializationType::anyDependentTemplateArguments(TemplateArgs, CanonicalConverted)) {\n Diag(TemplateNameLoc, diag::err_partial_spec_fully_specialized) << ClassTemplate->getDeclName();"}}, [l]={ ["clang/test/SemaTemplate/temp_class_spec.cpp"]={"clang/test/SemaTemplate/temp_class_spec.cpp:359:9: error: partial specialization of \'a\' does not use any of its template parameters","clang/test/SemaTemplate/temp_class_spec.cpp:374:7: error: partial specialization of \'Bar\' does not use any of its template parameters","clang/test/SemaTemplate/temp_class_spec.cpp:386:7: error: partial specialization of \'Foo\' does not use any of its template parameters"} } }, ["err_partial_spec_ordering_ambiguous"]={ [d]="err_partial_spec_ordering_ambiguous", [e]="ambiguous partial specializations of %0", [i]="ambiguous partial specializations of A", [j]=k, [c]="ambiguous partial specializations of (.*?)", [h]=a, [g]=m, [f]={"be999390ebc7",1253031831,"Implement partial ordering of class template partial specializations ","Implement partial ordering of class template partial specializations \n(C++ [temp.class.order]).\n\nllvm-svn: 81866"}, [b]={{fb,4852,"DeclResult Sema::CheckVarTemplateId(VarTemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation TemplateNameLoc, const TemplateArgumentListInfo &TemplateArgs) {\n // ...\n if (AmbiguousPartialSpec) {\n // ...\n Diag(PointOfInstantiation, diag::err_partial_spec_ordering_ambiguous) << Decl;"},{"clang/lib/Sema/SemaTemplateInstantiate.cpp",3691,"/// Get the instantiation pattern to use to instantiate the definition of a\n/// given ClassTemplateSpecializationDecl (either the pattern of the primary\n/// template or of a partial specialization).\nstatic ActionResult<CXXRecordDecl *> getPatternForClassTemplateSpecialization(Sema &S, SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK) {\n // ...\n if (!Specialized.is<ClassTemplatePartialSpecializationDecl *>()) {\n // ...\n if (Matched.size() >= 1) {\n // ...\n if (Matched.size() == 1) {\n // ...\n } else {\n // ...\n if (Ambiguous) {\n // ...\n S.Diag(PointOfInstantiation, diag::err_partial_spec_ordering_ambiguous) << ClassTemplateSpec;"}}, [l]={ ["clang/test/SemaTemplate/temp_class_order.cpp"]={"clang/test/SemaTemplate/temp_class_order.cpp:41:16: error: ambiguous partial specializations of \'X2<int *, int *>\'"} } }, ["err_partial_spec_redeclared"]={ [d]="err_partial_spec_redeclared", [e]="class template partial specialization %0 cannot be redeclared", [i]="class template partial specialization A cannot be redeclared", [j]=k, [c]="class template partial specialization (.*?) cannot be redeclared", [h]=a, [g]=m, [f]={"21610380de97",1256774651,"Implement support for semantic checking and template instantiation of","Implement support for semantic checking and template instantiation of\nclass template partial specializations of member templates. Also,\nfixes a silly little bug in the marking of \"used\" template parameters\nin member templates. Fixes PR5236.\n\nllvm-svn: 85447"}, [b]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",4244,"/// Instantiate the declaration of a class template partial\n/// specialization.\n///\n/// \\param ClassTemplate the (instantiated) class template that is partially\n// specialized by the instantiation of \\p PartialSpec.\n///\n/// \\param PartialSpec the (uninstantiated) class template partial\n/// specialization that we are instantiating.\n///\n/// \\returns The instantiated partial specialization, if successful; otherwise,\n/// NULL to indicate an error.\nClassTemplatePartialSpecializationDecl *TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(ClassTemplateDecl *ClassTemplate, ClassTemplatePartialSpecializationDecl *PartialSpec) {\n // ...\n if (PrevDecl) {\n // ...\n SemaRef.Diag(PartialSpec->getLocation(), diag::err_partial_spec_redeclared) << WrittenTy->getType();"}}, [l]={ ["clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp"]={"clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp:42:31: error: class template partial specialization \'Inner<int, Y>\' cannot be redeclared","clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp:84:29: error: class template partial specialization \'Bar<0, int, Y>\' cannot be redeclared"} } }, ["err_partial_specialization_friend"]={ [d]="err_partial_specialization_friend", [e]="partial specialization cannot be declared as a friend", [i]="partial specialization cannot be declared as a friend", [j]=k, [c]="partial specialization cannot be declared as a friend", [h]=a, [g]=m, [f]={"ec9518be89c9",1292919297,"A class template partial specialization cannot be a friend. Fixes PR8649.","A class template partial specialization cannot be a friend. Fixes PR8649.\n\nllvm-svn: 122325"}, [b]={{fb,8662,"DeclResult Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody) {\n // ...\n if (TemplateParams && TemplateParams->size() > 0) {\n // ...\n if (TUK == TUK_Friend) {\n Diag(KWLoc, diag::err_partial_specialization_friend) << SourceRange(LAngleLoc, RAngleLoc);"}}, [l]={ ["clang/test/CXX/temp/temp.decls/temp.friend/p8.cpp"]={"clang/test/CXX/temp/temp.decls/temp.friend/p8.cpp:5:28: error: partial specialization cannot be declared as a friend"} } }, ["err_partition_import_outside_module"]={ [d]={{nil,J,"err_partition_import_outside_module"}}, [e]={{nil,J,"module partition imports must be within a module purview"}}, [i]={{nil,J,"module partition imports must be within a module purview"}}, [j]=k, [c]="module partition imports must be within a module purview", [h]=a, [g]={{nil,J,"Modules Issue"}}, [f]={"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"}, [b]={{"clang/lib/Parse/Parser.cpp",2555,"/// Parse a module import declaration. This is essentially the same for\n/// Objective-C and C++20 except for the leading \'@\' (in ObjC) and the\n/// trailing optional attributes (in C++).\n///\n/// [ObjC] @import declaration:\n/// \'@\' \'import\' module-name \';\'\n/// [ModTS] module-import-declaration:\n/// \'import\' module-name attribute-specifier-seq[opt] \';\'\n/// [C++20] module-import-declaration:\n/// \'export\'[opt] \'import\' module-name\n/// attribute-specifier-seq[opt] \';\'\n/// \'export\'[opt] \'import\' module-partition\n/// attribute-specifier-seq[opt] \';\'\n/// \'export\'[opt] \'import\' header-name\n/// attribute-specifier-seq[opt] \';\'\nDecl *Parser::ParseModuleImport(SourceLocation AtLoc, Sema::ModuleImportState &ImportState) {\n // ...\n case Sema::ModuleImportState::FirstDecl:\n case Sema::ModuleImportState::NotACXX20Module:\n // We can only import a partition within a module purview.\n if (IsPartition)\n Diag(ImportLoc, diag::err_partition_import_outside_module);"}} }, ["err_pascal_string_too_long"]={ [d]="err_pascal_string_too_long", [e]="Pascal string is too long", [i]="Pascal string is too long", [j]=k, [c]="Pascal string is too long", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{"clang/lib/Lex/LiteralSupport.cpp",2209,"void StringLiteralParser::init(ArrayRef<Token> StringToks) {\n // ...\n if (Pascal) {\n // ...\n // Verify that pascal strings aren\'t too large.\n if (GetStringLength() > 256) {\n if (Diags)\n Diags->Report(StringToks.front().getLocation(), diag::err_pascal_string_too_long) << SourceRange(StringToks.front().getLocation(), StringToks.back().getLocation());"}} }, ["err_paste_at_end"]={ [d]="err_paste_at_end", [e]="\'##\' cannot appear at end of macro expansion", [i]="\'##\' cannot appear at end of macro expansion", [j]=k, [c]="\'\\#\\#\' cannot appear at end of macro expansion", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{I,3080,"/// HandleDefineDirective - Implements \\#define. This consumes the entire macro\n/// line then lets the caller lex the next real token.\nvoid Preprocessor::HandleDefineDirective(Token &DefineTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n if (NumTokens != 0) {\n // ...\n if (MI->getReplacementToken(NumTokens - 1).is(tok::hashhash)) {\n Diag(MI->getReplacementToken(NumTokens - 1), diag::err_paste_at_end);"}}, [l]={ ["clang/test/Preprocessor/macro_paste_bad.c"]={"clang/test/Preprocessor/macro_paste_bad.c:10:18: error: \'##\' cannot appear at end of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:11:18: error: \'##\' cannot appear at end of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:12:15: error: \'##\' cannot appear at end of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:13:15: error: \'##\' cannot appear at end of macro expansion"} } }, ["err_paste_at_start"]={ [d]="err_paste_at_start", [e]="\'##\' cannot appear at start of macro expansion", [i]="\'##\' cannot appear at start of macro expansion", [j]=k, [c]="\'\\#\\#\' cannot appear at start of macro expansion", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{I,3076,"/// HandleDefineDirective - Implements \\#define. This consumes the entire macro\n/// line then lets the caller lex the next real token.\nvoid Preprocessor::HandleDefineDirective(Token &DefineTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n if (NumTokens != 0) {\n if (MI->getReplacementToken(0).is(tok::hashhash)) {\n Diag(MI->getReplacementToken(0), diag::err_paste_at_start);"}}, [l]={ ["clang/test/Preprocessor/macro_paste_bad.c"]={"clang/test/Preprocessor/macro_paste_bad.c:16:13: error: \'##\' cannot appear at start of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:17:13: error: \'##\' cannot appear at start of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:18:13: error: \'##\' cannot appear at start of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:19:13: error: \'##\' cannot appear at start of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:20:13: error: \'##\' cannot appear at start of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:21:13: error: \'##\' cannot appear at start of macro expansion"} } }, ["err_pch_diagopt_mismatch"]={ [d]="err_pch_diagopt_mismatch", [e]="%0 is currently enabled, but was not in the PCH file", [i]="A is currently enabled, but was not in the PCH file", [j]=k, [c]="(.*?) is currently enabled, but was not in the PCH file", [h]=a, [g]=P, [f]={"be84adbf1b7d",1398731813,"Check -Werror options during module validation","Check -Werror options during module validation\n\nThis patch checks whether the diagnostic options that could lead to\nerrors (principally -Werror) are consistent between when a module was\nbuilt and when it is loaded. If there are new -Werror flags, then the\nmodule is rebuilt. In order to canonicalize the options we do this\ncheck at the level of the constructed DiagnosticsEngine, which contains\nthe final set of diag to diagnostic level mappings. Currently we only\nrebuild with the new diagnostic options, but we intend to refine this in\nthe future to include the union of the new and old flags, since we know\nthe old ones did not cause errors. System modules are only rebuilt when\n-Wsystem-headers is enabled.\n\nOne oddity is that unlike checking language options, we don’t perform\nthis diagnostic option checking when loading from a precompiled header.\nThe reason for this is that the compiler cannot rebuild the PCH, so\nanything that requires it to be rebuilt effectively leaks into the build\nsystem. And in this case, that would mean the build system\nunderstanding the complex relationship between diagnostic options and\nthe underlying diagnostic mappings, which is unreasonable. Skipping the\ncheck is safe, because these options do not affect the generated AST.\nYou simply won’t get new build errors due to changed -Werror options\nautomatically, which is also true for non-module cases.\n\nllvm-svn: 207477"}, [b]={{D,493,"static bool checkDiagnosticGroupMappings(DiagnosticsEngine &StoredDiags, DiagnosticsEngine &Diags, bool Complain) {\n // ...\n for (DiagnosticsEngine *MappingSource : MappingSources) {\n for (auto DiagIDMappingPair : MappingSource->getDiagnosticMappings()) {\n // ...\n if (StoredLevel < DiagnosticsEngine::Error) {\n if (Complain)\n Diags.Report(diag::err_pch_diagopt_mismatch) << \"-Werror=\" + Diags.getDiagnosticIDs()->getWarningOptionForDiag(DiagID).str();"},{D,520,"static bool checkDiagnosticMappings(DiagnosticsEngine &StoredDiags, DiagnosticsEngine &Diags, bool IsSystem, bool Complain) {\n // Top-level options\n if (IsSystem) {\n // ...\n // If -Wsystem-headers was not enabled before, be conservative\n if (StoredDiags.getSuppressSystemWarnings()) {\n if (Complain)\n Diags.Report(diag::err_pch_diagopt_mismatch) << \"-Wsystem-headers\";"},{D,527,"static bool checkDiagnosticMappings(DiagnosticsEngine &StoredDiags, DiagnosticsEngine &Diags, bool IsSystem, bool Complain) {\n // ...\n if (Diags.getWarningsAsErrors() && !StoredDiags.getWarningsAsErrors()) {\n if (Complain)\n Diags.Report(diag::err_pch_diagopt_mismatch) << \"-Werror\";"},{D,534,"static bool checkDiagnosticMappings(DiagnosticsEngine &StoredDiags, DiagnosticsEngine &Diags, bool IsSystem, bool Complain) {\n // ...\n if (Diags.getWarningsAsErrors() && Diags.getEnableAllWarnings() && !StoredDiags.getEnableAllWarnings()) {\n if (Complain)\n Diags.Report(diag::err_pch_diagopt_mismatch) << \"-Weverything -Werror\";"},{D,541,"static bool checkDiagnosticMappings(DiagnosticsEngine &StoredDiags, DiagnosticsEngine &Diags, bool IsSystem, bool Complain) {\n // ...\n if (isExtHandlingFromDiagsError(Diags) && !isExtHandlingFromDiagsError(StoredDiags)) {\n if (Complain)\n Diags.Report(diag::err_pch_diagopt_mismatch) << \"-pedantic-errors\";"}} }, ["err_pch_different_branch"]={ [d]="err_pch_different_branch", [e]="PCH file built from a different branch (%0) than the compiler (%1)", [i]="PCH file built from a different branch (A) than the compiler (B)", [j]=k, [c]="PCH file built from a different branch \\((.*?)\\) than the compiler \\((.*?)\\)", [h]=a, [g]=P, [f]={"2228cd3f070d",1392133209,"Rename some PCH-related errors to have \'err_\' as their prefix","Rename some PCH-related errors to have \'err_\' as their prefix\n\nllvm-svn: 201157"}, [b]={{D,2869,"ASTReader::ASTReadResult ASTReader::ReadControlBlock(ModuleFile &F, SmallVectorImpl<ImportedModule> &Loaded, const ModuleFile *ImportedBy, unsigned ClientLoadCapabilities) {\n // ...\n while (true) {\n // ...\n case METADATA: {\n // ...\n if (StringRef(CurBranch) != ASTBranch && !DisableValidation) {\n if ((ClientLoadCapabilities & ARR_VersionMismatch) == 0)\n Diag(diag::err_pch_different_branch) << ASTBranch << CurBranch;"}} }, ["err_pch_langopt_mismatch"]={ [d]="err_pch_langopt_mismatch", [e]="%0 was %select{disabled|enabled}1 in PCH file but is currently %select{disabled|enabled}2", [i]={{nil,nil,{"A was ",{"disabled","enabled"}," in PCH file but is currently ",{"disabled","enabled"}}}}, [j]=k, [c]="(.*?) was (?:disabled|enabled) in PCH file but is currently (?:disabled|enabled)", [h]=a, [g]=P, [f]={"c2ae8800701c",1315938399,"Switch the serialization of LangOptions over to use the .def file. We","Switch the serialization of LangOptions over to use the .def file. We\nshould no longer have the serialization of LangOptions out of sync\nwith the structure itself (yay).\n\nllvm-svn: 139613"}, [b]={{D,285,"#define LANGOPT(Name, Bits, Default, Description) \\\n if (ExistingLangOpts.Name != LangOpts.Name) { \\\n if (Diags) { \\\n if (Bits == 1) \\\n Diags->Report(diag::err_pch_langopt_mismatch) << Description << LangOpts.Name << ExistingLangOpts.Name; \\"}}, [l]={ ["clang/test/Modules/prebuilt-implicit-modules.m"]={"error: signed char was disabled in PCH file but is currently enabled"} } }, ["err_pch_langopt_value_mismatch"]={ [d]="err_pch_langopt_value_mismatch", [e]="%0 differs in PCH file vs. current file", [i]="A differs in PCH file vs. current file", [j]=k, [c]="(.*?) differs in PCH file vs\\. current file", [h]=a, [g]=P, [f]={"c2ae8800701c",1315938399,"Switch the serialization of LangOptions over to use the .def file. We","Switch the serialization of LangOptions over to use the .def file. We\nshould no longer have the serialization of LangOptions out of sync\nwith the structure itself (yay).\n\nllvm-svn: 139613"}, [b]={{D,288,"#define LANGOPT(Name, Bits, Default, Description) \\\n if (ExistingLangOpts.Name != LangOpts.Name) { \\\n if (Diags) { \\\n if (Bits == 1) \\\n Diags->Report(diag::err_pch_langopt_mismatch) << Description << LangOpts.Name << ExistingLangOpts.Name; \\\n else \\\n Diags->Report(diag::err_pch_langopt_value_mismatch) << Description; \\"},{D,297,"#define VALUE_LANGOPT(Name, Bits, Default, Description) \\\n if (ExistingLangOpts.Name != LangOpts.Name) { \\\n if (Diags) \\\n Diags->Report(diag::err_pch_langopt_value_mismatch) << Description; \\"},{D,305,"#define ENUM_LANGOPT(Name, Type, Bits, Default, Description) \\\n if (ExistingLangOpts.get##Name() != LangOpts.get##Name()) { \\\n if (Diags) \\\n Diags->Report(diag::err_pch_langopt_value_mismatch) << Description; \\"},{D,329,"#include \"clang/Basic/LangOptions.def\"\n if (ExistingLangOpts.ModuleFeatures != LangOpts.ModuleFeatures) {\n if (Diags)\n Diags->Report(diag::err_pch_langopt_value_mismatch) << \"module features\";"},{D,335,"#include \"clang/Basic/LangOptions.def\"\n // ...\n if (ExistingLangOpts.ObjCRuntime != LangOpts.ObjCRuntime) {\n if (Diags)\n Diags->Report(diag::err_pch_langopt_value_mismatch) << \"target Objective-C runtime\";"},{D,343,"#include \"clang/Basic/LangOptions.def\"\n // ...\n if (ExistingLangOpts.CommentOpts.BlockCommandNames != LangOpts.CommentOpts.BlockCommandNames) {\n if (Diags)\n Diags->Report(diag::err_pch_langopt_value_mismatch) << \"block command names\";"}} }, ["err_pch_macro_def_conflict"]={ [d]="err_pch_macro_def_conflict", [e]="definition of macro \'%0\' differs between the precompiled header (\'%1\') and the command line (\'%2\')", [i]="definition of macro \'A\' differs between the precompiled header (\'B\') and the command line (\'C\')", [j]=k, [c]="definition of macro \'(.*?)\' differs between the precompiled header \\(\'(.*?)\'\\) and the command line \\(\'(.*?)\'\\)", [h]=a, [g]=P, [f]={"b63687519610",1351122110,"Teach the PCH validator to check the preprocessor options, especially","Teach the PCH validator to check the preprocessor options, especially\nthe macros that are #define\'d or #undef\'d on the command line. This\nchecking happens much earlier than the current macro-definition\nchecking and is far cleaner, because it does a direct comparison\nrather than a diff of the predefines buffers. Moreover, it allows us\nto use the result of this check to skip over PCH files within a\ndirectory that have non-matching -D\'s or -U\'s on the command\nline. Finally, it improves the diagnostics a bit for mismatches,\nfixing <rdar://problem/8612222>.\n\nThe old predefines-buffer diff\'ing will go away in a subsequent commit.\n\nllvm-svn: 166641"}, [b]={{D,721,"/// Check the preprocessor options deserialized from the control block\n/// against the preprocessor options in an existing preprocessor.\n///\n/// \\param Diags If non-null, produce diagnostics for any mismatches incurred.\n/// \\param Validation If set to OptionValidateNone, ignore differences in\n/// preprocessor options. If set to OptionValidateContradictions,\n/// require that options passed both in the AST file and on the command\n/// line (-D or -U) match, but tolerate options missing in one or the\n/// other. If set to OptionValidateContradictions, require that there\n/// are no differences in the options between the two.\nstatic bool checkPreprocessorOptions(const PreprocessorOptions &PPOpts, const PreprocessorOptions &ExistingPPOpts, DiagnosticsEngine *Diags, FileManager &FileMgr, std::string &SuggestedPredefines, const LangOptions &LangOpts, OptionValidation Validation = OptionValidateContradictions) {\n // ...\n for (unsigned I = 0, N = ExistingMacroNames.size(); I != N; ++I) {\n // ...\n // The macro bodies differ; complain.\n if (Diags) {\n Diags->Report(diag::err_pch_macro_def_conflict) << MacroName << Known->second.first << Existing.first;"}} }, ["err_pch_macro_def_undef"]={ [d]="err_pch_macro_def_undef", [e]="macro \'%0\' was %select{defined|undef\'d}1 in the precompiled header but %select{undef\'d|defined}1 on the command line", [i]={{nil,nil,{"macro \'A\' was ",{"defined","undef\'d"}," in the precompiled header but ",{"undef\'d","defined"}," on the command line"}}}, [j]=k, [c]="macro \'(.*?)\' was (?:defined|undef\'d) in the precompiled header but (?:undef\'d|defined) on the command line", [h]=a, [g]=P, [f]={"b63687519610",1351122110,"Teach the PCH validator to check the preprocessor options, especially","Teach the PCH validator to check the preprocessor options, especially\nthe macros that are #define\'d or #undef\'d on the command line. This\nchecking happens much earlier than the current macro-definition\nchecking and is far cleaner, because it does a direct comparison\nrather than a diff of the predefines buffers. Moreover, it allows us\nto use the result of this check to skip over PCH files within a\ndirectory that have non-matching -D\'s or -U\'s on the command\nline. Finally, it improves the diagnostics a bit for mismatches,\nfixing <rdar://problem/8612222>.\n\nThe old predefines-buffer diff\'ing will go away in a subsequent commit.\n\nllvm-svn: 166641"}, [b]={{D,680,"/// Check the preprocessor options deserialized from the control block\n/// against the preprocessor options in an existing preprocessor.\n///\n/// \\param Diags If non-null, produce diagnostics for any mismatches incurred.\n/// \\param Validation If set to OptionValidateNone, ignore differences in\n/// preprocessor options. If set to OptionValidateContradictions,\n/// require that options passed both in the AST file and on the command\n/// line (-D or -U) match, but tolerate options missing in one or the\n/// other. If set to OptionValidateContradictions, require that there\n/// are no differences in the options between the two.\nstatic bool checkPreprocessorOptions(const PreprocessorOptions &PPOpts, const PreprocessorOptions &ExistingPPOpts, DiagnosticsEngine *Diags, FileManager &FileMgr, std::string &SuggestedPredefines, const LangOptions &LangOpts, OptionValidation Validation = OptionValidateContradictions) {\n // ...\n for (unsigned I = 0, N = ExistingMacroNames.size(); I != N; ++I) {\n // ...\n if (Validation == OptionValidateNone || Known == ASTFileMacros.end()) {\n if (Validation == OptionValidateStrictMatches) {\n // If strict matches are requested, don\'t tolerate any extra defines on\n // the command line that are missing in the AST file.\n if (Diags) {\n Diags->Report(diag::err_pch_macro_def_undef) << MacroName << true;"},{D,706,"/// Check the preprocessor options deserialized from the control block\n/// against the preprocessor options in an existing preprocessor.\n///\n/// \\param Diags If non-null, produce diagnostics for any mismatches incurred.\n/// \\param Validation If set to OptionValidateNone, ignore differences in\n/// preprocessor options. If set to OptionValidateContradictions,\n/// require that options passed both in the AST file and on the command\n/// line (-D or -U) match, but tolerate options missing in one or the\n/// other. If set to OptionValidateContradictions, require that there\n/// are no differences in the options between the two.\nstatic bool checkPreprocessorOptions(const PreprocessorOptions &PPOpts, const PreprocessorOptions &ExistingPPOpts, DiagnosticsEngine *Diags, FileManager &FileMgr, std::string &SuggestedPredefines, const LangOptions &LangOpts, OptionValidation Validation = OptionValidateContradictions) {\n // ...\n for (unsigned I = 0, N = ExistingMacroNames.size(); I != N; ++I) {\n // ...\n // If the macro was defined in one but undef\'d in the other, we have a\n // conflict.\n if (Existing.second != Known->second.second) {\n if (Diags) {\n Diags->Report(diag::err_pch_macro_def_undef) << MacroName << Known->second.second;"},{D,735,"/// Check the preprocessor options deserialized from the control block\n/// against the preprocessor options in an existing preprocessor.\n///\n/// \\param Diags If non-null, produce diagnostics for any mismatches incurred.\n/// \\param Validation If set to OptionValidateNone, ignore differences in\n/// preprocessor options. If set to OptionValidateContradictions,\n/// require that options passed both in the AST file and on the command\n/// line (-D or -U) match, but tolerate options missing in one or the\n/// other. If set to OptionValidateContradictions, require that there\n/// are no differences in the options between the two.\nstatic bool checkPreprocessorOptions(const PreprocessorOptions &PPOpts, const PreprocessorOptions &ExistingPPOpts, DiagnosticsEngine *Diags, FileManager &FileMgr, std::string &SuggestedPredefines, const LangOptions &LangOpts, OptionValidation Validation = OptionValidateContradictions) {\n // ...\n if (Validation == OptionValidateStrictMatches) {\n // If strict matches are requested, don\'t tolerate any extra defines in\n // the AST file that are missing on the command line.\n for (const auto &MacroName : ASTFileMacros.keys()) {\n if (Diags) {\n Diags->Report(diag::err_pch_macro_def_undef) << MacroName << false;"}} }, ["err_pch_modulecache_mismatch"]={ [d]="err_pch_modulecache_mismatch", [e]="PCH was compiled with module cache path \'%0\', but the path is currently \'%1\'", [i]="PCH was compiled with module cache path \'A\', but the path is currently \'B\'", [j]=k, [c]="PCH was compiled with module cache path \'(.*?)\', but the path is currently \'(.*?)\'", [h]=a, [g]=P, [f]={"bd0b651bd249",1424376740,"[PCH/Modules] Check that the specific module cache path the PCH was built with, is the same as","[PCH/Modules] Check that the specific module cache path the PCH was built with, is the same as\nthe one in the current compiler invocation. If they differ reject the PCH.\n\nThis protects against the badness occurring from getting modules loaded from different module caches (see crashes).\n\nrdar://19889860\n\nllvm-svn: 229909"}, [b]={{D,833,"/// Check the header search options deserialized from the control block\n/// against the header search options in an existing preprocessor.\n///\n/// \\param Diags If non-null, produce diagnostics for any mismatches incurred.\nstatic bool checkHeaderSearchOptions(const HeaderSearchOptions &HSOpts, StringRef SpecificModuleCachePath, StringRef ExistingModuleCachePath, DiagnosticsEngine *Diags, const LangOptions &LangOpts, const PreprocessorOptions &PPOpts) {\n if (LangOpts.Modules) {\n if (SpecificModuleCachePath != ExistingModuleCachePath && !PPOpts.AllowPCHWithDifferentModulesCachePath) {\n if (Diags)\n Diags->Report(diag::err_pch_modulecache_mismatch) << SpecificModuleCachePath << ExistingModuleCachePath;"}} }, ["err_pch_pp_detailed_record"]={ [d]="err_pch_pp_detailed_record", [e]="%select{command line contains|precompiled header was built with}0 \'-detailed-preprocessing-record\' but %select{precompiled header was not built with it|it is not present on the command line}0", [i]={{nil,nil,{{"command line contains","precompiled header was built with"}," \'-detailed-preprocessing-record\' but ",{"precompiled header was not built with it","it is not present on the command line"}}}}, [j]=k, [c]="(?:command line contains|precompiled header was built with) \'\\-detailed\\-preprocessing\\-record\' but (?:precompiled header was not built with it|it is not present on the command line)", [h]=a, [g]=P, [f]={"d3afa0c7fbac",1367012020,"[PCH/modules] Require the preprocessing record option to match the used PCH, if modules are enabled.","[PCH/modules] Require the preprocessing record option to match the used PCH, if modules are enabled.\n\nThe preprocessing record becomes important when modules are enabled, since it is used to calculate the\nmodule cache hash.\n\nllvm-svn: 180635"}, [b]={{D,755,"/// Check the preprocessor options deserialized from the control block\n/// against the preprocessor options in an existing preprocessor.\n///\n/// \\param Diags If non-null, produce diagnostics for any mismatches incurred.\n/// \\param Validation If set to OptionValidateNone, ignore differences in\n/// preprocessor options. If set to OptionValidateContradictions,\n/// require that options passed both in the AST file and on the command\n/// line (-D or -U) match, but tolerate options missing in one or the\n/// other. If set to OptionValidateContradictions, require that there\n/// are no differences in the options between the two.\nstatic bool checkPreprocessorOptions(const PreprocessorOptions &PPOpts, const PreprocessorOptions &ExistingPPOpts, DiagnosticsEngine *Diags, FileManager &FileMgr, std::string &SuggestedPredefines, const LangOptions &LangOpts, OptionValidation Validation = OptionValidateContradictions) {\n // ...\n // Detailed record is important since it is used for the module cache hash.\n if (LangOpts.Modules && PPOpts.DetailedRecord != ExistingPPOpts.DetailedRecord && Validation != OptionValidateNone) {\n if (Diags) {\n Diags->Report(diag::err_pch_pp_detailed_record) << PPOpts.DetailedRecord;"}} }, ["err_pch_targetopt_feature_mismatch"]={ [d]="err_pch_targetopt_feature_mismatch", [e]={{nil,z,"%select{AST file was|current translation unit is}0 compiled with the target feature \'%1\' but the %select{current translation unit is|AST file was}0 not"},{F,nil,"%select{AST file|current translation unit}0 was compiled with the target feature\'%1\' but the %select{current translation unit is|AST file was}0 not"}}, [i]={{nil,z,{{"AST file was","current translation unit is"}," compiled with the target feature \'B\' but the ",{"current translation unit is","AST file was"}," not"}},{F,nil,{{"AST file","current translation unit"}," was compiled with the target feature\'B\' but the ",{"current translation unit is","AST file was"}," not"}}}, [j]=k, [c]="(?:AST file was|current translation unit is) compiled with the target feature \'(.*?)\' but the (?:current translation unit is|AST file was) not", [h]=a, [g]=P, [f]={"cb177f15e788",1350430858,"Serialize TargetOptions into an AST file, and make sure that we keep","Serialize TargetOptions into an AST file, and make sure that we keep\ntarget options around so they can be accessed at any point (rather\nthan keeping them transient).\n\nllvm-svn: 166072"}, [b]={{D,366,"#define SANITIZER(NAME, ID) \\\n { \\\n bool InExistingModule = ExistingSanitizers.has(SanitizerKind::ID); \\\n bool InImportedModule = ImportedSanitizers.has(SanitizerKind::ID); \\\n if (InExistingModule != InImportedModule) \\\n Diags->Report(diag::err_pch_targetopt_feature_mismatch) << InExistingModule << (Flag + NAME); \\"},{D,436,"/// Compare the given set of target options against an existing set of\n/// target options.\n///\n/// \\param Diags If non-NULL, diagnostics will be emitted via this engine.\n///\n/// \\returns true if the target options mis-match, false otherwise.\nstatic bool checkTargetOptions(const TargetOptions &TargetOpts, const TargetOptions &ExistingTargetOpts, DiagnosticsEngine *Diags, bool AllowCompatibleDifferences = true) {\n // ...\n if (Diags) {\n for (StringRef Feature : UnmatchedReadFeatures)\n Diags->Report(diag::err_pch_targetopt_feature_mismatch) << /* is-existing-feature */ false << Feature;"},{D,439,"/// Compare the given set of target options against an existing set of\n/// target options.\n///\n/// \\param Diags If non-NULL, diagnostics will be emitted via this engine.\n///\n/// \\returns true if the target options mis-match, false otherwise.\nstatic bool checkTargetOptions(const TargetOptions &TargetOpts, const TargetOptions &ExistingTargetOpts, DiagnosticsEngine *Diags, bool AllowCompatibleDifferences = true) {\n // ...\n if (Diags) {\n // ...\n for (StringRef Feature : UnmatchedExistingFeatures)\n Diags->Report(diag::err_pch_targetopt_feature_mismatch) << /* is-existing-feature */ true << Feature;"}} }, ["err_pch_targetopt_mismatch"]={ [d]="err_pch_targetopt_mismatch", [e]="PCH file was compiled for the %0 \'%1\' but the current translation unit is being compiled for target \'%2\'", [i]="PCH file was compiled for the A \'B\' but the current translation unit is being compiled for target \'C\'", [j]=k, [c]="PCH file was compiled for the (.*?) \'(.*?)\' but the current translation unit is being compiled for target \'(.*?)\'", [h]=a, [g]=P, [f]={"cb177f15e788",1350430858,"Serialize TargetOptions into an AST file, and make sure that we keep","Serialize TargetOptions into an AST file, and make sure that we keep\ntarget options around so they can be accessed at any point (rather\nthan keeping them transient).\n\nllvm-svn: 166072"}, [b]={{D,391,"#define CHECK_TARGET_OPT(Field, Name) \\\n if (TargetOpts.Field != ExistingTargetOpts.Field) { \\\n if (Diags) \\\n Diags->Report(diag::err_pch_targetopt_mismatch) << Name << TargetOpts.Field << ExistingTargetOpts.Field; \\"}} }, ["err_pch_undef"]={ [d]="err_pch_undef", [e]="%select{command line contains|precompiled header was built with}0 \'-undef\' but %select{precompiled header was not built with it|it is not present on the command line}0", [i]={{nil,nil,{{"command line contains","precompiled header was built with"}," \'-undef\' but ",{"precompiled header was not built with it","it is not present on the command line"}}}}, [j]=k, [c]="(?:command line contains|precompiled header was built with) \'\\-undef\' but (?:precompiled header was not built with it|it is not present on the command line)", [h]=a, [g]=P, [f]={"b63687519610",1351122110,"Teach the PCH validator to check the preprocessor options, especially","Teach the PCH validator to check the preprocessor options, especially\nthe macros that are #define\'d or #undef\'d on the command line. This\nchecking happens much earlier than the current macro-definition\nchecking and is far cleaner, because it does a direct comparison\nrather than a diff of the predefines buffers. Moreover, it allows us\nto use the result of this check to skip over PCH files within a\ndirectory that have non-matching -D\'s or -U\'s on the command\nline. Finally, it improves the diagnostics a bit for mismatches,\nfixing <rdar://problem/8612222>.\n\nThe old predefines-buffer diff\'ing will go away in a subsequent commit.\n\nllvm-svn: 166641"}, [b]={{D,745,"/// Check the preprocessor options deserialized from the control block\n/// against the preprocessor options in an existing preprocessor.\n///\n/// \\param Diags If non-null, produce diagnostics for any mismatches incurred.\n/// \\param Validation If set to OptionValidateNone, ignore differences in\n/// preprocessor options. If set to OptionValidateContradictions,\n/// require that options passed both in the AST file and on the command\n/// line (-D or -U) match, but tolerate options missing in one or the\n/// other. If set to OptionValidateContradictions, require that there\n/// are no differences in the options between the two.\nstatic bool checkPreprocessorOptions(const PreprocessorOptions &PPOpts, const PreprocessorOptions &ExistingPPOpts, DiagnosticsEngine *Diags, FileManager &FileMgr, std::string &SuggestedPredefines, const LangOptions &LangOpts, OptionValidation Validation = OptionValidateContradictions) {\n // ...\n // Check whether we\'re using predefines.\n if (PPOpts.UsePredefines != ExistingPPOpts.UsePredefines && Validation != OptionValidateNone) {\n if (Diags) {\n Diags->Report(diag::err_pch_undef) << ExistingPPOpts.UsePredefines;"}} }, ["err_pch_version_too_new"]={ [d]="err_pch_version_too_new", [e]="PCH file uses a newer PCH format that cannot be read", [i]="PCH file uses a newer PCH format that cannot be read", [j]=k, [c]="PCH file uses a newer PCH format that cannot be read", [h]=a, [g]=P, [f]={"2228cd3f070d",1392133209,"Rename some PCH-related errors to have \'err_\' as their prefix","Rename some PCH-related errors to have \'err_\' as their prefix\n\nllvm-svn: 201157"}, [b]={{D,2833,"ASTReader::ASTReadResult ASTReader::ReadControlBlock(ModuleFile &F, SmallVectorImpl<ImportedModule> &Loaded, const ModuleFile *ImportedBy, unsigned ClientLoadCapabilities) {\n // ...\n while (true) {\n // ...\n case METADATA: {\n if (Record[0] != VERSION_MAJOR && !DisableValidation) {\n if ((ClientLoadCapabilities & ARR_VersionMismatch) == 0)\n Diag(Record[0] < VERSION_MAJOR ? diag::err_pch_version_too_old : diag::err_pch_version_too_new);"}} }, ["err_pch_version_too_old"]={ [d]="err_pch_version_too_old", [e]="PCH file uses an older PCH format that is no longer supported", [i]="PCH file uses an older PCH format that is no longer supported", [j]=k, [c]="PCH file uses an older PCH format that is no longer supported", [h]=a, [g]=P, [f]={"2228cd3f070d",1392133209,"Rename some PCH-related errors to have \'err_\' as their prefix","Rename some PCH-related errors to have \'err_\' as their prefix\n\nllvm-svn: 201157"}, [b]={{D,2832,"ASTReader::ASTReadResult ASTReader::ReadControlBlock(ModuleFile &F, SmallVectorImpl<ImportedModule> &Loaded, const ModuleFile *ImportedBy, unsigned ClientLoadCapabilities) {\n // ...\n while (true) {\n // ...\n case METADATA: {\n if (Record[0] != VERSION_MAJOR && !DisableValidation) {\n if ((ClientLoadCapabilities & ARR_VersionMismatch) == 0)\n Diag(Record[0] < VERSION_MAJOR ? diag::err_pch_version_too_old : diag::err_pch_version_too_new);"},{D,4701,"ASTReader::ASTReadResult ASTReader::ReadASTCore(StringRef FileName, ModuleKind Type, SourceLocation ImportLoc, ModuleFile *ImportedBy, SmallVectorImpl<ImportedModule> &Loaded, off_t ExpectedSize, time_t ExpectedModTime, ASTFileSignature ExpectedSignature, unsigned ClientLoadCapabilities) {\n // ...\n while (true) {\n // ...\n case AST_BLOCK_ID:\n if (!HaveReadControlBlock) {\n if ((ClientLoadCapabilities & ARR_VersionMismatch) == 0)\n Diag(diag::err_pch_version_too_old);"}} }, ["err_pch_with_compiler_errors"]={ [d]="err_pch_with_compiler_errors", [e]="PCH file contains compiler errors", [i]="PCH file contains compiler errors", [j]=k, [c]="PCH file contains compiler errors", [h]=a, [g]=P, [f]={"4a280ff48fd6",1331085077,"[PCH] Mark a PCH file with a flag to indicate if the serialized AST had","[PCH] Mark a PCH file with a flag to indicate if the serialized AST had\ncompiler errors or not.\n\n-Control whether ASTReader should reject such a PCH by a boolean flag at ASTReader\'s creation time.\nBy default, such a PCH file will be rejected with an error when trying to load it.\n\n[libclang] Allow clang_saveTranslationUnit to create a PCH file even if compiler errors\noccurred.\n-Have libclang API calls accept a PCH that had compiler errors.\n\nThe general idea is that we want libclang to stay functional even if a PCH had a compiler error.\nrdar://10976363.\n\nllvm-svn: 152192"}, [b]={{D,2846,"ASTReader::ASTReadResult ASTReader::ReadControlBlock(ModuleFile &F, SmallVectorImpl<ImportedModule> &Loaded, const ModuleFile *ImportedBy, unsigned ClientLoadCapabilities) {\n // ...\n while (true) {\n // ...\n case METADATA: {\n // ...\n if (hasErrors && !DisableValidation) {\n // ...\n if (!AllowASTWithCompilerErrors) {\n Diag(diag::err_pch_with_compiler_errors);"}}, [l]={ ["clang/test/Modules/load-module-with-errors.m"]={"clang/test/Modules/load-module-with-errors.m:5:2: error: PCH file contains compiler errors"} } }, ["err_placeholder_constraints_not_satisfied"]={ [d]={{nil,w,"err_placeholder_constraints_not_satisfied"}}, [e]={{nil,w,"deduced type %0 does not satisfy %1"}}, [i]={{nil,w,"deduced type A does not satisfy B"}}, [j]=k, [c]="deduced type (.*?) does not satisfy (.*?)", [h]=a, [g]={{nil,w,m}}, [f]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk","Improve static checks for sprintf and __builtin___sprintf_chk\n\nImplement a pessimistic evaluator of the minimal required size for a buffer\nbased on the format string, and couple that with the fortified version to emit a\nwarning when the buffer size is lower than the lower bound computed from the\nformat string.\n\nDifferential Revision: https://reviews.llvm.org/D71566"}, [b]={{"clang/lib/Sema/SemaTemplateDeduction.cpp",4733,"static bool CheckDeducedPlaceholderConstraints(Sema &S, const AutoType &Type, AutoTypeLoc TypeLoc, QualType Deduced) {\n // ...\n if (!Satisfaction.IsSatisfied) {\n // ...\n S.Diag(TypeLoc.getConceptNameLoc(), diag::err_placeholder_constraints_not_satisfied) << Deduced << Buf << TypeLoc.getLocalSourceRange();"}}, [l]={ ["clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp"]={"clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp:23:3: error: deduced type \'char\' does not satisfy \'Large\'","clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp:29:3: error: deduced type \'int\' does not satisfy \'LargerThan<10>\'","clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp:22:1: error: deduced type \'char\' does not satisfy \'Large\'","clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp:37:1: error: deduced type \'int\' does not satisfy \'LargerThan<4>\'"} } }, ["err_placeholder_expected_auto_or_decltype_auto"]={ [d]={{nil,w,"err_placeholder_expected_auto_or_decltype_auto"}}, [e]={{nil,w,"expected \'auto\' or \'decltype(auto)\' after concept name"}}, [i]={{nil,w,"expected \'auto\' or \'decltype(auto)\' after concept name"}}, [j]=k, [c]="expected \'auto\' or \'decltype\\(auto\\)\' after concept name", [h]=a, [g]={{nil,w,"Concepts Issue"}}, [f]={"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"}, [b]={{ib,3800,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::annot_template_id: {\n // ...\n if (TemplateId->Kind == TNK_Concept_template) {\n // ...\n // Any of the following tokens are likely the start of the user\n // forgetting \'auto\' or \'decltype(auto)\', so diagnose.\n // Note: if updating this list, please make sure we update\n // isCXXDeclarationSpecifier\'s check for IsPlaceholderSpecifier to have\n // a matching list.\n if (NextToken().isOneOf(tok::identifier, tok::kw_const, tok::kw_volatile, tok::kw_restrict, tok::amp, tok::ampamp)) {\n Diag(Loc, diag::err_placeholder_expected_auto_or_decltype_auto) << FixItHint::CreateInsertion(NextToken().getLocation(), \"auto\");"},{ib,3824,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::annot_template_id: {\n // ...\n if (TemplateId->Kind == TNK_Concept_template) {\n // ...\n if (TryConsumeToken(tok::kw_decltype)) {\n // ...\n if (Tracker.consumeOpen()) {\n // ...\n } else {\n if (!TryConsumeToken(tok::kw_auto)) {\n // ...\n Diag(Tok, diag::err_placeholder_expected_auto_or_decltype_auto) << FixItHint::CreateReplacement(SourceRange(AutoLoc, Tok.getLocation()), \"auto\");"}}, [l]={ ["clang/test/Parser/cxx2a-placeholder-type-constraint.cpp"]={"clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:30:4: error: expected \'auto\' or \'decltype(auto)\' after concept name","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:32:4: error: expected \'auto\' or \'decltype(auto)\' after concept name","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:34:4: error: expected \'auto\' or \'decltype(auto)\' after concept name","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:36:4: error: expected \'auto\' or \'decltype(auto)\' after concept name","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:40:18: error: expected \'auto\' or \'decltype(auto)\' after concept name","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:45:11: error: expected \'auto\' or \'decltype(auto)\' after concept name","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:48:17: error: expected \'auto\' or \'decltype(auto)\' after concept name"} } }, ["err_placeholder_in_source"]={ [d]={{nil,q,"err_placeholder_in_source"}}, [e]={{nil,q,"editor placeholder in source file"}}, [i]={{nil,q,"editor placeholder in source file"}}, [j]=k, [c]="editor placeholder in source file", [h]=a, [g]={{nil,q,x}}, [f]={"1be800c511c8",1492592336,"Add support for editor placeholders to Clang","Add support for editor placeholders to Clang\n\nThis commit teaches Clang to recognize editor placeholders that are produced\nwhen an IDE like Xcode inserts a code-completion result that includes a\nplaceholder. Now when the lexer sees a placeholder token, it emits an\n\'editor placeholder in source file\' error and creates an identifier token\nthat represents the placeholder. The parser/sema can now recognize the\nplaceholders and can suppress the diagnostics related to the placeholders. This\nensures that live issues in an IDE like Xcode won\'t get spurious diagnostics\nrelated to placeholders.\n\nThis commit also adds a new compiler option named \'-fallow-editor-placeholders\'\nthat silences the \'editor placeholder in source file\' error. This is useful\nfor an IDE like Xcode as we don\'t want to display those errors in live issues.\n\nrdar://31581400\n\nDifferential Revision: https://reviews.llvm.org/D32081\n\nllvm-svn: 300667"}, [b]={{"clang/lib/Lex/Lexer.cpp",3241,"bool Lexer::lexEditorPlaceholder(Token &Result, const char *CurPtr) {\n // ...\n if (!LangOpts.AllowEditorPlaceholders)\n Diag(Start, diag::err_placeholder_in_source);"}}, [l]={ ["clang/test/Frontend/pp-only-no-editor-placeholders.c"]={"clang/test/Frontend/pp-only-no-editor-placeholders.c:4:1: error: editor placeholder in source file"} } }, ["err_placement_new_non_placement_delete"]={ [d]="err_placement_new_non_placement_delete", [e]="\'new\' expression with placement arguments refers to non-placement \'operator delete\'", [i]="\'new\' expression with placement arguments refers to non-placement \'operator delete\'", [j]=k, [c]="\'new\' expression with placement arguments refers to non\\-placement \'operator delete\'", [h]=a, [g]=m, [f]={"6642ca217e73",1267160778,"Implement semantic analysis for C++ [expr.new]p18-20, which describe","Implement semantic analysis for C++ [expr.new]p18-20, which describe\nhow we find the operator delete that matches withe operator new we\nfound in a C++ new-expression.\n\nThis will also need CodeGen support. On a happy note, we\'re now a\n\"nans\" away from building tramp3d-v4.\n\nllvm-svn: 97209"}, [b]={{N,2926,"bool Sema::FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range, AllocationFunctionScope NewScope, AllocationFunctionScope DeleteScope, QualType AllocType, bool IsArray, bool &PassAlignment, MultiExprArg PlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete, bool Diagnose) {\n // ...\n // C++ [expr.new]p20:\n // [...] If the lookup finds a single matching deallocation\n // function, that function will be called; otherwise, no\n // deallocation function will be called.\n if (Matches.size() == 1) {\n // ...\n // C++1z [expr.new]p23:\n // If the lookup finds a usual deallocation function (3.7.4.2)\n // with a parameter of type std::size_t and that function, considered\n // as a placement deallocation function, would have been\n // selected as a match for the allocation function, the program\n // is ill-formed.\n if (getLangOpts().CPlusPlus11 && isPlacementNew && isNonPlacementDeallocationFunction(*this, OperatorDelete)) {\n // ...\n if (IsSizedDelete) {\n // ...\n Diag(StartLoc, diag::err_placement_new_non_placement_delete) << R;"}}, [l]={ ["clang/test/SemaCXX/cxx1y-sized-deallocation.cpp"]={"clang/test/SemaCXX/cxx1y-sized-deallocation.cpp:18:3: error: \'new\' expression with placement arguments refers to non-placement \'operator delete\'"} } }, ["err_pointer_to_member_call_drops_quals"]={ [d]="err_pointer_to_member_call_drops_quals", [e]="call to pointer to member function of type %0 drops \'%1\' qualifier%s2", [i]="call to pointer to member function of type A drops \'B\' qualifierC", [j]=k, [c]="call to pointer to member function of type (.*?) drops \'(.*?)\' qualifier(.*?)", [h]=a, [g]=m, [f]={"125fa40c34a4",1296824269,"When calling a bound pointer to member function, check the","When calling a bound pointer to member function, check the\ncv-qualifiers on the object against the cv-qualifiers on the member\nfunction. Fixes PR8315.\n\nllvm-svn: 124865"}, [b]={{B,14691,"/// BuildCallToMemberFunction - Build a call to a member\n/// function. MemExpr is the expression that refers to the member\n/// function (and includes the object parameter), Args/NumArgs are the\n/// arguments to the function call (not including the object\n/// parameter). The caller needs to validate that the member\n/// expression refers to a non-static member function or an overloaded\n/// member function.\nExprResult Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n // Determine whether this is a call to a pointer-to-member function.\n if (BinaryOperator *op = dyn_cast<BinaryOperator>(NakedMemExpr)) {\n // ...\n if (difference) {\n // ...\n Diag(LParenLoc, diag::err_pointer_to_member_call_drops_quals) << fnType.getUnqualifiedType() << qualsString << (qualsString.find(\' \') == std::string::npos ? 1 : 2);"}}, [l]={ ["clang/test/CXX/expr/expr.mptr.oper/p5.cpp"]={"clang/test/CXX/expr/expr.mptr.oper/p5.cpp:27:12: error: call to pointer to member function of type \'void ()\' drops \'const\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:29:13: error: call to pointer to member function of type \'void () volatile\' drops \'const\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:32:12: error: call to pointer to member function of type \'void ()\' drops \'volatile\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:33:13: error: call to pointer to member function of type \'void () const\' drops \'volatile\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:37:13: error: call to pointer to member function of type \'void ()\' drops \'const volatile\' qualifiers","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:38:14: error: call to pointer to member function of type \'void () const\' drops \'volatile\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:39:14: error: call to pointer to member function of type \'void () volatile\' drops \'const\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:47:11: error: call to pointer to member function of type \'void ()\' drops \'const\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:49:12: error: call to pointer to member function of type \'void () volatile\' drops \'const\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:52:11: error: call to pointer to member function of type \'void ()\' drops \'volatile\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:53:12: error: call to pointer to member function of type \'void () const\' drops \'volatile\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:57:12: error: call to pointer to member function of type \'void ()\' drops \'const volatile\' qualifiers","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:58:13: error: call to pointer to member function of type \'void () const\' drops \'volatile\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:59:13: error: call to pointer to member function of type \'void () volatile\' drops \'const\' qualifier"} } }, ["err_pointer_to_member_oper_value_classify"]={ [d]="err_pointer_to_member_oper_value_classify", [e]="pointer-to-member function type %0 can only be called on an %select{rvalue|lvalue}1", [i]={{nil,nil,{"pointer-to-member function type A can only be called on an ",{"rvalue","lvalue"}}}}, [j]=k, [c]="pointer\\-to\\-member function type (.*?) can only be called on an (?:rvalue|lvalue)", [h]=a, [g]=m, [f]={"1d042091d39c",1296060018,"Reference qualifiers for *this: implement C++0x [expr.mptr.oper]p6,","Reference qualifiers for *this: implement C++0x [expr.mptr.oper]p6,\nthe restrictions on .* and ->* for ref-qualified pointer-to-member\nfunctions.\n\nllvm-svn: 124294"}, [b]={{N,6094,"QualType Sema::CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation Loc, bool isIndirect) {\n // ...\n // C++0x [expr.mptr.oper]p6:\n // In a .* expression whose object expression is an rvalue, the program is\n // ill-formed if the second operand is a pointer to member function with\n // ref-qualifier &. In a ->* expression or in a .* expression whose object\n // expression is an lvalue, the program is ill-formed if the second operand\n // is a pointer to member function with ref-qualifier &&.\n if (const FunctionProtoType *Proto = Result->getAs<FunctionProtoType>()) {\n // ...\n case RQ_LValue:\n if (!isIndirect && !LHS.get()->Classify(Context).isLValue()) {\n // C++2a allows functions with ref-qualifier & if their cv-qualifier-seq\n // is (exactly) \'const\'.\n if (Proto->isConst() && !Proto->isVolatile())\n // ...\n else\n Diag(Loc, diag::err_pointer_to_member_oper_value_classify) << RHSType << 1 << LHS.get()->getSourceRange();"},{N,6101,"QualType Sema::CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation Loc, bool isIndirect) {\n // ...\n // C++0x [expr.mptr.oper]p6:\n // In a .* expression whose object expression is an rvalue, the program is\n // ill-formed if the second operand is a pointer to member function with\n // ref-qualifier &. In a ->* expression or in a .* expression whose object\n // expression is an lvalue, the program is ill-formed if the second operand\n // is a pointer to member function with ref-qualifier &&.\n if (const FunctionProtoType *Proto = Result->getAs<FunctionProtoType>()) {\n // ...\n case RQ_RValue:\n if (isIndirect || !LHS.get()->Classify(Context).isRValue())\n Diag(Loc, diag::err_pointer_to_member_oper_value_classify) << RHSType << 0 << LHS.get()->getSourceRange();"}}, [l]={ ["clang/test/SemaCXX/cxx2a-pointer-to-const-ref-member.cpp"]={"clang/test/SemaCXX/cxx2a-pointer-to-const-ref-member.cpp:14:7: error: pointer-to-member function type \'void (X::*)() &\' can only be called on an lvalue","clang/test/SemaCXX/cxx2a-pointer-to-const-ref-member.cpp:16:7: error: pointer-to-member function type \'void (X::*)() const volatile &\' can only be called on an lvalue"} } }, ["err_pointer_to_member_type"]={ [d]="err_pointer_to_member_type", [e]="invalid use of pointer to member type after %select{.*|->*}0", [i]={{nil,nil,{"invalid use of pointer to member type after ",{".*","->*"}}}}, [j]=k, [c]="invalid use of pointer to member type after (?:\\.\\*|\\-\\>\\*)", [h]=a, [g]=m, [f]={"9a14b84ac559",1256331699,"Diagnose misuse of \'.*\' and \'->*\' operators during parse","Diagnose misuse of \'.*\' and \'->*\' operators during parse\ninstead of crashing in code gen.\n\nllvm-svn: 84968"}, [b]={{N,6061,"QualType Sema::CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation Loc, bool isIndirect) {\n // ...\n if (isa<CXXScalarValueInitExpr>(RHS.get()->IgnoreParens())) {\n // ...\n Diag(Loc, diag::err_pointer_to_member_type) << isIndirect;"}}, [l]={ ["clang/test/SemaCXX/cxx-member-pointer-op.cpp"]={"clang/test/SemaCXX/cxx-member-pointer-op.cpp:11:4: error: invalid use of pointer to member type after ->*","clang/test/SemaCXX/cxx-member-pointer-op.cpp:13:5: error: invalid use of pointer to member type after .*","clang/test/SemaCXX/cxx-member-pointer-op.cpp:14:4: error: invalid use of pointer to member type after ->*","clang/test/SemaCXX/cxx-member-pointer-op.cpp:15:5: error: invalid use of pointer to member type after .*"} } }, ["err_postfix_after_unary_requires_parens"]={ [d]={{nil,p,"err_postfix_after_unary_requires_parens"}}, [e]={{nil,p,"expression cannot be followed by a postfix %0 operator; add parentheses"}}, [i]={{nil,p,"expression cannot be followed by a postfix A operator; add parentheses"}}, [j]=k, [c]="expression cannot be followed by a postfix (.*?) operator; add parentheses", [h]=a, [g]={{nil,p,K}}, [f]={"4d1b7e9820ee",1593465134,"Fix a few cases that were incorrectly parsed as unary-expressions","Fix a few cases that were incorrectly parsed as unary-expressions\ninstead of postfix-expressions, and improve error recovery for postfix\noperators after unary-expressions.\n\nThis covers nullptr, __null, and some calls to type traits with special\nparsing rules. We would previously not parse a postfix-expression suffix\nfor these expressions, so would reject expressions such as\n__is_trivial(int)[\"foo\"].\n\nFor the case where a postfix-expression suffix is *not* permitted after\na unary-expression (for example, after a new-expression or sizeof\nexpression), produce a diagnostic if one appears there anyway. That\'s\nalways ill-formed, but previously produced very bad diagnostics."}, [b]={{"clang/lib/Parse/ParseExpr.cpp",1844,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n if (!AllowSuffix) {\n // ...\n Diag(Tok.getLocation(), diag::err_postfix_after_unary_requires_parens) << Tok.getKind() << Res.get()->getSourceRange() << FixItHint::CreateInsertion(Res.get()->getBeginLoc(), \"(\") << FixItHint::CreateInsertion(PP.getLocForEndOfToken(PrevTokLocation), \")\");"}}, [l]={ ["clang/test/Parser/expressions.cpp"]={"clang/test/Parser/expressions.cpp:9:17: error: expression cannot be followed by a postfix \'->\' operator; add parentheses","clang/test/Parser/expressions.cpp:12:31: error: expression cannot be followed by a postfix \'(\' operator; add parentheses","clang/test/Parser/expressions.cpp:14:23: error: expression cannot be followed by a postfix \'[\' operator; add parentheses","clang/test/Parser/expressions.cpp:15:24: error: expression cannot be followed by a postfix \'[\' operator; add parentheses","clang/test/Parser/expressions.cpp:16:23: error: expression cannot be followed by a postfix \'[\' operator; add parentheses","clang/test/Parser/expressions.cpp:17:32: error: expression cannot be followed by a postfix \'[\' operator; add parentheses","clang/test/Parser/expressions.cpp:21:19: error: expression cannot be followed by a postfix \'->\' operator; add parentheses"} } }, ["err_pp_arc_cf_code_audited_syntax"]={ [d]="err_pp_arc_cf_code_audited_syntax", [e]=jb, [i]=jb, [j]=k, [c]=jb, [h]=a, [g]=x, [f]={"32f5fe1467c4",1317359532,"Add explicit attributes to mark functions as having had their","Add explicit attributes to mark functions as having had their\nCoreFoundation object-transfer properties audited, and add a #pragma\nto cause them to be automatically applied to functions in a particular\nspan of code. This has to be implemented largely in the preprocessor\nbecause of the requirement that the region be entirely contained in\na single file; that\'s hard to impose from the parser without registering\nfor a ton of callbacks.\n\nllvm-svn: 140846"}, [b]={{T,1881,"/// PragmaARCCFCodeAuditedHandler -\n/// \\#pragma clang arc_cf_code_audited begin/end\nstruct PragmaARCCFCodeAuditedHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (BeginEnd && BeginEnd->isStr(\"begin\")) {\n // ...\n } else if (BeginEnd && BeginEnd->isStr(\"end\")) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::err_pp_arc_cf_code_audited_syntax);"}} }, ["err_pp_assume_nonnull_syntax"]={ [d]="err_pp_assume_nonnull_syntax", [e]=jb, [i]=jb, [j]=k, [c]=jb, [h]=a, [g]="Nullability Issue", [f]={"2a20bd1a9457",1434738357,"Introduced pragmas for audited nullability regions.","Introduced pragmas for audited nullability regions.\n\nIntroduce the clang pragmas \"assume_nonnull begin\" and \"assume_nonnull\nend\" in which we make default assumptions about the nullability of many\nunannotated pointers:\n\n - Single-level pointers are inferred to __nonnull\n - NSError** in a (function or method) parameter list is inferred to\n NSError * __nullable * __nullable.\n - CFErrorRef * in a (function or method) parameter list is inferred\n to CFErrorRef __nullable * __nullable.\n - Other multi-level pointers are never inferred to anything.\n\nImplements rdar://problem/19191042.\n\nllvm-svn: 240156"}, [b]={{T,1936,"/// PragmaAssumeNonNullHandler -\n/// \\#pragma clang assume_nonnull begin/end\nstruct PragmaAssumeNonNullHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (BeginEnd && BeginEnd->isStr(\"begin\")) {\n // ...\n } else if (BeginEnd && BeginEnd->isStr(\"end\")) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::err_pp_assume_nonnull_syntax);"}}, [l]={ ["clang/test/Sema/pragma-arc-cf-code-audited.c"]={"clang/test/Sema/pragma-arc-cf-code-audited.c:3:35: error: expected \'begin\' or \'end\'"} } }, ["err_pp_bad_paste"]={ [d]="err_pp_bad_paste", [e]="pasting formed \'%0\', an invalid preprocessing token", [i]="pasting formed \'A\', an invalid preprocessing token", [j]=k, [c]="pasting formed \'(.*?)\', an invalid preprocessing token", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{"clang/lib/Lex/TokenLexer.cpp",870,"/// LHSTok is the LHS of a ## operator, and CurTokenIdx is the ##\n/// operator. Read the ## and RHS, and paste the LHS/RHS together. If there\n/// are more ## after it, chomp them iteratively. Return the result as LHSTok.\n/// If this returns true, the caller should immediately return the token.\nbool TokenLexer::pasteTokens(Token &LHSTok, ArrayRef<Token> TokenStream, unsigned int &CurIdx) {\n // ...\n do {\n // ...\n if (LHSTok.isAnyIdentifier() && RHS.isAnyIdentifier()) {\n // ...\n } else {\n // ...\n // If pasting the two tokens didn\'t form a full new token, this is an\n // error. This occurs with \"x ## +\" and other stuff. Return with LHSTok\n // unmodified and with RHS as the next token to lex.\n if (isInvalid) {\n // ...\n // Do not emit the error when preprocessing assembler code.\n if (!PP.getLangOpts().AsmPreprocessor) {\n // ...\n PP.Diag(Loc, PP.getLangOpts().MicrosoftExt ? diag::ext_pp_bad_paste_ms : diag::err_pp_bad_paste) << Buffer;"}}, [l]={ ["clang/test/CXX/lex/lex.pptoken/p3-0x.cpp"]={"clang/test/CXX/lex/lex.pptoken/p3-0x.cpp:11:9: error: pasting formed \':::\', an invalid preprocessing token"} } }, ["err_pp_colon_without_question"]={ [d]="err_pp_colon_without_question", [e]="\':\' without preceding \'?\'", [i]="\':\' without preceding \'?\'", [j]=k, [c]="\'\\:\' without preceding \'\\?\'", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{R,851,"/// EvaluateDirectiveSubExpr - Evaluate the subexpression whose first token is\n/// PeekTok, and whose precedence is PeekPrec. This returns the result in LHS.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation, such as division by zero warnings.\nstatic bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, Token &PeekTok, bool ValueLive, bool &IncludedUndefinedIds, Preprocessor &PP) {\n // ...\n while (true) {\n // ...\n case tok::colon:\n // ...\n PP.Diag(OpLoc, diag::err_pp_colon_without_question) << LHS.getRange() << RHS.getRange();"}} }, ["err_pp_directive_required"]={ [d]="err_pp_directive_required", [e]="%0 must be used within a preprocessing directive", [i]="A must be used within a preprocessing directive", [j]=k, [c]="(.*?) must be used within a preprocessing directive", [h]=a, [g]=x, [f]={"6ce0000dd528",1358364741,"No longer crashing with an assert when __has_include or __has_include_next is used outside of a prep...","No longer crashing with an assert when __has_include or __has_include_next is used outside of a preprocessor directive. This fixes PR14837.\n\nllvm-svn: 172639"}, [b]={{S,1192,"/// EvaluateHasIncludeCommon - Process a \'__has_include(\"path\")\'\n/// or \'__has_include_next(\"path\")\' expression.\n/// Returns true if successful.\nstatic bool EvaluateHasIncludeCommon(Token &Tok, IdentifierInfo *II, Preprocessor &PP, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n // These expressions are only allowed within a preprocessor directive.\n if (!PP.isParsingIfOrElifDirective()) {\n PP.Diag(LParenLoc, diag::err_pp_directive_required) << II;"}}, [l]={ ["clang/test/Preprocessor/has_include.c"]={"clang/test/Preprocessor/has_include.c:96:3: error: \'__has_include_next\' must be used within a preprocessing directive","clang/test/Preprocessor/has_include.c:97:3: error: \'__has_include\' must be used within a preprocessing directive","clang/test/Preprocessor/has_include.c:100:1: error: \'__has_include\' must be used within a preprocessing directive","clang/test/Preprocessor/has_include.c:103:1: error: \'__has_include\' must be used within a preprocessing directive","clang/test/Preprocessor/has_include.c:108:1: error: \'__has_include\' must be used within a preprocessing directive","clang/test/Preprocessor/has_include.c:152:1: error: \'__has_include\' must be used within a preprocessing directive"} } }, ["err_pp_division_by_zero"]={ [d]="err_pp_division_by_zero", [e]="division by zero in preprocessor expression", [i]="division by zero in preprocessor expression", [j]=k, [c]="division by zero in preprocessor expression", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{R,721,"/// EvaluateDirectiveSubExpr - Evaluate the subexpression whose first token is\n/// PeekTok, and whose precedence is PeekPrec. This returns the result in LHS.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation, such as division by zero warnings.\nstatic bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, Token &PeekTok, bool ValueLive, bool &IncludedUndefinedIds, Preprocessor &PP) {\n // ...\n while (true) {\n // ...\n case tok::slash:\n if (RHS.Val != 0) {\n // ...\n } else if (ValueLive) {\n PP.Diag(OpLoc, diag::err_pp_division_by_zero) << LHS.getRange() << RHS.getRange();"}}, [l]={ ["clang/test/Preprocessor/ucn-pp-identifier.c"]={"clang/test/Preprocessor/ucn-pp-identifier.c:52:5: error: division by zero in preprocessor expression"} } }, ["err_pp_double_begin_of_arc_cf_code_audited"]={ [d]="err_pp_double_begin_of_arc_cf_code_audited", [e]="already inside \'#pragma clang arc_cf_code_audited\'", [i]="already inside \'#pragma clang arc_cf_code_audited\'", [j]=k, [c]="already inside \'\\#pragma clang arc_cf_code_audited\'", [h]=a, [g]=x, [f]={"32f5fe1467c4",1317359532,"Add explicit attributes to mark functions as having had their","Add explicit attributes to mark functions as having had their\nCoreFoundation object-transfer properties audited, and add a #pragma\nto cause them to be automatically applied to functions in a particular\nspan of code. This has to be implemented largely in the preprocessor\nbecause of the requirement that the region be entirely contained in\na single file; that\'s hard to impose from the parser without registering\nfor a ton of callbacks.\n\nllvm-svn: 140846"}, [b]={{T,1899,"/// PragmaARCCFCodeAuditedHandler -\n/// \\#pragma clang arc_cf_code_audited begin/end\nstruct PragmaARCCFCodeAuditedHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (IsBegin) {\n // Complain about attempts to re-enter an audit.\n if (BeginLoc.isValid()) {\n PP.Diag(Loc, diag::err_pp_double_begin_of_arc_cf_code_audited);"}}, [l]={ ["clang/test/Sema/pragma-arc-cf-code-audited.c"]={"clang/test/Sema/pragma-arc-cf-code-audited.c:11:15: error: already inside \'#pragma clang arc_cf_code_audited\'"} } }, ["err_pp_double_begin_of_assume_nonnull"]={ [d]="err_pp_double_begin_of_assume_nonnull", [e]="already inside \'#pragma clang assume_nonnull\'", [i]="already inside \'#pragma clang assume_nonnull\'", [j]=k, [c]="already inside \'\\#pragma clang assume_nonnull\'", [h]=a, [g]="Nullability Issue", [f]={"2a20bd1a9457",1434738357,"Introduced pragmas for audited nullability regions.","Introduced pragmas for audited nullability regions.\n\nIntroduce the clang pragmas \"assume_nonnull begin\" and \"assume_nonnull\nend\" in which we make default assumptions about the nullability of many\nunannotated pointers:\n\n - Single-level pointers are inferred to __nonnull\n - NSError** in a (function or method) parameter list is inferred to\n NSError * __nullable * __nullable.\n - CFErrorRef * in a (function or method) parameter list is inferred\n to CFErrorRef __nullable * __nullable.\n - Other multi-level pointers are never inferred to anything.\n\nImplements rdar://problem/19191042.\n\nllvm-svn: 240156"}, [b]={{T,1955,"/// PragmaAssumeNonNullHandler -\n/// \\#pragma clang assume_nonnull begin/end\nstruct PragmaAssumeNonNullHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (IsBegin) {\n // Complain about attempts to re-enter an audit.\n if (BeginLoc.isValid()) {\n PP.Diag(Loc, diag::err_pp_double_begin_of_assume_nonnull);"}}, [l]={ ["clang/test/SemaObjCXX/nullability-pragmas.mm"]={"clang/test/SemaObjCXX/Inputs/nullability-pragmas-2.h:8:15: error: already inside \'#pragma clang assume_nonnull\'"} } }, ["err_pp_double_begin_pragma_unsafe_buffer_usage"]={ [d]="err_pp_double_begin_pragma_unsafe_buffer_usage", [e]="already inside \'#pragma unsafe_buffer_usage\'", [i]="already inside \'#pragma unsafe_buffer_usage\'", [j]=k, [c]="already inside \'\\#pragma unsafe_buffer_usage\'", [h]=a, [g]=x, [f]={"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"}, [b]={{T,1266,"struct PragmaUnsafeBufferUsageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (II->isStr(\"begin\")) {\n if (PP.enterOrExitSafeBufferOptOutRegion(true, Loc))\n PP.Diag(Loc, diag::err_pp_double_begin_pragma_unsafe_buffer_usage);"}}, [l]={ ["clang/test/SemaCXX/warn-unsafe-buffer-usage-pragma-misuse.cpp"]={"clang/test/SemaCXX/warn-unsafe-buffer-usage-pragma-misuse.cpp:7:35: error: already inside \'#pragma unsafe_buffer_usage\'"} } }, ["err_pp_duplicate_name_in_arg_list"]={ [d]="err_pp_duplicate_name_in_arg_list", [e]="duplicate macro parameter name %0", [i]="duplicate macro parameter name A", [j]=k, [c]="duplicate macro parameter name (.*?)", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{I,2714,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n // ...\n while (true) {\n // ...\n default:\n // ...\n // If this is already used as a parameter, it is used multiple times (e.g.\n // #define X(A,A.\n if (llvm::is_contained(Parameters, II)) { // C99 6.10.3p6\n Diag(Tok, diag::err_pp_duplicate_name_in_arg_list) << II;"}} }, ["err_pp_empty_filename"]={ [d]="err_pp_empty_filename", [e]="empty filename", [i]="empty filename", [j]=k, [c]="empty filename", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{I,1798,"/// GetIncludeFilenameSpelling - Turn the specified lexer token into a fully\n/// checked and spelled filename, e.g. as an operand of \\#include. This returns\n/// true if the input filename was in <>\'s or false if it were in \"\"\'s. The\n/// caller is expected to provide a buffer that is large enough to hold the\n/// spelling of the filename, but is also expected to handle the case when\n/// this method decides to use a different buffer.\nbool Preprocessor::GetIncludeFilenameSpelling(SourceLocation Loc, StringRef &Buffer) {\n // ...\n // Diagnose #include \"\" as invalid.\n if (Buffer.size() <= 2) {\n Diag(Loc, diag::err_pp_empty_filename);"}}, [l]={ ["clang/test/Preprocessor/include-directive2.c"]={"clang/test/Preprocessor/include-directive2.c:17:10: error: empty filename"} } }, ["err_pp_endif_without_if"]={ [d]="err_pp_endif_without_if", [e]="#endif without #if", [i]="#endif without #if", [j]=k, [c]="\\#endif without \\#if", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{I,3383,"/// HandleEndifDirective - Implements the \\#endif directive.\n///\nvoid Preprocessor::HandleEndifDirective(Token &EndifToken) {\n // ...\n if (CurPPLexer->popConditionalLevel(CondInfo)) {\n // ...\n Diag(EndifToken, diag::err_pp_endif_without_if);"}}, [l]={ ["clang/test/Parser/diag-crash.c"]={"clang/test/Parser/diag-crash.c:6:2: error: #endif without #if"} } }, ["err_pp_eof_in_arc_cf_code_audited"]={ [d]="err_pp_eof_in_arc_cf_code_audited", [e]="\'#pragma clang arc_cf_code_audited\' was not ended within this file", [i]="\'#pragma clang arc_cf_code_audited\' was not ended within this file", [j]=k, [c]="\'\\#pragma clang arc_cf_code_audited\' was not ended within this file", [h]=a, [g]=x, [f]={"32f5fe1467c4",1317359532,"Add explicit attributes to mark functions as having had their","Add explicit attributes to mark functions as having had their\nCoreFoundation object-transfer properties audited, and add a #pragma\nto cause them to be automatically applied to functions in a particular\nspan of code. This has to be implemented largely in the preprocessor\nbecause of the requirement that the region be entirely contained in\na single file; that\'s hard to impose from the parser without registering\nfor a ton of callbacks.\n\nllvm-svn: 140846"}, [b]={{"clang/lib/Lex/PPLexerChange.cpp",418,"/// HandleEndOfFile - This callback is invoked when the lexer hits the end of\n/// the current file. This either returns the EOF token or pops a level off\n/// the include stack and keeps going.\nbool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {\n // ...\n // Complain about reaching a true EOF within arc_cf_code_audited.\n // We don\'t want to complain about reaching the end of a macro\n // instantiation or a _Pragma.\n if (PragmaARCCFCodeAuditedInfo.second.isValid() && !isEndOfMacro && !(CurLexer && CurLexer->Is_PragmaLexer)) {\n Diag(PragmaARCCFCodeAuditedInfo.second, diag::err_pp_eof_in_arc_cf_code_audited);"}}, [l]={ ["clang/test/Sema/pragma-arc-cf-code-audited.c"]={"clang/test/Sema/Inputs/pragma-arc-cf-code-audited.h:16:15: error: \'#pragma clang arc_cf_code_audited\' was not ended within this file","clang/test/Sema/pragma-arc-cf-code-audited.c:18:15: error: \'#pragma clang arc_cf_code_audited\' was not ended within this file"} } }, ["err_pp_eof_in_assume_nonnull"]={ [d]="err_pp_eof_in_assume_nonnull", [e]="\'#pragma clang assume_nonnull\' was not ended within this file", [i]="\'#pragma clang assume_nonnull\' was not ended within this file", [j]=k, [c]="\'\\#pragma clang assume_nonnull\' was not ended within this file", [h]=a, [g]="Nullability Issue", [f]={"2a20bd1a9457",1434738357,"Introduced pragmas for audited nullability regions.","Introduced pragmas for audited nullability regions.\n\nIntroduce the clang pragmas \"assume_nonnull begin\" and \"assume_nonnull\nend\" in which we make default assumptions about the nullability of many\nunannotated pointers:\n\n - Single-level pointers are inferred to __nonnull\n - NSError** in a (function or method) parameter list is inferred to\n NSError * __nullable * __nullable.\n - CFErrorRef * in a (function or method) parameter list is inferred\n to CFErrorRef __nullable * __nullable.\n - Other multi-level pointers are never inferred to anything.\n\nImplements rdar://problem/19191042.\n\nllvm-svn: 240156"}, [b]={{"clang/lib/Lex/PPLexerChange.cpp",435,"/// HandleEndOfFile - This callback is invoked when the lexer hits the end of\n/// the current file. This either returns the EOF token or pops a level off\n/// the include stack and keeps going.\nbool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {\n // ...\n // Complain about reaching a true EOF within assume_nonnull.\n // We don\'t want to complain about reaching the end of a macro\n // instantiation or a _Pragma.\n if (PragmaAssumeNonNullLoc.isValid() && !isEndOfMacro && !(CurLexer && CurLexer->Is_PragmaLexer)) {\n // If we\'re at the end of generating a preamble, we should record the\n // unterminated \\#pragma clang assume_nonnull so we can restore it later\n // when the preamble is loaded into the main file.\n if (isRecordingPreamble() && isInPrimaryFile())\n // ...\n else\n Diag(PragmaAssumeNonNullLoc, diag::err_pp_eof_in_assume_nonnull);"}}, [l]={ ["clang/test/SemaObjCXX/nullability-pragmas.mm"]={"clang/test/SemaObjCXX/Inputs/nullability-pragmas-2.h:11:15: error: \'#pragma clang assume_nonnull\' was not ended within this file"} } }, ["err_pp_error_opening_file"]={ [d]="err_pp_error_opening_file", [e]="error opening file \'%0\': %1", [i]="error opening file \'A\': B", [j]="fatal error\\: ", [c]="error opening file \'(.*?)\'\\: (.*?)", [h]=a, [g]=x, [f]={"710bb871478f",1259554724,"Fix PR5633 by making the preprocessor handle the case where we can","Fix PR5633 by making the preprocessor handle the case where we can\nstat a file but where mmaping it fails. In this case, we emit an\nerror like:\nt.c:1:10: fatal error: error opening file \'../../foo.h\'\n\ninstead of \"cannot find file\".\n\nllvm-svn: 90110"}, [b]={{"clang/lib/Lex/PPLexerChange.cpp",84,"/// EnterSourceFile - Add a source file to the top of the include stack and\n/// start lexing tokens from it instead of the current buffer.\nbool Preprocessor::EnterSourceFile(FileID FID, ConstSearchDirIterator CurDir, SourceLocation Loc, bool IsFirstIncludeOfFile) {\n // ...\n if (!InputFile) {\n // ...\n Diag(Loc, diag::err_pp_error_opening_file) << std::string(SourceMgr.getBufferName(FileStart)) << \"\";"}} }, ["err_pp_expected_after"]={ [d]="err_pp_expected_after", [e]="missing %1 after %0", [i]="missing B after A", [j]=k, [c]="missing (.*?) after (.*?)", [h]=a, [g]=x, [f]={"751d635a2adc",1388368769,"Cleanup: Switch the preprocessor to err_pp_expected_after","Cleanup: Switch the preprocessor to err_pp_expected_after\n\nThis is approaching consistency but the PP and Parse categories they still have\nslightly different wording:\n\ndef err_pp_expected_after : Error<\"missing %1 after %0\">;\ndef err_expected_after : Error<\"expected %1 after %0\">;\n\nllvm-svn: 198189"}, [b]={{I,3021,"MacroInfo *Preprocessor::ReadOptionalMacroParameterListAndBody(const Token &MacroNameTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n // Read the rest of the macro body.\n if (MI->isObjectLike()) {\n // ...\n } else {\n // ...\n if (VAOCtx.isInVAOpt()) {\n // ...\n Diag(Tok, diag::err_pp_expected_after) << LastTok.getKind() << tok::r_paren;"},{R,153,"/// EvaluateDefined - Process a \'defined(sym)\' expression.\nstatic bool EvaluateDefined(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n // If we are in parens, ensure we have a trailing ).\n if (LParenLoc.isValid()) {\n // ...\n if (PeekTok.isNot(tok::r_paren)) {\n PP.Diag(PeekTok.getLocation(), diag::err_pp_expected_after) << \"\'defined\'\" << tok::r_paren;"},{S,1209,"/// EvaluateHasIncludeCommon - Process a \'__has_include(\"path\")\'\n/// or \'__has_include_next(\"path\")\' expression.\n/// Returns true if successful.\nstatic bool EvaluateHasIncludeCommon(Token &Tok, IdentifierInfo *II, Preprocessor &PP, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n // Ensure we have a \'(\'.\n if (Tok.isNot(tok::l_paren)) {\n // ...\n PP.Diag(LParenLoc, diag::err_pp_expected_after) << II << tok::l_paren;"},{S,1240,"/// EvaluateHasIncludeCommon - Process a \'__has_include(\"path\")\'\n/// or \'__has_include_next(\"path\")\' expression.\n/// Returns true if successful.\nstatic bool EvaluateHasIncludeCommon(Token &Tok, IdentifierInfo *II, Preprocessor &PP, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n // Ensure we have a trailing ).\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(PP.getLocForEndOfToken(FilenameLoc), diag::err_pp_expected_after) << II << tok::r_paren;"},{S,1292,"/// Process single-argument builtin feature-like macros that return\n/// integer values.\nstatic void EvaluateFeatureLikeBuiltinMacro(llvm::raw_svector_ostream &OS, Token &Tok, IdentifierInfo *II, Preprocessor &PP, bool ExpandArgs, llvm::function_ref<int(Token &Tok, bool &HasLexedNextTok)> Op) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_pp_expected_after) << II << tok::l_paren;"},{S,1378,"/// Process single-argument builtin feature-like macros that return\n/// integer values.\nstatic void EvaluateFeatureLikeBuiltinMacro(llvm::raw_svector_ostream &OS, Token &Tok, IdentifierInfo *II, Preprocessor &PP, bool ExpandArgs, llvm::function_ref<int(Token &Tok, bool &HasLexedNextTok)> Op) {\n // ...\n already_lexed:\n // ...\n // Diagnose missing \')\'.\n if (!SuppressDiagnostic) {\n if (auto Diag = PP.Diag(Tok.getLocation(), diag::err_pp_expected_after)) {"},{S,1859,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n // ...\n } else if (II == Ident__is_identifier) {\n // ...\n } else if (II == Ident__has_attribute) {\n // ...\n } else if (II == Ident__has_declspec) {\n // ...\n } else if (II == Ident__has_cpp_attribute || II == Ident__has_c_attribute) {\n // ...\n } else if (II == Ident__has_include || II == Ident__has_include_next) {\n // ...\n } else if (II == Ident__has_warning) {\n // ...\n } else if (II == Ident__building_module) {\n // ...\n } else if (II == Ident__MODULE__) {\n // ...\n } else if (II == Ident__identifier) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n // ...\n Diag(getLocForEndOfToken(Loc), diag::err_pp_expected_after) << II << tok::l_paren;"},{S,1892,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n // ...\n } else if (II == Ident__is_identifier) {\n // ...\n } else if (II == Ident__has_attribute) {\n // ...\n } else if (II == Ident__has_declspec) {\n // ...\n } else if (II == Ident__has_cpp_attribute || II == Ident__has_c_attribute) {\n // ...\n } else if (II == Ident__has_include || II == Ident__has_include_next) {\n // ...\n } else if (II == Ident__has_warning) {\n // ...\n } else if (II == Ident__building_module) {\n // ...\n } else if (II == Ident__MODULE__) {\n // ...\n } else if (II == Ident__identifier) {\n // ...\n if (RParen.isNot(tok::r_paren)) {\n Diag(getLocForEndOfToken(Tok.getLocation()), diag::err_pp_expected_after) << Tok.getKind() << tok::r_paren;"}}, [l]={ ["clang/test/Preprocessor/has_attribute_errors.cpp"]={"clang/test/Preprocessor/has_attribute_errors.cpp:13:30: error: missing \')\' after <numeric_constant>"} } }, ["err_pp_expected_comma_in_arg_list"]={ [d]="err_pp_expected_comma_in_arg_list", [e]="expected comma in macro parameter list", [i]="expected comma in macro parameter list", [j]=k, [c]="expected comma in macro parameter list", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{I,2726,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n // ...\n while (true) {\n // ...\n default:\n // ...\n default: // #define X(A B\n Diag(Tok, diag::err_pp_expected_comma_in_arg_list);"}} }, ["err_pp_expected_eol"]={ [d]="err_pp_expected_eol", [e]="expected end of line in preprocessor expression", [i]="expected end of line in preprocessor expression", [j]=k, [c]="expected end of line in preprocessor expression", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{R,940,"/// EvaluateDirectiveExpression - Evaluate an integer constant expression that\n/// may occur after a #if or #elif directive. If the expression is equivalent\n/// to \"!defined(X)\" return X in IfNDefMacro.\nPreprocessor::DirectiveEvalResult Preprocessor::EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro) {\n // ...\n // If we aren\'t at the tok::eod token, something bad happened, like an extra\n // \')\' token.\n if (Tok.isNot(tok::eod)) {\n Diag(Tok, diag::err_pp_expected_eol);"}}, [l]={ ["clang/test/Preprocessor/has_include.c"]={"clang/test/Preprocessor/has_include.c:175:22: error: expected end of line in preprocessor expression"} } }, ["err_pp_expected_ident_in_arg_list"]={ [d]="err_pp_expected_ident_in_arg_list", [e]="expected identifier in macro parameter list", [i]="expected identifier in macro parameter list", [j]=k, [c]="expected identifier in macro parameter list", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{I,2674,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n // ...\n while (true) {\n // ...\n case tok::r_paren:\n // ...\n Diag(Tok, diag::err_pp_expected_ident_in_arg_list);"}} }, ["err_pp_expected_module_name"]={ [d]={{nil,q,"err_pp_expected_module_name"}}, [e]={{nil,q,"expected %select{identifier after \'.\' in |}0module name"}}, [i]={{nil,q,{"expected ",{"identifier after \'.\' in ",a},"module name"}}}, [j]=k, [c]="expected (?:identifier after \'\\.\' in |)module name", [h]=a, [g]={{nil,q,x}}, [f]={"d13863008b38",1493857794,"Add #pragma clang module begin/end pragmas and generate them when preprocessing a module.","Add #pragma clang module begin/end pragmas and generate them when preprocessing a module.\n\nThese pragmas are intended to simulate the effect of entering or leaving a file\nwith an associated module. This is not completely implemented yet: declarations\nbetween the pragmas will not be attributed to the correct module, but macro\nvisibility is already functional.\n\nModules named by #pragma clang module begin must already be known to clang (in\nsome module map that\'s either loaded or on the search path).\n\nllvm-svn: 302098"}, [b]={{T,786,"// Lex a component of a module name: either an identifier or a string literal;\n// for components that can be expressed both ways, the two forms are equivalent.\nstatic bool LexModuleNameComponent(Preprocessor &PP, Token &Tok, std::pair<IdentifierInfo *, SourceLocation> &ModuleNameComponent, bool First) {\n // ...\n if (Tok.is(tok::string_literal) && !Tok.hasUDSuffix()) {\n // ...\n } else if (!Tok.isAnnotation() && Tok.getIdentifierInfo()) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::err_pp_expected_module_name) << First;"}}, [l]={ ["clang/test/Preprocessor/pragma_module.c"]={"clang/test/Preprocessor/pragma_module.c:13:100: error: expected identifier after \'.\' in module name"} } }, ["err_pp_expected_rparen"]={ [d]="err_pp_expected_rparen", [e]="expected \')\' in preprocessor expression", [i]="expected \')\' in preprocessor expression", [j]=k, [c]="expected \'\\)\' in preprocessor expression", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{R,457,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n case tok::l_paren: {\n // ...\n // If this is a silly value like (X), which doesn\'t need parens, check for\n // !(defined X).\n if (PeekTok.is(tok::r_paren)) {\n // ...\n } else {\n // ...\n if (PeekTok.isNot(tok::r_paren)) {\n PP.Diag(PeekTok.getLocation(), diag::err_pp_expected_rparen) << Result.getRange();"}} }, ["err_pp_expected_value_in_expr"]={ [d]="err_pp_expected_value_in_expr", [e]="expected value in expression", [i]="expected value in expression", [j]=k, [c]="expected value in expression", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{R,291,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n case tok::eod:\n case tok::r_paren:\n // ...\n PP.Diag(PeekTok, diag::err_pp_expected_value_in_expr);"}}, [l]={ ["clang/test/Preprocessor/ifdef-recover.c"]={"clang/test/Preprocessor/ifdef-recover.c:19:8: error: expected value in expression"} } }, ["err_pp_expects_filename"]={ [d]="err_pp_expects_filename", [e]="expected \"FILENAME\" or <FILENAME>", [i]="expected \"FILENAME\" or <FILENAME>", [j]=k, [c]="expected \"FILENAME\" or \\<FILENAME\\>", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{I,1778,"/// GetIncludeFilenameSpelling - Turn the specified lexer token into a fully\n/// checked and spelled filename, e.g. as an operand of \\#include. This returns\n/// true if the input filename was in <>\'s or false if it were in \"\"\'s. The\n/// caller is expected to provide a buffer that is large enough to hold the\n/// spelling of the filename, but is also expected to handle the case when\n/// this method decides to use a different buffer.\nbool Preprocessor::GetIncludeFilenameSpelling(SourceLocation Loc, StringRef &Buffer) {\n // ...\n if (Buffer[0] == \'<\') {\n if (Buffer.back() != \'>\') {\n Diag(Loc, diag::err_pp_expects_filename);"},{I,1785,"/// GetIncludeFilenameSpelling - Turn the specified lexer token into a fully\n/// checked and spelled filename, e.g. as an operand of \\#include. This returns\n/// true if the input filename was in <>\'s or false if it were in \"\"\'s. The\n/// caller is expected to provide a buffer that is large enough to hold the\n/// spelling of the filename, but is also expected to handle the case when\n/// this method decides to use a different buffer.\nbool Preprocessor::GetIncludeFilenameSpelling(SourceLocation Loc, StringRef &Buffer) {\n // ...\n if (Buffer[0] == \'<\') {\n // ...\n } else if (Buffer[0] == \'\"\') {\n if (Buffer.back() != \'\"\') {\n Diag(Loc, diag::err_pp_expects_filename);"},{I,1791,"/// GetIncludeFilenameSpelling - Turn the specified lexer token into a fully\n/// checked and spelled filename, e.g. as an operand of \\#include. This returns\n/// true if the input filename was in <>\'s or false if it were in \"\"\'s. The\n/// caller is expected to provide a buffer that is large enough to hold the\n/// spelling of the filename, but is also expected to handle the case when\n/// this method decides to use a different buffer.\nbool Preprocessor::GetIncludeFilenameSpelling(SourceLocation Loc, StringRef &Buffer) {\n // ...\n if (Buffer[0] == \'<\') {\n // ...\n } else if (Buffer[0] == \'\"\') {\n // ...\n } else {\n Diag(Loc, diag::err_pp_expects_filename);"},{I,1971,"/// HandleIncludeDirective - The \"\\#include\" tokens have just been read, read\n/// the file to be included from the lexer, then include it! This is a common\n/// routine with functionality shared between \\#include, \\#include_next and\n/// \\#import. LookupFrom is set when this is a \\#include_next directive, it\n/// specifies the file to start searching from.\nvoid Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, Token &IncludeTok, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n if (FilenameTok.isNot(tok::header_name)) {\n Diag(FilenameTok.getLocation(), diag::err_pp_expects_filename);"},{S,1222,"/// EvaluateHasIncludeCommon - Process a \'__has_include(\"path\")\'\n/// or \'__has_include_next(\"path\")\' expression.\n/// Returns true if successful.\nstatic bool EvaluateHasIncludeCommon(Token &Tok, IdentifierInfo *II, Preprocessor &PP, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n if (Tok.isNot(tok::header_name)) {\n PP.Diag(Tok.getLocation(), diag::err_pp_expects_filename);"},{T,524,"/// HandlePragmaDependency - Handle \\#pragma GCC dependency \"foo\" blah.\nvoid Preprocessor::HandlePragmaDependency(Token &DependencyTok) {\n // ...\n // If the next token wasn\'t a header-name, diagnose the error.\n if (FilenameTok.isNot(tok::header_name)) {\n Diag(FilenameTok.getLocation(), diag::err_pp_expects_filename);"}}, [l]={ ["clang/test/Preprocessor/_Pragma-dependency.c"]={"clang/test/Preprocessor/_Pragma-dependency.c:7:24: error: expected \"FILENAME\" or <FILENAME>"} } }, ["err_pp_expr_bad_token_binop"]={ [d]="err_pp_expr_bad_token_binop", [e]="token is not a valid binary operator in a preprocessor subexpression", [i]="token is not a valid binary operator in a preprocessor subexpression", [j]=k, [c]="token is not a valid binary operator in a preprocessor subexpression", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{R,581,"static void diagnoseUnexpectedOperator(Preprocessor &PP, PPValue &LHS, Token &Tok) {\n if (Tok.is(tok::l_paren) && LHS.getIdentifier())\n // ...\n else\n PP.Diag(Tok.getLocation(), diag::err_pp_expr_bad_token_binop) << LHS.getRange();"}}, [l]={ ["clang/test/Preprocessor/disabled-cond-diags2.c"]={"clang/test/Preprocessor/disabled-cond-diags2.c:11:7: error: token is not a valid binary operator in a preprocessor subexpression"} } }, ["err_pp_expr_bad_token_lparen"]={ [d]="err_pp_expr_bad_token_lparen", [e]="function-like macro %0 is not defined", [i]="function-like macro A is not defined", [j]=k, [c]="function\\-like macro (.*?) is not defined", [h]=a, [g]=x, [f]={"4d247e7012ae",1460765229,"Improve diagnostic for the case when a non-defined function-like macro is used","Improve diagnostic for the case when a non-defined function-like macro is used\nin a preprocessor constant expression.\n\nllvm-svn: 266495"}, [b]={{R,578,"static void diagnoseUnexpectedOperator(Preprocessor &PP, PPValue &LHS, Token &Tok) {\n if (Tok.is(tok::l_paren) && LHS.getIdentifier())\n PP.Diag(LHS.getRange().getBegin(), diag::err_pp_expr_bad_token_lparen) << LHS.getIdentifier();"}}, [l]={ ["clang/test/Preprocessor/has_attribute.c"]={"clang/test/Preprocessor/has_attribute.c:57:5: error: function-like macro \'__has_cpp_attribute\' is not defined"} } }, ["err_pp_expr_bad_token_start_expr"]={ [d]="err_pp_expr_bad_token_start_expr", [e]="invalid token at start of a preprocessor expression", [i]="invalid token at start of a preprocessor expression", [j]=k, [c]="invalid token at start of a preprocessor expression", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{R,286,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n default:\n // ...\n PP.Diag(PeekTok, diag::err_pp_expr_bad_token_start_expr);"}}, [l]={ ["clang/test/Preprocessor/has_include.c"]={"clang/test/Preprocessor/has_include.c:140:19: error: invalid token at start of a preprocessor expression"} } }, ["err_pp_file_not_found"]={ [d]="err_pp_file_not_found", [e]="\'%0\' file not found", [i]="\'A\' file not found", [j]="fatal error\\: ", [c]="\'(.*?)\' file not found", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{I,2091,"OptionalFileEntryRef Preprocessor::LookupHeaderIncludeOrImport(ConstSearchDirIterator *CurDir, StringRef &Filename, SourceLocation FilenameLoc, CharSourceRange FilenameRange, const Token &FilenameTok, bool &IsFrameworkFound, bool IsImportDecl, bool &IsMapped, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile, StringRef &LookupFilename, SmallVectorImpl<char> &RelativePath, SmallVectorImpl<char> &SearchPath, ModuleMap::KnownHeader &SuggestedModule, bool isAngled) {\n // ...\n Diag(FilenameTok, diag::err_pp_file_not_found) << OriginalFilename << FilenameRange;"},{T,548,"/// HandlePragmaDependency - Handle \\#pragma GCC dependency \"foo\" blah.\nvoid Preprocessor::HandlePragmaDependency(Token &DependencyTok) {\n // ...\n if (!File) {\n if (!SuppressIncludeNotFoundError)\n Diag(FilenameTok, diag::err_pp_file_not_found) << Filename;"}}, [l]={ ["clang/test/SemaCXX/template-specialization-fatal.cpp"]={"clang/test/SemaCXX/template-specialization-fatal.cpp:5:10: fatal error: \'not_found.h\' file not found"} } }, ["err_pp_file_not_found_angled_include_not_fatal"]={ [d]={{nil,u,"err_pp_file_not_found_angled_include_not_fatal"}}, [e]={{nil,v,"\'%0\' file not found with <angled> %select{include|import}1; use \"quotes\" instead"},{u,u,"\'%0\' file not found with <angled> include; use \"quotes\" instead"}}, [i]={{nil,v,{"\'A\' file not found with <angled> ",{"include","import"},"; use \"quotes\" instead"}},{u,u,"\'A\' file not found with <angled> include; use \"quotes\" instead"}}, [j]=k, [c]="\'(.*?)\' file not found with \\<angled\\> (?:include|import); use \"quotes\" instead", [h]=a, [g]={{nil,u,x}}, [f]={"2ce63b424632",1536873008,"Diagnose likely typos in #include directives.","Diagnose likely typos in #include directives.\n\nSummary:\nWhen someone writes\n\n #include \"<some_file>\"\n\nor\n\n #include \" some_file \"\n\nthe compiler returns \"file not fuond...\" with fonts and quotes that may\nmake it hard to see there are excess quotes or surprising bytes in the\nfilename. Assuming that files are usually logically named and start and\nend with an alphanumeric character, we can check for the file\'s\nexistence by stripping the non-alphanumeric leading or trailing\ncharacters. If the file is found, emit a non-fatal error with a\nFixItHint.\n\nPatch by Christy Lee!\n\nReviewers: aaron.ballman, erikjv, rsmith\n\nReviewed By: rsmith\n\nSubscribers: lebedev.ri, xbolva00, sammccall, modocache, erikjv, aaron.ballman, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D51333\n\nllvm-svn: 342177"}, [b]={{I,2044,"OptionalFileEntryRef Preprocessor::LookupHeaderIncludeOrImport(ConstSearchDirIterator *CurDir, StringRef &Filename, SourceLocation FilenameLoc, CharSourceRange FilenameRange, const Token &FilenameTok, bool &IsFrameworkFound, bool IsImportDecl, bool &IsMapped, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile, StringRef &LookupFilename, SmallVectorImpl<char> &RelativePath, SmallVectorImpl<char> &SearchPath, ModuleMap::KnownHeader &SuggestedModule, bool isAngled) {\n // ...\n // If the file could not be located and it was included via angle\n // brackets, we can attempt a lookup as though it were a quoted path to\n // provide the user with a possible fixit.\n if (isAngled) {\n // ...\n if (File) {\n Diag(FilenameTok, diag::err_pp_file_not_found_angled_include_not_fatal) << Filename << IsImportDecl << FixItHint::CreateReplacement(FilenameRange, \"\\\"\" + Filename.str() + \"\\\"\");"}}, [l]={ ["clang/test/FixIt/fixit-include.c"]={"clang/test/FixIt/fixit-include.c:9:10: error: \'fixit-include.h\' file not found with <angled> include; use \"quotes\" instead"} } }, ["err_pp_file_not_found_typo_not_fatal"]={ [d]={{nil,u,"err_pp_file_not_found_typo_not_fatal"}}, [e]={{nil,u,"\'%0\' file not found, did you mean \'%1\'?"}}, [i]={{nil,u,"\'A\' file not found, did you mean \'B\'?"}}, [j]=k, [c]="\'(.*?)\' file not found, did you mean \'(.*?)\'\\?", [h]=a, [g]={{nil,u,x}}, [f]={"2ce63b424632",1536873008,"Diagnose likely typos in #include directives.","Diagnose likely typos in #include directives.\n\nSummary:\nWhen someone writes\n\n #include \"<some_file>\"\n\nor\n\n #include \" some_file \"\n\nthe compiler returns \"file not fuond...\" with fonts and quotes that may\nmake it hard to see there are excess quotes or surprising bytes in the\nfilename. Assuming that files are usually logically named and start and\nend with an alphanumeric character, we can check for the file\'s\nexistence by stripping the non-alphanumeric leading or trailing\ncharacters. If the file is found, emit a non-fatal error with a\nFixItHint.\n\nPatch by Christy Lee!\n\nReviewers: aaron.ballman, erikjv, rsmith\n\nReviewed By: rsmith\n\nSubscribers: lebedev.ri, xbolva00, sammccall, modocache, erikjv, aaron.ballman, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D51333\n\nllvm-svn: 342177"}, [b]={{I,2079,"OptionalFileEntryRef Preprocessor::LookupHeaderIncludeOrImport(ConstSearchDirIterator *CurDir, StringRef &Filename, SourceLocation FilenameLoc, CharSourceRange FilenameRange, const Token &FilenameTok, bool &IsFrameworkFound, bool IsImportDecl, bool &IsMapped, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile, StringRef &LookupFilename, SmallVectorImpl<char> &RelativePath, SmallVectorImpl<char> &SearchPath, ModuleMap::KnownHeader &SuggestedModule, bool isAngled) {\n // ...\n if (LangOpts.SpellChecking) {\n // ...\n if (File) {\n // ...\n Diag(FilenameTok, diag::err_pp_file_not_found_typo_not_fatal) << OriginalFilename << TypoCorrectionName << Hint;"}}, [l]={ ["clang/test/Preprocessor/include-likely-typo.c"]={"clang/test/Preprocessor/include-likely-typo.c:4:10: error: \'<empty_file_to_include.h>\' file not found, did you mean \'empty_file_to_include.h\'?"} } }, ["err_pp_identifier_arg_not_identifier"]={ [d]="err_pp_identifier_arg_not_identifier", [e]="cannot convert %0 token to an identifier", [i]="cannot convert A token to an identifier", [j]=k, [c]="cannot convert (.*?) token to an identifier", [h]=a, [g]=x, [f]={"ae385084c517",1394841968,"Implement the MS extension __identifier properly: take a token and strip it of","Implement the MS extension __identifier properly: take a token and strip it of\nits keywordliness.\n\nllvm-svn: 203987"}, [b]={{S,1881,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n // ...\n } else if (II == Ident__is_identifier) {\n // ...\n } else if (II == Ident__has_attribute) {\n // ...\n } else if (II == Ident__has_declspec) {\n // ...\n } else if (II == Ident__has_cpp_attribute || II == Ident__has_c_attribute) {\n // ...\n } else if (II == Ident__has_include || II == Ident__has_include_next) {\n // ...\n } else if (II == Ident__has_warning) {\n // ...\n } else if (II == Ident__building_module) {\n // ...\n } else if (II == Ident__MODULE__) {\n // ...\n } else if (II == Ident__identifier) {\n // ...\n if (!Tok.isAnnotation() && Tok.getIdentifierInfo())\n // ...\n else if (Tok.is(tok::string_literal) && !Tok.hasUDSuffix()) {\n // ...\n } else {\n Diag(Tok.getLocation(), diag::err_pp_identifier_arg_not_identifier) << Tok.getKind();"}}, [l]={ ["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:281:16: error: cannot convert \'(\' token to an identifier","clang/test/Parser/MicrosoftExtensions.cpp:283:16: error: cannot convert \')\' token to an identifier","clang/test/Parser/MicrosoftExtensions.cpp:285:16: error: cannot convert <numeric_constant> token to an identifier","clang/test/Parser/MicrosoftExtensions.cpp:286:16: error: cannot convert \'+\' token to an identifier","clang/test/Parser/MicrosoftExtensions.cpp:287:16: error: cannot convert \';\' token to an identifier"} } }, ["err_pp_illegal_floating_literal"]={ [d]="err_pp_illegal_floating_literal", [e]="floating point literal in preprocessor expression", [i]="floating point literal in preprocessor expression", [j]=k, [c]="floating point literal in preprocessor expression", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{R,308,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n case tok::numeric_constant: {\n // ...\n if (Literal.isFloatingLiteral() || Literal.isImaginary) {\n PP.Diag(PeekTok, diag::err_pp_illegal_floating_literal);"}} }, ["err_pp_import_directive_ms"]={ [d]="err_pp_import_directive_ms", [e]="#import of type library is an unsupported Microsoft feature", [i]="#import of type library is an unsupported Microsoft feature", [j]=k, [c]="\\#import of type library is an unsupported Microsoft feature", [h]=a, [g]=x, [f]={"0467f55d6283",1332040237,"Turns #import in MS Mode into an error.","Turns #import in MS Mode into an error.\n\nllvm-svn: 153009"}, [b]={{I,2609,"/// HandleMicrosoftImportDirective - Implements \\#import for Microsoft Mode\nvoid Preprocessor::HandleMicrosoftImportDirective(Token &Tok) {\n // ...\n Diag(Tok, diag::err_pp_import_directive_ms);"}}, [l]={ ["clang/test/Preprocessor/microsoft-import.c"]={"clang/test/Preprocessor/microsoft-import.c:3:2: error: #import of type library is an unsupported Microsoft feature","clang/test/Preprocessor/microsoft-import.c:6:2: error: #import of type library is an unsupported Microsoft feature","clang/test/Preprocessor/microsoft-import.c:8:2: error: #import of type library is an unsupported Microsoft feature"} } }, ["err_pp_include_in_arc_cf_code_audited"]={ [d]="err_pp_include_in_arc_cf_code_audited", [e]={{nil,v,"cannot %select{#include files|import headers}0 inside \'#pragma clang arc_cf_code_audited\'"},{u,nil,"cannot #include files inside \'#pragma clang arc_cf_code_audited\'"}}, [i]={{nil,v,{"cannot ",{"#include files","import headers"}," inside \'#pragma clang arc_cf_code_audited\'"}},{u,nil,"cannot #include files inside \'#pragma clang arc_cf_code_audited\'"}}, [j]=k, [c]="cannot (?:\\#include files|import headers) inside \'\\#pragma clang arc_cf_code_audited\'", [h]=a, [g]=x, [f]={"32f5fe1467c4",1317359532,"Add explicit attributes to mark functions as having had their","Add explicit attributes to mark functions as having had their\nCoreFoundation object-transfer properties audited, and add a #pragma\nto cause them to be automatically applied to functions in a particular\nspan of code. This has to be implemented largely in the preprocessor\nbecause of the requirement that the region be entirely contained in\na single file; that\'s hard to impose from the parser without registering\nfor a ton of callbacks.\n\nllvm-svn: 140846"}, [b]={{I,2145,"/// Handle either a #include-like directive or an import declaration that names\n/// a header file.\n///\n/// \\param HashLoc The location of the \'#\' token for an include, or\n/// SourceLocation() for an import declaration.\n/// \\param IncludeTok The include / include_next / import token.\n/// \\param FilenameTok The header-name token.\n/// \\param EndLoc The location at which any imported macros become visible.\n/// \\param LookupFrom For #include_next, the starting directory for the\n/// directory lookup.\n/// \\param LookupFromFile For #include_next, the starting file for the directory\n/// lookup.\nPreprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport(SourceLocation HashLoc, Token &IncludeTok, Token &FilenameTok, SourceLocation EndLoc, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n // Complain about attempts to #include files in an audit pragma.\n if (PragmaARCCFCodeAuditedInfo.second.isValid()) {\n Diag(StartLoc, diag::err_pp_include_in_arc_cf_code_audited) << IsImportDecl;"}}, [l]={ ["clang/test/Sema/pragma-arc-cf-code-audited.c"]={"clang/test/Sema/pragma-arc-cf-code-audited.c:13:1: error: cannot #include files inside \'#pragma clang arc_cf_code_audited\'"} } }, ["err_pp_include_in_assume_nonnull"]={ [d]="err_pp_include_in_assume_nonnull", [e]={{nil,v,"cannot %select{#include files|import headers}0 inside \'#pragma clang assume_nonnull\'"},{u,nil,"cannot #include files inside \'#pragma clang assume_nonnull\'"}}, [i]={{nil,v,{"cannot ",{"#include files","import headers"}," inside \'#pragma clang assume_nonnull\'"}},{u,nil,"cannot #include files inside \'#pragma clang assume_nonnull\'"}}, [j]=k, [c]="cannot (?:\\#include files|import headers) inside \'\\#pragma clang assume_nonnull\'", [h]=a, [g]="Nullability Issue", [f]={"2a20bd1a9457",1434738357,"Introduced pragmas for audited nullability regions.","Introduced pragmas for audited nullability regions.\n\nIntroduce the clang pragmas \"assume_nonnull begin\" and \"assume_nonnull\nend\" in which we make default assumptions about the nullability of many\nunannotated pointers:\n\n - Single-level pointers are inferred to __nonnull\n - NSError** in a (function or method) parameter list is inferred to\n NSError * __nullable * __nullable.\n - CFErrorRef * in a (function or method) parameter list is inferred\n to CFErrorRef __nullable * __nullable.\n - Other multi-level pointers are never inferred to anything.\n\nImplements rdar://problem/19191042.\n\nllvm-svn: 240156"}, [b]={{I,2154,"/// Handle either a #include-like directive or an import declaration that names\n/// a header file.\n///\n/// \\param HashLoc The location of the \'#\' token for an include, or\n/// SourceLocation() for an import declaration.\n/// \\param IncludeTok The include / include_next / import token.\n/// \\param FilenameTok The header-name token.\n/// \\param EndLoc The location at which any imported macros become visible.\n/// \\param LookupFrom For #include_next, the starting directory for the\n/// directory lookup.\n/// \\param LookupFromFile For #include_next, the starting file for the directory\n/// lookup.\nPreprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport(SourceLocation HashLoc, Token &IncludeTok, Token &FilenameTok, SourceLocation EndLoc, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n // Complain about attempts to #include files in an assume-nonnull pragma.\n if (PragmaAssumeNonNullLoc.isValid()) {\n Diag(StartLoc, diag::err_pp_include_in_assume_nonnull) << IsImportDecl;"}}, [l]={ ["clang/test/SemaObjCXX/nullability-pragmas.mm"]={"clang/test/SemaObjCXX/Inputs/nullability-pragmas-2.h:5:1: error: cannot #include files inside \'#pragma clang assume_nonnull\'"} } }, ["err_pp_include_too_deep"]={ [d]="err_pp_include_too_deep", [e]="#include nested too deeply", [i]="#include nested too deeply", [j]=k, [c]="\\#include nested too deeply", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{I,2525,"#endif\n // ...\n // Check that we don\'t have infinite #include recursion.\n if (IncludeMacroStack.size() == MaxAllowedIncludeStackDepth - 1) {\n Diag(FilenameTok, diag::err_pp_include_too_deep);"}} }, ["err_pp_including_mainfile_in_preamble"]={ [d]={{nil,v,"err_pp_including_mainfile_in_preamble"}}, [e]={{nil,v,"main file cannot be included recursively when building a preamble"}}, [i]={{nil,v,"main file cannot be included recursively when building a preamble"}}, [j]=k, [c]="main file cannot be included recursively when building a preamble", [h]=a, [g]={{nil,v,x}}, [f]={"3c28a2dc6bdc",1557483935,"[Preamble] Stop circular inclusion of main file when building preamble","[Preamble] Stop circular inclusion of main file when building preamble\n\nIf a header file was processed for the second time, we could end up with a\nwrong conditional stack and skipped ranges:\n\nIn the particular example, if the header guard is evaluated the second time and\nit is decided to skip the conditional block, the corresponding \"#endif\" is\nnever seen since the preamble does not include it and we end up in the\nTok.is(tok::eof) case with a wrong conditional stack.\n\nDetect the circular inclusion, emit a diagnostic and stop processing the\ninclusion.\n\nllvm-svn: 360418"}, [b]={{I,2371,"/// Handle either a #include-like directive or an import declaration that names\n/// a header file.\n///\n/// \\param HashLoc The location of the \'#\' token for an include, or\n/// SourceLocation() for an import declaration.\n/// \\param IncludeTok The include / include_next / import token.\n/// \\param FilenameTok The header-name token.\n/// \\param EndLoc The location at which any imported macros become visible.\n/// \\param LookupFrom For #include_next, the starting directory for the\n/// directory lookup.\n/// \\param LookupFromFile For #include_next, the starting file for the directory\n/// lookup.\nPreprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport(SourceLocation HashLoc, Token &IncludeTok, Token &FilenameTok, SourceLocation EndLoc, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n // Check for circular inclusion of the main file.\n // We can\'t generate a consistent preamble with regard to the conditional\n // stack if the main file is included again as due to the preamble bounds\n // some directives (e.g. #endif of a header guard) will never be seen.\n // Since this will lead to confusing errors, avoid the inclusion.\n if (Action == Enter && File && PreambleConditionalStack.isRecording() && SourceMgr.isMainFile(File->getFileEntry())) {\n Diag(FilenameTok.getLocation(), diag::err_pp_including_mainfile_in_preamble);"}} }, ["err_pp_invalid_directive"]={ [d]="err_pp_invalid_directive", [e]={{nil,J,"invalid preprocessing directive%select{|, did you mean \'#%1\'?}0"},{M,nil,"invalid preprocessing directive"}}, [i]={{nil,J,{"invalid preprocessing directive",{a,", did you mean \'#B\'?"}}},{M,nil,"invalid preprocessing directive"}}, [j]=k, [c]="invalid preprocessing directive(?:|, did you mean \'\\#(.*?)\'\\?)", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{I,1334,"/// HandleDirective - This callback is invoked when the lexer sees a # token\n/// at the start of a line. This consumes the directive, modifies the\n/// lexer/preprocessor state, and advances the lexer(s) so that the next token\n/// read is the correct one.\nvoid Preprocessor::HandleDirective(Token &Result) {\n // ...\n Diag(Result, diag::err_pp_invalid_directive) << 0;"}}, [l]={ ["clang/test/Preprocessor/disabled-cond-diags2.c"]={"clang/test/Preprocessor/disabled-cond-diags2.c:14:2: error: invalid preprocessing directive"} } }, ["err_pp_invalid_poison"]={ [d]="err_pp_invalid_poison", [e]="can only poison identifier tokens", [i]="can only poison identifier tokens", [j]=k, [c]="can only poison identifier tokens", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{T,461,"/// HandlePragmaPoison - Handle \\#pragma GCC poison. PoisonTok is the \'poison\'.\nvoid Preprocessor::HandlePragmaPoison() {\n // ...\n while (true) {\n // ...\n // Can only poison identifiers.\n if (Tok.isNot(tok::raw_identifier)) {\n Diag(Tok, diag::err_pp_invalid_poison);"}} }, ["err_pp_invalid_tok_in_arg_list"]={ [d]="err_pp_invalid_tok_in_arg_list", [e]="invalid token in macro parameter list", [i]="invalid token in macro parameter list", [j]=k, [c]="invalid token in macro parameter list", [h]=a, [g]=x, [f]={t,1236199783,r,s}, [b]={{I,2707,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n // ...\n while (true) {\n // ...\n default:\n // ...\n if (!II) {\n // ...\n Diag(Tok, diag::err_pp_invalid_tok_in_arg_list);"}} } };