Module:ClangDiags/DiagsLongData18
Jump to navigation
Jump to search
Documentation for this module may be created at Module:ClangDiags/DiagsLongData18/doc
local a="regex2"; local b="message_hist"; local c="regex3"; local d="commit"; local e="regex1"; local f="hierarchical_hist"; local g="source"; local h="id_hist"; local i="category_hist"; local j="(?:warning|error|fatal error)\\: "; local k="groups"; local l="maingroup"; local m="tests2"; local n="clang/lib/Parse/ParsePragma.cpp"; local o="Semantic Issue"; local p="9.0"; local q="ignored-pragmas"; local r="pragmas"; local s="11.0"; local t="Parse Issue"; local u="CL4"; local v="all"; local w="most"; local x="6.0"; local y=" \\[(?:\\-Werror,)?\\-Wignored\\-pragmas[^\\]]*\\]"; local z="7.0"; local A="10.0"; local B="Lexical or Preprocessor Issue"; local C="clang/lib/Lex/Pragma.cpp"; local D="openmp-clauses"; local E="clang/lib/Sema/SemaChecking.cpp"; local F="14.0"; local G="odr"; local H="13.0"; local I="clang/lib/Sema/SemaExpr.cpp"; local J="unknown-pragmas"; local K="8.0"; local L="clang/lib/Parse/ParseOpenMP.cpp"; local M="openmp"; local N="format"; local O="None"; local P="15.0"; local Q="clang/lib/Sema/SemaObjCProperty.cpp"; local R="12.0"; local S=" \\[(?:\\-Werror,)?\\-Wopenmp\\-clauses[^\\]]*\\]"; local T=""; local U=" \\[(?:\\-Werror,)?\\-Wodr[^\\]]*\\]"; local V="clang/lib/Sema/SemaDeclAttr.cpp"; local W="clang/lib/AST/ASTStructuralEquivalence.cpp"; local X="Format String Issue"; local Y="[ASTImporter] Make ODR error handling configurable\n\nSummary:\nODR errors are not necessarily true errors during the import of ASTs.\nASTMerge and CrossTU should use the warning equivalent of every CTU error,\nwhile Sema should emit errors as before.\n\nReviewers: martong, a_sidorin, shafik, a.sidorin\n\nReviewed By: a_sidorin\n\nSubscribers: rnkovacs, dkrupp, Szelethus, jdoerfert, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D58897\n\nPatch by Endre Fulop!\n\nllvm-svn: 357394"; local Z="[ASTImporter] Make ODR error handling configurable"; local ab="60768cd89672"; local bb=" \\[(?:\\-Werror,)?\\-Wunknown\\-pragmas[^\\]]*\\]"; local cb="ignored-attributes"; local db="clang/lib/Sema/SemaAttr.cpp"; local eb="clang/lib/Sema/SemaOpenMP.cpp"; local fb="OpenMP Issue"; local gb="5.0"; local hb="16.0"; local ib="clang/lib/Sema/SemaExprObjC.cpp"; local jb="clang/lib/AST/ASTImporter.cpp"; local kb="source-uses-openmp"; local lb=" \\[(?:\\-Werror,)?\\-Wformat[^\\]]*\\]"; local mb="clang/test/Preprocessor/pragma_microsoft.c"; local nb="clang/lib/Sema/SemaType.cpp"; local ob="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 pb="The basic representation of diagnostics information in tablegen format, plus (uncommented and incomp..."; local qb="b1c4d5507fad"; local rb="objc-designated-initializers"; local sb="1228d42ddab8"; local tb="[OpenMP][Part 2] Use reusable OpenMP context/traits handling"; local ub="[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"; local vb="clang/lib/Sema/SemaDeclObjC.cpp"; local wb="(?: \\[(?:\\-Werror)?[^\\]]*\\])?"; local xb="clang/lib/Sema/SemaDecl.cpp"; local yb="clang/test/OpenMP/declare_variant_messages.c"; local zb="7.1"; local Ab=" \\[(?:\\-Werror,)?\\-Wignored\\-attributes[^\\]]*\\]"; local Bb="deprecated"; local Cb="attributes"; local Db="95f50964fbf5"; local Eb="clang/lib/Lex/PPExpressions.cpp"; local Fb="Implement P2361 Unevaluated string literals\n\nThis patch proposes to handle in an uniform fashion\nthe parsing of strings that are never evaluated,\nin asm statement, static assert, attrributes, extern,\netc.\n\nUnevaluated strings are UTF-8 internally and so currently\nbehave as narrow strings, but these things will diverge with\nD93031.\n\nThe big question both for this patch and the P2361 paper\nis whether we risk breaking code by disallowing\nencoding prefixes in this context.\nI hope this patch may allow to gather some data on that.\n\nFuture work:\nImprove the rendering of unicode characters, line break\nand so forth in static-assert messages\n\nReviewed By: aaron.ballman, shafik\n\nDifferential Revision: https://reviews.llvm.org/D105759"; local Gb="Implement P2361 Unevaluated string literals"; local Hb="class"; local Ib="clang/test/Sema/format-strings.c"; local Jb="Nullability Issue"; local Kb="clang/lib/Sema/SemaStmt.cpp"; local Lb=" \\[(?:\\-Werror,)?\\-Wsource\\-uses\\-openmp[^\\]]*\\]"; local Mb="clang/lib/Sema/SemaCast.cpp"; local Nb="clang/lib/Sema/SemaDeclCXX.cpp"; local Ob="c3b18967ed07"; local Pb="clang/lib/Sema/SemaInit.cpp"; local Qb="clang/lib/Lex/PPDirectives.cpp"; local Rb="property-attribute-mismatch"; local Sb="clang/test/SemaObjC/attr-designated-init.m"; local Tb="clang/lib/Sema/AnalysisBasedWarnings.cpp"; local Ub=" \\[(?:\\-Werror,)?\\-Wobjc\\-designated\\-initializers[^\\]]*\\]"; local Vb="parentheses"; local Wb="padded"; local Xb="[MS-ABI] Add support for #pragma section and related pragmas"; local Yb="function"; local Zb="clang/test/Sema/pragma-section.c"; local ac="[MS-ABI] Add support for #pragma section and related pragmas\nThis patch adds support for the msvc pragmas section, bss_seg, code_seg, \nconst_seg and data_seg as well as support for __declspec(allocate()).\n\nAdditionally it corrects semantics and adds diagnostics for \n__attribute__((section())) and the interaction between the attribute \nand the msvc pragmas and declspec. In general conflicts should now be \nwell diganosed within and among these features.\n\nIn supporting the pragmas new machinery for uniform lexing for \nmsvc pragmas was introduced. The new machinery always lexes the \nentire pragma and stores it on an annotation token. The parser \nis responsible for parsing the pragma when the handling the \nannotation token.\n\nThere is a known outstanding bug in this implementation in C mode. \nBecause these attributes and pragmas apply _only_ to definitions, we \nprocess them at the time we detect a definition. Due to tentative \ndefinitions in C, we end up processing the definition late. This means \nthat in C mode, everything that ends up in a BSS section will end up in \nthe _last_ BSS section rather than the one that was live at the time of \ntentative definition, even if that turns out to be the point of actual \ndefinition. This issue is not known to impact anything as of yet \nbecause we are not aware of a clear use or use case for #pragma bss_seg \nbut should be fixed at some point.\n\nDifferential Revision=http://reviews.llvm.org/D3065#inline-16241 \n\nllvm-svn: 205810"; local bc="clang/lib/Lex/Preprocessor.cpp"; local cc="pointer"; local dc="has"; local ec="false"; local fc="openmp-target"; local gc="true"; local hc="Deprecations"; local ic="pragma-pack"; return { ["warn_namespace_member_extra_qualification"]={ [k]={"extra-qualification"}, [l]="extra-qualification", [h]="warn_namespace_member_extra_qualification", [b]="extra qualification on member %0", [f]="extra qualification on member A", [e]=j, [a]="extra qualification on member (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wextra\\-qualification[^\\]]*\\]", [i]=o, [d]={"a230224be492",1386229862,"Implement DR482: namespace members can be redeclared with a qualified name","Implement DR482: namespace members can be redeclared with a qualified name\nwithin their namespace, and such a redeclaration isn\'t required to be a\ndefinition any more.\n\nUpdate DR status page to say Clang 3.4 instead of SVN and add new Clang 3.5\ncategory (but keep Clang 3.4 yellow for now).\n\nllvm-svn: 196481"}, [g]={{xb,6181,"/// Diagnose a declaration whose declarator-id has the given\n/// nested-name-specifier.\n///\n/// \\param SS The nested-name-specifier of the declarator-id.\n///\n/// \\param DC The declaration context to which the nested-name-specifier\n/// resolves.\n///\n/// \\param Name The name of the entity being declared.\n///\n/// \\param Loc The location of the name of the entity being declared.\n///\n/// \\param IsTemplateId Whether the name is a (simple-)template-id, and thus\n/// we\'re declaring an explicit / partial specialization / instantiation.\n///\n/// \\returns true if we cannot safely recover from this error, false otherwise.\nbool Sema::diagnoseQualifiedDeclaration(CXXScopeSpec &SS, DeclContext *DC, DeclarationName Name, SourceLocation Loc, bool IsTemplateId) {\n // ...\n // If the user provided a superfluous scope specifier that refers back to the\n // class in which the entity is already declared, diagnose and ignore it.\n //\n // class X {\n // void X::f();\n // };\n //\n // Note, it was once ill-formed to give redundant qualification in all\n // contexts, but that rule was removed by DR482.\n if (Cur->Equals(DC)) {\n if (Cur->isRecord()) {\n // ...\n } else {\n Diag(Loc, diag::warn_namespace_member_extra_qualification) << Name;"}}, [m]={ ["clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:118:26: warning: extra qualification on member \'f_in_inline\' [-Wextra-qualification]","clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp:123:26: warning: extra qualification on member \'v_in_inline\' [-Wextra-qualification]"} } }, ["warn_neon_vector_initializer_non_portable"]={ [k]={"nonportable-vector-initialization"}, [l]="nonportable-vector-initialization", [h]="warn_neon_vector_initializer_non_portable", [b]="vector initializers are not compatible with NEON intrinsics in big endian mode", [f]="vector initializers are not compatible with NEON intrinsics in big endian mode", [e]=j, [a]="vector initializers are not compatible with NEON intrinsics in big endian mode", [c]=" \\[(?:\\-Werror,)?\\-Wnonportable\\-vector\\-initialization[^\\]]*\\]", [i]=o, [d]={"9eef2659bf60",1403274913,"The ability to use vector initializer lists is a GNU vector extension","The ability to use vector initializer lists is a GNU vector extension\nand is unrelated to the NEON intrinsics in arm_neon.h. On little\nendian machines it works fine, however on big endian machines it\nexhibits surprising behaviour:\n\n uint32x2_t x = {42, 64};\n return vget_lane_u32(x, 0); // Will return 64.\n\nBecause of this, explicitly call out that it is unsupported on big\nendian machines.\n\nThis patch will emit the following warning in big-endian mode:\n\n test.c:3:15: warning: vector initializers are a GNU extension and are not compatible with NEON intrinsics [-Wgnu]\n int32x4_t x = {0, 1, 2, 3};\n ^\n test.c:3:15: note: consider using vld1q_s32() to initialize a vector from memory, or vcombine_s32(vcreate_s32(), vcreate_s32()) to initialize from integer constants\n 1 warning generated.\n\nllvm-svn: 211362"}, [g]={{Pb,1848,"void InitListChecker::CheckVectorType(const InitializedEntity &Entity, InitListExpr *IList, QualType DeclType, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n // ...\n if (!SemaRef.getLangOpts().OpenCL && !SemaRef.getLangOpts().HLSL) {\n // ...\n if (isBigEndian && (T->getVectorKind() == VectorType::NeonVector || T->getVectorKind() == VectorType::NeonPolyVector)) {\n // ...\n SemaRef.Diag(IList->getBeginLoc(), diag::warn_neon_vector_initializer_non_portable);"}}, [m]={ ["clang/test/Sema/big-endian-neon-initializers.c"]={"clang/test/Sema/big-endian-neon-initializers.c:8:15: warning: vector initializers are not compatible with NEON intrinsics in big endian mode [-Wnonportable-vector-initialization]","clang/test/Sema/big-endian-neon-initializers.c:9:15: warning: vector initializers are not compatible with NEON intrinsics in big endian mode [-Wnonportable-vector-initialization]","clang/test/Sema/big-endian-neon-initializers.c:10:15: warning: vector initializers are not compatible with NEON intrinsics in big endian mode [-Wnonportable-vector-initialization]","clang/test/Sema/big-endian-neon-initializers.c:11:17: warning: vector initializers are not compatible with NEON intrinsics in big endian mode [-Wnonportable-vector-initialization]"} } }, ["warn_nested_block_comment"]={ [k]={u,v,"comment","comments",w}, [l]="comment", [h]="warn_nested_block_comment", [b]="\'/*\' within block comment", [f]="\'/*\' within block comment", [e]=j, [a]="\'\\/\\*\' within block comment", [c]=" \\[(?:\\-Werror,)?\\-Wcomment[^\\]]*\\]", [i]=B, [d]={qb,1236199783,pb,ob}, [g]={{"clang/lib/Lex/Lexer.cpp",2877,"#endif\n // ...\n FoundSlash:\n // ...\n if (CurPtr[0] == \'*\' && CurPtr[1] != \'/\') {\n // If this is a /* inside of the comment, emit a warning. Don\'t do this\n // if this is a /*/, which will end the comment. This misses cases with\n // embedded escaped newlines, but oh well.\n if (!isLexingRawMode())\n Diag(CurPtr - 1, diag::warn_nested_block_comment);"}}, [m]={ ["clang/test/Preprocessor/traditional-cpp.c"]={"clang/test/Preprocessor/traditional-cpp.c:12:15: warning: \'/*\' within block comment [-Wcomment]","clang/test/Preprocessor/traditional-cpp.c:13:25: warning: \'/*\' within block comment [-Wcomment]","clang/test/Preprocessor/traditional-cpp.c:87:20: warning: \'/*\' within block comment [-Wcomment]"} } }, ["warn_new_dangling_initializer_list"]={ [k]={"dangling","dangling-initializer-list"}, [l]="dangling-initializer-list", [h]={{nil,z,"warn_new_dangling_initializer_list"}}, [b]={{nil,z,"array backing %select{initializer list subobject of the allocated object|the allocated initializer list}0 will be destroyed at the end of the full-expression"}}, [f]={{nil,z,{"array backing ",{"initializer list subobject of the allocated object","the allocated initializer list"}," will be destroyed at the end of the full-expression"}}}, [e]=j, [a]="array backing (?:initializer list subobject of the allocated object|the allocated initializer list) will be destroyed at the end of the full\\-expression", [c]=" \\[(?:\\-Werror,)?\\-Wdangling\\-initializer\\-list[^\\]]*\\]", [i]={{nil,z,o}}, [d]={"0a9969b36b16",1531786301,"Restructure checking for, and warning on, lifetime extension.","Restructure checking for, and warning on, lifetime extension.\n\nThis change implements C++ DR1696, which makes initialization of a\nreference member of a class from a temporary object ill-formed. The\nstandard wording here is imprecise, but we interpret it as meaning that\nany time a mem-initializer would result in lifetime extension, the\nprogram is ill-formed.\n\nllvm-svn: 337226"}, [g]={{Pb,8243,"void Sema::checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init) {\n // ...\n auto TemporaryVisitor = [&](IndirectLocalPath &Path, Local L, ReferenceKind RK) -> bool {\n // ...\n case LK_New:\n if (isa<MaterializeTemporaryExpr>(L)) {\n if (IsGslPtrInitWithGslTempOwner)\n // ...\n else\n Diag(DiagLoc, RK == RK_ReferenceBinding ? diag::warn_new_dangling_reference : diag::warn_new_dangling_initializer_list) << !Entity.getParent() << DiagRange;"}}, [m]={ ["clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp:152:33: warning: array backing the allocated initializer list will be destroyed at the end of the full-expression [-Wdangling-initializer-list]"} } }, ["warn_new_dangling_reference"]={ [k]={"dangling","dangling-field"}, [l]="dangling-field", [h]={{nil,z,"warn_new_dangling_reference"}}, [b]={{nil,z,"temporary bound to reference member of allocated object will be destroyed at the end of the full-expression"}}, [f]={{nil,z,"temporary bound to reference member of allocated object will be destroyed at the end of the full-expression"}}, [e]=j, [a]="temporary bound to reference member of allocated object will be destroyed at the end of the full\\-expression", [c]=" \\[(?:\\-Werror,)?\\-Wdangling\\-field[^\\]]*\\]", [i]={{nil,z,o}}, [d]={"0a9969b36b16",1531786301,"Restructure checking for, and warning on, lifetime extension.","Restructure checking for, and warning on, lifetime extension.\n\nThis change implements C++ DR1696, which makes initialization of a\nreference member of a class from a temporary object ill-formed. The\nstandard wording here is imprecise, but we interpret it as meaning that\nany time a mem-initializer would result in lifetime extension, the\nprogram is ill-formed.\n\nllvm-svn: 337226"}, [g]={{Pb,8242,"void Sema::checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init) {\n // ...\n auto TemporaryVisitor = [&](IndirectLocalPath &Path, Local L, ReferenceKind RK) -> bool {\n // ...\n case LK_New:\n if (isa<MaterializeTemporaryExpr>(L)) {\n if (IsGslPtrInitWithGslTempOwner)\n // ...\n else\n Diag(DiagLoc, RK == RK_ReferenceBinding ? diag::warn_new_dangling_reference : diag::warn_new_dangling_initializer_list) << !Entity.getParent() << DiagRange;"}} }, ["warn_no_autosynthesis_property"]={ [k]={"objc-property-synthesis"}, [l]="objc-property-synthesis", [h]="warn_no_autosynthesis_property", [b]="auto property synthesis will not synthesize property %0 because it is \'readwrite\' but it will be synthesized \'readonly\' via another property", [f]="auto property synthesis will not synthesize property A because it is \'readwrite\' but it will be synthesized \'readonly\' via another property", [e]=j, [a]="auto property synthesis will not synthesize property (.*?) because it is \'readwrite\' but it will be synthesized \'readonly\' via another property", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-synthesis[^\\]]*\\]", [i]=o, [d]={"9d25a48b4131",1363117577,"Objective-C: Issue warning in couple of obscure cases","Objective-C: Issue warning in couple of obscure cases\nwhen property autosynthesis does not synthesize a property.\nWhen property is declared \'readonly\' in a super class and\nis redeclared \'readwrite\' in a subclass. When a property\nautosynthesis causes it to share \'ivar\' with another property.\n// rdar://13388503\n\nllvm-svn: 176889"}, [g]={{Q,1953,"/// Default synthesizes all properties which must be synthesized\n/// in class\'s \\@implementation.\nvoid Sema::DefaultSynthesizeProperties(Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl, SourceLocation AtEnd) {\n // ...\n for (const auto &PropEntry : PropMap) {\n // ...\n // If property to be implemented in the super class, ignore.\n if (PropInSuperClass) {\n if ((Prop->getPropertyAttributes() & ObjCPropertyAttribute::kind_readwrite) && (PropInSuperClass->getPropertyAttributes() & ObjCPropertyAttribute::kind_readonly) && !IMPDecl->getInstanceMethod(Prop->getSetterName()) && !IDecl->HasUserDeclaredSetterMethod(Prop)) {\n Diag(Prop->getLocation(), diag::warn_no_autosynthesis_property) << Prop->getIdentifier();"}}, [m]={ ["clang/test/SemaObjC/default-synthesize-3.m"]={"clang/test/SemaObjC/default-synthesize-3.m:66:28: warning: auto property synthesis will not synthesize property \'isFoo\' because it is \'readwrite\' but it will be synthesized \'readonly\' via another property [-Wobjc-property-synthesis]"} } }, ["warn_no_autosynthesis_shared_ivar_property"]={ [k]={"objc-property-synthesis"}, [l]="objc-property-synthesis", [h]="warn_no_autosynthesis_shared_ivar_property", [b]="auto property synthesis will not synthesize property %0 because it cannot share an ivar with another synthesized property", [f]="auto property synthesis will not synthesize property A because it cannot share an ivar with another synthesized property", [e]=j, [a]="auto property synthesis will not synthesize property (.*?) because it cannot share an ivar with another synthesized property", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-synthesis[^\\]]*\\]", [i]=o, [d]={"9d25a48b4131",1363117577,"Objective-C: Issue warning in couple of obscure cases","Objective-C: Issue warning in couple of obscure cases\nwhen property autosynthesis does not synthesize a property.\nWhen property is declared \'readonly\' in a super class and\nis redeclared \'readwrite\' in a subclass. When a property\nautosynthesis causes it to share \'ivar\' with another property.\n// rdar://13388503\n\nllvm-svn: 176889"}, [g]={{Q,1918,"/// Default synthesizes all properties which must be synthesized\n/// in class\'s \\@implementation.\nvoid Sema::DefaultSynthesizeProperties(Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl, SourceLocation AtEnd) {\n // ...\n for (const auto &PropEntry : PropMap) {\n // ...\n if (ObjCPropertyImplDecl *PID = IMPDecl->FindPropertyImplIvarDecl(Prop->getIdentifier())) {\n Diag(Prop->getLocation(), diag::warn_no_autosynthesis_shared_ivar_property) << Prop->getIdentifier();"}}, [m]={ ["clang/test/SemaObjC/default-synthesize-3.m"]={"clang/test/SemaObjC/default-synthesize-3.m:67:16: warning: auto property synthesis will not synthesize property \'Property1\' because it cannot share an ivar with another synthesized property [-Wobjc-property-synthesis]"} } }, ["warn_no_constructor_for_refconst"]={ [h]="warn_no_constructor_for_refconst", [b]="%select{struct|interface|union|class|enum}0 %1 does not declare any constructor to initialize its non-modifiable members", [f]={{nil,nil,{{"struct","interface","union",Hb,"enum"}," B does not declare any constructor to initialize its non-modifiable members"}}}, [e]=j, [a]="(?:struct|interface|union|class|enum) (.*?) does not declare any constructor to initialize its non\\-modifiable members", [c]=wb, [i]=o, [d]={"454a5b65d402",1271289653,"Warn about non-aggregate classes with no user-declared constructors","Warn about non-aggregate classes with no user-declared constructors\nthat have reference or const scalar members, since those members can\nnever be initializer or modified. Fixes <rdar://problem/7804350>.\n\nllvm-svn: 101316"}, [g]={{Nb,6928,"/// Perform semantic checks on a class definition that has been\n/// completing, introducing implicitly-declared members, checking for\n/// abstract types, etc.\n///\n/// \\param S The scope in which the class was parsed. Null if we didn\'t just\n/// parse a class definition.\n/// \\param Record The completed class.\nvoid Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) {\n // ...\n // If this is not an aggregate type and has no user-declared constructor,\n // complain about any non-static data members of reference or const scalar\n // type, since they will never get initializers.\n if (!Record->isInvalidDecl() && !Record->isDependentType() && !Record->isAggregate() && !Record->hasUserDeclaredConstructor() && !Record->isLambda()) {\n // ...\n for (const auto *F : Record->fields()) {\n // ...\n if (F->getType()->isReferenceType() || (F->getType().isConstQualified() && F->getType()->isScalarType())) {\n if (!Complained) {\n Diag(Record->getLocation(), diag::warn_no_constructor_for_refconst) << Record->getTagKind() << Record;"}}, [m]={ ["clang/test/SemaTemplate/instantiation-backtrace.cpp"]={"clang/test/SemaTemplate/instantiation-backtrace.cpp:35:28: warning: class \'ResultTy<int &>\' does not declare any constructor to initialize its non-modifiable members"} } }, ["warn_no_dynamic_cast_with_rtti_disabled"]={ [k]={"rtti"}, [l]="rtti", [h]={{nil,R,"warn_no_dynamic_cast_with_rtti_disabled"}}, [b]={{nil,R,"dynamic_cast will not work since RTTI data is disabled by %select{-fno-rtti-data|/GR-}0"}}, [f]={{nil,R,{"dynamic_cast will not work since RTTI data is disabled by ",{"-fno-rtti-data","/GR-"}}}}, [e]=j, [a]="dynamic_cast will not work since RTTI data is disabled by (?:\\-fno\\-rtti\\-data|\\/GR\\-)", [c]=" \\[(?:\\-Werror,)?\\-Wrtti[^\\]]*\\]", [i]={{nil,R,o}}, [d]={"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"}, [g]={{Mb,935,"/// CheckDynamicCast - Check that a dynamic_cast\\<DestType\\>(SrcExpr) is valid.\n/// Refer to C++ 5.2.7 for details. Dynamic casts are used mostly for runtime-\n/// checked downcasts in class hierarchies.\nvoid CastOperation::CheckDynamicCast() {\n // ...\n // Warns when dynamic_cast is used with RTTI data disabled.\n if (!Self.getLangOpts().RTTIData) {\n // ...\n if (MicrosoftABI || !DestPointee->isVoidType())\n Self.Diag(OpRange.getBegin(), diag::warn_no_dynamic_cast_with_rtti_disabled) << isClangCL;"}}, [m]={ ["clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp"]={"clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp:21:14: warning: dynamic_cast will not work since RTTI data is disabled by -fno-rtti-data [-Wrtti]"} } }, ["warn_no_newline_eof"]={ [k]={"newline-eof"}, [l]="newline-eof", [h]="warn_no_newline_eof", [b]="no newline at end of file", [f]="no newline at end of file", [e]=j, [a]="no newline at end of file", [c]=" \\[(?:\\-Werror,)?\\-Wnewline\\-eof[^\\]]*\\]", [i]=B, [d]={"4c55d45b13e9",1377272521,"Respect -Wnewline-eof even in C++11 mode.","Respect -Wnewline-eof even in C++11 mode.\n\nIf the user has requested this warning, we should emit it, even if it\'s not\nan extension in the current language mode. However, being an extension is\nmore important, so prefer the pedantic warning or the pedantic-compatibility\nwarning if those are enabled.\n\n<rdar://problem/12922063>\n\nllvm-svn: 189110"}, [g]={{"clang/lib/Lex/Lexer.cpp",3055,"/// LexEndOfFile - CurPtr points to the end of this file. Handle this\n/// condition, reporting diagnostics and handling other edge cases as required.\n/// This returns true if Result contains a token, false if PP.Lex should be\n/// called again.\nbool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) {\n // ...\n // C99 5.1.1.2p2: If the file is non-empty and didn\'t end in a newline, issue\n // a pedwarn.\n if (CurPtr != BufferStart && (CurPtr[-1] != \'\\n\' && CurPtr[-1] != \'\\r\')) {\n // ...\n if (LangOpts.CPlusPlus11) {\n // C++11 [lex.phases] 2.2 p2\n // Prefer the C++98 pedantic compatibility warning over the generic,\n // non-extension, user-requested \"missing newline at EOF\" warning.\n if (!Diags.isIgnored(diag::warn_cxx98_compat_no_newline_eof, EndLoc)) {\n // ...\n } else {\n DiagID = diag::warn_no_newline_eof;"}}, [m]={ ["clang/test/Lexer/eof-number.c"]={"clang/test/Lexer/eof-number.c:9:6: warning: no newline at end of file [-Wnewline-eof]"} } }, ["warn_no_priv_submodule_use_toplevel"]={ [k]={"private-module"}, [l]="private-module", [h]={{nil,x,"warn_no_priv_submodule_use_toplevel"}}, [b]={{nil,x,"no submodule named %0 in module \'%1\'; using top level \'%2\'"}}, [f]={{nil,x,"no submodule named A in module \'B\'; using top level \'C\'"}}, [e]=j, [a]="no submodule named (.*?) in module \'(.*?)\'; using top level \'(.*?)\'", [c]=" \\[(?:\\-Werror,)?\\-Wprivate\\-module[^\\]]*\\]", [i]={{nil,x,O}}, [d]={"84bc0a271dcd",1513919083,"[Modules] Map missing private submodules from Foo.Private to Foo_Private","[Modules] Map missing private submodules from Foo.Private to Foo_Private\n\nIn case `@import Foo.Private` fails because the submodule doesn\'t exist,\nlook for `Foo_Private` (if available) and build/load that module\ninstead. In that process emit a warning and tell the user about the\nassumption.\n\nThe intention here is to assist all existing private modules owners\n(in ObjC and Swift) to migrate to the new `Foo_Private` syntax.\n\nrdar://problem/36023940\n\nllvm-svn: 321342"}, [g]={{"clang/lib/Frontend/CompilerInstance.cpp",2046,"ModuleLoadResult CompilerInstance::loadModule(SourceLocation ImportLoc, ModuleIdPath Path, Module::NameVisibilityKind Visibility, bool IsInclusionDirective) {\n // ...\n for (unsigned I = 1, N = Path.size(); I != N; ++I) {\n // ...\n // If the user is requesting Foo.Private and it doesn\'t exist, try to\n // match Foo_Private and emit a warning asking for the user to write\n // @import Foo_Private instead. FIXME: remove this when existing clients\n // migrate off of Foo.Private syntax.\n if (!Sub && Name == \"Private\" && Module == Module->getTopLevelModule()) {\n // ...\n if (Sub) {\n // ...\n if (!getDiagnostics().isIgnored(diag::warn_no_priv_submodule_use_toplevel, ImportLoc)) {"},{"clang/lib/Frontend/CompilerInstance.cpp",2048,"ModuleLoadResult CompilerInstance::loadModule(SourceLocation ImportLoc, ModuleIdPath Path, Module::NameVisibilityKind Visibility, bool IsInclusionDirective) {\n // ...\n for (unsigned I = 1, N = Path.size(); I != N; ++I) {\n // ...\n // If the user is requesting Foo.Private and it doesn\'t exist, try to\n // match Foo_Private and emit a warning asking for the user to write\n // @import Foo_Private instead. FIXME: remove this when existing clients\n // migrate off of Foo.Private syntax.\n if (!Sub && Name == \"Private\" && Module == Module->getTopLevelModule()) {\n // ...\n if (Sub) {\n // ...\n if (!getDiagnostics().isIgnored(diag::warn_no_priv_submodule_use_toplevel, ImportLoc)) {\n getDiagnostics().Report(Path[I].second, diag::warn_no_priv_submodule_use_toplevel) << Path[I].first << Module->getFullModuleName() << PrivateModule << SourceRange(Path[0].second, Path[I].second) << FixItHint::CreateReplacement(SourceRange(Path[0].second), PrivateModule);"}}, [m]={ ["clang/test/Modules/implicit-map-dot-private.m"]={"clang/test/Modules/implicit-map-dot-private.m:19:11: warning: no submodule named \'Private\' in module \'A\'; using top level \'A_Private\' [-Wprivate-module]"} } }, ["warn_no_support_for_eval_method_source_on_m32"]={ [k]={r}, [l]=r, [h]={{nil,P,"warn_no_support_for_eval_method_source_on_m32"}}, [b]={{nil,P,"Setting the floating point evaluation method to `source` on a target without SSE is not supported."}}, [f]={{nil,P,"Setting the floating point evaluation method to `source` on a target without SSE is not supported."}}, [e]=j, [a]="Setting the floating point evaluation method to `source` on a target without SSE is not supported\\.", [c]=" \\[(?:\\-Werror,)?\\-Wpragmas[^\\]]*\\]", [i]={{nil,P,t}}, [d]={"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"}, [g]={{"clang/lib/Parse/ParseStmt.cpp",1260,"/// ParseCompoundStatementBody - Parse a sequence of statements optionally\n/// followed by a label and invoke the ActOnCompoundStmt action. This expects\n/// the \'{\' to be the current token, and consume the \'}\' at the end of the\n/// block. It does not manipulate the scope stack.\nStmtResult Parser::ParseCompoundStatementBody(bool isStmtExpr) {\n // ...\n // Warn the user that using option `-ffp-eval-method=source` on a\n // 32-bit target and feature `sse` disabled, or using\n // `pragma clang fp eval_method=source` and feature `sse` disabled, is not\n // supported.\n if (!PP.getTargetInfo().supportSourceEvalMethod() && (PP.getLastFPEvalPragmaLocation().isValid() || PP.getCurrentFPEvalMethod() == LangOptions::FPEvalMethodKind::FEM_Source))\n Diag(Tok.getLocation(), diag::warn_no_support_for_eval_method_source_on_m32);"}}, [m]={ ["clang/test/Sema/x86_64-eval-method.c"]={"clang/test/Sema/x86_64-eval-method.c:13:1: warning: Setting the floating point evaluation method to `source` on a target without SSE is not supported. [-Wpragmas]"} } }, ["warn_no_typeid_with_rtti_disabled"]={ [k]={"rtti"}, [l]="rtti", [h]={{nil,R,"warn_no_typeid_with_rtti_disabled"}}, [b]={{nil,R,"typeid will not work since RTTI data is disabled by %select{-fno-rtti-data|/GR-}0"}}, [f]={{nil,R,{"typeid will not work since RTTI data is disabled by ",{"-fno-rtti-data","/GR-"}}}}, [e]=j, [a]="typeid will not work since RTTI data is disabled by (?:\\-fno\\-rtti\\-data|\\/GR\\-)", [c]=" \\[(?:\\-Werror,)?\\-Wrtti[^\\]]*\\]", [i]={{nil,R,o}}, [d]={"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"}, [g]={{"clang/lib/Sema/SemaExprCXX.cpp",705,"/// ActOnCXXTypeidOfType - Parse typeid( type-id ) or typeid (expression);\nExprResult Sema::ActOnCXXTypeid(SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc) {\n // ...\n if (!getLangOpts().RTTIData && !Result.isInvalid())\n if (auto *CTE = dyn_cast<CXXTypeidExpr>(Result.get()))\n if (CTE->isPotentiallyEvaluated() && !CTE->isMostDerived(Context))\n Diag(OpLoc, diag::warn_no_typeid_with_rtti_disabled) << (getDiagnostics().getDiagnosticOptions().getFormat() == DiagnosticOptions::MSVC);"}}, [m]={ ["clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp"]={"clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp:20:28: warning: typeid will not work since RTTI data is disabled by -fno-rtti-data [-Wrtti]"} } }, ["warn_no_underlying_type_specified_for_enum_bitfield"]={ [k]={"signed-enum-bitfield"}, [l]="signed-enum-bitfield", [h]="warn_no_underlying_type_specified_for_enum_bitfield", [b]="enums in the Microsoft ABI are signed integers by default; consider giving the enum %0 an unsigned underlying type to make this code portable", [f]="enums in the Microsoft ABI are signed integers by default; consider giving the enum A an unsigned underlying type to make this code portable", [e]=j, [a]="enums in the Microsoft ABI are signed integers by default; consider giving the enum (.*?) an unsigned underlying type to make this code portable", [c]=" \\[(?:\\-Werror,)?\\-Wsigned\\-enum\\-bitfield[^\\]]*\\]", [i]=o, [d]={"ad425626d237",1479339600,"Add warning when assigning enums to bitfields without an explicit unsigned underlying type","Add warning when assigning enums to bitfields without an explicit unsigned underlying type\n\nSummary:\nAdd a warning when assigning enums to bitfields without an explicit\nunsigned underlying type. This is to prevent problems with MSVC\ncompatibility, since the Microsoft ABI defaults to storing enums with a\nsigned type, causing inconsistencies with saving to/reading from\nbitfields.\n\nAlso disabled the warning in the dr0xx.cpp test which throws the error,\nand added a test for the warning.\n\nThe warning can be disabled with -Wno-signed-enum-bitfield.\n\nPatch by Sasha Bermeister!\n\nReviewers: rnk, aaron.ballman\n\nSubscribers: mehdi_amini, aaron.ballman, cfe-commits, thakis, dcheng\n\nDifferential Revision: https://reviews.llvm.org/D24289\n\nllvm-svn: 287177"}, [g]={{E,14047,"/// Analyzes an attempt to assign the given value to a bitfield.\n///\n/// Returns true if there was something fishy about the attempt.\nstatic bool AnalyzeBitFieldAssignment(Sema &S, FieldDecl *Bitfield, Expr *Init, SourceLocation InitLoc) {\n // ...\n if (BitfieldType->isEnumeralType()) {\n // ...\n // If the underlying enum type was not explicitly specified as an unsigned\n // type and the enum contain only positive values, MSVC++ will cause an\n // inconsistency by storing this as a signed type.\n if (S.getLangOpts().CPlusPlus11 && !BitfieldEnumDecl->getIntegerTypeSourceInfo() && BitfieldEnumDecl->getNumPositiveBits() > 0 && BitfieldEnumDecl->getNumNegativeBits() == 0) {\n S.Diag(InitLoc, diag::warn_no_underlying_type_specified_for_enum_bitfield) << BitfieldEnumDecl;"}}, [m]={ ["clang/test/SemaCXX/warn-msvc-enum-bitfield.cpp"]={"clang/test/SemaCXX/warn-msvc-enum-bitfield.cpp:9:8: warning: enums in the Microsoft ABI are signed integers by default; consider giving the enum \'E\' an unsigned underlying type to make this code portable [-Wsigned-enum-bitfield]","clang/test/SemaCXX/warn-msvc-enum-bitfield.cpp:10:8: warning: enums in the Microsoft ABI are signed integers by default; consider giving the enum \'F\' an unsigned underlying type to make this code portable [-Wsigned-enum-bitfield]"} } }, ["warn_no_unlock"]={ [k]={"thread-safety","thread-safety-analysis"}, [l]="thread-safety-analysis", [h]="warn_no_unlock", [b]="%0 \'%1\' is still held at the end of function", [f]="A \'B\' is still held at the end of function", [e]=j, [a]="(.*?) \'(.*?)\' is still held at the end of function", [c]=" \\[(?:\\-Werror,)?\\-Wthread\\-safety\\-analysis[^\\]]*\\]", [i]=o, [d]={"ee5db8b5c4ab",1315518770,"Thread Safety: In C++0x Mutexes are the objects that control access to shared variables, while Lock...","Thread Safety: In C++0x Mutexes are the objects that control access to shared variables, while Locks are the objects that acquire and release Mutexes. We switch to this new terminology.\n\nllvm-svn: 139321"}, [g]={{Tb,1915,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleMutexHeldEndOfScope(StringRef Kind, Name LockName, SourceLocation LocLocked, SourceLocation LocEndOfScope, LockErrorKind LEK) override {\n // ...\n case LEK_LockedAtEndOfFunction:\n DiagID = diag::warn_no_unlock;"}}, [m]={ ["clang/test/SemaObjCXX/warn-thread-safety-analysis.mm"]={"clang/test/SemaObjCXX/warn-thread-safety-analysis.mm:26:1: warning: mutex \'self->lock_\' is still held at the end of function [-Wthread-safety-analysis]"} } }, ["warn_nocf_check_attribute_ignored"]={ [k]={Cb,cb}, [l]=cb, [h]={{nil,z,"warn_nocf_check_attribute_ignored"}}, [b]={{nil,z,"\'nocf_check\' attribute ignored; use -fcf-protection to enable the attribute"}}, [f]={{nil,z,"\'nocf_check\' attribute ignored; use -fcf-protection to enable the attribute"}}, [e]=j, [a]="\'nocf_check\' attribute ignored; use \\-fcf\\-protection to enable the attribute", [c]=Ab, [i]={{nil,z,o}}, [d]={"220671a08064",1521293495,"Adding nocf_check attribute for cf-protection fine tuning","Adding nocf_check attribute for cf-protection fine tuning\n\nThe patch adds nocf_check target independent attribute for disabling checks that were enabled by cf-protection flag.\nThe attribute can be appertained to functions and function pointers.\nAttribute name follows GCC\'s similar attribute name.\n\nDifferential Revision: https://reviews.llvm.org/D41880\n\nllvm-svn: 327768"}, [g]={{V,2212,"static void handleNoCfCheckAttr(Sema &S, Decl *D, const ParsedAttr &Attrs) {\n if (!S.getLangOpts().CFProtectionBranch)\n S.Diag(Attrs.getLoc(), diag::warn_nocf_check_attribute_ignored);"},{nb,7860,"/// Process an individual function attribute. Returns true to\n/// indicate that the attribute was handled, false if it wasn\'t.\nstatic bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // ...\n if (attr.getKind() == ParsedAttr::AT_AnyX86NoCfCheck) {\n if (!S.getLangOpts().CFProtectionBranch) {\n S.Diag(attr.getLoc(), diag::warn_nocf_check_attribute_ignored);"}}, [m]={ ["clang/test/Sema/nocf_check_attr_not_allowed.c"]={"clang/test/Sema/nocf_check_attr_not_allowed.c:5:21: warning: \'nocf_check\' attribute ignored; use -fcf-protection to enable the attribute [-Wignored-attributes]"} } }, ["warn_noderef_on_non_pointer_or_array"]={ [k]={Cb,cb}, [l]=cb, [h]={{nil,K,"warn_noderef_on_non_pointer_or_array"}}, [b]={{nil,K,"\'noderef\' can only be used on an array or pointer type"}}, [f]={{nil,K,"\'noderef\' can only be used on an array or pointer type"}}, [e]=j, [a]="\'noderef\' can only be used on an array or pointer type", [c]=Ab, [i]={{nil,K,O}}, [d]={"ad7ac964e5cf",1544058354,"[Sema/Attribute] Check for noderef attribute","[Sema/Attribute] Check for noderef attribute\n\nThis patch adds the noderef attribute in clang and checks for dereferences of\ntypes that have this attribute. This attribute is currently used by sparse and\nwould like to be ported to clang.\n\nDifferential Revision: https://reviews.llvm.org/D49511\n\nllvm-svn: 348442"}, [g]={{nb,5732,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n if (DeclType.Kind != DeclaratorChunk::Paren) {\n if (ExpectNoDerefChunk && !IsNoDerefableChunk(DeclType))\n S.Diag(DeclType.Loc, diag::warn_noderef_on_non_pointer_or_array);"},{nb,5740,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n if (ExpectNoDerefChunk)\n S.Diag(state.getDeclarator().getBeginLoc(), diag::warn_noderef_on_non_pointer_or_array);"}}, [m]={ ["clang/test/Frontend/noderef.cpp"]={"clang/test/Frontend/noderef.cpp:15:3: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:18:3: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:22:3: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:46:17: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:49:29: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:67:12: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:73:15: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:76:16: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:80:34: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:87:3: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:99:15: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]","clang/test/Frontend/noderef.cpp:125:3: warning: \'noderef\' can only be used on an array or pointer type [-Wignored-attributes]"} } }, ["warn_noderef_to_dereferenceable_pointer"]={ [k]={"noderef"}, [l]="noderef", [h]={{nil,K,"warn_noderef_to_dereferenceable_pointer"}}, [b]={{nil,K,"casting to dereferenceable pointer removes \'noderef\' attribute"}}, [f]={{nil,K,"casting to dereferenceable pointer removes \'noderef\' attribute"}}, [e]=j, [a]="casting to dereferenceable pointer removes \'noderef\' attribute", [c]=" \\[(?:\\-Werror,)?\\-Wnoderef[^\\]]*\\]", [i]={{nil,K,O}}, [d]={"ad7ac964e5cf",1544058354,"[Sema/Attribute] Check for noderef attribute","[Sema/Attribute] Check for noderef attribute\n\nThis patch adds the noderef attribute in clang and checks for dereferences of\ntypes that have this attribute. This attribute is currently used by sparse and\nwould like to be ported to clang.\n\nDifferential Revision: https://reviews.llvm.org/D49511\n\nllvm-svn: 348442"}, [g]={{Mb,187,"void CheckNoDeref(Sema &S, const QualType FromType, const QualType ToType, SourceLocation OpLoc) {\n if (const auto *PtrType = dyn_cast<PointerType>(FromType)) {\n if (PtrType->getPointeeType()->hasAttr(attr::NoDeref)) {\n if (const auto *DestType = dyn_cast<PointerType>(ToType)) {\n if (!DestType->getPointeeType()->hasAttr(attr::NoDeref)) {\n S.Diag(OpLoc, diag::warn_noderef_to_dereferenceable_pointer);"},{I,10624,"Sema::AssignConvertType Sema::CheckSingleAssignmentConstraints(QualType LHSType, ExprResult &CallerRHS, bool Diagnose, bool DiagnoseCFAudited, bool ConvertRHS) {\n // ...\n if (const auto *LHSPtrType = LHSType->getAs<PointerType>()) {\n if (const auto *RHSPtrType = RHS.get()->getType()->getAs<PointerType>()) {\n if (RHSPtrType->getPointeeType()->hasAttr(attr::NoDeref) && !LHSPtrType->getPointeeType()->hasAttr(attr::NoDeref)) {\n Diag(RHS.get()->getExprLoc(), diag::warn_noderef_to_dereferenceable_pointer) << RHS.get()->getSourceRange();"},{Pb,8976,"ExprResult InitializationSequence::Perform(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType) {\n // ...\n for (step_iterator Step = step_begin(), StepEnd = step_end(); Step != StepEnd; ++Step) {\n // ...\n case SK_ConversionSequence:\n case SK_ConversionSequenceNoNarrowing: {\n if (const auto *FromPtrType = CurInit.get()->getType()->getAs<PointerType>()) {\n if (const auto *ToPtrType = Step->Type->getAs<PointerType>()) {\n if (FromPtrType->getPointeeType()->hasAttr(attr::NoDeref) && !ToPtrType->getPointeeType()->hasAttr(attr::NoDeref)) {\n // Do not check static casts here because they are checked earlier\n // in Sema::ActOnCXXNamedCast()\n if (!Kind.isStaticCast()) {\n S.Diag(CurInit.get()->getExprLoc(), diag::warn_noderef_to_dereferenceable_pointer) << CurInit.get()->getSourceRange();"}}, [m]={ ["clang/test/Frontend/noderef.cpp"]={"clang/test/Frontend/noderef.cpp:33:17: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:34:15: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:93:31: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:138:12: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:147:13: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:148:13: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:156:19: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:160:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:164:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:168:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:172:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:176:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:180:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]","clang/test/Frontend/noderef.cpp:184:10: warning: casting to dereferenceable pointer removes \'noderef\' attribute [-Wnoderef]"} } }, ["warn_non_aligned_allocation_function"]={ [k]={"coro-non-aligned-allocation-function","coroutine"}, [l]="coro-non-aligned-allocation-function", [h]={{nil,hb,"warn_non_aligned_allocation_function"}}, [b]={{nil,hb,"under -fcoro-aligned-allocation, the non-aligned allocation function for the promise type %0 has higher precedence than the global aligned allocation function"}}, [f]={{nil,hb,"under -fcoro-aligned-allocation, the non-aligned allocation function for the promise type A has higher precedence than the global aligned allocation function"}}, [e]=j, [a]="under \\-fcoro\\-aligned\\-allocation, the non\\-aligned allocation function for the promise type (.*?) has higher precedence than the global aligned allocation function", [c]=" \\[(?:\\-Werror,)?\\-Wcoro\\-non\\-aligned\\-allocation\\-function[^\\]]*\\]", [i]={{nil,hb,"Coroutines Issue"}}, [d]={Db,1625925174,Gb,Fb}, [g]={{"clang/lib/Sema/SemaCoroutine.cpp",1479,"bool CoroutineStmtBuilder::makeNewAndDeleteExpr() {\n // ...\n // If we found a non-aligned allocation function in the promise_type,\n // it indicates the user forgot to update the allocation function. Let\'s emit\n // a warning here.\n if (FoundNonAlignedInPromise) {\n S.Diag(OperatorNew->getLocation(), diag::warn_non_aligned_allocation_function) << &FD;"}}, [m]={ ["clang/test/SemaCXX/coroutine-alloc-4.cpp"]={"clang/test/SemaCXX/coroutine-alloc-4.cpp:18:11: warning: under -fcoro-aligned-allocation, the non-aligned allocation function for the promise type \'f\' has higher precedence than the global aligned allocation function [-Wcoro-non-aligned-allocation-function]","clang/test/SemaCXX/coroutine-alloc-4.cpp:18:11: warning: under -fcoro-aligned-allocation, the non-aligned allocation function for the promise type \'f\' has higher precedence than the global aligned allocation function [-Wcoro-non-aligned-allocation-function]"} } }, ["warn_non_contravariant_overriding_param_types"]={ [k]={"overriding-method-mismatch"}, [l]="overriding-method-mismatch", [h]="warn_non_contravariant_overriding_param_types", [b]="conflicting parameter types in declaration of %0: %1 vs %2", [f]="conflicting parameter types in declaration of A: B vs C", [e]=j, [a]="conflicting parameter types in declaration of (.*?)\\: (.*?) vs (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Woverriding\\-method\\-mismatch[^\\]]*\\]", [i]=o, [d]={"3c12dd7675cd",1312996590,"objective-c: Using existing infrastructure for finding ","objective-c: Using existing infrastructure for finding \noverridden methods to diagnose their type mismatch.\nThis is a general solution for previous fixes\nfor // rdar://6191214 and // rdar://9352731\nand removes lots of duplicate code.\n\nllvm-svn: 137222"}, [g]={{vb,2492,"static bool CheckMethodOverrideParam(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, ParmVarDecl *ImplVar, ParmVarDecl *IfaceVar, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n // ...\n // Mismatches between ObjC pointers go into a different warning\n // category, and sometimes they\'re even completely explicitly allowed..\n if (const ObjCObjectPointerType *ImplPtrTy = ImplTy->getAs<ObjCObjectPointerType>()) {\n if (const ObjCObjectPointerType *IfacePtrTy = IfaceTy->getAs<ObjCObjectPointerType>()) {\n // ...\n DiagID = IsOverridingMode ? diag::warn_non_contravariant_overriding_param_types : diag::warn_non_contravariant_param_types;"}} }, ["warn_non_contravariant_param_types"]={ [k]={"method-signatures"}, [l]="method-signatures", [h]="warn_non_contravariant_param_types", [b]="conflicting parameter types in implementation of %0: %1 vs %2", [f]="conflicting parameter types in implementation of A: B vs C", [e]=j, [a]="conflicting parameter types in implementation of (.*?)\\: (.*?) vs (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wmethod\\-signatures[^\\]]*\\]", [i]=o, [d]={"071df46743b9",1288233278,"Implement the newest status quo for method override checking. The idea now","Implement the newest status quo for method override checking. The idea now\nis that we need more information to decide the exact conditions for whether\none ObjCObjectPointer is an acceptable return/parameter override for another,\nso we\'re going to disable that entire class of warning for now. The\n\"forward developement\" warning category, -Wmethod-signatures, can receive\nunrestricted feature work, and when we\'re happy with how it acts, we\'ll\nturn it on by default.\n\nThis is a pretty conservative change, and nobody\'s totally content with it.\n\nllvm-svn: 117524"}, [g]={{vb,2493,"static bool CheckMethodOverrideParam(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, ParmVarDecl *ImplVar, ParmVarDecl *IfaceVar, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n // ...\n // Mismatches between ObjC pointers go into a different warning\n // category, and sometimes they\'re even completely explicitly allowed..\n if (const ObjCObjectPointerType *ImplPtrTy = ImplTy->getAs<ObjCObjectPointerType>()) {\n if (const ObjCObjectPointerType *IfacePtrTy = IfaceTy->getAs<ObjCObjectPointerType>()) {\n // ...\n DiagID = IsOverridingMode ? diag::warn_non_contravariant_overriding_param_types : diag::warn_non_contravariant_param_types;"}}, [m]={ ["clang/test/SemaObjC/method-def-1.m"]={"clang/test/SemaObjC/method-def-1.m:37:3: warning: conflicting parameter types in implementation of \'myMethod1:\': \'id<proto>\' vs \'id<NSObject>\' [-Wmethod-signatures]"} } }, ["warn_non_covariant_overriding_ret_types"]={ [k]={"overriding-method-mismatch"}, [l]="overriding-method-mismatch", [h]="warn_non_covariant_overriding_ret_types", [b]="conflicting return type in declaration of %0: %1 vs %2", [f]="conflicting return type in declaration of A: B vs C", [e]=j, [a]="conflicting return type in declaration of (.*?)\\: (.*?) vs (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Woverriding\\-method\\-mismatch[^\\]]*\\]", [i]=o, [d]={"3c12dd7675cd",1312996590,"objective-c: Using existing infrastructure for finding ","objective-c: Using existing infrastructure for finding \noverridden methods to diagnose their type mismatch.\nThis is a general solution for previous fixes\nfor // rdar://6191214 and // rdar://9352731\nand removes lots of duplicate code.\n\nllvm-svn: 137222"}, [g]={{vb,2410,"static bool CheckMethodOverrideReturn(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n // ...\n // Mismatches between ObjC pointers go into a different warning\n // category, and sometimes they\'re even completely explicitly allowed.\n if (const ObjCObjectPointerType *ImplPtrTy = MethodImpl->getReturnType()->getAs<ObjCObjectPointerType>()) {\n if (const ObjCObjectPointerType *IfacePtrTy = MethodDecl->getReturnType()->getAs<ObjCObjectPointerType>()) {\n // ...\n DiagID = IsOverridingMode ? diag::warn_non_covariant_overriding_ret_types : diag::warn_non_covariant_ret_types;"}} }, ["warn_non_covariant_ret_types"]={ [k]={"method-signatures"}, [l]="method-signatures", [h]="warn_non_covariant_ret_types", [b]="conflicting return type in implementation of %0: %1 vs %2", [f]="conflicting return type in implementation of A: B vs C", [e]=j, [a]="conflicting return type in implementation of (.*?)\\: (.*?) vs (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wmethod\\-signatures[^\\]]*\\]", [i]=o, [d]={"071df46743b9",1288233278,"Implement the newest status quo for method override checking. The idea now","Implement the newest status quo for method override checking. The idea now\nis that we need more information to decide the exact conditions for whether\none ObjCObjectPointer is an acceptable return/parameter override for another,\nso we\'re going to disable that entire class of warning for now. The\n\"forward developement\" warning category, -Wmethod-signatures, can receive\nunrestricted feature work, and when we\'re happy with how it acts, we\'ll\nturn it on by default.\n\nThis is a pretty conservative change, and nobody\'s totally content with it.\n\nllvm-svn: 117524"}, [g]={{vb,2411,"static bool CheckMethodOverrideReturn(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n // ...\n // Mismatches between ObjC pointers go into a different warning\n // category, and sometimes they\'re even completely explicitly allowed.\n if (const ObjCObjectPointerType *ImplPtrTy = MethodImpl->getReturnType()->getAs<ObjCObjectPointerType>()) {\n if (const ObjCObjectPointerType *IfacePtrTy = MethodDecl->getReturnType()->getAs<ObjCObjectPointerType>()) {\n // ...\n DiagID = IsOverridingMode ? diag::warn_non_covariant_overriding_ret_types : diag::warn_non_covariant_ret_types;"}}, [m]={ ["clang/test/SemaObjC/method-typecheck-3.m"]={"clang/test/SemaObjC/method-typecheck-3.m:17:1: warning: conflicting return type in implementation of \'a\': \'B *\' vs \'A *\' [-Wmethod-signatures]"} } }, ["warn_non_literal_null_pointer"]={ [k]={"conversion","non-gcc","non-literal-null-conversion"}, [l]="non-literal-null-conversion", [h]="warn_non_literal_null_pointer", [b]="expression which evaluates to zero treated as a null pointer constant of type %0", [f]="expression which evaluates to zero treated as a null pointer constant of type A", [e]=j, [a]="expression which evaluates to zero treated as a null pointer constant of type (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wnon\\-literal\\-null\\-conversion[^\\]]*\\]", [i]="Value Conversion Issue", [d]={"1c7c8f763769",1344447211,"Implement warning for integral null pointer constants other than the literal 0.","Implement warning for integral null pointer constants other than the literal 0.\n\nThis is effectively a warning for code that violates core issue 903 & thus will\nbecome standard error in the future, hopefully. It catches strange null\npointers such as: \'\\0\', 1 - 1, const int null = 0; etc...\n\nThere\'s currently a flaw in this warning (& the warning for \'false\' as a null\npointer literal as well) where it doesn\'t trigger on comparisons (ptr == \'\\0\'\nfor example). Fix to come in a future patch.\n\nAlso, due to this only being a warning, not an error, it triggers quite\nfrequently on gtest code which tests expressions for null-pointer-ness in a\nSFINAE context (so it wouldn\'t be a problem if this was an error as in an\nactual implementation of core issue 903). To workaround this for now, the\ndiagnostic does not fire in unevaluated contexts.\n\nReview by Sean Silva and Richard Smith.\n\nllvm-svn: 161501"}, [g]={{"clang/lib/Sema/SemaOverload.cpp",3131,"/// CheckPointerConversion - Check the pointer conversion from the\n/// expression From to the type ToType. This routine checks for\n/// ambiguous or inaccessible derived-to-base pointer\n/// conversions for which IsPointerConversion has already returned\n/// true. It returns true and produces a diagnostic if there was an\n/// error, or returns false otherwise.\nbool Sema::CheckPointerConversion(Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess, bool Diagnose) {\n // ...\n if (Diagnose && !IsCStyleOrFunctionalCast && !FromType->isAnyPointerType() && From->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNotNull) == Expr::NPCK_ZeroExpression) {\n if (Context.hasSameUnqualifiedType(From->getType(), Context.BoolTy))\n // ...\n else if (!isUnevaluatedContext())\n Diag(From->getExprLoc(), diag::warn_non_literal_null_pointer) << ToType << From->getSourceRange();"}}, [m]={ ["clang/test/Sema/warn-null.c"]={"clang/test/Sema/warn-null.c:7:10: warning: expression which evaluates to zero treated as a null pointer constant of type \'int *\' [-Wnon-literal-null-conversion]","clang/test/Sema/warn-null.c:8:10: warning: expression which evaluates to zero treated as a null pointer constant of type \'int *\' [-Wnon-literal-null-conversion]","clang/test/Sema/warn-null.c:11:7: warning: expression which evaluates to zero treated as a null pointer constant of type \'int *\' [-Wnon-literal-null-conversion]","clang/test/Sema/warn-null.c:12:9: warning: expression which evaluates to zero treated as a null pointer constant of type \'int *\' [-Wnon-literal-null-conversion]","clang/test/Sema/warn-null.c:13:7: warning: expression which evaluates to zero treated as a null pointer constant of type \'int *\' [-Wnon-literal-null-conversion]"} } }, ["warn_non_modular_include_in_framework_module"]={ [k]={"incomplete-module","non-modular-include-in-framework-module","non-modular-include-in-module"}, [l]="non-modular-include-in-framework-module", [h]="warn_non_modular_include_in_framework_module", [b]="include of non-modular header inside framework module \'%0\': \'%1\'", [f]="include of non-modular header inside framework module \'A\': \'B\'", [e]=j, [a]="include of non\\-modular header inside framework module \'(.*?)\'\\: \'(.*?)\'", [c]=" \\[(?:\\-Werror,)?\\-Wnon\\-modular\\-include\\-in\\-framework\\-module[^\\]]*\\]", [i]=B, [d]={"71e1a64f916e",1399326253,"Add -Wnon-modular-include* options","Add -Wnon-modular-include* options\n\nWarn on non-modular includes in various contexts.\n\n-Wnon-modular-include\n -Wnon-modular-include-in-module\n -Wnon-modular-include-in-framework-module\n\nWhere each group is a subgroup of those above it.\n\nllvm-svn: 208004"}, [g]={{"clang/lib/Lex/ModuleMap.cpp",546,"void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule, bool RequestingModuleIsModuleInterface, SourceLocation FilenameLoc, StringRef Filename, FileEntryRef File) {\n // ...\n if (RequestingModule && LangOpts.ModulesStrictDeclUse) {\n // ...\n } else if (RequestingModule && RequestingModuleIsModuleInterface && LangOpts.isCompilingModule()) {\n // ...\n diag::kind DiagID = RequestingModule->getTopLevelModule()->IsFramework ? diag::warn_non_modular_include_in_framework_module : diag::warn_non_modular_include_in_module;"}} }, ["warn_non_modular_include_in_module"]={ [k]={"incomplete-module","non-modular-include-in-module"}, [l]="non-modular-include-in-module", [h]="warn_non_modular_include_in_module", [b]="include of non-modular header inside module \'%0\': \'%1\'", [f]="include of non-modular header inside module \'A\': \'B\'", [e]=j, [a]="include of non\\-modular header inside module \'(.*?)\'\\: \'(.*?)\'", [c]=" \\[(?:\\-Werror,)?\\-Wnon\\-modular\\-include\\-in\\-module[^\\]]*\\]", [i]=B, [d]={"71e1a64f916e",1399326253,"Add -Wnon-modular-include* options","Add -Wnon-modular-include* options\n\nWarn on non-modular includes in various contexts.\n\n-Wnon-modular-include\n -Wnon-modular-include-in-module\n -Wnon-modular-include-in-framework-module\n\nWhere each group is a subgroup of those above it.\n\nllvm-svn: 208004"}, [g]={{"clang/lib/Lex/ModuleMap.cpp",547,"void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule, bool RequestingModuleIsModuleInterface, SourceLocation FilenameLoc, StringRef Filename, FileEntryRef File) {\n // ...\n if (RequestingModule && LangOpts.ModulesStrictDeclUse) {\n // ...\n } else if (RequestingModule && RequestingModuleIsModuleInterface && LangOpts.isCompilingModule()) {\n // ...\n diag::kind DiagID = RequestingModule->getTopLevelModule()->IsFramework ? diag::warn_non_modular_include_in_framework_module : diag::warn_non_modular_include_in_module;"}}, [m]={ ["clang/test/Modules/incomplete-module.m"]={"clang/test/Modules/Inputs/incomplete_mod.h:1:10: warning: include of non-modular header inside module \'incomplete_mod\': \'clang/test/Modules/Inputs/incomplete_mod_missing.h\' [-Wnon-modular-include-in-module]"} } }, ["warn_non_pod_vararg_with_format_string"]={ [k]={"class-varargs","non-pod-varargs"}, [l]="non-pod-varargs", [h]="warn_non_pod_vararg_with_format_string", [b]="cannot pass %select{non-POD|non-trivial}0 object of type %1 to variadic %select{function|block|method|constructor}2; expected type from format string was %3", [f]={{nil,nil,{"cannot pass ",{"non-POD","non-trivial"}," object of type B to variadic ",{Yb,"block","method","constructor"},"; expected type from format string was D"}}}, [e]="(?:error|warning|fatal error)\\: ", [a]="cannot pass (?:non\\-POD|non\\-trivial) object of type (.*?) to variadic (?:function|block|method|constructor); expected type from format string was (.*?)", [c]=" \\[[^\\]]*\\-Wnon\\-pod\\-varargs[^\\]]*\\]", [i]=o, [d]={"c7b0bdffe75c",1340240915,"If an object (such as a std::string) with an appropriate c_str() member function","If an object (such as a std::string) with an appropriate c_str() member function\nis passed to a variadic function in a position where a format string indicates\nthat c_str()\'s return type is desired, provide a note suggesting that the user\nmay have intended to call the c_str() member.\n\nFactor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and\nmove it to SemaChecking in order to facilitate this. Factor the call checking\nout of function call checking and block call checking, and extend it to cover\nconstructor calls too.\n\nPatch by Sam Panzer!\n\nllvm-svn: 158887"}, [g]={{E,11385,"bool CheckPrintfHandler::checkFormatExpr(const analyze_printf::PrintfSpecifier &FS, const char *StartSpecifier, unsigned SpecifierLen, const Expr *E) {\n // ...\n if (Success) {\n // ...\n } else {\n // ...\n case Sema::VAK_Undefined:\n case Sema::VAK_MSVCUndefined:\n if (CallType == Sema::VariadicDoesNotApply) {\n // ...\n } else {\n EmitFormatDiagnostic(S.PDiag(diag::warn_non_pod_vararg_with_format_string) << S.getLangOpts().CPlusPlus11 << ExprTy << CallType << AT.getRepresentativeTypeName(S.Context) << CSR << E->getSourceRange(), E->getBeginLoc(), /*IsStringLocation*/ false, CSR);"}}, [m]={ ["clang/test/SemaCXX/vararg-class.cpp"]={"clang/test/SemaCXX/vararg-class.cpp:35:11: error: cannot pass non-trivial object of type \'B\' to variadic function; expected type from format string was \'char *\' [-Wnon-pod-varargs]"} } }, ["warn_non_prototype_changes_behavior"]={ [k]={"deprecated-non-prototype","strict-prototypes"}, [l]="deprecated-non-prototype", [h]={{nil,P,"warn_non_prototype_changes_behavior"}}, [b]={{nil,P,"a function %select{declaration|definition}0 without a prototype is deprecated in all versions of C %select{and is not supported in C2x|and is treated as a zero-parameter prototype in C2x, conflicting with a %select{previous|subsequent}2 %select{declaration|definition}3}1"}}, [f]={{nil,P,{"a function ",{"declaration","definition"}," without a prototype is deprecated in all versions of C ",{"and is not supported in C2x",{"and is treated as a zero-parameter prototype in C2x, conflicting with a ",{"previous","subsequent"}," ",{"declaration","definition"}}}}}}, [e]=j, [a]="a function (?:declaration|definition) without a prototype is deprecated in all versions of C (?:and is not supported in C2x|and is treated as a zero\\-parameter prototype in C2x, conflicting with a (?:previous|subsequent) (?:declaration|definition))", [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-non\\-prototype[^\\]]*\\]", [i]={{nil,P,o}}, [d]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs","Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/classes (the\ntype information may be lost through a function pointer, a declaration\nor use of the underlying type without using the typedef, etc) but I\nthink there\'s still value in being able to attribute a typedef and have\nall return types written with that typedef pick up the\nwarn_unused_result behavior.\n\nSpecifically I\'d like to be able to annotate LLVMErrorRef (a wrapper for\nllvm::Error used in the C API - the underlying type is a raw pointer, so\nit can\'t be attributed itself) to reduce the chance of unhandled errors.\n\nDifferential Revision: https://reviews.llvm.org/D102122"}, [g]={{xb,4166,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n // C: Function types need to be compatible, not identical. This handles\n // duplicate function decls like \"void f(int); void f(enum X);\" properly.\n if (!getLangOpts().CPlusPlus) {\n // ...\n // If we are merging two functions where only one of them has a prototype,\n // we may have enough information to decide to issue a diagnostic that the\n // function without a protoype will change behavior in C2x. This handles\n // cases like:\n // void i(); void i(int j);\n // void i(int j); void i();\n // void i(); void i(int j) {}\n // See ActOnFinishFunctionBody() for other cases of the behavior change\n // diagnostic. See GetFullTypeForDeclarator() for handling of a function\n // type without a prototype.\n if (New->hasWrittenPrototype() != Old->hasWrittenPrototype() && !New->isImplicit() && !Old->isImplicit()) {\n // ...\n if (WithProto->getNumParams() != 0) {\n if (WithoutProto->getBuiltinID() == 0 && !WithoutProto->isImplicit()) {\n // ...\n Diag(WithoutProto->getLocation(), diag::warn_non_prototype_changes_behavior) << IsWithoutProtoADef << (WithoutProto->getNumParams() ? 0 : 1) << (WithoutProto == Old) << IsWithProtoADef;"},{xb,15766,"Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, bool IsInstantiation) {\n // ...\n {\n // ...\n if (FD) {\n // ...\n // If the function being defined does not have a prototype, then we may\n // need to diagnose it as changing behavior in C2x because we now know\n // whether the function accepts arguments or not. This only handles the\n // case where the definition has no prototype but does have parameters\n // and either there is no previous potential prototype, or the previous\n // potential prototype also has no actual prototype. This handles cases\n // like:\n // void f(); void f(a) int a; {}\n // void g(a) int a; {}\n // See MergeFunctionDecl() for other cases of the behavior change\n // diagnostic. See GetFullTypeForDeclarator() for handling of a function\n // type without a prototype.\n if (!FD->hasWrittenPrototype() && FD->getNumParams() != 0 && (!PossiblePrototype || (!PossiblePrototype->hasWrittenPrototype() && !PossiblePrototype->isImplicit()))) {\n // ...\n Diag(FD->getLocation(), diag::warn_non_prototype_changes_behavior) << /*definition*/ 1 << /* not supported in C2x */ 0;"},{xb,15776,"Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, bool IsInstantiation) {\n // ...\n {\n // ...\n if (FD) {\n // ...\n // If the function being defined does not have a prototype, then we may\n // need to diagnose it as changing behavior in C2x because we now know\n // whether the function accepts arguments or not. This only handles the\n // case where the definition has no prototype but does have parameters\n // and either there is no previous potential prototype, or the previous\n // potential prototype also has no actual prototype. This handles cases\n // like:\n // void f(); void f(a) int a; {}\n // void g(a) int a; {}\n // See MergeFunctionDecl() for other cases of the behavior change\n // diagnostic. See GetFullTypeForDeclarator() for handling of a function\n // type without a prototype.\n if (!FD->hasWrittenPrototype() && FD->getNumParams() != 0 && (!PossiblePrototype || (!PossiblePrototype->hasWrittenPrototype() && !PossiblePrototype->isImplicit()))) {\n // ...\n // If we have a possible prototype for the function which is a user-\n // visible declaration, we already tested that it has no prototype.\n // This will change behavior in C2x. This gets a warning rather than a\n // note because it\'s the same behavior-changing problem as with the\n // definition.\n if (PossiblePrototype)\n Diag(PossiblePrototype->getLocation(), diag::warn_non_prototype_changes_behavior) << /*declaration*/ 0 << /* conflicting */ 1 << /*subsequent*/ 1 << /*definition*/ 1;"}}, [m]={ ["clang/test/Parser/declarators.c"]={"clang/test/Parser/declarators.c:30:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]","clang/test/Parser/declarators.c:34:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]","clang/test/Parser/declarators.c:101:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]","clang/test/Parser/declarators.c:103:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]","clang/test/Parser/declarators.c:105:6: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]"} } }, ["warn_non_virtual_dtor"]={ [k]={"effc++","non-virtual-dtor"}, [l]="non-virtual-dtor", [h]="warn_non_virtual_dtor", [b]="%0 has virtual functions but non-virtual destructor", [f]="A has virtual functions but non-virtual destructor", [e]=j, [a]="(.*?) has virtual functions but non\\-virtual destructor", [c]=" \\[(?:\\-Werror,)?\\-Wnon\\-virtual\\-dtor[^\\]]*\\]", [i]=o, [d]={"7f3986dc64fd",1296457500,"Warn if the class has virtual methods but non-virtual destructor. Addresses rdar://8756445.","Warn if the class has virtual methods but non-virtual destructor. Addresses rdar://8756445.\n\nllvm-svn: 124582"}, [g]={{Nb,6969,"/// Perform semantic checks on a class definition that has been\n/// completing, introducing implicitly-declared members, checking for\n/// abstract types, etc.\n///\n/// \\param S The scope in which the class was parsed. Null if we didn\'t just\n/// parse a class definition.\n/// \\param Record The completed class.\nvoid Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) {\n // ...\n // Warn if the class has virtual methods but non-virtual public destructor.\n if (Record->isPolymorphic() && !Record->isDependentType()) {\n // ...\n if ((!dtor || (!dtor->isVirtual() && dtor->getAccess() == AS_public)) && !Record->hasAttr<FinalAttr>())\n Diag(dtor ? dtor->getLocation() : Record->getLocation(), diag::warn_non_virtual_dtor) << Context.getRecordType(Record);"}} }, ["warn_nonnull_expr_compare"]={ [k]={u,"address",v,w,"tautological-compare","tautological-pointer-compare"}, [l]="tautological-pointer-compare", [h]="warn_nonnull_expr_compare", [b]="comparison of nonnull %select{function call|parameter}0 \'%1\' %select{not |}2equal to a null pointer is \'%select{true|false}2\' on first encounter", [f]={{nil,nil,{"comparison of nonnull ",{"function call","parameter"}," \'B\' ",{"not ",T},"equal to a null pointer is \'",{gc,ec},"\' on first encounter"}}}, [e]=j, [a]="comparison of nonnull (?:function call|parameter) \'(.*?)\' (?:not |)equal to a null pointer is \'(?:true|false)\' on first encounter", [c]=" \\[(?:\\-Werror,)?\\-Wtautological\\-pointer\\-compare[^\\]]*\\]", [i]=o, [d]={"850269a47eed",1449612120,"[Sema] Add warning when comparing nonnull and null","[Sema] Add warning when comparing nonnull and null\n\nCurrently, we emit warnings in some cases where nonnull function\nparameters are compared against null. This patch extends this support\nto warn when comparing the result of `returns_nonnull` functions\nagainst null.\n\nMore specifically, we will now warn cases like:\n\nint *foo() __attribute__((returns_nonnull));\nint main() {\n if (foo() == NULL) {} // warning: will always evaluate to false\n}\n\nDifferential Revision: http://reviews.llvm.org/D15324\n\nllvm-svn: 255058"}, [g]={{E,15489,"/// Diagnose pointers that are always non-null.\n/// \\param E the expression containing the pointer\n/// \\param NullKind NPCK_NotNull if E is a cast to bool, otherwise, E is\n/// compared to a null pointer\n/// \\param IsEqual True when the comparison is equal to a null pointer\n/// \\param Range Extra SourceRange to highlight in the diagnostic\nvoid Sema::DiagnoseAlwaysNonNullPointer(Expr *E, Expr::NullPointerConstantKind NullKind, bool IsEqual, SourceRange Range) {\n // ...\n auto ComplainAboutNonnullParamOrCall = [&](const Attr *NonnullAttr) {\n // ...\n unsigned DiagID = IsCompare ? diag::warn_nonnull_expr_compare : diag::warn_cast_nonnull_to_bool;"}}, [m]={ ["clang/test/Sema/nonnull.c"]={"clang/test/Sema/nonnull.c:96:8: warning: comparison of nonnull parameter \'pointer\' equal to a null pointer is \'false\' on first encounter [-Wtautological-pointer-compare]","clang/test/Sema/nonnull.c:108:8: warning: comparison of nonnull parameter \'pv\' equal to a null pointer is \'false\' on first encounter [-Wtautological-pointer-compare]","clang/test/Sema/nonnull.c:114:8: warning: comparison of nonnull parameter \'pointer\' equal to a null pointer is \'false\' on first encounter [-Wtautological-pointer-compare]","clang/test/Sema/nonnull.c:126:8: warning: comparison of nonnull parameter \'pv\' equal to a null pointer is \'false\' on first encounter [-Wtautological-pointer-compare]","clang/test/Sema/nonnull.c:164:7: warning: comparison of nonnull function call \'returns_nonnull_whee()\' equal to a null pointer is \'false\' on first encounter [-Wtautological-pointer-compare]","clang/test/Sema/nonnull.c:166:7: warning: comparison of nonnull function call \'returns_nonnull_whee()\' not equal to a null pointer is \'true\' on first encounter [-Wtautological-pointer-compare]"} } }, ["warn_noreturn_function_has_return_expr"]={ [k]={"invalid-noreturn"}, [l]="invalid-noreturn", [h]="warn_noreturn_function_has_return_expr", [b]="function %0 declared \'noreturn\' should not return", [f]="function A declared \'noreturn\' should not return", [e]=j, [a]="function (.*?) declared \'noreturn\' should not return", [c]=" \\[(?:\\-Werror,)?\\-Winvalid\\-noreturn[^\\]]*\\]", [i]=o, [d]={"6e127a6d8642",1243798333,"Downgrade an error about \"return in a no-return function\" from being ","Downgrade an error about \"return in a no-return function\" from being \nan error to being a warning that defaults to error. If you want this to\nbe a warning, you have to explicitly pass -Winvalid-noreturn to clang to\nmap it back to a warning.\n\nllvm-svn: 72669"}, [g]={{Tb,631,"struct CheckFallThroughDiagnostics {\n // ...\n bool checkDiagnostics(DiagnosticsEngine &D, bool ReturnsVoid, bool HasNoReturn) const {\n if (funMode == Function) {\n return (ReturnsVoid || D.isIgnored(diag::warn_maybe_falloff_nonvoid_function, FuncLoc)) && (!HasNoReturn || D.isIgnored(diag::warn_noreturn_function_has_return_expr, FuncLoc)) && (!ReturnsVoid || D.isIgnored(diag::warn_suggest_noreturn_block, FuncLoc));"},{Kb,3962,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n // ...\n if (const FunctionDecl *FD = getCurFunctionDecl()) {\n // ...\n if (FD->isNoReturn())\n Diag(ReturnLoc, diag::warn_noreturn_function_has_return_expr) << FD;"}}, [m]={ ["clang/test/Sema/attr-noreturn.c"]={"clang/test/Sema/attr-noreturn.c:20:3: warning: function \'f3\' declared \'noreturn\' should not return [-Winvalid-noreturn]","clang/test/Sema/attr-noreturn.c:27:3: error: function \'f4\' declared \'noreturn\' should not return [-Werror,-Winvalid-noreturn]"} } }, ["warn_not_a_doxygen_trailing_member_comment"]={ [k]={"documentation"}, [l]="documentation", [h]="warn_not_a_doxygen_trailing_member_comment", [b]="not a Doxygen trailing comment", [f]="not a Doxygen trailing comment", [e]=j, [a]="not a Doxygen trailing comment", [c]=" \\[(?:\\-Werror,)?\\-Wdocumentation[^\\]]*\\]", [i]="Documentation Issue", [d]={"052f60d3846f",1340380975,"Add a warning about almost-Doxygen trailing comments: //< and /*< ... */","Add a warning about almost-Doxygen trailing comments: //< and /*< ... */\n\nllvm-svn: 159001"}, [g]={{"clang/lib/Sema/Sema.cpp",2421,"void Sema::ActOnComment(SourceRange Comment) {\n // ...\n if (RC.isAlmostTrailingComment() || RC.hasUnsupportedSplice(SourceMgr)) {\n // ...\n Diag(Comment.getBegin(), diag::warn_not_a_doxygen_trailing_member_comment) << FixItHint::CreateReplacement(MagicMarkerRange, MagicMarkerText);"}}, [m]={ ["clang/test/Sema/warn-documentation-almost-trailing.c"]={"clang/test/Sema/warn-documentation-almost-trailing.c:8:10: warning: not a Doxygen trailing comment [-Wdocumentation]","clang/test/Sema/warn-documentation-almost-trailing.c:9:10: warning: not a Doxygen trailing comment [-Wdocumentation]"} } }, ["warn_not_compound_assign"]={ [h]="warn_not_compound_assign", [b]="use of unary operator that may be intended as compound assignment (%0=)", [f]="use of unary operator that may be intended as compound assignment (A=)", [e]=j, [a]="use of unary operator that may be intended as compound assignment \\((.*?)\\=\\)", [c]=wb, [i]=o, [d]={"5a8987ca5113",1237025389,"Update tablegen diagnostic files to be in sync with the def files.","Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"}, [g]={{I,14527,"// C99 6.5.16.1\nQualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType, BinaryOperatorKind Opc) {\n // ...\n if (CompoundType.isNull()) {\n // ...\n if (UnaryOperator *UO = dyn_cast<UnaryOperator>(RHSCheck)) {\n if ((UO->getOpcode() == UO_Plus || UO->getOpcode() == UO_Minus) && Loc.isFileID() && UO->getOperatorLoc().isFileID() &&\n // ...\n Diag(Loc, diag::warn_not_compound_assign) << (UO->getOpcode() == UO_Plus ? \"+\" : \"-\") << SourceRange(UO->getOperatorLoc(), UO->getOperatorLoc());"}}, [m]={ ["clang/test/Sema/exprs.c"]={"clang/test/Sema/exprs.c:55:11: warning: use of unary operator that may be intended as compound assignment (+=)","clang/test/Sema/exprs.c:56:11: warning: use of unary operator that may be intended as compound assignment (-=)"} } }, ["warn_not_enough_argument"]={ [k]={"sentinel"}, [l]="sentinel", [h]="warn_not_enough_argument", [b]="not enough variable arguments in %0 declaration to fit a sentinel", [f]="not enough variable arguments in A declaration to fit a sentinel", [e]=j, [a]="not enough variable arguments in (.*?) declaration to fit a sentinel", [c]=" \\[(?:\\-Werror,)?\\-Wsentinel[^\\]]*\\]", [i]=o, [d]={"9e87721d47fd",1242256850,"Look for and diagnose missing sentinel argument on message","Look for and diagnose missing sentinel argument on message\ndispatch arguments which have sentinel attribute.\n\nllvm-svn: 71737"}, [g]={{I,473,"/// DiagnoseSentinelCalls - This routine checks whether a call or\n/// message-send is to a declaration with the sentinel attribute, and\n/// if so, it checks that the requirements of the sentinel are\n/// satisfied.\nvoid Sema::DiagnoseSentinelCalls(NamedDecl *D, SourceLocation Loc, ArrayRef<Expr *> Args) {\n // ...\n // If there aren\'t enough arguments for all the formal parameters,\n // the sentinel, and the args after the sentinel, complain.\n if (Args.size() < numFormalParams + numArgsAfterSentinel + 1) {\n Diag(Loc, diag::warn_not_enough_argument) << D->getDeclName();"}}, [m]={ ["clang/test/SemaObjC/method-sentinel-attr.m"]={"clang/test/SemaObjC/method-sentinel-attr.m:38:6: warning: not enough variable arguments in \'foo7:\' declaration to fit a sentinel [-Wsentinel]","clang/test/SemaObjC/method-sentinel-attr.m:41:6: warning: not enough variable arguments in \'foo12:\' declaration to fit a sentinel [-Wsentinel]"} } }, ["warn_not_in_enum"]={ [k]={u,v,"switch"}, [l]="switch", [h]="warn_not_in_enum", [b]="case value not in enumerated type %0", [f]="case value not in enumerated type A", [e]=j, [a]="case value not in enumerated type (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wswitch[^\\]]*\\]", [i]=o, [d]={"d3dfbd6f4fd7",1274152761,"If a switch condition is constant, don\'t warn about missing enum cases.","If a switch condition is constant, don\'t warn about missing enum cases.\nIf a switch condition is constant, warn if there\'s no case for it.\n\nConstant switch conditions do come up in reasonable template code.\n\nllvm-svn: 104010"}, [g]={{Kb,1526,"StmtResult Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *BodyStmt) {\n // ...\n if (!HasDependentValue) {\n // ...\n // If switch has default case, then ignore it.\n if (!CaseListIsErroneous && !CaseListIsIncomplete && !HasConstantCond && ET && ET->getDecl()->isCompleteDefinition() && !ET->getDecl()->enumerators().empty()) {\n // ...\n // See which case values aren\'t in enum.\n for (CaseValsTy::const_iterator CI = CaseVals.begin(); CI != CaseVals.end(); CI++) {\n // ...\n if (ShouldDiagnoseSwitchCaseNotInEnum(*this, ED, CaseExpr, EI, EIEnd, CI->first))\n Diag(CaseExpr->getExprLoc(), diag::warn_not_in_enum) << CondTypeBeforePromotion;"},{Kb,1537,"StmtResult Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *BodyStmt) {\n // ...\n if (!HasDependentValue) {\n // ...\n // If switch has default case, then ignore it.\n if (!CaseListIsErroneous && !CaseListIsIncomplete && !HasConstantCond && ET && ET->getDecl()->isCompleteDefinition() && !ET->getDecl()->enumerators().empty()) {\n // ...\n for (CaseRangesTy::const_iterator RI = CaseRanges.begin(); RI != CaseRanges.end(); RI++) {\n // ...\n if (ShouldDiagnoseSwitchCaseNotInEnum(*this, ED, CaseExpr, EI, EIEnd, RI->first))\n Diag(CaseExpr->getExprLoc(), diag::warn_not_in_enum) << CondTypeBeforePromotion;"},{Kb,1547,"StmtResult Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *BodyStmt) {\n // ...\n if (!HasDependentValue) {\n // ...\n // If switch has default case, then ignore it.\n if (!CaseListIsErroneous && !CaseListIsIncomplete && !HasConstantCond && ET && ET->getDecl()->isCompleteDefinition() && !ET->getDecl()->enumerators().empty()) {\n // ...\n for (CaseRangesTy::const_iterator RI = CaseRanges.begin(); RI != CaseRanges.end(); RI++) {\n // ...\n if (ShouldDiagnoseSwitchCaseNotInEnum(*this, ED, CaseExpr, EI, EIEnd, Hi))\n Diag(CaseExpr->getExprLoc(), diag::warn_not_in_enum) << CondTypeBeforePromotion;"}}, [m]={ ["clang/test/SemaCXX/enum-attr.cpp"]={"clang/test/SemaCXX/enum-attr.cpp:32:8: warning: case value not in enumerated type \'enum Enum\' [-Wswitch]","clang/test/SemaCXX/enum-attr.cpp:45:8: warning: case value not in enumerated type \'enum EnumClosed\' [-Wswitch]","clang/test/SemaCXX/enum-attr.cpp:72:8: warning: case value not in enumerated type \'enum EnumFlag\' [-Wswitch]","clang/test/SemaCXX/enum-attr.cpp:86:8: warning: case value not in enumerated type \'enum EnumFlagClosed\' [-Wswitch]"} } }, ["warn_not_in_enum_assignment"]={ [k]={"assign-enum"}, [l]="assign-enum", [h]="warn_not_in_enum_assignment", [b]="integer constant not in range of enumerated type %0", [f]="integer constant not in range of enumerated type A", [e]=j, [a]="integer constant not in range of enumerated type (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wassign\\-enum[^\\]]*\\]", [i]=o, [d]={"1ba2733e2cde",1370526480,"Fix a crash with -Wassign-enum, where we didn\'t adjust the APInt type of the","Fix a crash with -Wassign-enum, where we didn\'t adjust the APInt type of the\nconstant. Also fix some spelling mistakes and formatting issues.\n\nReviewed by Richard Smith over IRC.\n\nFixes PR15069.\n\nllvm-svn: 183409"}, [g]={{Kb,1633,"void Sema::DiagnoseAssignmentEnum(QualType DstType, QualType SrcType, Expr *SrcExpr) {\n if (Diags.isIgnored(diag::warn_not_in_enum_assignment, SrcExpr->getExprLoc()))"},{Kb,1654,"void Sema::DiagnoseAssignmentEnum(QualType DstType, QualType SrcType, Expr *SrcExpr) {\n // ...\n if (const EnumType *ET = DstType->getAs<EnumType>())\n if (!Context.hasSameUnqualifiedType(SrcType, DstType) && SrcType->isIntegerType()) {\n if (!SrcExpr->isTypeDependent() && !SrcExpr->isValueDependent() && SrcExpr->isIntegerConstantExpr(Context)) {\n // ...\n if (ED->hasAttr<FlagEnumAttr>()) {\n if (!IsValueInFlagEnum(ED, RhsVal, true))\n Diag(SrcExpr->getExprLoc(), diag::warn_not_in_enum_assignment) << DstType.getUnqualifiedType();"},{Kb,1679,"void Sema::DiagnoseAssignmentEnum(QualType DstType, QualType SrcType, Expr *SrcExpr) {\n // ...\n if (const EnumType *ET = DstType->getAs<EnumType>())\n if (!Context.hasSameUnqualifiedType(SrcType, DstType) && SrcType->isIntegerType()) {\n if (!SrcExpr->isTypeDependent() && !SrcExpr->isValueDependent() && SrcExpr->isIntegerConstantExpr(Context)) {\n // ...\n if (ED->hasAttr<FlagEnumAttr>()) {\n // ...\n } else {\n // ...\n if (EI == EIend || EI->first != RhsVal) {\n Diag(SrcExpr->getExprLoc(), diag::warn_not_in_enum_assignment) << DstType.getUnqualifiedType();"}}, [m]={ ["clang/test/Sema/attr-flag-enum.c"]={"clang/test/Sema/attr-flag-enum.c:49:7: warning: integer constant not in range of enumerated type \'enum flag\' [-Wassign-enum]","clang/test/Sema/attr-flag-enum.c:50:7: warning: integer constant not in range of enumerated type \'enum flag\' [-Wassign-enum]","clang/test/Sema/attr-flag-enum.c:55:7: warning: integer constant not in range of enumerated type \'enum flag\' [-Wassign-enum]","clang/test/Sema/attr-flag-enum.c:76:7: warning: integer constant not in range of enumerated type \'enum flag4\' [-Wassign-enum]"} } }, ["warn_not_xl_compatible"]={ [k]={"aix-compat"}, [l]="aix-compat", [h]={{nil,H,"warn_not_xl_compatible"}}, [b]={{nil,P,"alignment of 16 bytes for a struct member is not binary compatible with IBM XL C/C++ for AIX 16.1.0 or older"},{F,F,"requesting an alignment of 16 bytes or greater for struct members is not binary compatible with IBM XL C/C++ for AIX 16.1.0 and older"},{H,H,"requesting an alignment of 16 bytes or greater for struct members is not binary compatible with AIX XL 16.1 and older"}}, [f]={{nil,P,"alignment of 16 bytes for a struct member is not binary compatible with IBM XL C/C++ for AIX 16.1.0 or older"},{F,F,"requesting an alignment of 16 bytes or greater for struct members is not binary compatible with IBM XL C/C++ for AIX 16.1.0 and older"},{H,H,"requesting an alignment of 16 bytes or greater for struct members is not binary compatible with AIX XL 16.1 and older"}}, [e]=j, [a]="alignment of 16 bytes for a struct member is not binary compatible with IBM XL C\\/C\\+\\+ for AIX 16\\.1\\.0 or older", [c]=" \\[(?:\\-Werror,)?\\-Waix\\-compat[^\\]]*\\]", [i]={{nil,H,o}}, [d]={"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"}, [g]={{E,6602,"// 16 byte ByVal alignment not due to a vector member is not honoured by XL\n// on AIX. Emit a warning here that users are generating binary incompatible\n// code to be safe.\n// Here we try to get information about the alignment of the struct member\n// from the struct passed to the caller function. We only warn when the struct\n// is passed byval, hence the series of checks and early returns if we are a not\n// passing a struct byval.\nvoid Sema::checkAIXMemberAlignment(SourceLocation Loc, const Expr *Arg) {\n // ...\n for (const FieldDecl *FD : ArgType->castAs<RecordType>()->getDecl()->fields()) {\n if (const auto *AA = FD->getAttr<AlignedAttr>()) {\n // ...\n if (Alignment.getQuantity() == 16) {\n Diag(FD->getLocation(), diag::warn_not_xl_compatible) << FD;"}}, [m]={ ["clang/test/Sema/aix-attr-align.c"]={"clang/test/Sema/aix-attr-align.c:15:7: warning: alignment of 16 bytes for a struct member is not binary compatible with IBM XL C/C++ for AIX 16.1.0 or older [-Waix-compat]"} } }, ["warn_nothrow_attribute_ignored"]={ [k]={Cb,cb}, [l]=cb, [h]={{nil,p,"warn_nothrow_attribute_ignored"}}, [b]={{nil,p,"\'nothrow\' attribute conflicts with exception specification; attribute ignored"}}, [f]={{nil,p,"\'nothrow\' attribute conflicts with exception specification; attribute ignored"}}, [e]=j, [a]="\'nothrow\' attribute conflicts with exception specification; attribute ignored", [c]=Ab, [i]={{nil,p,o}}, [d]={"d02f4a1043c0",1559237514,"Add Attribute NoThrow as an Exception Specifier Type","Add Attribute NoThrow as an Exception Specifier Type\n\nIn response to https://bugs.llvm.org/show_bug.cgi?id=33235, it became\nclear that the current mechanism of hacking through checks for the\nexception specification of a function gets confused really quickly when\nthere are alternate exception specifiers.\n\nThis patch introcues EST_NoThrow, which is the equivilent of\nEST_noexcept when caused by EST_noThrow. The existing implementation is\nleft in place to cover functions with no FunctionProtoType.\n\nDifferential Revision: https://reviews.llvm.org/D62435\n\nllvm-svn: 362119"}, [g]={{nb,7941,"/// Process an individual function attribute. Returns true to\n/// indicate that the attribute was handled, false if it wasn\'t.\nstatic bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // ...\n if (attr.getKind() == ParsedAttr::AT_NoThrow) {\n // ...\n // MSVC ignores nothrow if it is in conflict with an explicit exception\n // specification.\n if (Proto->hasExceptionSpec()) {\n // ...\n case EST_Dynamic:\n case EST_MSAny:\n case EST_NoexceptFalse:\n S.Diag(attr.getLoc(), diag::warn_nothrow_attribute_ignored);"}}, [m]={ ["clang/test/SemaCXX/nothrow-vs-exception-specs.cpp"]={"clang/test/SemaCXX/nothrow-vs-exception-specs.cpp:45:16: warning: \'nothrow\' attribute conflicts with exception specification; attribute ignored [-Wignored-attributes]","clang/test/SemaCXX/nothrow-vs-exception-specs.cpp:51:12: warning: \'nothrow\' attribute conflicts with exception specification; attribute ignored [-Wignored-attributes]","clang/test/SemaCXX/nothrow-vs-exception-specs.cpp:55:12: warning: \'nothrow\' attribute conflicts with exception specification; attribute ignored [-Wignored-attributes]"} } }, ["warn_npot_ms_struct"]={ [k]={"incompatible-ms-struct"}, [l]="incompatible-ms-struct", [h]={{nil,x,"warn_npot_ms_struct"}}, [b]={{nil,x,"ms_struct may not produce Microsoft-compatible layouts with fundamental data types with sizes that aren\'t a power of two"}}, [f]={{nil,x,"ms_struct may not produce Microsoft-compatible layouts with fundamental data types with sizes that aren\'t a power of two"}}, [e]="(?:error|warning|fatal error)\\: ", [a]="ms_struct may not produce Microsoft\\-compatible layouts with fundamental data types with sizes that aren\'t a power of two", [c]=" \\[[^\\]]*\\-Wincompatible\\-ms\\-struct[^\\]]*\\]", [i]={{nil,K,O},{zb,x,o}}, [d]={"87c2ad29ee4e",1519935777,"[RecordLayout] Only assert that fundamental type sizes are power of two on MSVC","[RecordLayout] Only assert that fundamental type sizes are power of two on MSVC\n\nMake types with sizes that aren\'t a power of two an error (that can\nbe disabled) in structs with ms_struct layout, except on mingw where\nthe situation is quite likely to occur and GCC handles it silently.\n\nDifferential Revision: https://reviews.llvm.org/D43908\n\nllvm-svn: 326476"}, [g]={{"clang/lib/AST/RecordLayoutBuilder.cpp",1958,"void ItaniumRecordLayoutBuilder::LayoutField(const FieldDecl *D, bool InsertExtraPadding) {\n // ...\n if (D->getType()->isIncompleteArrayType()) {\n // ...\n } else {\n // ...\n if (IsMsStruct) {\n // ...\n if (const BuiltinType *BTy = T->getAs<BuiltinType>()) {\n // ...\n if (!llvm::isPowerOf2_64(TypeSize.getQuantity())) {\n // ...\n // Since the combination of -mms-bitfields together with structs\n // like max_align_t (which contains a long double) for mingw is\n // quite common (and GCC handles it silently), just handle it\n // silently there. For other targets that have ms_struct enabled\n // (most probably via a pragma or attribute), trigger a diagnostic\n // that defaults to an error.\n if (!Context.getTargetInfo().getTriple().isWindowsGNUEnvironment())\n Diag(D->getLocation(), diag::warn_npot_ms_struct);"}} }, ["warn_ns_attribute_wrong_parameter_type"]={ [k]={Cb,cb}, [l]=cb, [h]="warn_ns_attribute_wrong_parameter_type", [b]={{nil,K,"%0 attribute only applies to %select{Objective-C object|pointer|pointer-to-CF-pointer|pointer/reference-to-OSObject-pointer}1 parameters"},{zb,nil,"%0 attribute only applies to %select{Objective-C object|pointer|pointer-to-CF-pointer}1 parameters"}}, [f]={{nil,K,{"A attribute only applies to ",{"Objective-C object",cc,"pointer-to-CF-pointer","pointer/reference-to-OSObject-pointer"}," parameters"}},{zb,nil,{"A attribute only applies to ",{"Objective-C object",cc,"pointer-to-CF-pointer"}," parameters"}}}, [e]=j, [a]="(.*?) attribute only applies to (?:Objective\\-C object|pointer|pointer\\-to\\-CF\\-pointer|pointer\\/reference\\-to\\-OSObject\\-pointer) parameters", [c]=Ab, [i]=o, [d]={"ed433937c2b8",1295926318,"Add the ns_consumes_self, ns_consumed, cf_consumed, and ns_returns_autoreleased","Add the ns_consumes_self, ns_consumed, cf_consumed, and ns_returns_autoreleased\nattributes for the benefit of the static analyzer.\n\nllvm-svn: 124174"}, [g]={{V,5898,"void Sema::AddXConsumedAttr(Decl *D, const AttributeCommonInfo &CI, RetainOwnershipKind K, bool IsTemplateInstantiation) {\n // ...\n case RetainOwnershipKind::OS:\n handleSimpleAttributeOrDiagnose<OSConsumedAttr>(*this, VD, CI, isValidSubjectOfOSAttribute(VD->getType()), diag::warn_ns_attribute_wrong_parameter_type,"},{V,5911,"void Sema::AddXConsumedAttr(Decl *D, const AttributeCommonInfo &CI, RetainOwnershipKind K, bool IsTemplateInstantiation) {\n // ...\n case RetainOwnershipKind::NS:\n handleSimpleAttributeOrDiagnose<NSConsumedAttr>(*this, VD, CI, isValidSubjectOfNSAttribute(VD->getType()),\n // ...\n ((IsTemplateInstantiation && getLangOpts().ObjCAutoRefCount) ? diag::err_ns_attribute_wrong_parameter_type : diag::warn_ns_attribute_wrong_parameter_type),"},{V,5917,"void Sema::AddXConsumedAttr(Decl *D, const AttributeCommonInfo &CI, RetainOwnershipKind K, bool IsTemplateInstantiation) {\n // ...\n case RetainOwnershipKind::CF:\n handleSimpleAttributeOrDiagnose<CFConsumedAttr>(*this, VD, CI, isValidSubjectOfCFAttribute(VD->getType()), diag::warn_ns_attribute_wrong_parameter_type,"},{V,5989,"static void handleXReturnsXRetainedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {\n // ...\n } else if (S.getLangOpts().ObjCAutoRefCount && hasDeclarator(D) && (AL.getKind() == ParsedAttr::AT_NSReturnsRetained)) {\n // ...\n } else if (const auto *PD = dyn_cast<ObjCPropertyDecl>(D)) {\n // ...\n } else if (const auto *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n } else if (const auto *Param = dyn_cast<ParmVarDecl>(D)) {\n // ...\n if (ReturnType.isNull()) {\n S.Diag(D->getBeginLoc(), diag::warn_ns_attribute_wrong_parameter_type) << AL << DiagID << AL.getRange();"},{V,6053,"static void handleXReturnsXRetainedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!TypeOK) {\n // ...\n if (isa<ParmVarDecl>(D)) {\n S.Diag(D->getBeginLoc(), diag::warn_ns_attribute_wrong_parameter_type) << AL << ParmDiagID << AL.getRange();"},{V,9091,"/// ProcessDeclAttribute - Apply the specific attribute to the specified decl if\n/// the attribute applies to decls. If the attribute is a type attribute, just\n/// silently ignore it if a GNU attribute.\nstatic void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, const Sema::ProcessDeclAttributeOptions &Options) {\n // ...\n case ParsedAttr::AT_OSReturnsRetainedOnZero:\n handleSimpleAttributeOrDiagnose<OSReturnsRetainedOnZeroAttr>(S, D, AL, isValidOSObjectOutParameter(D), diag::warn_ns_attribute_wrong_parameter_type,"},{V,9097,"/// ProcessDeclAttribute - Apply the specific attribute to the specified decl if\n/// the attribute applies to decls. If the attribute is a type attribute, just\n/// silently ignore it if a GNU attribute.\nstatic void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, const Sema::ProcessDeclAttributeOptions &Options) {\n // ...\n case ParsedAttr::AT_OSReturnsRetainedOnNonZero:\n handleSimpleAttributeOrDiagnose<OSReturnsRetainedOnNonZeroAttr>(S, D, AL, isValidOSObjectOutParameter(D), diag::warn_ns_attribute_wrong_parameter_type,"}}, [m]={ ["clang/test/SemaObjC/attr-cf_returns.m"]={"clang/test/SemaObjC/attr-cf_returns.m:38:19: warning: \'cf_returns_retained\' attribute only applies to pointer-to-CF-pointer parameters [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:39:19: warning: \'cf_returns_retained\' attribute only applies to pointer-to-CF-pointer parameters [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:40:19: warning: \'cf_returns_retained\' attribute only applies to pointer-to-CF-pointer parameters [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:41:19: warning: \'cf_returns_retained\' attribute only applies to pointer-to-CF-pointer parameters [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:42:19: warning: \'cf_returns_retained\' attribute only applies to pointer-to-CF-pointer parameters [-Wignored-attributes]"} } }, ["warn_ns_attribute_wrong_return_type"]={ [k]={Cb,cb}, [l]=cb, [h]="warn_ns_attribute_wrong_return_type", [b]="%0 attribute only applies to %select{functions|methods|properties}1 that return %select{an Objective-C object|a pointer|a non-retainable pointer}2", [f]={{nil,nil,{"A attribute only applies to ",{"functions","methods","properties"}," that return ",{"an Objective-C object","a pointer","a non-retainable pointer"}}}}, [e]=j, [a]="(.*?) attribute only applies to (?:functions|methods|properties) that return (?:an Objective\\-C object|a pointer|a non\\-retainable pointer)", [c]=Ab, [i]=o, [d]={"3b204e4c2e06",1242248852,"Add some basic type checking for attributes ns_returns_retained and","Add some basic type checking for attributes ns_returns_retained and\ncf_returns_retained. Currently this attribute can now be applied to any\nObjective-C method or C function that returns a pointer or Objective-C object\ntype.\n\nModify the tablegen definition of diagnostic \'warn_attribute_wrong_decl_type\' to\nexpect that the diagnostics infrastructure will add quotes around the attribute\nname when appropriate. Alonq with this change, I modified the places where this\nwarning is issued to passed the attribute\'s IdentifierInfo* instead of having a\nhard-coded C constant string.\n\nllvm-svn: 71718"}, [g]={{V,5952,"bool Sema::checkNSReturnsRetainedReturnType(SourceLocation Loc, QualType QT) {\n // ...\n Diag(Loc, diag::warn_ns_attribute_wrong_return_type) << \"\'ns_returns_retained\'\" << 0 << 0;"},{V,6066,"static void handleXReturnsXRetainedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!TypeOK) {\n // ...\n if (isa<ParmVarDecl>(D)) {\n // ...\n } else {\n // ...\n S.Diag(D->getBeginLoc(), diag::warn_ns_attribute_wrong_return_type) << AL << SubjectKind << Cf << AL.getRange();"},{V,6113,"static void handleObjCReturnsInnerPointerAttr(Sema &S, Decl *D, const ParsedAttr &Attrs) {\n // ...\n if (!resultType->isReferenceType() && (!resultType->isPointerType() || resultType->isObjCRetainableType())) {\n S.Diag(D->getBeginLoc(), diag::warn_ns_attribute_wrong_return_type) << SourceRange(loc) << Attrs << (isa<ObjCMethodDecl>(D) ? EP_ObjCMethod : EP_ObjCProperty) << /*non-retainable pointer*/ 2;"}}, [m]={ ["clang/test/SemaObjC/attr-cf_returns.m"]={"clang/test/SemaObjC/attr-cf_returns.m:18:1: warning: \'cf_returns_retained\' attribute only applies to functions that return a pointer [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:19:1: warning: \'cf_returns_retained\' attribute only applies to functions that return a pointer [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:25:1: warning: \'cf_returns_retained\' attribute only applies to methods that return a pointer [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:26:1: warning: \'cf_returns_retained\' attribute only applies to methods that return a pointer [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:31:1: warning: \'cf_returns_retained\' attribute only applies to properties that return a pointer [-Wignored-attributes]","clang/test/SemaObjC/attr-cf_returns.m:32:1: warning: \'cf_returns_retained\' attribute only applies to properties that return a pointer [-Wignored-attributes]"} } }, ["warn_nsconsumed_attribute_mismatch"]={ [k]={"nsconsumed-mismatch"}, [l]="nsconsumed-mismatch", [h]={{nil,x,"warn_nsconsumed_attribute_mismatch"}}, [b]={{nil,x,"overriding method has mismatched ns_consumed attribute on its parameter"}}, [f]={{nil,x,"overriding method has mismatched ns_consumed attribute on its parameter"}}, [e]=j, [a]="overriding method has mismatched ns_consumed attribute on its parameter", [c]=" \\[(?:\\-Werror,)?\\-Wnsconsumed\\-mismatch[^\\]]*\\]", [i]={{nil,x,o}}, [d]={"7d85b8f6f651",1505885958,"[Sema][ObjC] Warn about mismatches in attributes between overriding and","[Sema][ObjC] Warn about mismatches in attributes between overriding and\noverridden methods when compiling for non-ARC.\n\nPreviously, clang would error out when compiling for ARC, but didn\'t\nprint any diagnostics when compiling for non-ARC.\n\nThis was pointed out in the patch review for attribute noescape:\n\nhttps://reviews.llvm.org/D32210\n\nllvm-svn: 313717"}, [g]={{vb,216,"void Sema::CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden) {\n // ...\n for (ObjCMethodDecl::param_iterator ni = NewMethod->param_begin(), ne = NewMethod->param_end(); ni != ne && oi != oe; ++ni, ++oi) {\n // ...\n if (newDecl->hasAttr<NSConsumedAttr>() != oldDecl->hasAttr<NSConsumedAttr>()) {\n Diag(newDecl->getLocation(), getLangOpts().ObjCAutoRefCount ? diag::err_nsconsumed_attribute_mismatch : diag::warn_nsconsumed_attribute_mismatch);"}}, [m]={ ["clang/test/SemaObjC/arc-nsconsumed-errors.m"]={"clang/test/SemaObjC/arc-nsconsumed-errors.m:29:44: warning: overriding method has mismatched ns_consumed attribute on its parameter [-Wnsconsumed-mismatch]"} } }, ["warn_nsdictionary_duplicate_key"]={ [k]={"objc-dictionary-duplicate-keys"}, [l]="objc-dictionary-duplicate-keys", [h]={{nil,s,"warn_nsdictionary_duplicate_key"}}, [b]={{nil,s,"duplicate key in dictionary literal"}}, [f]={{nil,s,"duplicate key in dictionary literal"}}, [e]=j, [a]="duplicate key in dictionary literal", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-dictionary\\-duplicate\\-keys[^\\]]*\\]", [i]={{nil,s,o}}, [d]={"931fcd3ba011",1576908663,"[WebAssembly] Improve clang diagnostics for wasm attributes","[WebAssembly] Improve clang diagnostics for wasm attributes\n\nThis patch addresses the review comments on r352930:\n\n - Removes redundant diagnostic checking code\n - Removes errnoneous use of diag::err_alias_is_definition, which\n turned out to be ineffective anyway since functions can be defined later\n in the translation unit and avoid detection.\n - Adds a test for various invalid cases for import_name and import_module.\n\nDifferential Revision: https://reviews.llvm.org/D59520"}, [g]={{ib,922,"/// Check for duplicate keys in an ObjC dictionary literal. For instance:\n/// NSDictionary *nd = @{ @\"foo\" : @\"bar\", @\"foo\" : @\"baz\" };\nstatic void CheckObjCDictionaryLiteralDuplicateKeys(Sema &S, ObjCDictionaryLiteral *Literal) {\n // ...\n auto checkOneKey = [&](auto &Map, const auto &Key, SourceLocation Loc) {\n // ...\n if (!Pair.second) {\n S.Diag(Loc, diag::warn_nsdictionary_duplicate_key);"}}, [m]={ ["clang/test/SemaObjC/dictionary-literal-duplicates.m"]={"clang/test/SemaObjC/dictionary-literal-duplicates.m:29:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:30:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:34:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:35:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:36:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:37:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:38:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:40:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:46:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:47:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:55:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]","clang/test/SemaObjC/dictionary-literal-duplicates.m:55:5: warning: duplicate key in dictionary literal [-Wobjc-dictionary-duplicate-keys]"} } }, ["warn_nsobject_attribute"]={ [k]={"NSObject-attribute"}, [l]="NSObject-attribute", [h]="warn_nsobject_attribute", [b]="\'NSObject\' attribute may be put on a typedef only; attribute is ignored", [f]="\'NSObject\' attribute may be put on a typedef only; attribute is ignored", [e]=j, [a]="\'NSObject\' attribute may be put on a typedef only; attribute is ignored", [c]=" \\[(?:\\-Werror,)?\\-WNSObject\\-attribute[^\\]]*\\]", [i]=o, [d]={"a45495a9f224",1322531320,"objc: warn if NSObject attribute appears other than in a typedef.","objc: warn if NSObject attribute appears other than in a typedef.\n// rdar://10453342\n\nllvm-svn: 145358"}, [g]={{V,3012,"static void handleObjCNSObject(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (const auto *TD = dyn_cast<TypedefNameDecl>(D)) {\n // ...\n } else if (const auto *PD = dyn_cast<ObjCPropertyDecl>(D)) {\n // ...\n } else {\n // ...\n S.Diag(D->getLocation(), diag::warn_nsobject_attribute);"}}, [m]={ ["clang/test/SemaObjC/nsobject-attribute.m"]={"clang/test/SemaObjC/nsobject-attribute.m:53:37: warning: \'NSObject\' attribute may be put on a typedef only; attribute is ignored [-WNSObject-attribute]","clang/test/SemaObjC/nsobject-attribute.m:59:37: warning: \'NSObject\' attribute may be put on a typedef only; attribute is ignored [-WNSObject-attribute]"} } }, ["warn_nsreturns_retained_attribute_mismatch"]={ [k]={"nsreturns-mismatch"}, [l]="nsreturns-mismatch", [h]={{nil,x,"warn_nsreturns_retained_attribute_mismatch"}}, [b]={{nil,x,"overriding method has mismatched ns_returns_%select{not_retained|retained}0 attributes"}}, [f]={{nil,x,{"overriding method has mismatched ns_returns_",{"not_retained","retained"}," attributes"}}}, [e]=j, [a]="overriding method has mismatched ns_returns_(?:not_retained|retained) attributes", [c]=" \\[(?:\\-Werror,)?\\-Wnsreturns\\-mismatch[^\\]]*\\]", [i]={{nil,x,o}}, [d]={"7d85b8f6f651",1505885958,"[Sema][ObjC] Warn about mismatches in attributes between overriding and","[Sema][ObjC] Warn about mismatches in attributes between overriding and\noverridden methods when compiling for non-ARC.\n\nPreviously, clang would error out when compiling for ARC, but didn\'t\nprint any diagnostics when compiling for non-ARC.\n\nThis was pointed out in the patch review for attribute noescape:\n\nhttps://reviews.llvm.org/D32210\n\nllvm-svn: 313717"}, [g]={{vb,190,"void Sema::CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden) {\n // ...\n if ((NewMethod->hasAttr<NSReturnsRetainedAttr>() != Overridden->hasAttr<NSReturnsRetainedAttr>())) {\n Diag(NewMethod->getLocation(), getLangOpts().ObjCAutoRefCount ? diag::err_nsreturns_retained_attribute_mismatch : diag::warn_nsreturns_retained_attribute_mismatch) << 1;"},{vb,199,"void Sema::CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden) {\n // ...\n if ((NewMethod->hasAttr<NSReturnsNotRetainedAttr>() != Overridden->hasAttr<NSReturnsNotRetainedAttr>())) {\n Diag(NewMethod->getLocation(), getLangOpts().ObjCAutoRefCount ? diag::err_nsreturns_retained_attribute_mismatch : diag::warn_nsreturns_retained_attribute_mismatch) << 0;"}}, [m]={ ["clang/test/ARCMT/objcmt-arc-cf-annotations.m"]={"clang/test/ARCMT/objcmt-arc-cf-annotations.m:1687:1: warning: overriding method has mismatched ns_returns_retained attributes [-Wnsreturns-mismatch]","clang/test/ARCMT/objcmt-arc-cf-annotations.m:1691:1: warning: overriding method has mismatched ns_returns_retained attributes [-Wnsreturns-mismatch]"} } }, ["warn_null_arg"]={ [k]={u,v,N,w,"nonnull"}, [l]="nonnull", [h]="warn_null_arg", [b]="null passed to a callee that requires a non-null argument", [f]="null passed to a callee that requires a non-null argument", [e]=j, [a]="null passed to a callee that requires a non\\-null argument", [c]=" \\[(?:\\-Werror,)?\\-Wnonnull[^\\]]*\\]", [i]=X, [d]={"cd1a88da02c2",1242931731,"Check on null arguments in the presense of nonnull attribute.","Check on null arguments in the presense of nonnull attribute.\n\nllvm-svn: 72219"}, [g]={{E,6415,"static void CheckNonNullArgument(Sema &S, const Expr *ArgExpr, SourceLocation CallSiteLoc) {\n if (CheckNonNullExpr(S, ArgExpr))\n S.DiagRuntimeBehavior(CallSiteLoc, ArgExpr, S.PDiag(diag::warn_null_arg) << ArgExpr->getSourceRange());"},{I,6700,"/// CheckStaticArrayArgument - If the given argument corresponds to a static\n/// array parameter, check that it is non-null, and that if it is formed by\n/// array-to-pointer decay, the underlying array is sufficiently large.\n///\n/// C99 6.7.5.3p7: If the keyword static also appears within the [ and ] of the\n/// array type derivation, then for each call to the function, the value of the\n/// corresponding actual argument shall provide access to the first element of\n/// an array with at least as many elements as specified by the size expression.\nvoid Sema::CheckStaticArrayArgument(SourceLocation CallLoc, ParmVarDecl *Param, const Expr *ArgExpr) {\n // ...\n if (ArgExpr->isNullPointerConstant(Context, Expr::NPC_NeverValueDependent)) {\n Diag(CallLoc, diag::warn_null_arg) << ArgExpr->getSourceRange();"}}, [m]={ ["clang/test/SemaObjC/kindof.m"]={"clang/test/SemaObjC/kindof.m:374:19: warning: null passed to a callee that requires a non-null argument [-Wnonnull]","clang/test/SemaObjC/kindof.m:455:35: warning: null passed to a callee that requires a non-null argument [-Wnonnull]"} } }, ["warn_null_in_arithmetic_operation"]={ [k]={"null-arithmetic"}, [l]="null-arithmetic", [h]="warn_null_in_arithmetic_operation", [b]="use of NULL in arithmetic operation", [f]="use of NULL in arithmetic operation", [e]=j, [a]="use of NULL in arithmetic operation", [c]=" \\[(?:\\-Werror,)?\\-Wnull\\-arithmetic[^\\]]*\\]", [i]=o, [d]={"701fb36b9515",1308260216,"Add a new warning when a NULL constant is used in arithmetic operations. The warning will fire on c...","Add a new warning when a NULL constant is used in arithmetic operations. The warning will fire on cases such as:\n\nint x = 1 + NULL;\n\nllvm-svn: 133196"}, [g]={{I,11284,"// checkArithmeticNull - Detect when a NULL constant is used improperly in an\n// expression. These are mainly cases where the null pointer is used as an\n// integer instead of a pointer.\nstatic void checkArithmeticNull(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompare) {\n // ...\n // Comparison operations would not make sense with a null pointer no matter\n // what the other expression is.\n if (!IsCompare) {\n S.Diag(Loc, diag::warn_null_in_arithmetic_operation) << (LHSNull ? LHS.get()->getSourceRange() : SourceRange()) << (RHSNull ? RHS.get()->getSourceRange() : SourceRange());"}}, [m]={ ["clang/test/SemaCXX/null_in_arithmetic_ops.cpp"]={"clang/test/SemaCXX/null_in_arithmetic_ops.cpp:14:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:14:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:15:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:15:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:16:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:16:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:18:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:18:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:19:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:19:25: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:20:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:20:25: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:21:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:21:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:23:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:23:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:24:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:24:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:25:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:25:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:29:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:29:26: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:37:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:37:24: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:38:16: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:38:28: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:41:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:42:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:43:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:45:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:46:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:47:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:48:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:50:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:51:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:52:12: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:54:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:55:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:56:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:58:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:59:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:60:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:61:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:63:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:64:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:65:5: warning: use of NULL in arithmetic operation [-Wnull-arithmetic]"} } }, ["warn_null_in_comparison_operation"]={ [k]={"null-arithmetic"}, [l]="null-arithmetic", [h]="warn_null_in_comparison_operation", [b]="comparison between NULL and non-pointer %select{(%1 and NULL)|(NULL and %1)}0", [f]={{nil,nil,{"comparison between NULL and non-pointer ",{"(B and NULL)","(NULL and B)"}}}}, [e]=j, [a]="comparison between NULL and non\\-pointer (?:\\((.*?) and NULL\\)|\\(NULL and (.*?)\\))", [c]=" \\[(?:\\-Werror,)?\\-Wnull\\-arithmetic[^\\]]*\\]", [i]=o, [d]={"aee9e76722d0",1313102301,"The current warning in -Wnull-arithmetic for comparisons between NULL and non-pointers is not very h...","The current warning in -Wnull-arithmetic for comparisons between NULL and non-pointers is not very helpful. This patch will update the wording to be more helpful to users.\n\nOld warning:\n\nwarning: use of NULL in arithmetic operation [-Wnull-arithmetic]\n return 10 <= NULL;\n ^ ~~~~\n\nNew warning:\n\nwarning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]\n return 10 <= NULL;\n ~~ ^ ~~~~\nllvm-svn: 137377"}, [g]={{I,11312,"// checkArithmeticNull - Detect when a NULL constant is used improperly in an\n// expression. These are mainly cases where the null pointer is used as an\n// integer instead of a pointer.\nstatic void checkArithmeticNull(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompare) {\n // ...\n S.Diag(Loc, diag::warn_null_in_comparison_operation) << LHSNull /* LHS is NULL */ << NonNullType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange();"}}, [m]={ ["clang/test/SemaCXX/null_in_arithmetic_ops.cpp"]={"clang/test/SemaCXX/null_in_arithmetic_ops.cpp:67:9: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:67:21: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:68:12: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:68:24: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:69:9: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:69:22: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:70:12: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:70:25: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:71:9: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:71:22: warning: comparison between NULL and non-pointer (\'int\' and NULL) [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:72:12: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:72:25: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]","clang/test/SemaCXX/null_in_arithmetic_ops.cpp:85:16: warning: comparison between NULL and non-pointer (NULL and \'int\') [-Wnull-arithmetic]"} } }, ["warn_null_pointer_compare"]={ [k]={u,"address",v,w,"tautological-compare","tautological-pointer-compare"}, [l]="tautological-pointer-compare", [h]="warn_null_pointer_compare", [b]="comparison of %select{address of|function|array}0 \'%1\' %select{not |}2equal to a null pointer is always %select{true|false}2", [f]={{nil,nil,{"comparison of ",{"address of",Yb,"array"}," \'B\' ",{"not ",T},"equal to a null pointer is always ",{gc,ec}}}}, [e]=j, [a]="comparison of (?:address of|function|array) \'(.*?)\' (?:not |)equal to a null pointer is always (?:true|false)", [c]=" \\[(?:\\-Werror,)?\\-Wtautological\\-pointer\\-compare[^\\]]*\\]", [i]=o, [d]={"3bb8b56a5d90",1393382166,"PR16074, implement warnings to catch pointer to boolean true and pointer to","PR16074, implement warnings to catch pointer to boolean true and pointer to\nnull comparison when the pointer is known to be non-null.\n\nThis catches the array to pointer decay, function to pointer decay and\naddress of variables. This does not catch address of function since this\nhas been previously used to silence a warning.\n\nPointer to bool conversion is under -Wbool-conversion.\nPointer to null comparison is under -Wtautological-pointer-compare, a sub-group\nof -Wtautological-compare.\n\nvoid foo() {\n int arr[5];\n int x;\n // warn on these conditionals\n if (foo);\n if (arr);\n if (&x);\n if (foo == null);\n if (arr == null);\n if (&x == null);\n\n if (&foo); // no warning\n}\n\nllvm-svn: 202216"}, [g]={{E,15570,"/// Diagnose pointers that are always non-null.\n/// \\param E the expression containing the pointer\n/// \\param NullKind NPCK_NotNull if E is a cast to bool, otherwise, E is\n/// compared to a null pointer\n/// \\param IsEqual True when the comparison is equal to a null pointer\n/// \\param Range Extra SourceRange to highlight in the diagnostic\nvoid Sema::DiagnoseAlwaysNonNullPointer(Expr *E, Expr::NullPointerConstantKind NullKind, bool IsEqual, SourceRange Range) {\n // ...\n unsigned DiagID = IsCompare ? diag::warn_null_pointer_compare : diag::warn_impcast_pointer_to_bool;"}}, [m]={ ["clang/test/Sema/conditional-expr.c"]={"clang/test/Sema/conditional-expr.c:89:15: warning: comparison of address of \'x\' not equal to a null pointer is always true [-Wtautological-pointer-compare]"} } }, ["warn_null_resettable_setter"]={ [k]={"nullability"}, [l]="nullability", [h]="warn_null_resettable_setter", [b]="synthesized setter %0 for null_resettable property %1 does not handle nil", [f]="synthesized setter A for null_resettable property B does not handle nil", [e]=j, [a]="synthesized setter (.*?) for null_resettable property (.*?) does not handle nil", [c]=" \\[(?:\\-Werror,)?\\-Wnullability[^\\]]*\\]", [i]=Jb, [d]={"849ebc269fe1",1434737686,"Implement the \'null_resettable\' attribute for Objective-C properties.","Implement the \'null_resettable\' attribute for Objective-C properties.\n\n\'null_resettable\' properties are those whose getters return nonnull\nbut whose setters take nil, to \"reset\" the property to some\ndefault. Implements rdar://problem/19051334.\n\nllvm-svn: 240155"}, [g]={{Q,2155,"void Sema::diagnoseNullResettableSynthesizedSetters(const ObjCImplDecl *impDecl) {\n for (const auto *propertyImpl : impDecl->property_impls()) {\n // ...\n // Warn about null_resettable properties with synthesized setters,\n // because the setter won\'t properly handle nil.\n if (propertyImpl->getPropertyImplementation() == ObjCPropertyImplDecl::Synthesize && (property->getPropertyAttributes() & ObjCPropertyAttribute::kind_null_resettable) && property->getGetterMethodDecl() && property->getSetterMethodDecl()) {\n // ...\n if ((!getterImpl || getterImpl->isSynthesizedAccessorStub()) && (!setterImpl || setterImpl->isSynthesizedAccessorStub())) {\n // ...\n Diag(loc, diag::warn_null_resettable_setter) << setterImpl->getSelector() << property->getDeclName();"}}, [m]={ ["clang/test/SemaObjC/nullability.m"]={"clang/test/SemaObjC/nullability.m:209:13: warning: synthesized setter \'setResettable3:\' for null_resettable property \'resettable3\' does not handle nil [-Wnullability]","clang/test/SemaObjC/nullability.m:199:1: warning: synthesized setter \'setResettable4:\' for null_resettable property \'resettable4\' does not handle nil [-Wnullability]"} } }, ["warn_null_ret"]={ [k]={u,v,N,w,"nonnull"}, [l]="nonnull", [h]="warn_null_ret", [b]="null returned from %select{function|method}0 that requires a non-null return value", [f]={{nil,nil,{"null returned from ",{Yb,"method"}," that requires a non-null return value"}}}, [e]=j, [a]="null returned from (?:function|method) that requires a non\\-null return value", [c]=" \\[(?:\\-Werror,)?\\-Wnonnull[^\\]]*\\]", [i]=X, [d]={"ef9e7f80598c",1390371028,"Add basic checking for returning null from functions/methods marked \'returns_nonnull\'.","Add basic checking for returning null from functions/methods marked \'returns_nonnull\'.\n\nThis involved making CheckReturnStackAddr into a static function, which\nis now called by a top-level return value checking routine called\nCheckReturnValExpr.\n\nllvm-svn: 199790"}, [g]={{E,12944,"void Sema::CheckReturnValExpr(Expr *RetValExp, QualType lhsType, SourceLocation ReturnLoc, bool isObjCMethod, const AttrVec *Attrs, const FunctionDecl *FD) {\n // Check if the return value is null but should not be.\n if (((Attrs && hasSpecificAttr<ReturnsNonNullAttr>(*Attrs)) || (!isObjCMethod && isNonNullType(lhsType))) && CheckNonNullExpr(*this, RetValExp))\n Diag(ReturnLoc, diag::warn_null_ret) << (isObjCMethod ? 1 : 0) << RetValExp->getSourceRange();"}}, [m]={ ["clang/test/SemaCXX/nonnull.cpp"]={"clang/test/SemaCXX/nonnull.cpp:12:5: warning: null returned from function that requires a non-null return value [-Wnonnull]"} } }, ["warn_null_statement"]={ [k]={"extra-semi-stmt"}, [l]="extra-semi-stmt", [h]={{nil,K,"warn_null_statement"}}, [b]={{nil,K,"empty expression statement has no effect; remove unnecessary \';\' to silence this warning"}}, [f]={{nil,K,"empty expression statement has no effect; remove unnecessary \';\' to silence this warning"}}, [e]=j, [a]="empty expression statement has no effect; remove unnecessary \';\' to silence this warning", [c]=" \\[(?:\\-Werror,)?\\-Wextra\\-semi\\-stmt[^\\]]*\\]", [i]={{nil,K,t}}, [d]={"377748fd7bbf",1542740345,"[clang][Parse] Diagnose useless null statements / empty init-statements","[clang][Parse] Diagnose useless null statements / empty init-statements\n\nSummary:\nclang has `-Wextra-semi` (D43162), which is not dictated by the currently selected standard.\nWhile that is great, there is at least one more source of need-less semis - \'null statements\'.\nSometimes, they are needed:\n```\nfor(int x = 0; continueToDoWork(x); x++)\n ; // Ugly code, but the semi is needed here.\n```\n\nBut sometimes they are just there for no reason:\n```\nswitch(X) {\ncase 0:\n return -2345;\ncase 5:\n return 0;\ndefault:\n return 42;\n}; // <- oops\n\n;;;;;;;;;;; <- OOOOPS, still not diagnosed. Clearly this is junk.\n```\n\nAdditionally:\n```\nif(; // <- empty init-statement\n true)\n ;\n\nswitch (; // empty init-statement\n x) {\n ...\n}\n\nfor (; // <- empty init-statement\n int y : S())\n ;\n}\n\nAs usual, things may or may not go sideways in the presence of macros.\nWhile evaluating this diag on my codebase of interest, it was unsurprisingly\ndiscovered that Google Test macros are *very* prone to this.\nAnd it seems many issues are deep within the GTest itself, not\nin the snippets passed from the codebase that uses GTest.\n\nSo after some thought, i decided not do issue a diagnostic if the semi\nis within *any* macro, be it either from the normal header, or system header.\n\nFixes [[ https://bugs.llvm.org/show_bug.cgi?id=39111 | PR39111 ]]\n\nReviewers: rsmith, aaron.ballman, efriedma\n\nReviewed By: aaron.ballman\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D52695\n\nllvm-svn: 347339"}, [g]={{"clang/lib/Parse/ParseStmt.cpp",1109,"/// Consume any extra semi-colons resulting in null statements,\n/// returning true if any tok::semi were consumed.\nbool Parser::ConsumeNullStmt(StmtVector &Stmts) {\n // ...\n Diag(StartLoc, diag::warn_null_statement) << FixItHint::CreateRemoval(SourceRange(StartLoc, EndLoc));"}}, [m]={ ["clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp"]={"clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:16:3: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]","clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:28:5: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]","clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:31:5: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]","clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:35:5: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]","clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:46:18: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]","clang/test/Parser/extra-semi-resulting-in-nullstmt.cpp:48:19: warning: empty expression statement has no effect; remove unnecessary \';\' to silence this warning [-Wextra-semi-stmt]"} } }, ["warn_nullability_declspec"]={ [k]={"nullability-declspec"}, [l]="nullability-declspec", [h]="warn_nullability_declspec", [b]="nullability specifier %0 cannot be applied to non-pointer type %1; did you mean to apply the specifier to the %select{pointer|block pointer|member pointer|function pointer|member function pointer}2?", [f]={{nil,nil,{"nullability specifier A cannot be applied to non-pointer type B; did you mean to apply the specifier to the ",{cc,"block pointer","member pointer","function pointer","member function pointer"},"?"}}}, [e]="(?:error|warning|fatal error)\\: ", [a]="nullability specifier (.*?) cannot be applied to non\\-pointer type (.*?); did you mean to apply the specifier to the (?:pointer|block pointer|member pointer|function pointer|member function pointer)\\?", [c]=" \\[[^\\]]*\\-Wnullability\\-declspec[^\\]]*\\]", [i]=Jb, [d]={"261a89b0f70b",1434736265,"Introduce type nullability specifiers for C/C++.","Introduce type nullability specifiers for C/C++.\n\nIntroduces the type specifiers __nonnull, __nullable, and\n__null_unspecified that describe the nullability of the pointer type\nto which the specifier appertains. Nullability type specifiers improve\non the existing nonnull attributes in a few ways:\n - They apply to types, so one can represent a pointer to a non-null\n pointer, use them in function pointer types, etc.\n - As type specifiers, they are syntactically more lightweight than\n __attribute__s or [[attribute]]s.\n - They can express both the notion of \'should never be null\' and\n also \'it makes sense for this to be null\', and therefore can more\n easily catch errors of omission where one forgot to annotate the\n nullability of a particular pointer (this will come in a subsequent\n patch).\n\nNullability type specifiers are maintained as type sugar, and\ntherefore have no effect on mangling, encoding, overloading,\netc. Nonetheless, they will be used for warnings about, e.g., passing\n\'null\' to a method that does not accept it.\n\nThis is the C/C++ part of rdar://problem/18868820.\n\nllvm-svn: 240146"}, [g]={{nb,7662,"/// Distribute a nullability type attribute that cannot be applied to\n/// the type specifier to a pointer, block pointer, or member pointer\n/// declarator, complaining if necessary.\n///\n/// \\returns true if the nullability annotation was distributed, false\n/// otherwise.\nstatic bool distributeNullabilityTypeAttr(TypeProcessingState &state, QualType type, ParsedAttr &attr) {\n // ...\n /// Attempt to move the attribute to the specified chunk.\n auto moveToChunk = [&](DeclaratorChunk &chunk, bool inFunction) -> bool {\n // ...\n auto diag = state.getSema().Diag(attr.getLoc(), diag::warn_nullability_declspec) << DiagNullabilityKind(mapNullabilityAttrKind(attr.getKind()), attr.isContextSensitiveKeywordAttribute()) << type << static_cast<unsigned>(pointerKind);"}}, [m]={ ["clang/test/SemaCXX/nullability-declspec.cpp"]={"clang/test/SemaCXX/nullability-declspec.cpp:5:1: error: nullability specifier \'_Nullable\' cannot be applied to non-pointer type \'int\'; did you mean to apply the specifier to the pointer? [-Wnullability-declspec]","clang/test/SemaCXX/nullability-declspec.cpp:6:1: error: nullability specifier \'_Nullable\' cannot be applied to non-pointer type \'int\'; did you mean to apply the specifier to the function pointer? [-Wnullability-declspec]","clang/test/SemaCXX/nullability-declspec.cpp:7:1: error: nullability specifier \'_Nonnull\' cannot be applied to non-pointer type \'int\'; did you mean to apply the specifier to the block pointer? [-Wnullability-declspec]","clang/test/SemaCXX/nullability-declspec.cpp:8:1: error: nullability specifier \'_Nonnull\' cannot be applied to non-pointer type \'int\'; did you mean to apply the specifier to the member pointer? [-Wnullability-declspec]","clang/test/SemaCXX/nullability-declspec.cpp:9:1: error: nullability specifier \'_Nonnull\' cannot be applied to non-pointer type \'int\'; did you mean to apply the specifier to the member function pointer? [-Wnullability-declspec]"} } }, ["warn_nullability_duplicate"]={ [k]={"nullability"}, [l]="nullability", [h]="warn_nullability_duplicate", [b]="duplicate nullability specifier %0", [f]="duplicate nullability specifier A", [e]=j, [a]="duplicate nullability specifier (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wnullability[^\\]]*\\]", [i]=Jb, [d]={"813a066f16df",1434737678,"Extend type nullability qualifiers for Objective-C.","Extend type nullability qualifiers for Objective-C.\n\nIntroduce context-sensitive, non-underscored nullability specifiers\n(nonnull, nullable, null_unspecified) for Objective-C method return\ntypes, method parameter types, and properties.\n\nIntroduce Objective-C-specific semantics, including computation of the\nnullability of the result of a message send, merging of nullability\ninformation from the @interface of a class into its @implementation,\netc .\n\nThis is the Objective-C part of rdar://problem/18868820.\n\nllvm-svn: 240154"}, [g]={{"clang/lib/Parse/ParseObjc.cpp",848,"/// Diagnose redundant or conflicting nullability information.\nstatic void diagnoseRedundantPropertyNullability(Parser &P, ObjCDeclSpec &DS, NullabilityKind nullability, SourceLocation nullabilityLoc) {\n if (DS.getNullability() == nullability) {\n P.Diag(nullabilityLoc, diag::warn_nullability_duplicate) << DiagNullabilityKind(nullability, true) << SourceRange(DS.getNullabilityLoc());"},{nb,7493,"/// Applies a nullability type specifier to the given type, if possible.\n///\n/// \\param state The type processing state.\n///\n/// \\param type The type to which the nullability specifier will be\n/// added. On success, this type will be updated appropriately.\n///\n/// \\param attr The attribute as written on the type.\n///\n/// \\param allowOnArrayType Whether to accept nullability specifiers on an\n/// array type (e.g., because it will decay to a pointer).\n///\n/// \\returns true if a problem has been diagnosed, false on success.\nstatic bool checkNullabilityTypeSpecifier(TypeProcessingState &state, QualType &type, ParsedAttr &attr, bool allowOnArrayType) {\n // ...\n while (auto attributed = dyn_cast<AttributedType>(desugared.getTypePtr())) {\n // Check whether there is already a null\n if (auto existingNullability = attributed->getImmediateNullability()) {\n // Duplicated nullability.\n if (nullability == *existingNullability) {\n S.Diag(nullabilityLoc, diag::warn_nullability_duplicate) << DiagNullabilityKind(nullability, isContextSensitive) << FixItHint::CreateRemoval(nullabilityLoc);"}}, [m]={ ["clang/test/SemaObjC/nullability.m"]={"clang/test/SemaObjC/nullability.m:40:4: warning: duplicate nullability specifier \'nonnull\' [-Wnullability]","clang/test/SemaObjC/nullability.m:46:25: warning: duplicate nullability specifier \'nonnull\' [-Wnullability]","clang/test/SemaObjC/nullability.m:49:35: warning: duplicate nullability specifier \'nullable\' [-Wnullability]","clang/test/SemaObjC/nullability.m:57:25: warning: duplicate nullability specifier \'nonnull\' [-Wnullability]"} } }, ["warn_nullability_inferred_on_nested_type"]={ [k]={"nullability-inferred-on-nested-type"}, [l]="nullability-inferred-on-nested-type", [h]="warn_nullability_inferred_on_nested_type", [b]="inferring \'_Nonnull\' for pointer type within %select{array|reference}0 is deprecated", [f]={{nil,nil,{"inferring \'_Nonnull\' for pointer type within ",{"array","reference"}," is deprecated"}}}, [e]=j, [a]="inferring \'_Nonnull\' for pointer type within (?:array|reference) is deprecated", [c]=" \\[(?:\\-Werror,)?\\-Wnullability\\-inferred\\-on\\-nested\\-type[^\\]]*\\]", [i]=Jb, [d]={"3b917fe019ff",1478820510,"Warn when \'assume_nonnull\' infers nullability within an array.","Warn when \'assume_nonnull\' infers nullability within an array.\n\n...or within a reference. Both of these add an extra level of\nindirection that make us less certain that the pointer really was\nsupposed to be non-nullable. However, changing the default behavior\nwould be a breaking change, so we\'ll just make it a warning instead.\n\nPart of rdar://problem/25846421\n\nllvm-svn: 286521"}, [g]={{nb,4946,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n // Local function that checks the nullability for a given pointer declarator.\n // Returns true if _Nonnull was inferred.\n auto inferPointerNullability = [&](SimplePointerKind pointerKind, SourceLocation pointerLoc, SourceLocation pointerEndLoc, ParsedAttributesView &attrs, AttributePool &Pool) -> ParsedAttr * {\n // ...\n // If we\'re supposed to infer nullability, do so now.\n if (inferNullability && !inferNullabilityInnerOnlyComplete) {\n // ...\n if (pointerLoc.isValid() && complainAboutInferringWithinChunk != PointerWrappingDeclaratorKind::None) {\n auto Diag = S.Diag(pointerLoc, diag::warn_nullability_inferred_on_nested_type);"}}, [m]={ ["clang/test/FixIt/nullability.mm"]={"clang/test/FixIt/nullability.mm:12:13: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:15:12: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:18:13: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:25:8: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:30:8: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:34:13: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:37:13: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:40:13: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:43:13: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:46:13: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:49:13: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:52:8: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:54:8: warning: inferring \'_Nonnull\' for pointer type within reference is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:58:25: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:61:26: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:64:27: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]","clang/test/FixIt/nullability.mm:67:28: warning: inferring \'_Nonnull\' for pointer type within array is deprecated [-Wnullability-inferred-on-nested-type]"} } }, ["warn_nullability_lost"]={ [k]={"nullable-to-nonnull-conversion"}, [l]="nullable-to-nonnull-conversion", [h]="warn_nullability_lost", [b]="implicit conversion from nullable pointer %0 to non-nullable pointer type %1", [f]="implicit conversion from nullable pointer A to non-nullable pointer type B", [e]=j, [a]="implicit conversion from nullable pointer (.*?) to non\\-nullable pointer type (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wnullable\\-to\\-nonnull\\-conversion[^\\]]*\\]", [i]=Jb, [d]={"b4866e85e5ff",1434737599,"Diagnose unsafe uses of nil and __nonnull pointers.","Diagnose unsafe uses of nil and __nonnull pointers.\n\nThis generalizes the checking of null arguments to also work with\nvalues of pointer-to-function, reference-to-function, and block\npointer type, using the nullability information within the underling\nfunction prototype to extend non-null checking, and diagnoses returns\nof \'nil\' within a function with a __nonnull return type.\n\nNote that we don\'t warn about nil returns from Objective-C methods,\nbecause it\'s common for Objective-C methods to mimic the nil-swallowing\nbehavior of the receiver by checking ostensibly non-null parameters\nand returning nil from otherwise non-null methods in that\ncase.\n\nIt also diagnoses (via a separate flag) conversions from nullable to\nnonnull pointers. It\'s a separate flag because this warning can be noisy.\n\nllvm-svn: 240153"}, [g]={{"clang/lib/Sema/Sema.cpp",585,"void Sema::diagnoseNullableToNonnullConversion(QualType DstType, QualType SrcType, SourceLocation Loc) {\n // ...\n Diag(Loc, diag::warn_nullability_lost) << SrcType << DstType;"}}, [m]={ ["clang/test/SemaObjC/nullability.m"]={"clang/test/SemaObjC/nullability.m:252:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:255:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:256:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:257:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:258:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:260:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:264:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:267:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:268:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:269:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]","clang/test/SemaObjC/nullability.m:270:7: warning: implicit conversion from nullable pointer \'NSFoo * _Nullable_result\' to non-nullable pointer type \'NSFoo * _Nonnull\' [-Wnullable-to-nonnull-conversion]"} } }, ["warn_nullability_missing"]={ [k]={"nullability-completeness"}, [l]="nullability-completeness", [h]="warn_nullability_missing", [b]="%select{pointer|block pointer|member pointer}0 is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)", [f]={{nil,nil,{{cc,"block pointer","member pointer"}," is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)"}}}, [e]=j, [a]="(?:pointer|block pointer|member pointer) is missing a nullability type specifier \\(_Nonnull, _Nullable, or _Null_unspecified\\)", [c]=" \\[(?:\\-Werror,)?\\-Wnullability\\-completeness[^\\]]*\\]", [i]=Jb, [d]={"bec595a64121",1434738465,"Check for consistent use of nullability type specifiers in a header.","Check for consistent use of nullability type specifiers in a header.\n\nAdds a new warning (under -Wnullability-completeness) that complains\nabout pointer, block pointer, or member pointer declarations that have\nnot been annotated with nullability information (directly or inferred)\nwithin a header that contains some nullability annotations. This is\nintended to be used to help maintain the completeness of nullability\ninformation within a header that has already been audited.\n\nNote that, for performance reasons, this warning will underrepresent\nthe number of non-annotated pointers in the case where more than one\npointer is seen before the first nullability type specifier, because\nwe\'re only tracking one piece of information per header. Part of\nrdar://problem/18868820.\n\nllvm-svn: 240158"}, [g]={{nb,4467,"static void emitNullabilityConsistencyWarning(Sema &S, SimplePointerKind PointerKind, SourceLocation PointerLoc, SourceLocation PointerEndLoc) {\n // ...\n if (PointerKind == SimplePointerKind::Array) {\n // ...\n } else {\n S.Diag(PointerLoc, diag::warn_nullability_missing) << static_cast<unsigned>(PointerKind);"},{nb,4510,"/// Complains about missing nullability if the file containing \\p pointerLoc\n/// has other uses of nullability (either the keywords or the \\c assume_nonnull\n/// pragma).\n///\n/// If the file has \\e not seen other uses of nullability, this particular\n/// pointer is saved for possible later diagnosis. See recordNullabilitySeen().\nstatic void checkNullabilityConsistency(Sema &S, SimplePointerKind pointerKind, SourceLocation pointerLoc, SourceLocation pointerEndLoc = SourceLocation()) {\n // ...\n if (!fileNullability.SawTypeNullability) {\n // ...\n if (pointerKind == SimplePointerKind::Array)\n // ...\n else\n diagKind = diag::warn_nullability_missing;"}}, [m]={ ["clang/test/SemaObjCXX/nullability-pragmas.mm"]={"clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:11:13: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:43:12: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:43:13: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:46:10: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:51:14: warning: block pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:51:16: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:57:9: warning: block pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:57:19: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:64:14: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:64:15: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:74:18: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:80:19: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:80:20: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:90:13: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:114:12: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:117:10: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:120:10: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:125:10: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:130:4: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]"} } }, ["warn_nullability_missing_array"]={ [k]={"nullability-completeness","nullability-completeness-on-arrays"}, [l]="nullability-completeness-on-arrays", [h]="warn_nullability_missing_array", [b]="array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)", [f]="array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)", [e]=j, [a]="array parameter is missing a nullability type specifier \\(_Nonnull, _Nullable, or _Null_unspecified\\)", [c]=" \\[(?:\\-Werror,)?\\-Wnullability\\-completeness\\-on\\-arrays[^\\]]*\\]", [i]=Jb, [d]={"f85a9b06b826",1478820506,"Add -Wnullability-completeness-on-arrays.","Add -Wnullability-completeness-on-arrays.\n\nThis is an addition to (and sub-warning of) -Wnullability-completeness\nthat warns when an array parameter is missing nullability. When the\nspecific warning is switched off, the compiler falls back to only\nwarning on pointer types written as pointer types.\n\nNote that use of nullability /within/ an array triggers the\ncompleteness checks regardless of whether or not the array-specific\nwarning is enabled; the intent there is simply to determine whether a\nparticular header is trying to be nullability-aware at all.\n\nPart of rdar://problem/25846421.\n\nllvm-svn: 286520"}, [g]={{nb,4465,"static void emitNullabilityConsistencyWarning(Sema &S, SimplePointerKind PointerKind, SourceLocation PointerLoc, SourceLocation PointerEndLoc) {\n // ...\n if (PointerKind == SimplePointerKind::Array) {\n S.Diag(PointerLoc, diag::warn_nullability_missing_array);"},{nb,4508,"/// Complains about missing nullability if the file containing \\p pointerLoc\n/// has other uses of nullability (either the keywords or the \\c assume_nonnull\n/// pragma).\n///\n/// If the file has \\e not seen other uses of nullability, this particular\n/// pointer is saved for possible later diagnosis. See recordNullabilitySeen().\nstatic void checkNullabilityConsistency(Sema &S, SimplePointerKind pointerKind, SourceLocation pointerLoc, SourceLocation pointerEndLoc = SourceLocation()) {\n // ...\n if (!fileNullability.SawTypeNullability) {\n // ...\n if (pointerKind == SimplePointerKind::Array)\n diagKind = diag::warn_nullability_missing_array;"}}, [m]={ ["clang/test/FixIt/nullability.mm"]={"clang/test/FixIt/Inputs/nullability.h:3:26: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness-on-arrays]","clang/test/FixIt/Inputs/nullability.h:9:34: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness-on-arrays]","clang/test/FixIt/Inputs/nullability.h:15:34: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness-on-arrays]"} } }, ["warn_objc_boxing_invalid_utf8_string"]={ [k]={"objc-boxing"}, [l]="objc-boxing", [h]={{nil,p,"warn_objc_boxing_invalid_utf8_string"}}, [b]={{nil,p,"string is ill-formed as UTF-8 and will become a null %0 when boxed"}}, [f]={{nil,p,"string is ill-formed as UTF-8 and will become a null A when boxed"}}, [e]=j, [a]="string is ill\\-formed as UTF\\-8 and will become a null (.*?) when boxed", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-boxing[^\\]]*\\]", [i]={{nil,p,o}}, [d]={"1488ee4bd541",1552020337,"[ObjC] Emit a boxed expression as a compile-time constant if the","[ObjC] Emit a boxed expression as a compile-time constant if the\nexpression inside the parentheses is a valid UTF-8 string literal.\n\nPreviously clang emitted an expression like @(\"abc\") as a message send\nto stringWithUTF8String. This commit makes clang emit the boxed\nexpression as a compile-time constant instead.\n\nThis commit also has the effect of silencing the nullable-to-nonnull\nconversion warning clang started emitting after r317727, which\noriginally motivated this commit (see https://oleb.net/2018/@keypath).\n\nrdar://problem/42684601\n\nDifferential Revision: https://reviews.llvm.org/D58729\n\nllvm-svn: 355662"}, [g]={{ib,552,"ExprResult Sema::BuildObjCBoxedExpr(SourceRange SR, Expr *ValueExpr) {\n // ...\n if (const PointerType *PT = ValueType->getAs<PointerType>()) {\n // ...\n if (Context.hasSameUnqualifiedType(PointeeType, Context.CharTy)) {\n // ...\n // The boxed expression can be emitted as a compile time constant if it is\n // a string literal whose character encoding is compatible with UTF-8.\n if (auto *CE = dyn_cast<ImplicitCastExpr>(ValueExpr))\n if (CE->getCastKind() == CK_ArrayToPointerDecay)\n if (auto *SL = dyn_cast<StringLiteral>(CE->getSubExpr()->IgnoreParens())) {\n // ...\n Diag(SL->getBeginLoc(), diag::warn_objc_boxing_invalid_utf8_string) << NSStringPointer << SL->getSourceRange();"}}, [m]={ ["clang/test/SemaObjC/transfer-boxed-string-nullability.m"]={"clang/test/SemaObjC/transfer-boxed-string-nullability.m:26:18: warning: string is ill-formed as UTF-8 and will become a null \'NSString *\' when boxed [-Wobjc-boxing]","clang/test/SemaObjC/transfer-boxed-string-nullability.m:27:18: warning: string is ill-formed as UTF-8 and will become a null \'NSString *\' when boxed [-Wobjc-boxing]"} } }, ["warn_objc_cdirective_format_string"]={ [k]={"cstring-format-directive"}, [l]="cstring-format-directive", [h]="warn_objc_cdirective_format_string", [b]="using %0 directive in %select{NSString|CFString}1 which is being passed as a formatting argument to the formatting %select{method|CFfunction}2", [f]={{nil,nil,{"using A directive in ",{"NSString","CFString"}," which is being passed as a formatting argument to the formatting ",{"method","CFfunction"}}}}, [e]=j, [a]="using (.*?) directive in (?:NSString|CFString) which is being passed as a formatting argument to the formatting (?:method|CFfunction)", [c]=" \\[(?:\\-Werror,)?\\-Wcstring\\-format\\-directive[^\\]]*\\]", [i]=o, [d]={"6485fe4b07b0",1410304254,"Objective-C. Under a special flag, -Wcstring-format-directive,","Objective-C. Under a special flag, -Wcstring-format-directive,\noff by default, issue a warning if %s directive is used in\ncertain CF/NS formatting APIs, to assist user in deprecating\nuse of such %s in these APIs. rdar://18182443\n\nllvm-svn: 217467"}, [g]={{E,6464,"/// Diagnose use of %s directive in an NSString which is being passed\n/// as formatting string to formatting method.\nstatic void DiagnoseCStringFormatDirectiveInCFAPI(Sema &S, const NamedDecl *FDecl, Expr **Args, unsigned NumArgs) {\n // ...\n if (S.FormatStringHasSArg(FormatString)) {\n S.Diag(FormatExpr->getExprLoc(), diag::warn_objc_cdirective_format_string) << \"%s\" << 1 << 1;"},{ib,2571,"/// Diagnose use of %s directive in an NSString which is being passed\n/// as formatting string to formatting method.\nstatic void DiagnoseCStringFormatDirectiveInObjCAPI(Sema &S, ObjCMethodDecl *Method, Selector Sel, Expr **Args, unsigned NumArgs) {\n // ...\n if (ObjCStringLiteral *OSL = dyn_cast<ObjCStringLiteral>(FormatExpr->IgnoreParenImpCasts())) {\n // ...\n if (S.FormatStringHasSArg(FormatString)) {\n S.Diag(FormatExpr->getExprLoc(), diag::warn_objc_cdirective_format_string) << \"%s\" << 0 << 0;"}}, [m]={ ["clang/test/SemaObjC/format-cstrings-warning.m"]={"clang/test/SemaObjC/format-cstrings-warning.m:33:24: warning: using %s directive in NSString which is being passed as a formatting argument to the formatting method [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:34:41: warning: using %s directive in NSString which is being passed as a formatting argument to the formatting method [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:35:25: warning: using %s directive in NSString which is being passed as a formatting argument to the formatting method [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:36:25: warning: using %s directive in NSString which is being passed as a formatting argument to the formatting method [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:37:39: warning: using %s directive in NSString which is being passed as a formatting argument to the formatting method [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:63:64: warning: using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:64:82: warning: using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:74:11: warning: using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:76:43: warning: using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction [-Wcstring-format-directive]","clang/test/SemaObjC/format-cstrings-warning.m:77:15: warning: using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction [-Wcstring-format-directive]"} } }, ["warn_objc_circular_container"]={ [k]={"objc-circular-container"}, [l]="objc-circular-container", [h]="warn_objc_circular_container", [b]={{nil,z,"adding %0 to %1 might cause circular dependency in container"},{x,nil,"adding \'%0\' to \'%1\' might cause circular dependency in container"}}, [f]={{nil,z,"adding A to B might cause circular dependency in container"},{x,nil,"adding \'A\' to \'B\' might cause circular dependency in container"}}, [e]=j, [a]="adding (.*?) to (.*?) might cause circular dependency in container", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-circular\\-container[^\\]]*\\]", [i]=o, [d]={"e1d882c726b5",1425491752,"New ObjC warning: circular containers.","New ObjC warning: circular containers.\n\nThis commit adds new warning to prevent user from creating \'circular containers\'.\n\nMutable collections from NSFoundation allows user to add collection to itself, e.g.: \n\nNSMutableArray *a = [NSMutableArray new]; \n[a addObject:a]; \n\nThe code above leads to really weird behaviour (crashes, \'endless\' recursion) and \nretain cycles (collection retains itself) if ARC enabled.\n\nPatch checks the following collections: \n - NSMutableArray, \n - NSMutableDictionary, \n - NSMutableSet, \n - NSMutableOrderedSet, \n - NSCountedSet. \n\nllvm-svn: 231265"}, [g]={{E,17627,"void Sema::CheckObjCCircularContainer(ObjCMessageExpr *Message) {\n // ...\n if (Message->getReceiverKind() == ObjCMessageExpr::SuperInstance) {\n if (DeclRefExpr *ArgRE = dyn_cast<DeclRefExpr>(Arg)) {\n if (ArgRE->isObjCSelfExpr()) {\n Diag(Message->getSourceRange().getBegin(), diag::warn_objc_circular_container) << ArgRE->getDecl() << StringRef(\"\'super\'\");"},{E,17643,"void Sema::CheckObjCCircularContainer(ObjCMessageExpr *Message) {\n // ...\n if (Message->getReceiverKind() == ObjCMessageExpr::SuperInstance) {\n // ...\n } else {\n // ...\n if (DeclRefExpr *ReceiverRE = dyn_cast<DeclRefExpr>(Receiver)) {\n if (DeclRefExpr *ArgRE = dyn_cast<DeclRefExpr>(Arg)) {\n if (ReceiverRE->getDecl() == ArgRE->getDecl()) {\n // ...\n Diag(Message->getSourceRange().getBegin(), diag::warn_objc_circular_container) << Decl << Decl;"},{E,17657,"void Sema::CheckObjCCircularContainer(ObjCMessageExpr *Message) {\n // ...\n if (Message->getReceiverKind() == ObjCMessageExpr::SuperInstance) {\n // ...\n } else {\n // ...\n if (DeclRefExpr *ReceiverRE = dyn_cast<DeclRefExpr>(Receiver)) {\n // ...\n } else if (ObjCIvarRefExpr *IvarRE = dyn_cast<ObjCIvarRefExpr>(Receiver)) {\n if (ObjCIvarRefExpr *IvarArgRE = dyn_cast<ObjCIvarRefExpr>(Arg)) {\n if (IvarRE->getDecl() == IvarArgRE->getDecl()) {\n // ...\n Diag(Message->getSourceRange().getBegin(), diag::warn_objc_circular_container) << Decl << Decl;"}}, [m]={ ["clang/test/SemaObjC/circular-container.m"]={"clang/test/SemaObjC/circular-container.m:57:3: warning: adding \'_array\' to \'_array\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:58:3: warning: adding \'_dictionary\' to \'_dictionary\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:59:3: warning: adding \'_set\' to \'_set\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:60:3: warning: adding \'_countedSet\' to \'_countedSet\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:61:3: warning: adding \'_orderedSet\' to \'_orderedSet\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:65:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:69:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:73:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:77:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:81:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:87:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:91:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:95:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:99:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:103:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:109:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:110:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:111:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:112:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:113:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:119:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:120:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:121:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:122:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:128:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:134:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:140:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:141:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:142:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:143:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:144:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:154:3: warning: adding \'self\' to \'super\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:156:3: warning: adding \'self\' to \'self\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:165:3: warning: adding \'self\' to \'super\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:167:3: warning: adding \'self\' to \'self\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:176:3: warning: adding \'self\' to \'super\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:178:3: warning: adding \'self\' to \'self\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:186:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:187:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:188:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:189:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:190:3: warning: adding \'a\' to \'a\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:196:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:197:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:198:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:199:3: warning: adding \'d\' to \'d\' might cause circular dependency in container [-Wobjc-circular-container]","clang/test/SemaObjC/circular-container.m:205:3: warning: adding \'s\' to \'s\' might cause circular dependency in container [-Wobjc-circular-container]"} } }, ["warn_objc_collection_literal_element"]={ [k]={"conversion","non-gcc","objc-literal-conversion"}, [l]="objc-literal-conversion", [h]="warn_objc_collection_literal_element", [b]="object of type %0 is not compatible with %select{array element type|dictionary key type|dictionary value type}1 %2", [f]={{nil,nil,{"object of type A is not compatible with ",{"array element type","dictionary key type","dictionary value type"}," C"}}}, [e]=j, [a]="object of type (.*?) is not compatible with (?:array element type|dictionary key type|dictionary value type) (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-literal\\-conversion[^\\]]*\\]", [i]="Value Conversion Issue", [d]={"5054cb04673f",1436241502,"Warn when an Objective-C collection literal element is converted to an incompatible type.","Warn when an Objective-C collection literal element is converted to an incompatible type.\n\nObjective-C collection literals produce unspecialized\nNSArray/NSDictionary objects that can then be implicitly converted to\nspecialized versions of these types. In such cases, check that the\nelements in the collection are suitable for the specialized\ncollection. Part of rdar://problem/6294649.\n\nllvm-svn: 241546"}, [g]={{E,14509,"/// Check a single element within a collection literal against the\n/// target element type.\nstatic void checkObjCCollectionLiteralElement(Sema &S, QualType TargetElementType, Expr *Element, unsigned ElementKind) {\n // ...\n if (ElementType->getAs<ObjCObjectPointerType>() && S.CheckSingleAssignmentConstraints(TargetElementType, ElementResult, false, false) != Sema::Compatible) {\n S.Diag(Element->getBeginLoc(), diag::warn_objc_collection_literal_element) << ElementType << ElementKind << TargetElementType << Element->getSourceRange();"}}, [m]={ ["clang/test/SemaObjC/parameterized_classes_collection_literal.m"]={"clang/test/SemaObjC/parameterized_classes_collection_literal.m:39:36: warning: object of type \'NSNumber *\' is not compatible with array element type \'NSString *\' [-Wobjc-literal-conversion]","clang/test/SemaObjC/parameterized_classes_collection_literal.m:41:35: warning: object of type \'NSArray *\' is not compatible with array element type \'NSString *\' [-Wobjc-literal-conversion]","clang/test/SemaObjC/parameterized_classes_collection_literal.m:44:47: warning: object of type \'NSString *\' is not compatible with array element type \'NSArray<NSString *> *\' [-Wobjc-literal-conversion]","clang/test/SemaObjC/parameterized_classes_collection_literal.m:45:48: warning: object of type \'NSNumber *\' is not compatible with array element type \'NSString *\' [-Wobjc-literal-conversion]","clang/test/SemaObjC/parameterized_classes_collection_literal.m:51:5: warning: object of type \'NSNumber *\' is not compatible with dictionary key type \'NSString *\' [-Wobjc-literal-conversion]","clang/test/SemaObjC/parameterized_classes_collection_literal.m:52:16: warning: object of type \'NSString *\' is not compatible with dictionary value type \'NSNumber *\' [-Wobjc-literal-conversion]"} } }, ["warn_objc_designated_init_missing_super_call"]={ [k]={u,v,w,rb}, [l]=rb, [h]="warn_objc_designated_init_missing_super_call", [b]="designated initializer missing a \'super\' call to a designated initializer of the super class", [f]="designated initializer missing a \'super\' call to a designated initializer of the super class", [e]=j, [a]="designated initializer missing a \'super\' call to a designated initializer of the super class", [c]=Ub, [i]=o, [d]={"22bfa2c28bdb",1386105096,"[objc] Emit a warning when the implementation of a designated initializer does not chain to","[objc] Emit a warning when the implementation of a designated initializer does not chain to\nan init method that is a designated initializer for the superclass.\n\nllvm-svn: 196316"}, [g]={{xb,15851,"Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, bool IsInstantiation) {\n // ...\n {\n // ...\n if (FD) {\n // ...\n } else if (ObjCMethodDecl *MD = dyn_cast_or_null<ObjCMethodDecl>(dcl)) {\n // ...\n if (FSI->ObjCWarnForNoDesignatedInitChain) {\n // ...\n // Don\'t issue this warning for unavailable inits or direct subclasses\n // of NSObject.\n if (!MD->isUnavailable() && !superIsNSObject(MD)) {\n Diag(MD->getLocation(), diag::warn_objc_designated_init_missing_super_call);"}}, [m]={ [Sb]={"clang/test/SemaObjC/attr-designated-init.m:64:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:70:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:73:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:108:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:119:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:132:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:187:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:238:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:294:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:303:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:410:1: warning: designated initializer missing a \'super\' call to a designated initializer of the super class [-Wobjc-designated-initializers]"} } }, ["warn_objc_designated_init_non_designated_init_call"]={ [k]={u,v,w,rb}, [l]=rb, [h]="warn_objc_designated_init_non_designated_init_call", [b]="designated initializer invoked a non-designated initializer", [f]="designated initializer invoked a non-designated initializer", [e]=j, [a]="designated initializer invoked a non\\-designated initializer", [c]=Ub, [i]=o, [d]={"fcded9b93a96",1386105103,"[objc] Emit warnings when the implementation of a designated initializer calls on","[objc] Emit warnings when the implementation of a designated initializer calls on\nsuper an initializer that is not a designated one or any initializer on self.\n\nllvm-svn: 196317"}, [g]={{ib,3208,"/// Build an Objective-C instance message expression.\n///\n/// This routine takes care of both normal instance messages and\n/// instance messages to the superclass instance.\n///\n/// \\param Receiver The expression that computes the object that will\n/// receive this message. This may be empty, in which case we are\n/// sending to the superclass instance and \\p SuperLoc must be a valid\n/// source location.\n///\n/// \\param ReceiverType The (static) type of the object receiving the\n/// message. When a \\p Receiver expression is provided, this is the\n/// same type as that expression. For a superclass instance send, this\n/// is a pointer to the type of the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass instance message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this instance message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // ...\n if (DIFunctionScopeInfo && DIFunctionScopeInfo->ObjCIsDesignatedInit && (SuperLoc.isValid() || isSelfExpr(Receiver))) {\n // ...\n if (!isDesignatedInitChain) {\n // ...\n Diag(SelLoc, SuperLoc.isValid() ? diag::warn_objc_designated_init_non_designated_init_call : diag::warn_objc_designated_init_non_super_designated_init_call);"}}, [m]={ [Sb]={"clang/test/SemaObjC/attr-designated-init.m:71:17: warning: designated initializer invoked a non-designated initializer [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:109:17: warning: designated initializer invoked a non-designated initializer [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:295:18: warning: designated initializer invoked a non-designated initializer [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:304:18: warning: designated initializer invoked a non-designated initializer [-Wobjc-designated-initializers]"} } }, ["warn_objc_designated_init_non_super_designated_init_call"]={ [k]={u,v,w,rb}, [l]=rb, [h]="warn_objc_designated_init_non_super_designated_init_call", [b]="designated initializer should only invoke a designated initializer on \'super\'", [f]="designated initializer should only invoke a designated initializer on \'super\'", [e]=j, [a]="designated initializer should only invoke a designated initializer on \'super\'", [c]=Ub, [i]=o, [d]={"fcded9b93a96",1386105103,"[objc] Emit warnings when the implementation of a designated initializer calls on","[objc] Emit warnings when the implementation of a designated initializer calls on\nsuper an initializer that is not a designated one or any initializer on self.\n\nllvm-svn: 196317"}, [g]={{ib,3209,"/// Build an Objective-C instance message expression.\n///\n/// This routine takes care of both normal instance messages and\n/// instance messages to the superclass instance.\n///\n/// \\param Receiver The expression that computes the object that will\n/// receive this message. This may be empty, in which case we are\n/// sending to the superclass instance and \\p SuperLoc must be a valid\n/// source location.\n///\n/// \\param ReceiverType The (static) type of the object receiving the\n/// message. When a \\p Receiver expression is provided, this is the\n/// same type as that expression. For a superclass instance send, this\n/// is a pointer to the type of the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass instance message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this instance message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // ...\n if (DIFunctionScopeInfo && DIFunctionScopeInfo->ObjCIsDesignatedInit && (SuperLoc.isValid() || isSelfExpr(Receiver))) {\n // ...\n if (!isDesignatedInitChain) {\n // ...\n Diag(SelLoc, SuperLoc.isValid() ? diag::warn_objc_designated_init_non_designated_init_call : diag::warn_objc_designated_init_non_super_designated_init_call);"}}, [m]={ [Sb]={"clang/test/SemaObjC/attr-designated-init.m:74:16: warning: designated initializer should only invoke a designated initializer on \'super\' [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:136:9: warning: designated initializer should only invoke a designated initializer on \'super\' [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:141:11: warning: designated initializer should only invoke a designated initializer on \'super\' [-Wobjc-designated-initializers]"} } }, ["warn_objc_direct_ignored"]={ [k]={Cb,cb}, [l]=cb, [h]={{nil,A,"warn_objc_direct_ignored"}}, [b]={{nil,A,"%0 attribute isn\'t implemented by this Objective-C runtime"}}, [f]={{nil,A,"A attribute isn\'t implemented by this Objective-C runtime"}}, [e]=j, [a]="(.*?) attribute isn\'t implemented by this Objective\\-C runtime", [c]=Ab, [i]={{nil,A,o}}, [d]={"c094e7dc4b3f",1573050950,"[SYCL] Add sycl_kernel attribute for accelerated code outlining","[SYCL] Add sycl_kernel attribute for accelerated code outlining\n\nSYCL is single source offload programming model relying on compiler to\nseparate device code (i.e. offloaded to an accelerator) from the code\nexecuted on the host.\n\nHere is code example of the SYCL program to demonstrate compiler\noutlining work:\n\n```\nint foo(int x) { return ++x; }\nint bar(int x) { throw std::exception(\"CPU code only!\"); }\n...\nusing namespace cl::sycl;\nqueue Q;\nbuffer<int, 1> a(range<1>{1024});\nQ.submit([&](handler& cgh) {\n auto A = a.get_access<access::mode::write>(cgh);\n cgh.parallel_for<init_a>(range<1>{1024}, [=](id<1> index) {\n A[index] = index[0] + foo(42);\n });\n}\n...\n```\n\nSYCL device compiler must compile lambda expression passed to\ncl::sycl::handler::parallel_for method and function foo called from this\nlambda expression for an \"accelerator\". SYCL device compiler also must\nignore bar function as it\'s not required for offloaded code execution.\n\nThis patch adds the sycl_kernel attribute, which is used to mark code\npassed to cl::sycl::handler::parallel_for as \"accelerated code\".\n\nAttribute must be applied to function templates which parameters include\nat least \"kernel name\" and \"kernel function object\". These parameters\nwill be used to establish an ABI between the host application and\noffloaded part.\n\nReviewers: jlebar, keryell, Naghasan, ABataev, Anastasia, bader, aaron.ballman, rjmccall, rsmith\n\nReviewed By: keryell, bader\n\nSubscribers: mgorny, OlegM, ArturGainullin, agozillon, aaron.ballman, ebevhan, Anastasia, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D60455\n\nSigned-off-by: Alexey Bader <alexey.bader@intel.com>"}, [g]={{V,2951,"static void handleObjCDirectAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (S.getLangOpts().ObjCRuntime.allowsDirectDispatch()) {\n // ...\n } else {\n S.Diag(AL.getLoc(), diag::warn_objc_direct_ignored) << AL;"},{V,2960,"static void handleObjCDirectMembersAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (S.getLangOpts().ObjCRuntime.allowsDirectDispatch()) {\n // ...\n } else {\n S.Diag(AL.getLoc(), diag::warn_objc_direct_ignored) << AL;"}} }, ["warn_objc_direct_property_ignored"]={ [k]={Cb,cb}, [l]=cb, [h]={{nil,A,"warn_objc_direct_property_ignored"}}, [b]={{nil,A,"direct attribute on property %0 ignored (not implemented by this Objective-C runtime)"}}, [f]={{nil,A,"direct attribute on property A ignored (not implemented by this Objective-C runtime)"}}, [e]=j, [a]="direct attribute on property (.*?) ignored \\(not implemented by this Objective\\-C runtime\\)", [c]=Ab, [i]={{nil,A,o}}, [d]={"c094e7dc4b3f",1573050950,"[SYCL] Add sycl_kernel attribute for accelerated code outlining","[SYCL] Add sycl_kernel attribute for accelerated code outlining\n\nSYCL is single source offload programming model relying on compiler to\nseparate device code (i.e. offloaded to an accelerator) from the code\nexecuted on the host.\n\nHere is code example of the SYCL program to demonstrate compiler\noutlining work:\n\n```\nint foo(int x) { return ++x; }\nint bar(int x) { throw std::exception(\"CPU code only!\"); }\n...\nusing namespace cl::sycl;\nqueue Q;\nbuffer<int, 1> a(range<1>{1024});\nQ.submit([&](handler& cgh) {\n auto A = a.get_access<access::mode::write>(cgh);\n cgh.parallel_for<init_a>(range<1>{1024}, [=](id<1> index) {\n A[index] = index[0] + foo(42);\n });\n}\n...\n```\n\nSYCL device compiler must compile lambda expression passed to\ncl::sycl::handler::parallel_for method and function foo called from this\nlambda expression for an \"accelerator\". SYCL device compiler also must\nignore bar function as it\'s not required for offloaded code execution.\n\nThis patch adds the sycl_kernel attribute, which is used to mark code\npassed to cl::sycl::handler::parallel_for as \"accelerated code\".\n\nAttribute must be applied to function templates which parameters include\nat least \"kernel name\" and \"kernel function object\". These parameters\nwill be used to establish an ABI between the host application and\noffloaded part.\n\nReviewers: jlebar, keryell, Naghasan, ABataev, Anastasia, bader, aaron.ballman, rjmccall, rsmith\n\nReviewed By: keryell, bader\n\nSubscribers: mgorny, OlegM, ArturGainullin, agozillon, aaron.ballman, ebevhan, Anastasia, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D60455\n\nSigned-off-by: Alexey Bader <alexey.bader@intel.com>"}, [g]={{Q,714,"ObjCPropertyDecl *Sema::CreatePropertyDecl(Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TInfo, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC) {\n // ...\n if ((Attributes & ObjCPropertyAttribute::kind_direct) || CDecl->hasAttr<ObjCDirectMembersAttr>()) {\n if (isa<ObjCProtocolDecl>(CDecl)) {\n // ...\n } else if (getLangOpts().ObjCRuntime.allowsDirectDispatch()) {\n // ...\n } else {\n Diag(PDecl->getLocation(), diag::warn_objc_direct_property_ignored) << PDecl->getDeclName();"}} }, ["warn_objc_implementation_missing_designated_init_override"]={ [k]={u,v,w,rb}, [l]=rb, [h]="warn_objc_implementation_missing_designated_init_override", [b]="method override for the designated initializer of the superclass %objcinstance0 not found", [f]="method override for the designated initializer of the superclass A not found", [e]=j, [a]="method override for the designated initializer of the superclass (.*?) not found", [c]=Ub, [i]=o, [d]={"db5ce0f71ec9",1386105114,"[objc] Add a warning when a class that provides a designated initializer, does not","[objc] Add a warning when a class that provides a designated initializer, does not\noverride all of the designated initializers of its superclass.\n\nllvm-svn: 196319"}, [g]={{Q,2350,"void Sema::DiagnoseMissingDesignatedInitOverrides(const ObjCImplementationDecl *ImplD, const ObjCInterfaceDecl *IFD) {\n // ...\n for (SmallVector<const ObjCMethodDecl *, 8>::iterator I = DesignatedInits.begin(), E = DesignatedInits.end(); I != E; ++I) {\n // ...\n if (!InitSelSet.count(MD->getSelector())) {\n // ...\n if (!Ignore) {\n Diag(ImplD->getLocation(), diag::warn_objc_implementation_missing_designated_init_override) << MD->getSelector();"}}, [m]={ [Sb]={"clang/test/SemaObjC/attr-designated-init.m:92:17: warning: method override for the designated initializer of the superclass \'-initB1\' not found [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:92:17: warning: method override for the designated initializer of the superclass \'-initB3\' not found [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:107:17: warning: method override for the designated initializer of the superclass \'-initS1\' not found [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:155:17: warning: method override for the designated initializer of the superclass \'-initB1\' not found [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:155:17: warning: method override for the designated initializer of the superclass \'-initB3\' not found [-Wobjc-designated-initializers]"} } }, ["warn_objc_invalid_bridge"]={ [k]={"bridge-cast"}, [l]="bridge-cast", [h]="warn_objc_invalid_bridge", [b]="%0 bridges to %1, not %2", [f]="A bridges to B, not C", [e]=j, [a]="(.*?) bridges to (.*?), not (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wbridge\\-cast[^\\]]*\\]", [i]=o, [d]={"f07183ce9402",1384566325,"ObjetiveC ARC. Start diagnosing invalid toll free bridging.","ObjetiveC ARC. Start diagnosing invalid toll free bridging.\n// rdar://15454846.\n\nllvm-svn: 194915"}, [g]={{ib,4031,"template <typename TB> static bool CheckObjCBridgeNSCast(Sema &S, QualType castType, Expr *castExpr, bool &HadTheAttribute, bool warn) {\n // ...\n while (const auto *TD = T->getAs<TypedefType>()) {\n // ...\n if (TB *ObjCBAttr = getObjCBridgeAttr<TB>(TD)) {\n if (IdentifierInfo *Parm = ObjCBAttr->getBridgedType()) {\n // ...\n if (S.LookupName(R, S.TUScope)) {\n // ...\n if (Target && isa<ObjCInterfaceDecl>(Target)) {\n // ...\n if (const ObjCObjectPointerType *InterfacePointerType = castType->getAsObjCInterfacePointerType()) {\n // ...\n if (warn)\n S.Diag(castExpr->getBeginLoc(), diag::warn_objc_invalid_bridge) << T << Target->getName() << castType->getPointeeType();"},{ib,4043,"template <typename TB> static bool CheckObjCBridgeNSCast(Sema &S, QualType castType, Expr *castExpr, bool &HadTheAttribute, bool warn) {\n // ...\n while (const auto *TD = T->getAs<TypedefType>()) {\n // ...\n if (TB *ObjCBAttr = getObjCBridgeAttr<TB>(TD)) {\n if (IdentifierInfo *Parm = ObjCBAttr->getBridgedType()) {\n // ...\n if (S.LookupName(R, S.TUScope)) {\n // ...\n if (Target && isa<ObjCInterfaceDecl>(Target)) {\n // ...\n if (const ObjCObjectPointerType *InterfacePointerType = castType->getAsObjCInterfacePointerType()) {\n // ...\n } else if (castType->isObjCIdType() || (S.Context.ObjCObjectAdoptsQTypeProtocols(castType, ExprClass)))\n // ...\n else {\n if (warn) {\n S.Diag(castExpr->getBeginLoc(), diag::warn_objc_invalid_bridge) << T << Target->getName() << castType;"}}, [m]={ ["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:56:33: warning: \'CFErrorRef2\' (aka \'__CFErrorRef *\') bridges to NSError, not \'NSString\' [-Wbridge-cast]","clang/test/SemaObjCXX/objcbridge-static-cast.mm:63:31: warning: \'CFErrorRef2\' (aka \'__CFErrorRef *\') bridges to NSError, not \'MyError\' [-Wbridge-cast]","clang/test/SemaObjCXX/objcbridge-static-cast.mm:77:28: warning: \'CFErrorRef2\' (aka \'__CFErrorRef *\') bridges to NSError, not \'Class\' [-Wbridge-cast]","clang/test/SemaObjCXX/objcbridge-static-cast.mm:95:38: warning: \'CFErrorRef\' (aka \'__CFErrorRef *\') bridges to NSError, not \'id<P1,P2,P4>\' [-Wbridge-cast]","clang/test/SemaObjCXX/objcbridge-static-cast.mm:114:38: warning: \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') bridges to MyError, not \'id<P1,P2,P4>\' [-Wbridge-cast]"} } }, ["warn_objc_invalid_bridge_to_cf"]={ [k]={"bridge-cast"}, [l]="bridge-cast", [h]="warn_objc_invalid_bridge_to_cf", [b]="%0 cannot bridge to %1", [f]="A cannot bridge to B", [e]=j, [a]="(.*?) cannot bridge to (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wbridge\\-cast[^\\]]*\\]", [i]=o, [d]={"8a0210e535c5",1384629392,"ObjectiveC ARC. Validate toll free bridge casting","ObjectiveC ARC. Validate toll free bridge casting\nof ObjectiveC objects to CF types when CF type\nhas the objc_bridge attribute.\n\nllvm-svn: 194930"}, [g]={{ib,4096,"template <typename TB> static bool CheckObjCBridgeCFCast(Sema &S, QualType castType, Expr *castExpr, bool &HadTheAttribute, bool warn) {\n // ...\n while (const auto *TD = T->getAs<TypedefType>()) {\n // ...\n if (TB *ObjCBAttr = getObjCBridgeAttr<TB>(TD)) {\n if (IdentifierInfo *Parm = ObjCBAttr->getBridgedType()) {\n // ...\n if (S.LookupName(R, S.TUScope)) {\n // ...\n if (Target && isa<ObjCInterfaceDecl>(Target)) {\n // ...\n if (const ObjCObjectPointerType *InterfacePointerType = castExpr->getType()->getAsObjCInterfacePointerType()) {\n // ...\n if (warn) {\n S.Diag(castExpr->getBeginLoc(), diag::warn_objc_invalid_bridge_to_cf) << castExpr->getType()->getPointeeType() << T;"},{ib,4111,"template <typename TB> static bool CheckObjCBridgeCFCast(Sema &S, QualType castType, Expr *castExpr, bool &HadTheAttribute, bool warn) {\n // ...\n while (const auto *TD = T->getAs<TypedefType>()) {\n // ...\n if (TB *ObjCBAttr = getObjCBridgeAttr<TB>(TD)) {\n if (IdentifierInfo *Parm = ObjCBAttr->getBridgedType()) {\n // ...\n if (S.LookupName(R, S.TUScope)) {\n // ...\n if (Target && isa<ObjCInterfaceDecl>(Target)) {\n // ...\n if (const ObjCObjectPointerType *InterfacePointerType = castExpr->getType()->getAsObjCInterfacePointerType()) {\n // ...\n } else if (castExpr->getType()->isObjCIdType() || (S.Context.QIdProtocolsAdoptObjCObjectProtocols(castExpr->getType(), CastClass)))\n // ...\n else {\n if (warn) {\n S.Diag(castExpr->getBeginLoc(), diag::warn_objc_invalid_bridge_to_cf) << castExpr->getType() << castType;"}}, [m]={ ["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:73:33: warning: \'NSString\' cannot bridge to \'CFErrorRef\' (aka \'__CFErrorRef *\') [-Wbridge-cast]","clang/test/SemaObjCXX/objcbridge-static-cast.mm:81:33: warning: \'Class\' cannot bridge to \'CFErrorRef\' (aka \'__CFErrorRef *\') [-Wbridge-cast]"} } }, ["warn_objc_isa_assign"]={ [k]={"deprecated-objc-isa-usage"}, [l]="deprecated-objc-isa-usage", [h]="warn_objc_isa_assign", [b]="assignment to Objective-C\'s isa is deprecated in favor of object_setClass()", [f]="assignment to Objective-C\'s isa is deprecated in favor of object_setClass()", [e]=j, [a]="assignment to Objective\\-C\'s isa is deprecated in favor of object_setClass\\(\\)", [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-objc\\-isa\\-usage[^\\]]*\\]", [i]=o, [d]={"84510744d965",1364419165,"Objective-C: Issue more precise warning when user","Objective-C: Issue more precise warning when user\nis accessing \'isa\' as an object pointer.\n// rdar://13503456. FixIt to follow in another patch.\n\nllvm-svn: 178179"}, [g]={{I,613,"static void DiagnoseDirectIsaAccess(Sema &S, const ObjCIvarRefExpr *OIRE, SourceLocation AssignLoc, const Expr *RHS) {\n // ...\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>())\n if (ObjCInterfaceDecl *IDecl = OTy->getInterface()) {\n // ...\n if (!ClassDeclared->getSuperClass() && (*ClassDeclared->ivar_begin()) == IV) {\n if (RHS) {\n // ...\n if (ObjectSetClass) {\n // ...\n S.Diag(OIRE->getExprLoc(), diag::warn_objc_isa_assign) << FixItHint::CreateInsertion(OIRE->getBeginLoc(), \"object_setClass(\") << FixItHint::CreateReplacement(SourceRange(OIRE->getOpLoc(), AssignLoc), \",\") << FixItHint::CreateInsertion(RHSLocEnd, \")\");"},{I,621,"static void DiagnoseDirectIsaAccess(Sema &S, const ObjCIvarRefExpr *OIRE, SourceLocation AssignLoc, const Expr *RHS) {\n // ...\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>())\n if (ObjCInterfaceDecl *IDecl = OTy->getInterface()) {\n // ...\n if (!ClassDeclared->getSuperClass() && (*ClassDeclared->ivar_begin()) == IV) {\n if (RHS) {\n // ...\n if (ObjectSetClass) {\n // ...\n } else\n S.Diag(OIRE->getLocation(), diag::warn_objc_isa_assign);"},{I,15691,"/// CreateBuiltinBinOp - Creates a new built-in binary operation with\n/// operator @p Opc at location @c TokLoc. This routine only supports\n/// built-in operations; ActOnBinOp handles overloaded operators.\nExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n if (const ObjCIsaExpr *OISA = dyn_cast<ObjCIsaExpr>(LHS.get()->IgnoreParenCasts())) {\n // ...\n if (ObjectSetClass && isa<ObjCIsaExpr>(LHS.get())) {\n // ...\n Diag(LHS.get()->getExprLoc(), diag::warn_objc_isa_assign) << FixItHint::CreateInsertion(LHS.get()->getBeginLoc(), \"object_setClass(\") << FixItHint::CreateReplacement(SourceRange(OISA->getOpLoc(), OpLoc), \",\") << FixItHint::CreateInsertion(RHSLocEnd, \")\");"},{I,15760,"/// CreateBuiltinBinOp - Creates a new built-in binary operation with\n/// operator @p Opc at location @c TokLoc. This routine only supports\n/// built-in operations; ActOnBinOp handles overloaded operators.\nExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n if (const ObjCIsaExpr *OISA = dyn_cast<ObjCIsaExpr>(LHS.get()->IgnoreParenCasts())) {\n // ...\n if (ObjectSetClass && isa<ObjCIsaExpr>(LHS.get())) {\n // ...\n } else\n Diag(LHS.get()->getExprLoc(), diag::warn_objc_isa_assign);"}}, [m]={ ["clang/test/SemaObjC/deprecated-objc-introspection.m"]={"clang/test/SemaObjC/deprecated-objc-introspection.m:88:8: warning: assignment to Objective-C\'s isa is deprecated in favor of object_setClass() [-Wdeprecated-objc-isa-usage]"} } }, ["warn_objc_isa_use"]={ [k]={"deprecated-objc-isa-usage"}, [l]="deprecated-objc-isa-usage", [h]="warn_objc_isa_use", [b]="direct access to Objective-C\'s isa is deprecated in favor of object_getClass()", [f]="direct access to Objective-C\'s isa is deprecated in favor of object_getClass()", [e]=j, [a]="direct access to Objective\\-C\'s isa is deprecated in favor of object_getClass\\(\\)", [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-objc\\-isa\\-usage[^\\]]*\\]", [i]=o, [d]={"28324b00666b",1326913736,"objc: deprecate direct usage of \'isa\' of objc objects","objc: deprecate direct usage of \'isa\' of objc objects\nin favor of usage of api\'s intended for.\n// rdar://8290002\n\nllvm-svn: 148404"}, [g]={{I,628,"static void DiagnoseDirectIsaAccess(Sema &S, const ObjCIvarRefExpr *OIRE, SourceLocation AssignLoc, const Expr *RHS) {\n // ...\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>())\n if (ObjCInterfaceDecl *IDecl = OTy->getInterface()) {\n // ...\n if (!ClassDeclared->getSuperClass() && (*ClassDeclared->ivar_begin()) == IV) {\n if (RHS) {\n // ...\n } else {\n // ...\n if (ObjectGetClass)\n S.Diag(OIRE->getExprLoc(), diag::warn_objc_isa_use) << FixItHint::CreateInsertion(OIRE->getBeginLoc(), \"object_getClass(\") << FixItHint::CreateReplacement(SourceRange(OIRE->getOpLoc(), OIRE->getEndLoc()), \")\");"},{I,634,"static void DiagnoseDirectIsaAccess(Sema &S, const ObjCIvarRefExpr *OIRE, SourceLocation AssignLoc, const Expr *RHS) {\n // ...\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>())\n if (ObjCInterfaceDecl *IDecl = OTy->getInterface()) {\n // ...\n if (!ClassDeclared->getSuperClass() && (*ClassDeclared->ivar_begin()) == IV) {\n if (RHS) {\n // ...\n } else {\n // ...\n if (ObjectGetClass)\n // ...\n else\n S.Diag(OIRE->getLocation(), diag::warn_objc_isa_use);"},{I,692,"ExprResult Sema::DefaultLvalueConversion(Expr *E) {\n // ...\n if (const ObjCIsaExpr *OISA = dyn_cast<ObjCIsaExpr>(E->IgnoreParenCasts())) {\n // ...\n if (ObjectGetClass)\n Diag(E->getExprLoc(), diag::warn_objc_isa_use) << FixItHint::CreateInsertion(OISA->getBeginLoc(), \"object_getClass(\") << FixItHint::CreateReplacement(SourceRange(OISA->getOpLoc(), OISA->getIsaMemberLoc()), \")\");"},{I,697,"ExprResult Sema::DefaultLvalueConversion(Expr *E) {\n // ...\n if (const ObjCIsaExpr *OISA = dyn_cast<ObjCIsaExpr>(E->IgnoreParenCasts())) {\n // ...\n if (ObjectGetClass)\n // ...\n else\n Diag(E->getExprLoc(), diag::warn_objc_isa_use);"}}, [m]={ ["clang/test/SemaObjC/deprecated-objc-introspection.m"]={"clang/test/SemaObjC/deprecated-objc-introspection.m:29:9: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]","clang/test/SemaObjC/deprecated-objc-introspection.m:30:7: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]","clang/test/SemaObjC/deprecated-objc-introspection.m:81:14: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]","clang/test/SemaObjC/deprecated-objc-introspection.m:82:14: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]","clang/test/SemaObjC/deprecated-objc-introspection.m:83:14: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]","clang/test/SemaObjC/deprecated-objc-introspection.m:84:14: warning: direct access to Objective-C\'s isa is deprecated in favor of object_getClass() [-Wdeprecated-objc-isa-usage]"} } }, ["warn_objc_literal_comparison"]={ [k]={"objc-literal-compare"}, [l]="objc-literal-compare", [h]="warn_objc_literal_comparison", [b]="direct comparison of %select{an array literal|a dictionary literal|a numeric literal|a boxed expression|}0 has undefined behavior", [f]={{nil,nil,{"direct comparison of ",{"an array literal","a dictionary literal","a numeric literal","a boxed expression",T}," has undefined behavior"}}}, [e]=j, [a]="direct comparison of (?:an array literal|a dictionary literal|a numeric literal|a boxed expression|) has undefined behavior", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-literal\\-compare[^\\]]*\\]", [i]=o, [d]={"f9198030015f",1341852884,"Downgrade the \"direct comparison\" error for ObjC literals to a warning.","Downgrade the \"direct comparison\" error for ObjC literals to a warning.\n\nChris pointed out that while the comparison is certainly problematic\nand does not have well-defined behavior, it isn\'t any worse than some\nof the other abuses that we merely warn about and doesn\'t need to make\nthe compilation fail.\n\nRevert the release notes change (r159766) now that this is just a new warning.\n\nllvm-svn: 159939"}, [g]={{I,12513,"static void diagnoseObjCLiteralComparison(Sema &S, SourceLocation Loc, ExprResult &LHS, ExprResult &RHS, BinaryOperator::Opcode Opc) {\n // ...\n if (LiteralKind == Sema::LK_String)\n // ...\n else\n S.Diag(Loc, diag::warn_objc_literal_comparison) << LiteralKind << Literal->getSourceRange();"}}, [m]={ ["clang/test/SemaObjC/objc-literal-comparison.m"]={"clang/test/SemaObjC/objc-literal-comparison.m:44:11: warning: direct comparison of an array literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:45:11: warning: direct comparison of a dictionary literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:46:11: warning: direct comparison of a numeric literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:47:12: warning: direct comparison of a numeric literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:48:19: warning: direct comparison of a numeric literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:49:14: warning: direct comparison of a boxed expression has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:82:11: warning: direct comparison of a numeric literal has undefined behavior [-Wobjc-literal-compare]","clang/test/SemaObjC/objc-literal-comparison.m:83:10: warning: direct comparison of a numeric literal has undefined behavior [-Wobjc-literal-compare]"} } }, ["warn_objc_missing_super_call"]={ [k]={u,v,w,"objc-missing-super-calls"}, [l]="objc-missing-super-calls", [h]="warn_objc_missing_super_call", [b]="method possibly missing a [super %0] call", [f]="method possibly missing a [super A] call", [e]=j, [a]="method possibly missing a \\[super (.*?)\\] call", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-missing\\-super\\-calls[^\\]]*\\]", [i]=o, [d]={"b05417e1e136",1347295869,"objective-C: Improving diagnostocs for missing call to","objective-C: Improving diagnostocs for missing call to\nsuper\'s annotated methods. // rdar://6386358\n\nllvm-svn: 163517"}, [g]={{xb,15826,"Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, bool IsInstantiation) {\n // ...\n {\n // ...\n if (FD) {\n // ...\n } else if (ObjCMethodDecl *MD = dyn_cast_or_null<ObjCMethodDecl>(dcl)) {\n // ...\n if (FSI->ObjCShouldCallSuper) {\n Diag(MD->getEndLoc(), diag::warn_objc_missing_super_call) << MD->getSelector().getAsString();"}}, [m]={ ["clang/test/SemaObjCXX/warn-missing-super.mm"]={"clang/test/SemaObjCXX/warn-missing-super.mm:18:1: warning: method possibly missing a [super dealloc] call [-Wobjc-missing-super-calls]"} } }, ["warn_objc_pointer_cxx_catch_fragile"]={ [k]={"objc-nonunified-exceptions"}, [l]="objc-nonunified-exceptions", [h]="warn_objc_pointer_cxx_catch_fragile", [b]="cannot catch an exception thrown with @throw in C++ in the non-unified exception model", [f]="cannot catch an exception thrown with @throw in C++ in the non-unified exception model", [e]=j, [a]="cannot catch an exception thrown with @throw in C\\+\\+ in the non\\-unified exception model", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-nonunified\\-exceptions[^\\]]*\\]", [i]=o, [d]={"0a3cfcc87f07",1308774111,"Alloa catching Objective-C id\'s being thrown with C++ throw","Alloa catching Objective-C id\'s being thrown with C++ throw\nin Darwin\'s fragile abi mode. // rdar://8940528\n\nllvm-svn: 133639"}, [g]={{Nb,16678,"/// Perform semantic analysis for the variable declaration that\n/// occurs within a C++ catch clause, returning the newly-created\n/// variable.\nVarDecl *Sema::BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation Loc, IdentifierInfo *Name) {\n // ...\n // Only the non-fragile NeXT runtime currently supports C++ catches\n // of ObjC types, and no runtime supports catching ObjC types by value.\n if (!Invalid && getLangOpts().ObjC) {\n // ...\n if (T->isObjCObjectType()) {\n // ...\n } else if (T->isObjCObjectPointerType()) {\n // FIXME: should this be a test for macosx-fragile specifically?\n if (getLangOpts().ObjCRuntime.isFragile())\n Diag(Loc, diag::warn_objc_pointer_cxx_catch_fragile);"}}, [m]={ ["clang/test/SemaObjCXX/exceptions-fragile.mm"]={"clang/test/SemaObjCXX/exceptions-fragile.mm:9:27: warning: cannot catch an exception thrown with @throw in C++ in the non-unified exception model [-Wobjc-nonunified-exceptions]"} } }, ["warn_objc_pointer_masking"]={ [k]={"deprecated-objc-pointer-introspection"}, [l]="deprecated-objc-pointer-introspection", [h]="warn_objc_pointer_masking", [b]="bitmasking for introspection of Objective-C object pointers is strongly discouraged", [f]="bitmasking for introspection of Objective-C object pointers is strongly discouraged", [e]=j, [a]="bitmasking for introspection of Objective\\-C object pointers is strongly discouraged", [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-objc\\-pointer\\-introspection[^\\]]*\\]", [i]=o, [d]={"ebeabab9a9b6",1366670812,"Add a warning for Objective-C pointer introspection, which is solely the job of the Objective-C runt...","Add a warning for Objective-C pointer introspection, which is solely the job of the Objective-C runtime.\n\nllvm-svn: 180062"}, [g]={{I,15341,"/// Check if a bitwise-& is performed on an Objective-C pointer. This\n/// is usually indicative of introspection within the Objective-C pointer.\nstatic void checkObjCPointerIntrospection(Sema &S, ExprResult &L, ExprResult &R, SourceLocation OpLoc) {\n // ...\n // This warning is deliberately made very specific to reduce false\n // positives with logic that uses \'&\' for hashing. This logic mainly\n // looks for code trying to introspect into tagged pointers, which\n // code should generally never do.\n if (ObjCPointerExpr && isa<IntegerLiteral>(OtherExpr->IgnoreParenCasts())) {\n unsigned Diag = diag::warn_objc_pointer_masking;"}}, [m]={ ["clang/test/SemaObjC/deprecated-objc-introspection.m"]={"clang/test/SemaObjC/deprecated-objc-introspection.m:95:28: warning: bitmasking for introspection of Objective-C object pointers is strongly discouraged [-Wdeprecated-objc-pointer-introspection]","clang/test/SemaObjC/deprecated-objc-introspection.m:96:15: warning: bitmasking for introspection of Objective-C object pointers is strongly discouraged [-Wdeprecated-objc-pointer-introspection]","clang/test/SemaObjC/deprecated-objc-introspection.m:99:15: warning: bitmasking for introspection of Objective-C object pointers is strongly discouraged [-Wdeprecated-objc-pointer-introspection-performSelector]"} } }, ["warn_objc_pointer_masking_performSelector"]={ [k]={"deprecated-objc-pointer-introspection","deprecated-objc-pointer-introspection-performSelector"}, [l]="deprecated-objc-pointer-introspection-performSelector", [h]="warn_objc_pointer_masking_performSelector", [b]="bitmasking for introspection of Objective-C object pointers is strongly discouraged", [f]="bitmasking for introspection of Objective-C object pointers is strongly discouraged", [e]=j, [a]="bitmasking for introspection of Objective\\-C object pointers is strongly discouraged", [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-objc\\-pointer\\-introspection\\-performSelector[^\\]]*\\]", [i]=o, [d]={"009d61dd16b4",1372109739,"Tweak -Wdeprecated-objc-pointer-introspection to have a subgroup for results of using -performSelect...","Tweak -Wdeprecated-objc-pointer-introspection to have a subgroup for results of using -performSelectorXXX.\n\n-performSelector: and friends return a value that is boxed as an Objective-C\npointer. Sometimes it is an Objective-C pointer, sometimes it isn\'t.\nSome clients may wish to silence this warning based on calling\nthis method.\n\nFixes <rdar://problem/14147304>\n\nllvm-svn: 184789"}, [g]={{I,15489,"/// Check if a bitwise-& is performed on an Objective-C pointer. This\n/// is usually indicative of introspection within the Objective-C pointer.\nstatic void checkObjCPointerIntrospection(Sema &S, ExprResult &L, ExprResult &R, SourceLocation OpLoc) {\n // ...\n // This warning is deliberately made very specific to reduce false\n // positives with logic that uses \'&\' for hashing. This logic mainly\n // looks for code trying to introspect into tagged pointers, which\n // code should generally never do.\n if (ObjCPointerExpr && isa<IntegerLiteral>(OtherExpr->IgnoreParenCasts())) {\n // ...\n // Special case messages to -performSelector and friends, which\n // can return non-pointer values boxed in a pointer value.\n // Some clients may wish to silence warnings in this subcase.\n if (const ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(Ex)) {\n // ...\n if (SelArg0.startswith(\"performSelector\"))\n Diag = diag::warn_objc_pointer_masking_performSelector;"}} }, ["warn_objc_precise_lifetime_meaningless"]={ [h]="warn_objc_precise_lifetime_meaningless", [b]="objc_precise_lifetime is not meaningful for %select{__unsafe_unretained|__autoreleasing}0 objects", [f]={{nil,nil,{"objc_precise_lifetime is not meaningful for ",{"__unsafe_unretained","__autoreleasing"}," objects"}}}, [e]="(?:error|fatal error)\\: ", [a]="objc_precise_lifetime is not meaningful for (?:__unsafe_unretained|__autoreleasing) objects", [c]=T, [i]=o, [d]={"31168b077c36",1308178962,"Automatic Reference Counting.","Automatic Reference Counting.\n\nLanguage-design credit goes to a lot of people, but I particularly want\nto single out Blaine Garst and Patrick Beard for their contributions.\n\nCompiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,\nin no particular order.\n\nllvm-svn: 133103"}, [g]={{V,6325,"static void handleObjCPreciseLifetimeAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n case Qualifiers::OCL_ExplicitNone:\n case Qualifiers::OCL_Autoreleasing:\n S.Diag(AL.getLoc(), diag::warn_objc_precise_lifetime_meaningless) << (Lifetime == Qualifiers::OCL_Autoreleasing);"}} }, ["warn_objc_property_assign_on_object"]={ [k]={"objc-property-assign-on-object-type"}, [l]="objc-property-assign-on-object-type", [h]={{nil,K,"warn_objc_property_assign_on_object"}}, [b]={{nil,K,"\'assign\' property of object type may become a dangling reference; consider using \'unsafe_unretained\'"}}, [f]={{nil,K,"\'assign\' property of object type may become a dangling reference; consider using \'unsafe_unretained\'"}}, [e]=j, [a]="\'assign\' property of object type may become a dangling reference; consider using \'unsafe_unretained\'", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-assign\\-on\\-object\\-type[^\\]]*\\]", [i]={{nil,K,o}}, [d]={"52a503d4f333",1536174120,"Add -Wobjc-property-assign-on-object-type.","Add -Wobjc-property-assign-on-object-type.\n\nThis is a warning about using \'assign\' instead of \'unsafe_unretained\'\nin Objective-C property declarations. It\'s off by default because there\nisn\'t consensus in the Objective-C steering group that this is the right\nthing to do, but we\'re nonetheless okay with adding it because there\'s a\nsubstantial pool of Objective-C programmers who will appreciate the warning.\n\nPatch by Alfred Zien!\n\nllvm-svn: 341489"}, [g]={{Q,2675,"void Sema::CheckObjCPropertyAttributes(Decl *PDecl, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass) {\n // ...\n // Check for assign on object types.\n if ((Attributes & ObjCPropertyAttribute::kind_assign) && !(Attributes & ObjCPropertyAttribute::kind_unsafe_unretained) && PropertyTy->isObjCRetainableType() && !PropertyTy->isObjCARCImplicitlyUnretainedType()) {\n Diag(Loc, diag::warn_objc_property_assign_on_object);"}}, [m]={ ["clang/test/SemaObjC/property-assign-on-object-type.m"]={"clang/test/SemaObjC/property-assign-on-object-type.m:7:1: warning: \'assign\' property of object type may become a dangling reference; consider using \'unsafe_unretained\' [-Wobjc-property-assign-on-object-type]"} } }, ["warn_objc_property_copy_missing_on_block"]={ [h]="warn_objc_property_copy_missing_on_block", [b]="\'copy\' attribute must be specified for the block property when -fobjc-gc-only is specified", [f]="\'copy\' attribute must be specified for the block property when -fobjc-gc-only is specified", [e]=j, [a]="\'copy\' attribute must be specified for the block property when \\-fobjc\\-gc\\-only is specified", [c]=wb, [i]=o, [d]={"5580bdcaa2d4",1241737610,"Add a warning for a missing copy attribute on a property that is a","Add a warning for a missing copy attribute on a property that is a\nblock pointer. Radar 6441502\n\nllvm-svn: 71190"}, [g]={{Q,2808,"void Sema::CheckObjCPropertyAttributes(Decl *PDecl, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass) {\n // ...\n if (!(Attributes & ObjCPropertyAttribute::kind_copy) && !(Attributes & ObjCPropertyAttribute::kind_readonly) && getLangOpts().getGC() == LangOptions::GCOnly && PropertyTy->isBlockPointerType())\n Diag(Loc, diag::warn_objc_property_copy_missing_on_block);"}}, [m]={ ["clang/test/SemaObjC/block-attr.m"]={"clang/test/SemaObjC/block-attr.m:6:1: warning: \'copy\' attribute must be specified for the block property when -fobjc-gc-only is specified"} } }, ["warn_objc_property_default_assign_on_object"]={ [k]={"objc-property-no-attribute"}, [l]="objc-property-no-attribute", [h]="warn_objc_property_default_assign_on_object", [b]={{nil,z,"default property attribute \'assign\' not appropriate for object"},{x,nil,"default property attribute \'assign\' not appropriate for non-GC object"}}, [f]={{nil,z,"default property attribute \'assign\' not appropriate for object"},{x,nil,"default property attribute \'assign\' not appropriate for non-GC object"}}, [e]=j, [a]="default property attribute \'assign\' not appropriate for object", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-no\\-attribute[^\\]]*\\]", [i]=o, [d]={qb,1236199783,pb,ob}, [g]={{Q,2794,"void Sema::CheckObjCPropertyAttributes(Decl *PDecl, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass) {\n // ...\n // Warn if user supplied no assignment attribute, property is\n // readwrite, and this is an object type.\n if (!getOwnershipRule(Attributes) && PropertyTy->isObjCRetainableType()) {\n if (Attributes & ObjCPropertyAttribute::kind_readonly) {\n // ...\n } else if (getLangOpts().ObjCAutoRefCount) {\n // ...\n } else if (PropertyTy->isObjCObjectPointerType()) {\n // ...\n // In non-gc, non-arc mode, \'Class\' is treated as a \'void *\' no need to\n // issue any warning.\n if (isAnyClassTy && getLangOpts().getGC() == LangOptions::NonGC)\n // ...\n else if (propertyInPrimaryClass) {\n // ...\n // If non-gc code warn that this is likely inappropriate.\n if (getLangOpts().getGC() == LangOptions::NonGC)\n Diag(Loc, diag::warn_objc_property_default_assign_on_object);"}}, [m]={ ["clang/test/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:9:1: warning: default property attribute \'assign\' not appropriate for object [-Wobjc-property-no-attribute]"} } }, ["warn_objc_property_no_assignment_attribute"]={ [k]={"objc-property-no-attribute"}, [l]="objc-property-no-attribute", [h]="warn_objc_property_no_assignment_attribute", [b]="no \'assign\', \'retain\', or \'copy\' attribute is specified - \'assign\' is assumed", [f]="no \'assign\', \'retain\', or \'copy\' attribute is specified - \'assign\' is assumed", [e]=j, [a]="no \'assign\', \'retain\', or \'copy\' attribute is specified \\- \'assign\' is assumed", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-no\\-attribute[^\\]]*\\]", [i]=o, [d]={qb,1236199783,pb,ob}, [g]={{Q,2790,"void Sema::CheckObjCPropertyAttributes(Decl *PDecl, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass) {\n // ...\n // Warn if user supplied no assignment attribute, property is\n // readwrite, and this is an object type.\n if (!getOwnershipRule(Attributes) && PropertyTy->isObjCRetainableType()) {\n if (Attributes & ObjCPropertyAttribute::kind_readonly) {\n // ...\n } else if (getLangOpts().ObjCAutoRefCount) {\n // ...\n } else if (PropertyTy->isObjCObjectPointerType()) {\n // ...\n // In non-gc, non-arc mode, \'Class\' is treated as a \'void *\' no need to\n // issue any warning.\n if (isAnyClassTy && getLangOpts().getGC() == LangOptions::NonGC)\n // ...\n else if (propertyInPrimaryClass) {\n // Don\'t issue warning on property with no life time in class\n // extension as it is inherited from property in primary class.\n // Skip this warning in gc-only mode.\n if (getLangOpts().getGC() != LangOptions::GCOnly)\n Diag(Loc, diag::warn_objc_property_no_assignment_attribute);"}}, [m]={ ["clang/test/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:9:1: warning: no \'assign\', \'retain\', or \'copy\' attribute is specified - \'assign\' is assumed [-Wobjc-property-no-attribute]"} } }, ["warn_objc_property_retain_of_block"]={ [k]={"objc-noncopy-retain-block-property"}, [l]="objc-noncopy-retain-block-property", [h]="warn_objc_property_retain_of_block", [b]="retain\'ed block property does not copy the block - use copy attribute instead", [f]="retain\'ed block property does not copy the block - use copy attribute instead", [e]=j, [a]="retain\'ed block property does not copy the block \\- use copy attribute instead", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-noncopy\\-retain\\-block\\-property[^\\]]*\\]", [i]=o, [d]={"1723e17b78f8",1316023426,"objc-arc: warn when a \'retain\' block property is","objc-arc: warn when a \'retain\' block property is\ndeclared which does not force a \'copy\' of the block literal\nobject. // rdar://9829425\n\nllvm-svn: 139706"}, [g]={{Q,2813,"void Sema::CheckObjCPropertyAttributes(Decl *PDecl, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass) {\n // ...\n if (!(Attributes & ObjCPropertyAttribute::kind_copy) && !(Attributes & ObjCPropertyAttribute::kind_readonly) && getLangOpts().getGC() == LangOptions::GCOnly && PropertyTy->isBlockPointerType())\n // ...\n else if ((Attributes & ObjCPropertyAttribute::kind_retain) && !(Attributes & ObjCPropertyAttribute::kind_readonly) && !(Attributes & ObjCPropertyAttribute::kind_strong) && PropertyTy->isBlockPointerType())\n Diag(Loc, diag::warn_objc_property_retain_of_block);"}}, [m]={ ["clang/test/SemaObjC/warn-retain-cycle.m"]={"clang/test/SemaObjC/warn-retain-cycle.m:36:1: warning: retain\'ed block property does not copy the block - use copy attribute instead [-Wobjc-noncopy-retain-block-property]"} } }, ["warn_objc_protocol_qualifier_missing_id"]={ [h]="warn_objc_protocol_qualifier_missing_id", [b]="protocol has no object type specified; defaults to qualified \'id\'", [f]="protocol has no object type specified; defaults to qualified \'id\'", [e]=j, [a]="protocol has no object type specified; defaults to qualified \'id\'", [c]=wb, [i]=t, [d]={qb,1236199783,pb,ob}, [g]={{"clang/lib/Parse/ParseObjc.cpp",1625,"TypeResult Parser::parseObjCProtocolQualifierType(SourceLocation &rAngleLoc) {\n // ...\n if (result.isUsable()) {\n Diag(lAngleLoc, diag::warn_objc_protocol_qualifier_missing_id) << FixItHint::CreateInsertion(lAngleLoc, \"id\") << SourceRange(lAngleLoc, rAngleLoc);"}}, [m]={ ["clang/test/SemaObjC/protocol-archane.m"]={"clang/test/SemaObjC/protocol-archane.m:11:8: warning: protocol has no object type specified; defaults to qualified \'id\'","clang/test/SemaObjC/protocol-archane.m:13:5: warning: protocol has no object type specified; defaults to qualified \'id\'","clang/test/SemaObjC/protocol-archane.m:40:20: warning: protocol has no object type specified; defaults to qualified \'id\'","clang/test/SemaObjC/protocol-archane.m:44:9: warning: protocol has no object type specified; defaults to qualified \'id\'"} } }, ["warn_objc_readonly_property_has_setter"]={ [k]={"objc-readonly-with-setter-property"}, [l]="objc-readonly-with-setter-property", [h]="warn_objc_readonly_property_has_setter", [b]="setter cannot be specified for a readonly property", [f]="setter cannot be specified for a readonly property", [e]=j, [a]="setter cannot be specified for a readonly property", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-readonly\\-with\\-setter\\-property[^\\]]*\\]", [i]=o, [d]={"3018b950936a",1320188536,"objc: warn if a readonly property has a setter attribute too.","objc: warn if a readonly property has a setter attribute too.\n// rdar://10357768\n\nllvm-svn: 143518"}, [g]={{Q,2817,"void Sema::CheckObjCPropertyAttributes(Decl *PDecl, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass) {\n // ...\n if ((Attributes & ObjCPropertyAttribute::kind_readonly) && (Attributes & ObjCPropertyAttribute::kind_setter))\n Diag(Loc, diag::warn_objc_readonly_property_has_setter);"}}, [m]={ ["clang/test/SemaObjC/property-10.m"]={"clang/test/SemaObjC/property-10.m:46:1: warning: setter cannot be specified for a readonly property [-Wobjc-readonly-with-setter-property]"} } }, ["warn_objc_redundant_literal_use"]={ [k]={"objc-cocoa-api","objc-redundant-api-use","objc-redundant-literal-use"}, [l]="objc-redundant-literal-use", [h]="warn_objc_redundant_literal_use", [b]="using %0 with a literal is redundant", [f]="using A with a literal is redundant", [e]=j, [a]="using (.*?) with a literal is redundant", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-redundant\\-literal\\-use[^\\]]*\\]", [i]="Cocoa API Issue", [d]={"e65b086e07a6",1331064356,"Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,","Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,\nNSNumber, and boolean literals. This includes both Sema and Codegen support.\nIncluded is also support for new Objective-C container subscripting.\n\nMy apologies for the large patch. It was very difficult to break apart.\nThe patch introduces changes to the driver as well to cause clang to link\nin additional runtime support when needed to support the new language features.\n\nDocs are forthcoming to document the implementation and behavior of these features.\n\nllvm-svn: 152137"}, [g]={{ib,2491,"static void checkCocoaAPI(Sema &S, const ObjCMessageExpr *Msg) { applyCocoaAPICheck(S, Msg, diag::warn_objc_redundant_literal_use, edit::rewriteObjCRedundantCallWithLiteral); }"}}, [m]={ ["clang/test/ARCMT/objcmt-instancetype.m"]={"clang/test/ARCMT/objcmt-instancetype.m:107:21: warning: using \'stringWithString:\' with a literal is redundant [-Wobjc-redundant-literal-use]","clang/test/ARCMT/objcmt-instancetype.m:108:9: warning: using \'initWithString:\' with a literal is redundant [-Wobjc-redundant-literal-use]","clang/test/ARCMT/objcmt-instancetype.m:109:18: warning: using \'arrayWithArray:\' with a literal is redundant [-Wobjc-redundant-literal-use]","clang/test/ARCMT/objcmt-instancetype.m:110:24: warning: using \'dictionaryWithDictionary:\' with a literal is redundant [-Wobjc-redundant-literal-use]"} } }, ["warn_objc_redundant_qualified_class_type"]={ [k]={"objc-protocol-qualifiers"}, [l]="objc-protocol-qualifiers", [h]="warn_objc_redundant_qualified_class_type", [b]="parameterized class %0 already conforms to the protocols listed; did you forget a \'*\'?", [f]="parameterized class A already conforms to the protocols listed; did you forget a \'*\'?", [e]=j, [a]="parameterized class (.*?) already conforms to the protocols listed; did you forget a \'\\*\'\\?", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-protocol\\-qualifiers[^\\]]*\\]", [i]=O, [d]={"10dc9d80cbb4",1436241508,"Warn when an intended Objective-C specialization was actually a useless protocol qualification.","Warn when an intended Objective-C specialization was actually a useless protocol qualification.\n\nWarn in cases where one has provided redundant protocol qualification\nthat might be a typo for a specialization, e.g., NSArray<NSObject>,\nwhich is pointless (NSArray declares that it conforms to NSObject) and\nis likely to be a typo for NSArray<NSObject *>, i.e., an array of\nNSObject pointers. This warning is very narrow, only applying when the\nbase type being qualified is parameterized, has the same number of\nparameters as their are protocols listed, all of the names can also\nrefer to types (including Objective-C class types, of course), and at\nleast one of those types is an Objective-C class (making this a typo\nfor a missing \'*\'). The limitations are partly for performance reasons\n(we don\'t want to do redundant name lookup unless we really need to),\nand because we want the warning to apply in very limited cases to\nlimit false positives.\n\nPart of rdar://problem/6294649.\n\nllvm-svn: 241547"}, [g]={{vb,1528,"void Sema::actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef<IdentifierInfo *> identifiers, ArrayRef<SourceLocation> identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl<ParsedType> &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl<Decl *> &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) {\n // ...\n auto resolvedAsProtocols = [&] {\n // ...\n // All of the protocols listed also have type names, and at least\n // one is an Objective-C class name. Check whether all of the\n // protocol conformances are declared by the base class itself, in\n // which case we warn.\n if (allAreTypeNames && firstClassNameLoc.isValid()) {\n // ...\n if (allProtocolsDeclared) {\n Diag(firstClassNameLoc, diag::warn_objc_redundant_qualified_class_type) << baseClass->getDeclName() << SourceRange(lAngleLoc, rAngleLoc) << FixItHint::CreateInsertion(getLocForEndOfToken(firstClassNameLoc), \" *\");"}}, [m]={ ["clang/test/SemaObjC/parameterized_classes_subst.m"]={"clang/test/SemaObjC/parameterized_classes_subst.m:436:17: warning: parameterized class \'NSArray\' already conforms to the protocols listed; did you forget a \'*\'? [-Wobjc-protocol-qualifiers]"} } }, ["warn_objc_requires_super_protocol"]={ [k]={"requires-super-attribute"}, [l]="requires-super-attribute", [h]="warn_objc_requires_super_protocol", [b]="%0 attribute cannot be applied to %select{methods in protocols|dealloc}1", [f]={{nil,nil,{"A attribute cannot be applied to ",{"methods in protocols","dealloc"}}}}, [e]=j, [a]="(.*?) attribute cannot be applied to (?:methods in protocols|dealloc)", [c]=" \\[(?:\\-Werror,)?\\-Wrequires\\-super\\-attribute[^\\]]*\\]", [i]=o, [d]={"566fff0dac54",1347061583,"objective-C: introduce __attribute((objc_requires_super)) on method","objective-C: introduce __attribute((objc_requires_super)) on method\nin classes. Use it to flag those method implementations which don\'t\ncontain call to \'super\' if they have \'super\' class and it has the method\nwith this attribute set. This is wip. // rdar://6386358\n\nllvm-svn: 163434"}, [g]={{V,6131,"static void handleObjCRequiresSuperAttr(Sema &S, Decl *D, const ParsedAttr &Attrs) {\n // ...\n if (const auto *PDecl = dyn_cast_or_null<ObjCProtocolDecl>(DC)) {\n S.Diag(D->getBeginLoc(), diag::warn_objc_requires_super_protocol) << Attrs << 0;"},{V,6137,"static void handleObjCRequiresSuperAttr(Sema &S, Decl *D, const ParsedAttr &Attrs) {\n // ...\n if (Method->getMethodFamily() == OMF_dealloc) {\n S.Diag(D->getBeginLoc(), diag::warn_objc_requires_super_protocol) << Attrs << 1;"}}, [m]={ ["clang/test/SemaObjC/super-dealloc-attribute.m"]={"clang/test/SemaObjC/super-dealloc-attribute.m:12:1: warning: \'objc_requires_super\' attribute cannot be applied to methods in protocols [-Wrequires-super-attribute]","clang/test/SemaObjC/super-dealloc-attribute.m:18:1: warning: \'objc_requires_super\' attribute cannot be applied to dealloc [-Wrequires-super-attribute]"} } }, ["warn_objc_root_class_missing"]={ [k]={"objc-root-class"}, [l]="objc-root-class", [h]="warn_objc_root_class_missing", [b]="class %0 defined without specifying a base class", [f]="class A defined without specifying a base class", [e]=j, [a]="class (.*?) defined without specifying a base class", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-root\\-class[^\\]]*\\]", [i]=o, [d]={"acfbe9e1f228",1333735942,"Added a new attribute, objc_root_class, which informs the compiler when a root class is intentionall...","Added a new attribute, objc_root_class, which informs the compiler when a root class is intentionally declared.\nThe warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger\nthe warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698>\n\nllvm-svn: 154187"}, [g]={{vb,4138,"// Note: For class/category implementations, allMethods is always null.\nDecl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods, ArrayRef<DeclGroupPtrTy> allTUVars) {\n // ...\n if (ObjCImplementationDecl *IC = dyn_cast<ObjCImplementationDecl>(ClassDecl)) {\n // ...\n if (ObjCInterfaceDecl *IDecl = IC->getClassInterface()) {\n // ...\n if (IDecl->getSuperClass() == nullptr) {\n // This class has no superclass, so check that it has been marked with\n // __attribute((objc_root_class)).\n if (!HasRootClassAttr) {\n // ...\n Diag(DeclLoc, diag::warn_objc_root_class_missing) << IDecl->getIdentifier();"}}, [m]={ ["clang/test/SemaObjC/method-encoding-2.m"]={"clang/test/SemaObjC/method-encoding-2.m:4:12: warning: class \'Intf\' defined without specifying a base class [-Wobjc-root-class]"} } }, ["warn_objc_secondary_init_missing_init_call"]={ [k]={u,v,w,rb}, [l]=rb, [h]="warn_objc_secondary_init_missing_init_call", [b]="convenience initializer missing a \'self\' call to another initializer", [f]="convenience initializer missing a \'self\' call to another initializer", [e]=j, [a]="convenience initializer missing a \'self\' call to another initializer", [c]=Ub, [i]=o, [d]={"b66d3cf5cf84",1386105109,"[objc] Emit warning when the implementation of a secondary initializer calls on","[objc] Emit warning when the implementation of a secondary initializer calls on\nsuper another initializer and when the implementation does not delegate to\nanother initializer via a call on \'self\'.\n\nA secondary initializer is an initializer method not marked as a designated\ninitializer within a class that has at least one initializer marked as a\ndesignated initializer.\n\nllvm-svn: 196318"}, [g]={{xb,15861,"Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, bool IsInstantiation) {\n // ...\n {\n // ...\n if (FD) {\n // ...\n } else if (ObjCMethodDecl *MD = dyn_cast_or_null<ObjCMethodDecl>(dcl)) {\n // ...\n if (FSI->ObjCWarnForNoInitDelegation) {\n // Don\'t issue this warning for unavaialable inits.\n if (!MD->isUnavailable())\n Diag(MD->getLocation(), diag::warn_objc_secondary_init_missing_init_call);"}}, [m]={ [Sb]={"clang/test/SemaObjC/attr-designated-init.m:32:1: warning: convenience initializer missing a \'self\' call to another initializer [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:48:1: warning: convenience initializer missing a \'self\' call to another initializer [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:160:1: warning: convenience initializer missing a \'self\' call to another initializer [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:176:1: warning: convenience initializer missing a \'self\' call to another initializer [-Wobjc-designated-initializers]"} } }, ["warn_objc_secondary_init_super_init_call"]={ [k]={u,v,w,rb}, [l]=rb, [h]="warn_objc_secondary_init_super_init_call", [b]="convenience initializer should not invoke an initializer on \'super\'", [f]="convenience initializer should not invoke an initializer on \'super\'", [e]=j, [a]="convenience initializer should not invoke an initializer on \'super\'", [c]=Ub, [i]=o, [d]={"b66d3cf5cf84",1386105109,"[objc] Emit warning when the implementation of a secondary initializer calls on","[objc] Emit warning when the implementation of a secondary initializer calls on\nsuper another initializer and when the implementation does not delegate to\nanother initializer via a call on \'self\'.\n\nA secondary initializer is an initializer method not marked as a designated\ninitializer within a class that has at least one initializer marked as a\ndesignated initializer.\n\nllvm-svn: 196318"}, [g]={{ib,3219,"/// Build an Objective-C instance message expression.\n///\n/// This routine takes care of both normal instance messages and\n/// instance messages to the superclass instance.\n///\n/// \\param Receiver The expression that computes the object that will\n/// receive this message. This may be empty, in which case we are\n/// sending to the superclass instance and \\p SuperLoc must be a valid\n/// source location.\n///\n/// \\param ReceiverType The (static) type of the object receiving the\n/// message. When a \\p Receiver expression is provided, this is the\n/// same type as that expression. For a superclass instance send, this\n/// is a pointer to the type of the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass instance message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this instance message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // ...\n if (DIFunctionScopeInfo && DIFunctionScopeInfo->ObjCIsSecondaryInit && (SuperLoc.isValid() || isSelfExpr(Receiver))) {\n if (SuperLoc.isValid()) {\n Diag(SelLoc, diag::warn_objc_secondary_init_super_init_call);"}}, [m]={ [Sb]={"clang/test/SemaObjC/attr-designated-init.m:161:17: warning: convenience initializer should not invoke an initializer on \'super\' [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:170:10: warning: convenience initializer should not invoke an initializer on \'super\' [-Wobjc-designated-initializers]","clang/test/SemaObjC/attr-designated-init.m:172:12: warning: convenience initializer should not invoke an initializer on \'super\' [-Wobjc-designated-initializers]"} } }, ["warn_objc_string_literal_comparison"]={ [k]={"objc-literal-compare","objc-string-compare"}, [l]="objc-string-compare", [h]="warn_objc_string_literal_comparison", [b]="direct comparison of a string literal has undefined behavior", [f]="direct comparison of a string literal has undefined behavior", [e]=j, [a]="direct comparison of a string literal has undefined behavior", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-string\\-compare[^\\]]*\\]", [i]=o, [d]={"ea70bf71547b",1342547204,"Add -Wobjc-string-compare under -Wobjc-literal-compare.","Add -Wobjc-string-compare under -Wobjc-literal-compare.\n\nSuggested by Ted, since string literal comparison is at least slightly more\nsensible than comparison of runtime literals. (Ambiguous language on\ndeveloper.apple.com implies that strings are guaranteed to be uniqued within\na translation unit and possibly across a linked binary.)\n\nllvm-svn: 160378"}, [g]={{I,12503,"static void diagnoseObjCLiteralComparison(Sema &S, SourceLocation Loc, ExprResult &LHS, ExprResult &RHS, BinaryOperator::Opcode Opc) {\n // ...\n if (LiteralKind == Sema::LK_String)\n S.Diag(Loc, diag::warn_objc_string_literal_comparison) << Literal->getSourceRange();"}}, [m]={ ["clang/test/FixIt/fixit-nsstring-compare.m"]={"clang/test/FixIt/fixit-nsstring-compare.m:16:28: warning: direct comparison of a string literal has undefined behavior [-Wobjc-string-compare]"} } }, ["warn_objc_unsafe_perform_selector"]={ [k]={"objc-unsafe-perform-selector"}, [l]="objc-unsafe-perform-selector", [h]={{nil,gb,"warn_objc_unsafe_perform_selector"}}, [b]={{nil,gb,"%0 is incompatible with selectors that return a %select{struct|union|vector}1 type"}}, [f]={{nil,gb,{"A is incompatible with selectors that return a ",{"struct","union","vector"}," type"}}}, [e]=j, [a]="(.*?) is incompatible with selectors that return a (?:struct|union|vector) type", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-unsafe\\-perform\\-selector[^\\]]*\\]", [i]={{nil,gb,o}}, [d]={"0e23c61c8755",1488815914,"[Sema][ObjC] Warn about \'performSelector\' calls with selectors","[Sema][ObjC] Warn about \'performSelector\' calls with selectors\nthat return record or vector types\n\nThe performSelector family of methods from Foundation use objc_msgSend to\ndispatch the selector invocations to objects. However, method calls to methods\nthat return record types might have to use the objc_msgSend_stret as the return\nvalue won\'t find into the register. This is also supported by this sentence from\nperformSelector documentation: \"The method should not have a significant return\nvalue and should take a single argument of type id, or no arguments\". This\ncommit adds a new warning that warns when a selector which corresponds to a\nmethod that returns a record type is passed into performSelector.\n\nrdar://12056271\n\nDifferential Revision: https://reviews.llvm.org/D30174\n\nllvm-svn: 297019"}, [g]={{ib,2530,"static void checkFoundationAPI(Sema &S, SourceLocation Loc, const ObjCMethodDecl *Method, ArrayRef<Expr *> Args, QualType ReceiverType, bool IsClassObjectCall) {\n // ...\n if (Ret->isRecordType() || Ret->isVectorType() || Ret->isExtVectorType()) {\n S.Diag(Loc, diag::warn_objc_unsafe_perform_selector) << Method->getSelector() << (!Ret->isRecordType() ? /*Vector*/ 2 : Ret->isUnionType() ? /*Union*/ 1 : /*Struct*/ 0);"}}, [m]={ ["clang/test/SemaObjC/unsafe-perform-selector.m"]={"clang/test/SemaObjC/unsafe-perform-selector.m:58:6: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:59:6: warning: \'performSelectorInBackground:withObject:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:60:6: warning: \'performSelector:\' is incompatible with selectors that return a union type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:61:6: warning: \'performSelectorOnMainThread:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:62:6: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:90:9: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:91:9: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:95:10: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:96:10: warning: \'performSelectorInBackground:withObject:\' is incompatible with selectors that return a union type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:106:9: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:110:10: warning: \'performSelector:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:119:9: warning: \'performSelectorOnMainThread:onThread:withObject:waitUntilDone:modes:\' is incompatible with selectors that return a struct type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:123:9: warning: \'performSelector:\' is incompatible with selectors that return a vector type [-Wobjc-unsafe-perform-selector]","clang/test/SemaObjC/unsafe-perform-selector.m:124:9: warning: \'performSelector:\' is incompatible with selectors that return a vector type [-Wobjc-unsafe-perform-selector]"} } }, ["warn_odr_different_num_template_parameters"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_different_num_template_parameters"}}, [b]={{nil,p,"template parameter lists have a different number of parameters (%0 vs %1)"}}, [f]={{nil,p,"template parameter lists have a different number of parameters (A vs B)"}}, [e]=j, [a]="template parameter lists have a different number of parameters \\((.*?) vs (.*?)\\)", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{W,2240,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_different_num_template_parameters:\n return diag::warn_odr_different_num_template_parameters;"}} }, ["warn_odr_different_template_parameter_kind"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_different_template_parameter_kind"}}, [b]={{nil,p,"template parameter has different kinds in different translation units"}}, [f]={{nil,p,"template parameter has different kinds in different translation units"}}, [e]=j, [a]="template parameter has different kinds in different translation units", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{W,2242,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_different_template_parameter_kind:\n return diag::warn_odr_different_template_parameter_kind;"}}, [m]={ ["clang/test/ASTMerge/class-template/test.cpp"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class-template/Inputs/class-template1.cpp:12:14: warning: template parameter has different kinds in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class-template/Inputs/class-template1.cpp:21:18: warning: template parameter has different kinds in different translation units [-Wodr]"} } }, ["warn_odr_field_type_inconsistent"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_field_type_inconsistent"}}, [b]={{nil,p,"field %0 declared with incompatible types in different translation units (%1 vs. %2)"}}, [f]={{nil,p,"field A declared with incompatible types in different translation units (B vs. C)"}}, [e]=j, [a]="field (.*?) declared with incompatible types in different translation units \\((.*?) vs\\. (.*?)\\)", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{jb,3915,"ExpectedDecl ASTNodeImporter::VisitFieldDecl(FieldDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (FieldDecl *FoundField = dyn_cast<FieldDecl>(FoundDecl)) {\n // ...\n Importer.ToDiag(Loc, diag::warn_odr_field_type_inconsistent) << Name << D->getType() << FoundField->getType();"},{jb,3994,"ExpectedDecl ASTNodeImporter::VisitIndirectFieldDecl(IndirectFieldDecl *D) {\n // ...\n for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {\n if (auto *FoundField = dyn_cast<IndirectFieldDecl>(FoundDecls[I])) {\n // ...\n Importer.ToDiag(Loc, diag::warn_odr_field_type_inconsistent) << Name << D->getType() << FoundField->getType();"},{W,2220,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_field_type_inconsistent:\n return diag::warn_odr_field_type_inconsistent;"}} }, ["warn_odr_function_type_inconsistent"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_function_type_inconsistent"}}, [b]={{nil,p,"external function %0 declared with incompatible types in different translation units (%1 vs. %2)"}}, [f]={{nil,p,"external function A declared with incompatible types in different translation units (B vs. C)"}}, [e]=j, [a]="external function (.*?) declared with incompatible types in different translation units \\((.*?) vs\\. (.*?)\\)", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{jb,3543,"ExpectedDecl ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) {\n // ...\n }\n // Try to find a function in our own (\"to\") context with the same name, same\n // type, and in the same context as the function we\'re importing.\n else if (!LexicalDC->isFunctionOrMethod()) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n // ...\n if (auto *FoundFunction = dyn_cast<FunctionDecl>(FoundDecl)) {\n // ...\n Importer.ToDiag(Loc, diag::warn_odr_function_type_inconsistent) << Name << D->getType() << FoundFunction->getType();"},{W,2216,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_function_type_inconsistent:\n return diag::warn_odr_function_type_inconsistent;"}}, [m]={ ["clang/test/ASTMerge/function/test.c"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/function/Inputs/function2.c:3:6: warning: external function \'f1\' declared with incompatible types in different translation units (\'void (Int, double)\' (aka \'void (int, double)\') vs. \'void (int, float)\') [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/function/Inputs/function2.c:5:6: warning: external function \'f3\' declared with incompatible types in different translation units (\'void (int)\' vs. \'void (void)\') [-Wodr]"} } }, ["warn_odr_ivar_type_inconsistent"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_ivar_type_inconsistent"}}, [b]={{nil,p,"instance variable %0 declared with incompatible types in different translation units (%1 vs. %2)"}}, [f]={{nil,p,"instance variable A declared with incompatible types in different translation units (B vs. C)"}}, [e]=j, [a]="instance variable (.*?) declared with incompatible types in different translation units \\((.*?) vs\\. (.*?)\\)", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{jb,4185,"ExpectedDecl ASTNodeImporter::VisitObjCIvarDecl(ObjCIvarDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (ObjCIvarDecl *FoundIvar = dyn_cast<ObjCIvarDecl>(FoundDecl)) {\n // ...\n Importer.ToDiag(Loc, diag::warn_odr_ivar_type_inconsistent) << Name << D->getType() << FoundIvar->getType();"},{W,2222,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_ivar_type_inconsistent:\n return diag::warn_odr_ivar_type_inconsistent;"}}, [m]={ ["clang/test/ASTMerge/interface/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface2.m:16:9: warning: instance variable \'ivar2\' declared with incompatible types in different translation units (\'float\' vs. \'int\') [-Wodr]"} } }, ["warn_odr_non_type_parameter_type_inconsistent"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_non_type_parameter_type_inconsistent"}}, [b]={{nil,p,"non-type template parameter declared with incompatible types in different translation units (%0 vs. %1)"}}, [f]={{nil,p,"non-type template parameter declared with incompatible types in different translation units (A vs. B)"}}, [e]=j, [a]="non\\-type template parameter declared with incompatible types in different translation units \\((.*?) vs\\. (.*?)\\)", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{W,2246,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_non_type_parameter_type_inconsistent:\n return diag::warn_odr_non_type_parameter_type_inconsistent;"}}, [m]={ ["clang/test/ASTMerge/class-template/test.cpp"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class-template/Inputs/class-template1.cpp:9:14: warning: non-type template parameter declared with incompatible types in different translation units (\'int\' vs. \'long\') [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class-template/Inputs/class-template1.cpp:18:23: warning: non-type template parameter declared with incompatible types in different translation units (\'long\' vs. \'int\') [-Wodr]"} } }, ["warn_odr_objc_method_num_params_inconsistent"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_objc_method_num_params_inconsistent"}}, [b]={{nil,p,"%select{class|instance}0 method %1 has a different number of parameters in different translation units (%2 vs. %3)"}}, [f]={{nil,p,{{Hb,"instance"}," method B has a different number of parameters in different translation units (C vs. D)"}}}, [e]=j, [a]="(?:class|instance) method (.*?) has a different number of parameters in different translation units \\((.*?) vs\\. (.*?)\\)", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{jb,4503,"ExpectedDecl ASTNodeImporter::VisitObjCMethodDecl(ObjCMethodDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (auto *FoundMethod = dyn_cast<ObjCMethodDecl>(FoundDecl)) {\n // ...\n // Check the number of parameters.\n if (D->param_size() != FoundMethod->param_size()) {\n Importer.ToDiag(Loc, diag::warn_odr_objc_method_num_params_inconsistent) << D->isInstanceMethod() << Name << D->param_size() << FoundMethod->param_size();"},{W,2228,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_method_num_params_inconsistent:\n return diag::warn_odr_objc_method_num_params_inconsistent;"}} }, ["warn_odr_objc_method_param_type_inconsistent"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_objc_method_param_type_inconsistent"}}, [b]={{nil,p,"%select{class|instance}0 method %1 has a parameter with a different types in different translation units (%2 vs. %3)"}}, [f]={{nil,p,{{Hb,"instance"}," method B has a parameter with a different types in different translation units (C vs. D)"}}}, [e]=j, [a]="(?:class|instance) method (.*?) has a parameter with a different types in different translation units \\((.*?) vs\\. (.*?)\\)", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{jb,4520,"ExpectedDecl ASTNodeImporter::VisitObjCMethodDecl(ObjCMethodDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (auto *FoundMethod = dyn_cast<ObjCMethodDecl>(FoundDecl)) {\n // ...\n // Check parameter types.\n for (ObjCMethodDecl::param_iterator P = D->param_begin(), PEnd = D->param_end(), FoundP = FoundMethod->param_begin(); P != PEnd; ++P, ++FoundP) {\n if (!Importer.IsStructurallyEquivalent((*P)->getType(), (*FoundP)->getType())) {\n Importer.FromDiag((*P)->getLocation(), diag::warn_odr_objc_method_param_type_inconsistent) << D->isInstanceMethod() << Name << (*P)->getType() << (*FoundP)->getType();"},{W,2230,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_method_param_type_inconsistent:\n return diag::warn_odr_objc_method_param_type_inconsistent;"}}, [m]={ ["clang/test/ASTMerge/interface/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface2.m:39:19: warning: class method \'bar:\' has a parameter with a different types in different translation units (\'float\' vs. \'int\') [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface2.m:57:20: warning: instance method \'bar:\' has a parameter with a different types in different translation units (\'double\' vs. \'float\') [-Wodr]"} } }, ["warn_odr_objc_method_result_type_inconsistent"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_objc_method_result_type_inconsistent"}}, [b]={{nil,p,"%select{class|instance}0 method %1 has incompatible result types in different translation units (%2 vs. %3)"}}, [f]={{nil,p,{{Hb,"instance"}," method B has incompatible result types in different translation units (C vs. D)"}}}, [e]=j, [a]="(?:class|instance) method (.*?) has incompatible result types in different translation units \\((.*?) vs\\. (.*?)\\)", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{jb,4491,"ExpectedDecl ASTNodeImporter::VisitObjCMethodDecl(ObjCMethodDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (auto *FoundMethod = dyn_cast<ObjCMethodDecl>(FoundDecl)) {\n // ...\n // Check return types.\n if (!Importer.IsStructurallyEquivalent(D->getReturnType(), FoundMethod->getReturnType())) {\n Importer.ToDiag(Loc, diag::warn_odr_objc_method_result_type_inconsistent) << D->isInstanceMethod() << Name << D->getReturnType() << FoundMethod->getReturnType();"},{W,2226,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_method_result_type_inconsistent:\n return diag::warn_odr_objc_method_result_type_inconsistent;"}}, [m]={ ["clang/test/ASTMerge/property/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/property/Inputs/property2.m:12:26: warning: instance method \'Prop1\' has incompatible result types in different translation units (\'int\' vs. \'float\') [-Wodr]"} } }, ["warn_odr_objc_method_variadic_inconsistent"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_objc_method_variadic_inconsistent"}}, [b]={{nil,p,"%select{class|instance}0 method %1 is variadic in one translation unit and not variadic in another"}}, [f]={{nil,p,{{Hb,"instance"}," method B is variadic in one translation unit and not variadic in another"}}}, [e]=j, [a]="(?:class|instance) method (.*?) is variadic in one translation unit and not variadic in another", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{jb,4533,"ExpectedDecl ASTNodeImporter::VisitObjCMethodDecl(ObjCMethodDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (auto *FoundMethod = dyn_cast<ObjCMethodDecl>(FoundDecl)) {\n // ...\n // Check variadic/non-variadic.\n // Check the number of parameters.\n if (D->isVariadic() != FoundMethod->isVariadic()) {\n Importer.ToDiag(Loc, diag::warn_odr_objc_method_variadic_inconsistent) << D->isInstanceMethod() << Name;"},{W,2232,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_method_variadic_inconsistent:\n return diag::warn_odr_objc_method_variadic_inconsistent;"}}, [m]={ ["clang/test/ASTMerge/interface/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface2.m:45:1: warning: class method \'bar:\' is variadic in one translation unit and not variadic in another [-Wodr]"} } }, ["warn_odr_objc_property_impl_kind_inconsistent"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_objc_property_impl_kind_inconsistent"}}, [b]={{nil,p,"property %0 is implemented with %select{@synthesize|@dynamic}1 in one translation but %select{@dynamic|@synthesize}1 in another translation unit"}}, [f]={{nil,p,{"property A is implemented with ",{"@synthesize","@dynamic"}," in one translation but ",{"@dynamic","@synthesize"}," in another translation unit"}}}, [e]=j, [a]="property (.*?) is implemented with (?:@synthesize|@dynamic) in one translation but (?:@dynamic|@synthesize) in another translation unit", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{jb,5602,"ExpectedDecl ASTNodeImporter::VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D) {\n // ...\n if (!ToImpl) {\n // ...\n } else {\n // Check that we have the same kind of property implementation (@synthesize\n // vs. @dynamic).\n if (D->getPropertyImplementation() != ToImpl->getPropertyImplementation()) {\n Importer.ToDiag(ToImpl->getLocation(), diag::warn_odr_objc_property_impl_kind_inconsistent) << Property->getDeclName() << (ToImpl->getPropertyImplementation() == ObjCPropertyImplDecl::Dynamic);"},{W,2236,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_property_impl_kind_inconsistent:\n return diag::warn_odr_objc_property_impl_kind_inconsistent;"}}, [m]={ ["clang/test/ASTMerge/property/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/property/Inputs/property1.m:29:10: warning: property \'Prop3\' is implemented with @dynamic in one translation but @synthesize in another translation unit [-Wodr]"} } }, ["warn_odr_objc_property_type_inconsistent"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_objc_property_type_inconsistent"}}, [b]={{nil,p,"property %0 declared with incompatible types in different translation units (%1 vs. %2)"}}, [f]={{nil,p,"property A declared with incompatible types in different translation units (B vs. C)"}}, [e]=j, [a]="property (.*?) declared with incompatible types in different translation units \\((.*?) vs\\. (.*?)\\)", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{jb,5501,"ExpectedDecl ASTNodeImporter::VisitObjCPropertyDecl(ObjCPropertyDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (auto *FoundProp = dyn_cast<ObjCPropertyDecl>(FoundDecl)) {\n // ...\n // Check property types.\n if (!Importer.IsStructurallyEquivalent(D->getType(), FoundProp->getType())) {\n Importer.ToDiag(Loc, diag::warn_odr_objc_property_type_inconsistent) << Name << D->getType() << FoundProp->getType();"},{W,2234,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_property_type_inconsistent:\n return diag::warn_odr_objc_property_type_inconsistent;"}}, [m]={ ["clang/test/ASTMerge/property/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/property/Inputs/property2.m:12:26: warning: property \'Prop1\' declared with incompatible types in different translation units (\'int\' vs. \'float\') [-Wodr]"} } }, ["warn_odr_objc_superclass_inconsistent"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_objc_superclass_inconsistent"}}, [b]={{nil,p,"class %0 has incompatible superclasses"}}, [f]={{nil,p,"class A has incompatible superclasses"}}, [e]=j, [a]="class (.*?) has incompatible superclasses", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{jb,5182,"Error ASTNodeImporter::ImportDefinition(ObjCInterfaceDecl *From, ObjCInterfaceDecl *To, ImportDefinitionKind Kind) {\n if (To->getDefinition()) {\n // ...\n if ((bool)FromSuper != (bool)ToSuper || (FromSuper && !declaresSameEntity(FromSuper, ToSuper))) {\n Importer.ToDiag(To->getLocation(), diag::warn_odr_objc_superclass_inconsistent) << To->getDeclName();"},{jb,5448,"ExpectedDecl ASTNodeImporter::VisitObjCImplementationDecl(ObjCImplementationDecl *D) {\n // ...\n if (!Impl) {\n // ...\n } else {\n // ...\n // Verify that the existing @implementation has the same superclass.\n if ((Super && !Impl->getSuperClass()) || (!Super && Impl->getSuperClass()) || (Super && Impl->getSuperClass() && !declaresSameEntity(Super->getCanonicalDecl(), Impl->getSuperClass()))) {\n Importer.ToDiag(Impl->getLocation(), diag::warn_odr_objc_superclass_inconsistent) << Iface->getDeclName();"},{W,2224,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_superclass_inconsistent:\n return diag::warn_odr_objc_superclass_inconsistent;"}}, [m]={ ["clang/test/ASTMerge/interface/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface1.m:21:12: warning: class \'I4\' has incompatible superclasses [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface1.m:100:17: warning: class \'I15\' has incompatible superclasses [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface1.m:100:17: warning: class \'I15\' has incompatible superclasses [-Wodr]"} } }, ["warn_odr_objc_synthesize_ivar_inconsistent"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_objc_synthesize_ivar_inconsistent"}}, [b]={{nil,p,"property %0 is synthesized to different ivars in different translation units (%1 vs. %2)"}}, [f]={{nil,p,"property A is synthesized to different ivars in different translation units (B vs. C)"}}, [e]=j, [a]="property (.*?) is synthesized to different ivars in different translation units \\((.*?) vs\\. (.*?)\\)", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{jb,5618,"ExpectedDecl ASTNodeImporter::VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D) {\n // ...\n if (!ToImpl) {\n // ...\n } else {\n // ...\n // For @synthesize, check that we have the same\n if (D->getPropertyImplementation() == ObjCPropertyImplDecl::Synthesize && Ivar != ToImpl->getPropertyIvarDecl()) {\n Importer.ToDiag(ToImpl->getPropertyIvarDeclLoc(), diag::warn_odr_objc_synthesize_ivar_inconsistent) << Property->getDeclName() << ToImpl->getPropertyIvarDecl()->getDeclName() << Ivar->getDeclName();"},{W,2238,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_objc_synthesize_ivar_inconsistent:\n return diag::warn_odr_objc_synthesize_ivar_inconsistent;"}}, [m]={ ["clang/test/ASTMerge/property/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/property/Inputs/property1.m:28:21: warning: property \'Prop2\' is synthesized to different ivars in different translation units (\'ivar3\' vs. \'ivar2\') [-Wodr]"} } }, ["warn_odr_parameter_pack_non_pack"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_parameter_pack_non_pack"}}, [b]={{nil,p,"parameter kind mismatch; parameter is %select{not a|a}0 parameter pack"}}, [f]={{nil,p,{"parameter kind mismatch; parameter is ",{"not a","a"}," parameter pack"}}}, [e]=j, [a]="parameter kind mismatch; parameter is (?:not a|a) parameter pack", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{W,2244,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_parameter_pack_non_pack:\n return diag::warn_odr_parameter_pack_non_pack;"}} }, ["warn_odr_tag_type_inconsistent"]={ [k]={G}, [l]=G, [h]="warn_odr_tag_type_inconsistent", [b]="type %0 has incompatible definitions in different translation units", [f]="type A has incompatible definitions in different translation units", [e]=j, [a]="type (.*?) has incompatible definitions in different translation units", [c]=U, [i]=O, [d]={"98c101833744",1266013059,"Implement AST importing and merging for enumeration types and","Implement AST importing and merging for enumeration types and\nenumerators, along with ImplicitCastExprs to make it work.\n\nllvm-svn: 96024"}, [g]={{W,2218,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_tag_type_inconsistent:\n return diag::warn_odr_tag_type_inconsistent;"}}, [m]={ ["clang/test/ASTMerge/struct/test.c"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:13:8: warning: type \'struct S1\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:21:8: warning: type \'struct S2\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:24:8: warning: type \'struct S3\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:27:8: warning: type \'struct S4\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:56:10: warning: type \'struct DeeperError\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:54:8: warning: type \'struct DeepError\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:74:9: warning: type \'S13\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:130:7: warning: type \'struct DeepUnnamedError::(unnamed at /var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:130:7)\' has incompatible definitions in different translation units [-Wodr]","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:129:5: warning: type \'union DeepUnnamedError::(unnamed at /var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:129:5)\' has incompatible definitions in different translation units [-Wodr]"} } }, ["warn_odr_variable_multiple_def"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_variable_multiple_def"}}, [b]={{nil,p,"external variable %0 defined in multiple translation units"}}, [f]={{nil,p,"external variable A defined in multiple translation units"}}, [e]=j, [a]="external variable (.*?) defined in multiple translation units", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{W,2214,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_variable_multiple_def:\n return diag::warn_odr_variable_multiple_def;"}} }, ["warn_odr_variable_type_inconsistent"]={ [k]={G}, [l]=G, [h]={{nil,p,"warn_odr_variable_type_inconsistent"}}, [b]={{nil,p,"external variable %0 declared with incompatible types in different translation units (%1 vs. %2)"}}, [f]={{nil,p,"external variable A declared with incompatible types in different translation units (B vs. C)"}}, [e]=j, [a]="external variable (.*?) declared with incompatible types in different translation units \\((.*?) vs\\. (.*?)\\)", [c]=U, [i]={{nil,p,O}}, [d]={ab,1554130013,Z,Y}, [g]={{jb,4296,"ExpectedDecl ASTNodeImporter::VisitVarDecl(VarDecl *D) {\n // ...\n if (D->isFileVarDecl()) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n // ...\n if (auto *FoundVar = dyn_cast<VarDecl>(FoundDecl)) {\n // ...\n Importer.ToDiag(Loc, diag::warn_odr_variable_type_inconsistent) << Name << D->getType() << FoundVar->getType();"},{W,2212,"unsigned StructuralEquivalenceContext::getApplicableDiagnostic(unsigned ErrorDiagnostic) {\n // ...\n case diag::err_odr_variable_type_inconsistent:\n return diag::warn_odr_variable_type_inconsistent;"}}, [m]={ ["clang/test/ASTMerge/namespace/test.cpp"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/namespace/Inputs/namespace2.cpp:16:17: warning: external variable \'z\' declared with incompatible types in different translation units (\'double\' vs. \'float\') [-Wodr]"} } }, ["warn_old_implicitly_unsigned_long"]={ [k]={"c99-compat"}, [l]="c99-compat", [h]="warn_old_implicitly_unsigned_long", [b]="integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C89; this literal will %select{have type \'long long\'|be ill-formed}0 in C99 onwards", [f]={{nil,nil,{"integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C89; this literal will ",{"have type \'long long\'","be ill-formed"}," in C99 onwards"}}}, [e]=j, [a]="integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C89; this literal will (?:have type \'long long\'|be ill\\-formed) in C99 onwards", [c]=" \\[(?:\\-Werror,)?\\-Wc99\\-compat[^\\]]*\\]", [i]=O, [d]={"13234ae40db3",1433800799,"Consider unsigned long for non-u/U decimal literals (C90/C++03)","Consider unsigned long for non-u/U decimal literals (C90/C++03)\n\nSummary:\nThis modifies Clang to reflect that under pre-C99 ISO C, decimal\nconstants may have type `unsigned long` even if they do not contain `u`\nor `U` in their suffix (C90 subclause 6.1.3.2 paragraph 5). The same is\ndone for C++ without C++11 which--because of undefined behaviour--allows\nfor behaviour compatible with ISO C90 in the case of an unsuffixed\ndecimal literal and is otherwise identical to C90 in its treatment of\ninteger literals (C++03 subclause 2.13.1 [lex.icon] paragraph 2).\n\nMessages are added to the `c99-compat` and `c++11-compat` groups to warn\non such literals, since they behave differently under the newer\nstandards.\n\nFixes PR 16678.\n\nTest Plan:\nA new test file is added to exercise both pre-C99/C++11 and C99/C++11-up\non decimal literals with no suffix or suffixes `l`/`L` for both 32-bit\nand 64-bit `long`.\n\nIn the file, 2^31 (being `INT_MAX+1`) is tested for the expected type\nusing `__typeof__` and multiple declarations of the same entity. 2^63\nis similarly tested when it is within the range of `unsigned long`.\n\nPreprocessor arithmetic tests are added to ensure consistency given\nthat Clang (like GCC) uses greater than 32 bits for preprocessor\narithmetic even when `long` and `unsigned long` is 32 bits and a\npre-C99/C++11 mode is in effect.\n\nTests added:\n test/Sema/PR16678.c\n\nReviewers: fraggamuffin, rsmith\n\nReviewed By: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D9794\n\nllvm-svn: 239356"}, [g]={{I,4225,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n // ...\n if (Literal.isFixedPointLiteral()) {\n // ...\n } else if (Literal.isFloatingLiteral()) {\n // ...\n } else if (!Literal.isIntegerLiteral()) {\n // ...\n } else {\n // ...\n if (Literal.GetIntegerValue(ResultVal)) {\n // ...\n } else {\n // ...\n // Are long/unsigned long possibilities?\n if (Ty.isNull() && !Literal.isLongLong && !Literal.isSizeT) {\n // ...\n // Does it fit in a unsigned long?\n if (ResultVal.isIntN(LongSize)) {\n // Does it fit in a signed long?\n if (!Literal.isUnsigned && ResultVal[LongSize - 1] == 0)\n // ...\n else if (AllowUnsigned)\n // ...\n // Check according to the rules of C90 6.1.3.2p5. C++03 [lex.icon]p2\n // is compatible.\n else if (!getLangOpts().C99 && !getLangOpts().CPlusPlus11) {\n // ...\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus ? Literal.isLong ? diag::warn_old_implicitly_unsigned_long_cxx : /*C++98 UB*/ diag::ext_old_implicitly_unsigned_long_cxx : diag::warn_old_implicitly_unsigned_long) << (LongLongSize > LongSize ? /*will have type \'long long\'*/ 0 : /*will be ill-formed*/ 1);"}}, [m]={ ["clang/test/Sema/PR16678.c"]={"clang/test/Sema/PR16678.c:74:19: warning: integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C89; this literal will be ill-formed in C99 onwards [-Wc99-compat]","clang/test/Sema/PR16678.c:75:19: warning: integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C89; this literal will be ill-formed in C99 onwards [-Wc99-compat]","clang/test/Sema/PR16678.c:76:19: warning: integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C89; this literal will be ill-formed in C99 onwards [-Wc99-compat]"} } }, ["warn_old_implicitly_unsigned_long_cxx"]={ [k]={"c++0x-compat","c++11-compat","c++11-compat-pedantic"}, [l]="c++11-compat", [h]="warn_old_implicitly_unsigned_long_cxx", [b]="integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C++98; this literal will %select{have type \'long long\'|be ill-formed}0 in C++11 onwards", [f]={{nil,nil,{"integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C++98; this literal will ",{"have type \'long long\'","be ill-formed"}," in C++11 onwards"}}}, [e]=j, [a]="integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C\\+\\+98; this literal will (?:have type \'long long\'|be ill\\-formed) in C\\+\\+11 onwards", [c]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+11\\-compat[^\\]]*\\]", [i]=O, [d]={"13234ae40db3",1433800799,"Consider unsigned long for non-u/U decimal literals (C90/C++03)","Consider unsigned long for non-u/U decimal literals (C90/C++03)\n\nSummary:\nThis modifies Clang to reflect that under pre-C99 ISO C, decimal\nconstants may have type `unsigned long` even if they do not contain `u`\nor `U` in their suffix (C90 subclause 6.1.3.2 paragraph 5). The same is\ndone for C++ without C++11 which--because of undefined behaviour--allows\nfor behaviour compatible with ISO C90 in the case of an unsuffixed\ndecimal literal and is otherwise identical to C90 in its treatment of\ninteger literals (C++03 subclause 2.13.1 [lex.icon] paragraph 2).\n\nMessages are added to the `c99-compat` and `c++11-compat` groups to warn\non such literals, since they behave differently under the newer\nstandards.\n\nFixes PR 16678.\n\nTest Plan:\nA new test file is added to exercise both pre-C99/C++11 and C99/C++11-up\non decimal literals with no suffix or suffixes `l`/`L` for both 32-bit\nand 64-bit `long`.\n\nIn the file, 2^31 (being `INT_MAX+1`) is tested for the expected type\nusing `__typeof__` and multiple declarations of the same entity. 2^63\nis similarly tested when it is within the range of `unsigned long`.\n\nPreprocessor arithmetic tests are added to ensure consistency given\nthat Clang (like GCC) uses greater than 32 bits for preprocessor\narithmetic even when `long` and `unsigned long` is 32 bits and a\npre-C99/C++11 mode is in effect.\n\nTests added:\n test/Sema/PR16678.c\n\nReviewers: fraggamuffin, rsmith\n\nReviewed By: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D9794\n\nllvm-svn: 239356"}, [g]={{I,4193,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n // ...\n if (Literal.isFixedPointLiteral()) {\n // ...\n } else if (Literal.isFloatingLiteral()) {\n // ...\n } else if (!Literal.isIntegerLiteral()) {\n // ...\n } else {\n // ...\n if (Literal.GetIntegerValue(ResultVal)) {\n // ...\n } else {\n // ...\n // Are long/unsigned long possibilities?\n if (Ty.isNull() && !Literal.isLongLong && !Literal.isSizeT) {\n // ...\n // Does it fit in a unsigned long?\n if (ResultVal.isIntN(LongSize)) {\n // Does it fit in a signed long?\n if (!Literal.isUnsigned && ResultVal[LongSize - 1] == 0)\n // ...\n else if (AllowUnsigned)\n // ...\n // Check according to the rules of C90 6.1.3.2p5. C++03 [lex.icon]p2\n // is compatible.\n else if (!getLangOpts().C99 && !getLangOpts().CPlusPlus11) {\n // ...\n Diag(Tok.getLocation(), getLangOpts().CPlusPlus ? Literal.isLong ? diag::warn_old_implicitly_unsigned_long_cxx : /*C++98 UB*/ diag::ext_old_implicitly_unsigned_long_cxx : diag::warn_old_implicitly_unsigned_long) << (LongLongSize > LongSize ? /*will have type \'long long\'*/ 0 : /*will be ill-formed*/ 1);"}}, [m]={ ["clang/test/Sema/PR16678.c"]={"clang/test/Sema/PR16678.c:75:19: warning: integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C++98; this literal will be ill-formed in C++11 onwards [-Wc++11-compat]","clang/test/Sema/PR16678.c:76:19: warning: integer literal is too large to be represented in type \'long\', interpreting as \'unsigned long\' per C++98; this literal will be ill-formed in C++11 onwards [-Wc++11-compat]"} } }, ["warn_old_style_cast"]={ [k]={"old-style-cast"}, [l]="old-style-cast", [h]="warn_old_style_cast", [b]="use of old-style cast", [f]="use of old-style cast", [e]=j, [a]="use of old\\-style cast", [c]=" \\[(?:\\-Werror,)?\\-Wold\\-style\\-cast[^\\]]*\\]", [i]=o, [d]={"c7c1ebe66049",1385522297,"Implement -Wold-style-cast","Implement -Wold-style-cast\n\nBased on a patch by Ondřej Hošek!\n\nllvm-svn: 195808"}, [g]={{I,8508,"ExprResult Sema::ActOnCastExpr(Scope *S, SourceLocation LParenLoc, Declarator &D, ParsedType &Ty, SourceLocation RParenLoc, Expr *CastExpr) {\n // ...\n if (getLangOpts().CPlusPlus && !castType->isVoidType())\n Diag(LParenLoc, diag::warn_old_style_cast) << CastExpr->getSourceRange();"}}, [m]={ ["clang/test/SemaCXX/old-style-cast.cpp"]={"clang/test/SemaCXX/old-style-cast.cpp:4:12: warning: use of old-style cast [-Wold-style-cast]","clang/test/SemaCXX/old-style-cast.cpp:5:3: warning: use of old-style cast [-Wold-style-cast]","clang/test/SemaCXX/old-style-cast.cpp:6:3: warning: use of old-style cast [-Wold-style-cast]"} } }, ["warn_omp51_compat_attributes"]={ [k]={"pre-openmp-51-compat"}, [l]="pre-openmp-51-compat", [h]={{nil,H,"warn_omp51_compat_attributes"}}, [b]={{nil,H,"specifying OpenMP directives with [[]] is incompatible with OpenMP standards before OpenMP 5.1"}}, [f]={{nil,H,"specifying OpenMP directives with [[]] is incompatible with OpenMP standards before OpenMP 5.1"}}, [e]=j, [a]="specifying OpenMP directives with \\[\\[\\]\\] is incompatible with OpenMP standards before OpenMP 5\\.1", [c]=" \\[(?:\\-Werror,)?\\-Wpre\\-openmp\\-51\\-compat[^\\]]*\\]", [i]={{nil,H,t}}, [d]={"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"}, [g]={{"clang/lib/Parse/ParseDeclCXX.cpp",4431,"/// ParseCXX11AttributeArgs -- Parse a C++11 attribute-argument-clause.\n///\n/// [C++11] attribute-argument-clause:\n/// \'(\' balanced-token-seq \')\'\n///\n/// [C++11] balanced-token-seq:\n/// balanced-token\n/// balanced-token-seq balanced-token\n///\n/// [C++11] balanced-token:\n/// \'(\' balanced-token-seq \')\'\n/// \'[\' balanced-token-seq \']\'\n/// \'{\' balanced-token-seq \'}\'\n/// any token but \'(\', \')\', \'[\', \']\', \'{\', or \'}\'\nbool Parser::ParseCXX11AttributeArgs(IdentifierInfo *AttrName, SourceLocation AttrNameLoc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, CachedTokens &OpenMPTokens) {\n // ...\n if (ScopeName && ScopeName->isStr(\"omp\")) {\n Diag(AttrNameLoc, getLangOpts().OpenMP >= 51 ? diag::warn_omp51_compat_attributes : diag::ext_omp_attributes);"}}, [m]={ ["clang/test/OpenMP/openmp_attribute_compat.cpp"]={"clang/test/OpenMP/openmp_attribute_compat.cpp:17:8: warning: specifying OpenMP directives with [[]] is incompatible with OpenMP standards before OpenMP 5.1 [-Wpre-openmp-51-compat]"} } }, ["warn_omp_alignment_not_power_of_two"]={ [k]={M,D}, [l]=D, [h]="warn_omp_alignment_not_power_of_two", [b]="aligned clause will be ignored because the requested alignment is not a power of 2", [f]="aligned clause will be ignored because the requested alignment is not a power of 2", [e]=j, [a]="aligned clause will be ignored because the requested alignment is not a power of 2", [c]=S, [i]=fb, [d]={"09184fedc049",1412054968,"[OPENMP] Codegen of the ‘aligned’ clause for the ‘omp simd’ directive.","[OPENMP] Codegen of the ‘aligned’ clause for the ‘omp simd’ directive.\nDifferential Revision: http://reviews.llvm.org/D5499\n\nllvm-svn: 218660"}, [g]={{eb,16532,"ExprResult Sema::VerifyPositiveIntegerConstantInClause(Expr *E, OpenMPClauseKind CKind, bool StrictlyPositive, bool SuppressExprDiags) {\n // ...\n if ((CKind == OMPC_aligned || CKind == OMPC_align) && !Result.isPowerOf2()) {\n Diag(E->getExprLoc(), diag::warn_omp_alignment_not_power_of_two) << E->getSourceRange();"}}, [m]={ ["clang/test/OpenMP/align_clause_messages.cpp"]={"clang/test/OpenMP/align_clause_messages.cpp:41:31: warning: aligned clause will be ignored because the requested alignment is not a power of 2 [-Wopenmp-clauses]","clang/test/OpenMP/align_clause_messages.cpp:51:33: warning: aligned clause will be ignored because the requested alignment is not a power of 2 [-Wopenmp-clauses]"} } }, ["warn_omp_allocate_thread_on_task_target_directive"]={ [k]={M,D}, [l]=D, [h]={{nil,p,"warn_omp_allocate_thread_on_task_target_directive"}}, [b]={{nil,p,"allocator with the \'thread\' trait access has unspecified behavior on \'%0\' directive"}}, [f]={{nil,p,"allocator with the \'thread\' trait access has unspecified behavior on \'A\' directive"}}, [e]=j, [a]="allocator with the \'thread\' trait access has unspecified behavior on \'(.*?)\' directive", [c]=S, [i]={{nil,p,fb}}, [d]={"471171c4c94c",1553800536,"[OPENMP]Add check for undefined behavior with thread allocators on","[OPENMP]Add check for undefined behavior with thread allocators on\ntarget and task-based directives.\n\nAccording to OpenMP 5.0, 2.11.4 allocate Clause, Restrictions, For task,\ntaskloop or target directives, allocation requests to memory allocators\nwith the trait access set to thread result in unspecified behavior.\nPatch introduces a check for omp_thread_mem_alloc predefined allocator\non target- and trask-based directives.\n\nllvm-svn: 357205"}, [g]={{eb,5511,"static void checkAllocateClauses(Sema &S, DSAStackTy *Stack, ArrayRef<OMPClause *> Clauses) {\n // ...\n for (OMPClause *C : AllocateRange) {\n // ...\n // OpenMP, 2.11.4 allocate Clause, Restrictions.\n // For task, taskloop or target directives, allocation requests to memory\n // allocators with the trait access set to thread result in unspecified\n // behavior.\n if (AllocatorKind == OMPAllocateDeclAttr::OMPThreadMemAlloc && (isOpenMPTaskingDirective(Stack->getCurrentDirective()) || isOpenMPTargetExecutionDirective(Stack->getCurrentDirective()))) {\n S.Diag(AC->getAllocator()->getExprLoc(), diag::warn_omp_allocate_thread_on_task_target_directive) << getOpenMPDirectiveName(Stack->getCurrentDirective());"}}, [m]={ ["clang/test/OpenMP/target_teams_private_messages.cpp"]={"clang/test/OpenMP/target_teams_private_messages.cpp:112:89: warning: allocator with the \'thread\' trait access has unspecified behavior on \'target teams\' directive [-Wopenmp-clauses]"} } }, ["warn_omp_ctx_incompatible_property_for_selector"]={ [k]={M,D}, [l]=D, [h]={{nil,s,"warn_omp_ctx_incompatible_property_for_selector"}}, [b]={{nil,s,"the context property \'%0\' is not valid for the context selector \'%1\' and the context set \'%2\'; property ignored"}}, [f]={{nil,s,"the context property \'A\' is not valid for the context selector \'B\' and the context set \'C\'; property ignored"}}, [e]=j, [a]="the context property \'(.*?)\' is not valid for the context selector \'(.*?)\' and the context set \'(.*?)\'; property ignored", [c]=S, [i]={{nil,s,t}}, [d]={sb,1576809732,tb,ub}, [g]={{L,1027,"void Parser::parseOMPContextProperty(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n Diag(PropertyLoc, diag::warn_omp_ctx_incompatible_property_for_selector) << getOpenMPContextTraitPropertyName(TIProperty.Kind, TIProperty.RawString) << getOpenMPContextTraitSelectorName(TISelector.Kind) << getOpenMPContextTraitSetName(Set);"}} }, ["warn_omp_ctx_incompatible_score_for_property"]={ [k]={M,D}, [l]=D, [h]={{nil,s,"warn_omp_ctx_incompatible_score_for_property"}}, [b]={{nil,s,"the context selector \'%0\' in the context set \'%1\' cannot have a score (\'%2\'); score ignored"}}, [f]={{nil,s,"the context selector \'A\' in the context set \'B\' cannot have a score (\'C\'); score ignored"}}, [e]=j, [a]="the context selector \'(.*?)\' in the context set \'(.*?)\' cannot have a score \\(\'(.*?)\'\\); score ignored", [c]=S, [i]={{nil,s,t}}, [d]={sb,1576809732,tb,ub}, [g]={{L,1207,"/// Parses an OpenMP context selector.\n///\n/// <trait-selector-name> [\'(\'[<trait-score>] <trait-property> [, <t-p>]* \')\']\nvoid Parser::parseOMPContextSelector(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &SeenSelectors) {\n // ...\n if (!AllowsTraitScore && !Score.isUnset()) {\n if (Score.isUsable()) {\n Diag(ScoreLoc, diag::warn_omp_ctx_incompatible_score_for_property) << getOpenMPContextTraitSelectorName(TISelector.Kind) << getOpenMPContextTraitSetName(Set) << Score.get();"},{L,1211,"/// Parses an OpenMP context selector.\n///\n/// <trait-selector-name> [\'(\'[<trait-score>] <trait-property> [, <t-p>]* \')\']\nvoid Parser::parseOMPContextSelector(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &SeenSelectors) {\n // ...\n if (!AllowsTraitScore && !Score.isUnset()) {\n if (Score.isUsable()) {\n // ...\n } else {\n Diag(ScoreLoc, diag::warn_omp_ctx_incompatible_score_for_property) << getOpenMPContextTraitSelectorName(TISelector.Kind) << getOpenMPContextTraitSetName(Set) << \"<invalid>\";"}}, [m]={ [yb]={"clang/test/OpenMP/declare_variant_messages.c:49:53: warning: the context selector \'kind\' in the context set \'device\' cannot have a score (\'5\'); score ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:48:53: warning: the context selector \'kind\' in the context set \'device\' cannot have a score (\'5\'); score ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:47:53: warning: the context selector \'kind\' in the context set \'device\' cannot have a score (\'foo()\'); score ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:46:53: warning: the context selector \'kind\' in the context set \'device\' cannot have a score (\'2\'); score ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:45:55: warning: the context selector \'kind\' in the context set \'device\' cannot have a score (\'<recovery-expr>()\'); score ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:44:53: warning: the context selector \'kind\' in the context set \'device\' cannot have a score (\'<invalid>\'); score ignored [-Wopenmp-clauses]"} } }, ["warn_omp_ctx_incompatible_selector_for_set"]={ [k]={M,D}, [l]=D, [h]={{nil,s,"warn_omp_ctx_incompatible_selector_for_set"}}, [b]={{nil,s,"the context selector \'%0\' is not valid for the context set \'%1\'; selector ignored"}}, [f]={{nil,s,"the context selector \'A\' is not valid for the context set \'B\'; selector ignored"}}, [e]=j, [a]="the context selector \'(.*?)\' is not valid for the context set \'(.*?)\'; selector ignored", [c]=S, [i]={{nil,s,t}}, [d]={sb,1576809732,tb,ub}, [g]={{L,1161,"/// Parses an OpenMP context selector.\n///\n/// <trait-selector-name> [\'(\'[<trait-score>] <trait-property> [, <t-p>]* \')\']\nvoid Parser::parseOMPContextSelector(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &SeenSelectors) {\n // ...\n if (!isValidTraitSelectorForTraitSet(TISelector.Kind, Set, AllowsTraitScore, RequiresProperty)) {\n Diag(SelectorLoc, diag::warn_omp_ctx_incompatible_selector_for_set) << getOpenMPContextTraitSelectorName(TISelector.Kind) << getOpenMPContextTraitSetName(Set);"}}, [m]={ [yb]={"clang/test/OpenMP/declare_variant_messages.c:49:72: warning: the context selector \'vendor\' is not valid for the context set \'device\'; selector ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:39:79: warning: the context selector \'kind\' is not valid for the context set \'implementation\'; selector ignored [-Wopenmp-clauses]"} } }, ["warn_omp_ctx_selector_without_properties"]={ [k]={M,D}, [l]=D, [h]={{nil,s,"warn_omp_ctx_selector_without_properties"}}, [b]={{nil,s,"the context selector \'%0\' in context set \'%1\' requires a context property defined in parentheses; selector ignored"}}, [f]={{nil,s,"the context selector \'A\' in context set \'B\' requires a context property defined in parentheses; selector ignored"}}, [e]=j, [a]="the context selector \'(.*?)\' in context set \'(.*?)\' requires a context property defined in parentheses; selector ignored", [c]=S, [i]={{nil,s,t}}, [d]={sb,1576809732,tb,ub}, [g]={{L,1180,"/// Parses an OpenMP context selector.\n///\n/// <trait-selector-name> [\'(\'[<trait-score>] <trait-property> [, <t-p>]* \')\']\nvoid Parser::parseOMPContextSelector(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &SeenSelectors) {\n // ...\n if (!Tok.is(tok::l_paren)) {\n Diag(SelectorLoc, diag::warn_omp_ctx_selector_without_properties) << getOpenMPContextTraitSelectorName(TISelector.Kind) << getOpenMPContextTraitSetName(Set);"}}, [m]={ [yb]={"clang/test/OpenMP/declare_variant_messages.c:41:48: warning: the context selector \'kind\' in context set \'device\' requires a context property defined in parentheses; selector ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:31:56: warning: the context selector \'vendor\' in context set \'implementation\' requires a context property defined in parentheses; selector ignored [-Wopenmp-clauses]"} } }, ["warn_omp_declare_target_after_first_use"]={ [k]={M,fc}, [l]=fc, [h]={{nil,A,"warn_omp_declare_target_after_first_use"}}, [b]={{nil,A,"declaration marked as declare target after first use, it may lead to incorrect results"}}, [f]={{nil,A,"declaration marked as declare target after first use, it may lead to incorrect results"}}, [e]=j, [a]="declaration marked as declare target after first use, it may lead to incorrect results", [c]=" \\[(?:\\-Werror,)?\\-Wopenmp\\-target[^\\]]*\\]", [i]={{nil,A,fb}}, [d]={"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"}, [g]={{eb,23061,"void Sema::ActOnOpenMPDeclareTargetName(NamedDecl *ND, SourceLocation Loc, OMPDeclareTargetDeclAttr::MapTypeTy MT, DeclareTargetContextInfo &DTCI) {\n // ...\n // Diagnose marking after use as it may lead to incorrect diagnosis and\n // codegen.\n if (LangOpts.OpenMP >= 50 && (ND->isUsed(/*CheckUsedAttr=*/false) || ND->isReferenced()))\n Diag(Loc, diag::warn_omp_declare_target_after_first_use);"}}, [m]={ ["clang/test/OpenMP/declare_target_messages.cpp"]={"clang/test/OpenMP/declare_target_messages.cpp:76:28: warning: declaration marked as declare target after first use, it may lead to incorrect results [-Wopenmp-target]"} } }, ["warn_omp_declare_variant_after_emitted"]={ [k]={M,kb}, [l]=kb, [h]={{nil,A,"warn_omp_declare_variant_after_emitted"}}, [b]={{nil,A,"\'#pragma omp declare variant\' cannot be applied to the function that was defined already; the original function might be used"}}, [f]={{nil,A,"\'#pragma omp declare variant\' cannot be applied to the function that was defined already; the original function might be used"}}, [e]=j, [a]="\'\\#pragma omp declare variant\' cannot be applied to the function that was defined already; the original function might be used", [c]=Lb, [i]={{nil,A,fb}}, [d]={"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"}, [g]={{eb,7396,"std::optional<std::pair<FunctionDecl *, Expr *>> Sema::checkOpenMPDeclareVariantFunction(Sema::DeclGroupPtrTy DG, Expr *VariantRef, OMPTraitInfo &TI, unsigned NumAppendArgs, SourceRange SR) {\n // ...\n if (!FD->isThisDeclarationADefinition() && FD->isDefined(Definition) && (LangOpts.EmitAllDecls || Context.DeclMustBeEmitted(Definition)))\n Diag(SR.getBegin(), diag::warn_omp_declare_variant_after_emitted) << FD->getLocation();"}}, [m]={ [yb]={"clang/test/OpenMP/declare_variant_messages.c:133:1: warning: \'#pragma omp declare variant\' cannot be applied to the function that was defined already; the original function might be used [-Wsource-uses-openmp]"} } }, ["warn_omp_declare_variant_after_used"]={ [k]={M,kb}, [l]=kb, [h]={{nil,A,"warn_omp_declare_variant_after_used"}}, [b]={{nil,A,"\'#pragma omp declare variant\' cannot be applied for function after first usage; the original function might be used"}}, [f]={{nil,A,"\'#pragma omp declare variant\' cannot be applied for function after first usage; the original function might be used"}}, [e]=j, [a]="\'\\#pragma omp declare variant\' cannot be applied for function after first usage; the original function might be used", [c]=Lb, [i]={{nil,A,fb}}, [d]={"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"}, [g]={{eb,7389,"std::optional<std::pair<FunctionDecl *, Expr *>> Sema::checkOpenMPDeclareVariantFunction(Sema::DeclGroupPtrTy DG, Expr *VariantRef, OMPTraitInfo &TI, unsigned NumAppendArgs, SourceRange SR) {\n // ...\n // Allow #pragma omp declare variant only if the function is not used.\n if (FD->isUsed(false))\n Diag(SR.getBegin(), diag::warn_omp_declare_variant_after_used) << FD->getLocation();"}}, [m]={ [yb]={"clang/test/OpenMP/declare_variant_messages.c:127:1: warning: \'#pragma omp declare variant\' cannot be applied for function after first usage; the original function might be used [-Wsource-uses-openmp]"} } }, ["warn_omp_declare_variant_ctx_mutiple_use"]={ [k]={M,D}, [l]=D, [h]={{nil,s,"warn_omp_declare_variant_ctx_mutiple_use"}}, [b]={{nil,s,"the context %select{set|selector|property}0 \'%1\' was used already in the same \'omp declare variant\' directive; %select{set|selector|property}0 ignored"}}, [f]={{nil,s,{"the context ",{"set","selector","property"}," \'B\' was used already in the same \'omp declare variant\' directive; ",{"set","selector","property"}," ignored"}}}, [e]=j, [a]="the context (?:set|selector|property) \'(.*?)\' was used already in the same \'omp declare variant\' directive; (?:set|selector|property) ignored", [c]=S, [i]={{nil,s,t}}, [d]={sb,1576809732,tb,ub}, [g]={{L,867,"static bool checkForDuplicates(Parser &P, StringRef Name, SourceLocation NameLoc, llvm::StringMap<SourceLocation> &Seen, OMPContextLvl Lvl) {\n // ...\n P.Diag(NameLoc, diag::warn_omp_declare_variant_ctx_mutiple_use) << Lvl << Name;"}}, [m]={ ["clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c"]={"clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:9:79: warning: the context property \'match_none\' was used already in the same \'omp declare variant\' directive; property ignored [-Wopenmp-clauses]"} } }, ["warn_omp_declare_variant_ctx_not_a_property"]={ [k]={M,D}, [l]=D, [h]={{nil,s,"warn_omp_declare_variant_ctx_not_a_property"}}, [b]={{nil,s,"\'%0\' is not a valid context property for the context selector \'%1\' and the context set \'%2\'; property ignored"}}, [f]={{nil,s,"\'A\' is not a valid context property for the context selector \'B\' and the context set \'C\'; property ignored"}}, [e]=j, [a]="\'(.*?)\' is not a valid context property for the context selector \'(.*?)\' and the context set \'(.*?)\'; property ignored", [c]=S, [i]={{nil,s,t}}, [d]={sb,1576809732,tb,ub}, [g]={{L,899,"void Parser::parseOMPTraitPropertyKind(OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set, llvm::omp::TraitSelector Selector, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n Diag(NameLoc, diag::warn_omp_declare_variant_ctx_not_a_property) << Name << getOpenMPContextTraitSelectorName(Selector) << getOpenMPContextTraitSetName(Set);"}}, [m]={ [yb]={"clang/test/OpenMP/declare_variant_messages.c:50:66: warning: \'aaa\' is not a valid context property for the context selector \'extension\' and the context set \'implementation\'; property ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:47:66: warning: \'ibm\' is not a valid context property for the context selector \'kind\' and the context set \'device\'; property ignored [-Wopenmp-clauses]"} } }, ["warn_omp_declare_variant_ctx_not_a_selector"]={ [k]={M,D}, [l]=D, [h]={{nil,s,"warn_omp_declare_variant_ctx_not_a_selector"}}, [b]={{nil,s,"\'%0\' is not a valid context selector for the context set \'%1\'; selector ignored"}}, [f]={{nil,s,"\'A\' is not a valid context selector for the context set \'B\'; selector ignored"}}, [e]=j, [a]="\'(.*?)\' is not a valid context selector for the context set \'(.*?)\'; selector ignored", [c]=S, [i]={{nil,s,t}}, [d]={sb,1576809732,tb,ub}, [g]={{L,1064,"void Parser::parseOMPTraitSelectorKind(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n Diag(NameLoc, diag::warn_omp_declare_variant_ctx_not_a_selector) << Name << getOpenMPContextTraitSetName(Set);"}}, [m]={ [yb]={"clang/test/OpenMP/declare_variant_messages.c:40:48: warning: \'xxx\' is not a valid context selector for the context set \'device\'; selector ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:30:56: warning: \'xxx\' is not a valid context selector for the context set \'implementation\'; selector ignored [-Wopenmp-clauses]"} } }, ["warn_omp_declare_variant_ctx_not_a_set"]={ [k]={M,D}, [l]=D, [h]={{nil,s,"warn_omp_declare_variant_ctx_not_a_set"}}, [b]={{nil,s,"\'%0\' is not a valid context set in a `declare variant`; set ignored"}}, [f]={{nil,s,"\'A\' is not a valid context set in a `declare variant`; set ignored"}}, [e]=j, [a]="\'(.*?)\' is not a valid context set in a `declare variant`; set ignored", [c]=S, [i]={{nil,s,t}}, [d]={sb,1576809732,tb,ub}, [g]={{L,1251,"void Parser::parseOMPTraitSetKind(OMPTraitSet &TISet, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n Diag(NameLoc, diag::warn_omp_declare_variant_ctx_not_a_set) << Name;"}}, [m]={ [yb]={"clang/test/OpenMP/declare_variant_messages.c:29:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:28:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:27:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:26:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:25:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:24:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:23:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:22:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:21:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:67:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:70:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:94:40: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:98:45: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:103:43: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:108:45: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:127:54: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:129:54: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:133:54: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:139:52: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:144:53: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]","clang/test/OpenMP/declare_variant_messages.c:176:51: warning: \'xxx\' is not a valid context set in a `declare variant`; set ignored [-Wopenmp-clauses]"} } }, ["warn_omp_declare_variant_expected"]={ [k]={M,D}, [l]=D, [h]={{nil,s,"warn_omp_declare_variant_expected"}}, [b]={{nil,s,"expected \'%0\' after the %1; \'%0\' assumed"}}, [f]={{nil,s,"expected \'A\' after the B; \'A\' assumed"}}, [e]=j, [a]="expected \'(.*?)\' after the (.*?); \'(.*?)\' assumed", [c]=S, [i]={{nil,s,t}}, [d]={sb,1576809732,tb,ub}, [g]={{L,1112,"/// Parse optional \'score\' \'(\' <expr> \')\' \':\'.\nstatic ExprResult parseContextScore(Parser &P) {\n // ...\n // Parse \':\'\n if (P.getCurToken().is(tok::colon))\n // ...\n else\n P.Diag(P.getCurToken(), diag::warn_omp_declare_variant_expected) << \"\':\'\""},{L,1328,"/// Parses an OpenMP context selector set.\n///\n/// <trait-set-selector-name> \'=\' \'{\' <trait-selector> [, <trait-selector>]* \'}\'\nvoid Parser::parseOMPContextSelectorSet(OMPTraitSet &TISet, llvm::StringMap<SourceLocation> &SeenSets) {\n // ...\n // Parse \'=\'.\n if (!TryConsumeToken(tok::equal))\n Diag(Tok.getLocation(), diag::warn_omp_declare_variant_expected) << \"=\" << (\"context set name \\\"\" + getOpenMPContextTraitSetName(TISet.Kind) + \"\\\"\").str();"},{L,1338,"/// Parses an OpenMP context selector set.\n///\n/// <trait-set-selector-name> \'=\' \'{\' <trait-selector> [, <trait-selector>]* \'}\'\nvoid Parser::parseOMPContextSelectorSet(OMPTraitSet &TISet, llvm::StringMap<SourceLocation> &SeenSets) {\n // ...\n // Parse \'{\'.\n if (Tok.is(tok::l_brace)) {\n // ...\n } else {\n Diag(Tok.getLocation(), diag::warn_omp_declare_variant_expected) << \"{\" << (\"\'=\' that follows the context set name \\\"\" + getOpenMPContextTraitSetName(TISet.Kind) + \"\\\"\").str();"},{L,1358,"/// Parses an OpenMP context selector set.\n///\n/// <trait-set-selector-name> \'=\' \'{\' <trait-selector> [, <trait-selector>]* \'}\'\nvoid Parser::parseOMPContextSelectorSet(OMPTraitSet &TISet, llvm::StringMap<SourceLocation> &SeenSets) {\n // ...\n // Parse \'}\'.\n if (Tok.is(tok::r_brace)) {\n // ...\n } else {\n Diag(Tok.getLocation(), diag::warn_omp_declare_variant_expected) << \"}\" << (\"context selectors for the context set \\\"\" + getOpenMPContextTraitSetName(TISet.Kind) + \"\\\"\").str();"}}, [m]={ ["clang/test/OpenMP/metadirective_messages.cpp"]={"clang/test/OpenMP/metadirective_messages.cpp:10:38: warning: expected \'=\' after the context set name \"device\"; \'=\' assumed [-Wopenmp-clauses]","clang/test/OpenMP/metadirective_messages.cpp:12:38: warning: expected \'=\' after the context set name \"device\"; \'=\' assumed [-Wopenmp-clauses]","clang/test/OpenMP/metadirective_messages.cpp:14:38: warning: expected \'=\' after the context set name \"device\"; \'=\' assumed [-Wopenmp-clauses]"} } }, ["warn_omp_declare_variant_marked_as_declare_variant"]={ [k]={M,kb}, [l]=kb, [h]={{nil,A,"warn_omp_declare_variant_marked_as_declare_variant"}}, [b]={{nil,A,"variant function in \'#pragma omp declare variant\' is itself marked as \'#pragma omp declare variant\'"}}, [f]={{nil,A,"variant function in \'#pragma omp declare variant\' is itself marked as \'#pragma omp declare variant\'"}}, [e]=j, [a]="variant function in \'\\#pragma omp declare variant\' is itself marked as \'\\#pragma omp declare variant\'", [c]=Lb, [i]={{nil,A,fb}}, [d]={"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"}, [g]={{eb,7580,"std::optional<std::pair<FunctionDecl *, Expr *>> Sema::checkOpenMPDeclareVariantFunction(Sema::DeclGroupPtrTy DG, Expr *VariantRef, OMPTraitInfo &TI, unsigned NumAppendArgs, SourceRange SR) {\n // ...\n // Check if variant function is not marked with declare variant directive.\n if (NewFD->hasAttrs() && NewFD->hasAttr<OMPDeclareVariantAttr>()) {\n Diag(VariantRef->getExprLoc(), diag::warn_omp_declare_variant_marked_as_declare_variant) << VariantRef->getSourceRange();"}}, [m]={ [yb]={"clang/test/OpenMP/declare_variant_messages.c:176:29: warning: variant function in \'#pragma omp declare variant\' is itself marked as \'#pragma omp declare variant\' [-Wsource-uses-openmp]"} } }, ["warn_omp_declare_variant_score_not_constant"]={ [k]={M,kb}, [l]=kb, [h]={{nil,s,"warn_omp_declare_variant_score_not_constant"}}, [b]={{nil,s,"score expressions in the OpenMP context selector need to be constant; %0 is not and will be ignored"}}, [f]={{nil,s,"score expressions in the OpenMP context selector need to be constant; A is not and will be ignored"}}, [e]=j, [a]="score expressions in the OpenMP context selector need to be constant; (.*?) is not and will be ignored", [c]=Lb, [i]={{nil,s,fb}}, [d]={sb,1576809732,tb,ub}, [g]={{eb,7423,"std::optional<std::pair<FunctionDecl *, Expr *>> Sema::checkOpenMPDeclareVariantFunction(Sema::DeclGroupPtrTy DG, Expr *VariantRef, OMPTraitInfo &TI, unsigned NumAppendArgs, SourceRange SR) {\n // ...\n // Deal with non-constant score and user condition expressions.\n auto HandleNonConstantScoresAndConditions = [this](Expr *&E, bool IsScore) -> bool {\n // ...\n if (IsScore) {\n // ...\n Diag(E->getExprLoc(), diag::warn_omp_declare_variant_score_not_constant) << E;"}}, [m]={ [yb]={"clang/test/OpenMP/declare_variant_messages.c:37:69: warning: score expressions in the OpenMP context selector need to be constant; foo() is not and will be ignored [-Wsource-uses-openmp]","clang/test/OpenMP/declare_variant_messages.c:54:71: warning: score expressions in the OpenMP context selector need to be constant; foo() is not and will be ignored [-Wsource-uses-openmp]","clang/test/OpenMP/declare_variant_messages.c:53:71: warning: score expressions in the OpenMP context selector need to be constant; foo is not and will be ignored [-Wsource-uses-openmp]"} } }, ["warn_omp_declare_variant_string_literal_or_identifier"]={ [k]={M,D}, [l]=D, [h]={{nil,s,"warn_omp_declare_variant_string_literal_or_identifier"}}, [b]={{nil,s,"expected identifier or string literal describing a context %select{set|selector|property}0; %select{set|selector|property}0 skipped"}}, [f]={{nil,s,{"expected identifier or string literal describing a context ",{"set","selector","property"},"; ",{"set","selector","property"}," skipped"}}}, [e]=j, [a]="expected identifier or string literal describing a context (?:set|selector|property); (?:set|selector|property) skipped", [c]=S, [i]={{nil,s,t}}, [d]={sb,1576809732,tb,ub}, [g]={{L,852,"static StringRef getNameFromIdOrString(Parser &P, Token &Tok, OMPContextLvl Lvl) {\n // ...\n P.Diag(Tok.getLocation(), diag::warn_omp_declare_variant_string_literal_or_identifier) << Lvl;"}}, [m]={ ["clang/test/OpenMP/metadirective_messages.cpp"]={"clang/test/OpenMP/metadirective_messages.cpp:8:32: warning: expected identifier or string literal describing a context set; set skipped [-Wopenmp-clauses]","clang/test/OpenMP/metadirective_messages.cpp:10:39: warning: expected identifier or string literal describing a context selector; selector skipped [-Wopenmp-clauses]"} } }, ["warn_omp_depend_in_ordered_deprecated"]={ [k]={Bb}, [l]=Bb, [h]="warn_omp_depend_in_ordered_deprecated", [b]="\'depend\' clause for \'ordered\' is deprecated; use \'doacross\' instead", [f]="\'depend\' clause for \'ordered\' is deprecated; use \'doacross\' instead", [e]=j, [a]="\'depend\' clause for \'ordered\' is deprecated; use \'doacross\' instead", [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated[^\\]]*\\]", [i]=hc, [d]={"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"}, [g]={{L,3373,"/// Parsing of OpenMP clauses.\n///\n/// clause:\n/// if-clause | final-clause | num_threads-clause | safelen-clause |\n/// default-clause | private-clause | firstprivate-clause | shared-clause\n/// | linear-clause | aligned-clause | collapse-clause | bind-clause |\n/// lastprivate-clause | reduction-clause | proc_bind-clause |\n/// schedule-clause | copyin-clause | copyprivate-clause | untied-clause |\n/// mergeable-clause | flush-clause | read-clause | write-clause |\n/// update-clause | capture-clause | seq_cst-clause | device-clause |\n/// simdlen-clause | threads-clause | simd-clause | num_teams-clause |\n/// thread_limit-clause | priority-clause | grainsize-clause |\n/// nogroup-clause | num_tasks-clause | hint-clause | to-clause |\n/// from-clause | is_device_ptr-clause | task_reduction-clause |\n/// in_reduction-clause | allocator-clause | allocate-clause |\n/// acq_rel-clause | acquire-clause | release-clause | relaxed-clause |\n/// depobj-clause | destroy-clause | detach-clause | inclusive-clause |\n/// exclusive-clause | uses_allocators-clause | use_device_addr-clause |\n/// has_device_addr\n///\nOMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, OpenMPClauseKind CKind, bool FirstClause) {\n // ...\n case OMPC_private:\n case OMPC_firstprivate:\n case OMPC_lastprivate:\n case OMPC_shared:\n case OMPC_reduction:\n case OMPC_task_reduction:\n case OMPC_in_reduction:\n case OMPC_linear:\n case OMPC_aligned:\n case OMPC_copyin:\n case OMPC_copyprivate:\n case OMPC_flush:\n case OMPC_depend:\n case OMPC_map:\n case OMPC_to:\n case OMPC_from:\n case OMPC_use_device_ptr:\n case OMPC_use_device_addr:\n case OMPC_is_device_ptr:\n case OMPC_has_device_addr:\n case OMPC_allocate:\n case OMPC_nontemporal:\n case OMPC_inclusive:\n case OMPC_exclusive:\n case OMPC_affinity:\n case OMPC_doacross:\n if (getLangOpts().OpenMP >= 52 && DKind == OMPD_ordered && CKind == OMPC_depend)\n Diag(Tok, diag::warn_omp_depend_in_ordered_deprecated);"}}, [m]={ ["clang/test/OpenMP/ordered_messages.cpp"]={"clang/test/OpenMP/ordered_messages.cpp:405:21: warning: \'depend\' clause for \'ordered\' is deprecated; use \'doacross\' instead [-Wdeprecated]"} } }, ["warn_omp_extra_tokens_at_eol"]={ [k]={"endif-labels","extra-tokens"}, [l]="extra-tokens", [h]="warn_omp_extra_tokens_at_eol", [b]="extra tokens at the end of \'#pragma omp %0\' are ignored", [f]="extra tokens at the end of \'#pragma omp A\' are ignored", [e]=j, [a]="extra tokens at the end of \'\\#pragma omp (.*?)\' are ignored", [c]=" \\[(?:\\-Werror,)?\\-Wextra\\-tokens[^\\]]*\\]", [i]=t, [d]={"a769e07232d2",1363934075,"OpenMP threadprivate directive parsing and semantic analysis","OpenMP threadprivate directive parsing and semantic analysis\n\nllvm-svn: 177705"}, [g]={{L,1968,"void Parser::skipUntilPragmaOpenMPEnd(OpenMPDirectiveKind DKind) {\n // ...\n Diag(Tok, diag::warn_omp_extra_tokens_at_eol) << getOpenMPDirectiveName(DKind);"}}, [m]={ ["clang/test/OpenMP/unroll_messages.cpp"]={"clang/test/OpenMP/unroll_messages.cpp:21:22: warning: extra tokens at the end of \'#pragma omp unroll\' are ignored [-Wextra-tokens]"} } }, ["warn_omp_linear_step_zero"]={ [k]={M,D}, [l]=D, [h]="warn_omp_linear_step_zero", [b]="zero linear step (%0 %select{|and other variables in clause }1should probably be const)", [f]={{nil,nil,{"zero linear step (A ",{T,"and other variables in clause "},"should probably be const)"}}}, [e]=j, [a]="zero linear step \\((.*?) (?:|and other variables in clause )should probably be const\\)", [c]=S, [i]=fb, [d]={"8dba66412b0a",1398172182,"[OPENMP] parsing \'linear\' clause (for directive \'omp simd\')","[OPENMP] parsing \'linear\' clause (for directive \'omp simd\')\n\nDifferential Revision: http://reviews.llvm.org/D3272\n\nllvm-svn: 206891"}, [g]={{eb,20138,"OMPClause *Sema::ActOnOpenMPLinearClause(ArrayRef<Expr *> VarList, Expr *Step, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind LinKind, SourceLocation LinLoc, SourceLocation ColonLoc, SourceLocation EndLoc) {\n // ...\n if (Step && !Step->isValueDependent() && !Step->isTypeDependent() && !Step->isInstantiationDependent() && !Step->containsUnexpandedParameterPack()) {\n // ...\n // Warn about zero linear step (it would be probably better specified as\n // making corresponding variables \'const\').\n if (std::optional<llvm::APSInt> Result = StepExpr->getIntegerConstantExpr(Context)) {\n if (!Result->isNegative() && !Result->isStrictlyPositive())\n Diag(StepLoc, diag::warn_omp_linear_step_zero) << Vars[0] << (Vars.size() > 1);"}}, [m]={ ["clang/test/OpenMP/for_simd_linear_messages.cpp"]={"clang/test/OpenMP/for_simd_linear_messages.cpp:74:36: warning: zero linear step (ind2 should probably be const) [-Wopenmp-clauses]"} } }, ["warn_omp_loop_64_bit_var"]={ [k]={M,"openmp-loop-form"}, [l]="openmp-loop-form", [h]="warn_omp_loop_64_bit_var", [b]="OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed", [f]="OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed", [e]=j, [a]="OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed", [c]=" \\[(?:\\-Werror,)?\\-Wopenmp\\-loop\\-form[^\\]]*\\]", [i]=fb, [d]={"174b3ca6820b",1412594189,"[OPENMP] Limit the loop counters to 64 bits for the worksharing loops","[OPENMP] Limit the loop counters to 64 bits for the worksharing loops\n\nllvm-svn: 219113"}, [g]={{eb,8834,"/// Build the expression to calculate the number of iterations.\nExpr *OpenMPIterationSpaceChecker::buildNumIterations(Scope *S, ArrayRef<LoopIterationSpace> ResultIterSpaces, bool LimitedType, llvm::MapVector<const Expr *, DeclRefExpr *> &Captures) const {\n // ...\n if (LimitedType) {\n // ...\n if (NewSize != C.getTypeSize(Type)) {\n if (NewSize < C.getTypeSize(Type)) {\n // ...\n SemaRef.Diag(DefaultLoc, diag::warn_omp_loop_64_bit_var) << InitSrcRange << ConditionSrcRange;"}}, [m]={ ["clang/test/OpenMP/taskloop_misc_messages.c"]={"clang/test/OpenMP/taskloop_misc_messages.c:378:3: warning: OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed [-Wopenmp-loop-form]"} } }, ["warn_omp_minus_in_reduction_deprecated"]={ [k]={Bb}, [l]=Bb, [h]="warn_omp_minus_in_reduction_deprecated", [b]="minus(-) operator for reductions is deprecated; use + or user defined reduction instead", [f]="minus(-) operator for reductions is deprecated; use + or user defined reduction instead", [e]=j, [a]="minus\\(\\-\\) operator for reductions is deprecated; use \\+ or user defined reduction instead", [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated[^\\]]*\\]", [i]=hc, [d]={Db,1625925174,Gb,Fb}, [g]={{eb,19254,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n // OpenMP 5.2, 5.5.5 (see page 627, line 18) reduction Clause, Restrictions\n // A reduction clause with the minus (-) operator was deprecated\n if (OOK == OO_Minus && S.LangOpts.OpenMP == 52)\n S.Diag(ReductionId.getLoc(), diag::warn_omp_minus_in_reduction_deprecated);"}}, [m]={ ["clang/test/OpenMP/taskloop_reduction_messages_attr.cpp"]={"clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:158:39: warning: minus(-) operator for reductions is deprecated; use + or user defined reduction instead [-Wdeprecated]","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:260:39: warning: minus(-) operator for reductions is deprecated; use + or user defined reduction instead [-Wdeprecated]","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:158:39: warning: minus(-) operator for reductions is deprecated; use + or user defined reduction instead [-Wdeprecated]","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:158:39: warning: minus(-) operator for reductions is deprecated; use + or user defined reduction instead [-Wdeprecated]"} } }, ["warn_omp_more_one_device_type_clause"]={ [k]={M,D}, [l]=D, [h]={{nil,A,"warn_omp_more_one_device_type_clause"}}, [b]={{nil,A,"more than one \'device_type\' clause is specified"}}, [f]={{nil,A,"more than one \'device_type\' clause is specified"}}, [e]=j, [a]="more than one \'device_type\' clause is specified", [c]=S, [i]={{nil,A,t}}, [d]={"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"}, [g]={{L,1888,"void Parser::ParseOMPDeclareTargetClauses(Sema::DeclareTargetContextInfo &DTCI) {\n // ...\n while (Tok.isNot(tok::annot_pragma_openmp_end)) {\n // ...\n if (HasIdentifier) {\n // ...\n // Parse \'device_type\' clause and go to next clause if any.\n if (IsDeviceTypeClause) {\n // ...\n if (DevTypeData) {\n if (DeviceTypeLoc.isValid()) {\n // ...\n Diag(DevTypeData->Loc, diag::warn_omp_more_one_device_type_clause);"}}, [m]={ ["clang/test/OpenMP/declare_target_messages.cpp"]={"clang/test/OpenMP/declare_target_messages.cpp:37:51: warning: more than one \'device_type\' clause is specified [-Wopenmp-clauses]"} } }, ["warn_omp_more_one_interop_type"]={ [k]={M,D}, [l]=D, [h]={{nil,H,"warn_omp_more_one_interop_type"}}, [b]={{nil,H,"interop type \'%0\' cannot be specified more than once"}}, [f]={{nil,H,"interop type \'A\' cannot be specified more than once"}}, [e]=j, [a]="interop type \'(.*?)\' cannot be specified more than once", [c]=S, [i]={{nil,H,t}}, [d]={"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"}, [g]={{L,3562,"/// Parses a comma-separated list of interop-types and a prefer_type list.\n///\nbool Parser::ParseOMPInteropInfo(OMPInteropInfo &InteropInfo, OpenMPClauseKind Kind) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (Tok.getIdentifierInfo()->isStr(\"target\")) {\n // OpenMP 5.1 [2.15.1, interop Construct, Restrictions]\n // Each interop-type may be specified on an action-clause at most\n // once.\n if (IsTarget)\n Diag(Tok, diag::warn_omp_more_one_interop_type) << \"target\";"},{L,3567,"/// Parses a comma-separated list of interop-types and a prefer_type list.\n///\nbool Parser::ParseOMPInteropInfo(OMPInteropInfo &InteropInfo, OpenMPClauseKind Kind) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (Tok.getIdentifierInfo()->isStr(\"target\")) {\n // ...\n } else if (Tok.getIdentifierInfo()->isStr(\"targetsync\")) {\n if (IsTargetSync)\n Diag(Tok, diag::warn_omp_more_one_interop_type) << \"targetsync\";"}}, [m]={ ["clang/test/OpenMP/interop_messages.cpp"]={"clang/test/OpenMP/interop_messages.cpp:87:46: warning: interop type \'target\' cannot be specified more than once [-Wopenmp-clauses]"} } }, ["warn_omp_more_one_omp_all_memory"]={ [k]={M,D}, [l]=D, [h]={{nil,P,"warn_omp_more_one_omp_all_memory"}}, [b]={{nil,P,"reserved locator \'omp_all_memory\' cannot be specified more than once"}}, [f]={{nil,P,"reserved locator \'omp_all_memory\' cannot be specified more than once"}}, [e]=j, [a]="reserved locator \'omp_all_memory\' cannot be specified more than once", [c]=S, [i]={{nil,P,t}}, [d]={"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"}, [g]={{L,4309,"bool Parser::ParseOpenMPReservedLocator(OpenMPClauseKind Kind, Sema::OpenMPVarListDataTy &Data, const LangOptions &LangOpts) {\n // ...\n if (Tok.is(tok::identifier) && Tok.getIdentifierInfo()->isStr(\"omp_all_memory\")) {\n if (Data.ExtraModifier == OMPC_DEPEND_outallmemory || Data.ExtraModifier == OMPC_DEPEND_inoutallmemory)\n Diag(Tok, diag::warn_omp_more_one_omp_all_memory);"}}, [m]={ ["clang/test/OpenMP/task_depend_messages.cpp"]={"clang/test/OpenMP/task_depend_messages.cpp:89:52: warning: reserved locator \'omp_all_memory\' cannot be specified more than once [-Wopenmp-clauses]"} } }, ["warn_omp_nesting_simd"]={ [k]={M,kb}, [l]=kb, [h]="warn_omp_nesting_simd", [b]="OpenMP only allows an ordered construct with the simd clause nested in a simd construct", [f]="OpenMP only allows an ordered construct with the simd clause nested in a simd construct", [e]=j, [a]="OpenMP only allows an ordered construct with the simd clause nested in a simd construct", [c]=Lb, [i]=fb, [d]={"fd8b5748f113",1467383425,"[OpenMP] Issue warning if a simd construct nested inside another simd","[OpenMP] Issue warning if a simd construct nested inside another simd\nconstruct\n\nllvm-svn: 274352"}, [g]={{eb,5011,"static bool checkNestingOfRegions(Sema &SemaRef, const DSAStackTy *Stack, OpenMPDirectiveKind CurrentRegion, const DeclarationNameInfo &CurrentName, OpenMPDirectiveKind CancelRegion, OpenMPBindClauseKind BindKind, SourceLocation StartLoc) {\n if (Stack->getCurScope()) {\n // ...\n if (isOpenMPSimdDirective(ParentRegion) && ((SemaRef.LangOpts.OpenMP <= 45 && CurrentRegion != OMPD_ordered) || (SemaRef.LangOpts.OpenMP >= 50 && CurrentRegion != OMPD_ordered && CurrentRegion != OMPD_simd && CurrentRegion != OMPD_atomic && CurrentRegion != OMPD_scan))) {\n // ...\n SemaRef.Diag(StartLoc, (CurrentRegion != OMPD_simd) ? diag::err_omp_prohibited_region_simd : diag::warn_omp_nesting_simd) << (SemaRef.LangOpts.OpenMP >= 50 ? 1 : 0);"}}, [m]={ ["clang/test/OpenMP/nesting_of_regions.cpp"]={"clang/test/OpenMP/nesting_of_regions.cpp:250:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:803:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:2841:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:6735:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:7054:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:7847:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:8136:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:9432:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:9680:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:10135:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:10635:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:12554:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:15561:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:15880:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:16191:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:16726:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:17015:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:18311:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]","clang/test/OpenMP/nesting_of_regions.cpp:18559:1: warning: OpenMP only allows an ordered construct with the simd clause nested in a simd construct [-Wsource-uses-openmp]"} } }, ["warn_omp_non_trivial_type_mapped"]={ [k]={M,M,"openmp-mapping",fc}, [l]="openmp-mapping", [h]={{nil,z,"warn_omp_non_trivial_type_mapped"}}, [b]={{nil,A,"Type %0 is not trivially copyable and not guaranteed to be mapped correctly"},{p,z,"Non-trivial type %0 is mapped, only trivial types are guaranteed to be mapped correctly"}}, [f]={{nil,A,"Type A is not trivially copyable and not guaranteed to be mapped correctly"},{p,z,"Non-trivial type A is mapped, only trivial types are guaranteed to be mapped correctly"}}, [e]=j, [a]="Type (.*?) is not trivially copyable and not guaranteed to be mapped correctly", [c]=" \\[(?:\\-Werror,)?\\-Wopenmp\\-mapping[^\\]]*\\]", [i]={{nil,z,fb}}, [d]={"95c23e72da98",1519767071,"[OPENMP] Emit warning for non-trivial types in map clauses.","[OPENMP] Emit warning for non-trivial types in map clauses.\n\nIf the mapped type is non-trivial, the warning message is emitted for\nbetter user experience.\n\nllvm-svn: 326251"}, [g]={{eb,20969,"static bool checkTypeMappable(SourceLocation SL, SourceRange SR, Sema &SemaRef, DSAStackTy *Stack, QualType QTy, bool FullCheck = true) {\n // ...\n if (FullCheck && !SemaRef.CurContext->isDependentContext() && !QTy.isTriviallyCopyableType(SemaRef.Context))\n SemaRef.Diag(SL, diag::warn_omp_non_trivial_type_mapped) << QTy << SR;"}}, [m]={ ["clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp"]={"clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp:122:43: warning: Type \'const S3[5]\' is not trivially copyable and not guaranteed to be mapped correctly [-Wopenmp-mapping]"} } }, ["warn_omp_not_in_target_context"]={ [k]={M,fc}, [l]=fc, [h]="warn_omp_not_in_target_context", [b]="declaration is not declared in any declare target region", [f]="declaration is not declared in any declare target region", [e]=j, [a]="declaration is not declared in any declare target region", [c]=" \\[(?:\\-Werror,)?\\-Wopenmp\\-target[^\\]]*\\]", [i]=fb, [d]={"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"}, [g]={{eb,23133,"static void checkDeclInTargetContext(SourceLocation SL, SourceRange SR, Sema &SemaRef, Decl *D) {\n // ...\n SemaRef.Diag(VD->getLocation(), diag::warn_omp_not_in_target_context);"}}, [m]={ ["clang/test/OpenMP/nvptx_target_exceptions_messages.cpp"]={"clang/test/OpenMP/nvptx_target_exceptions_messages.cpp:92:7: warning: declaration is not declared in any declare target region [-Wopenmp-target]"} } }, ["warn_omp_section_is_char"]={ [k]={u,v,"char-subscripts",w}, [l]="char-subscripts", [h]="warn_omp_section_is_char", [b]="array section %select{lower bound|length}0 is of type \'char\'", [f]={{nil,nil,{"array section ",{"lower bound","length"}," is of type \'char\'"}}}, [e]=j, [a]="array section (?:lower bound|length) is of type \'char\'", [c]=" \\[(?:\\-Werror,)?\\-Wchar\\-subscripts[^\\]]*\\]", [i]=fb, [d]={"1a3320e4639c",1440512644,"[OPENMP 4.0] Initial support for array sections.","[OPENMP 4.0] Initial support for array sections.\n\nAdds parsing/sema analysis/serialization/deserialization for array sections in OpenMP constructs (introduced in OpenMP 4.0).\nCurrently it is allowed to use array sections only in OpenMP clauses that accepts list of expressions.\nDifferential Revision: http://reviews.llvm.org/D10732\n\nllvm-svn: 245937"}, [g]={{I,5326,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n // C99 6.5.2.1p1\n if (LowerBound) {\n // ...\n if (LowerBound->getType()->isSpecificBuiltinType(BuiltinType::Char_S) || LowerBound->getType()->isSpecificBuiltinType(BuiltinType::Char_U))\n Diag(LowerBound->getExprLoc(), diag::warn_omp_section_is_char) << 0 << LowerBound->getSourceRange();"},{I,5340,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n if (Length) {\n // ...\n if (Length->getType()->isSpecificBuiltinType(BuiltinType::Char_S) || Length->getType()->isSpecificBuiltinType(BuiltinType::Char_U))\n Diag(Length->getExprLoc(), diag::warn_omp_section_is_char) << 1 << Length->getSourceRange();"},{I,5355,"ExprResult Sema::ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc) {\n // ...\n if (Stride) {\n // ...\n if (Stride->getType()->isSpecificBuiltinType(BuiltinType::Char_S) || Stride->getType()->isSpecificBuiltinType(BuiltinType::Char_U))\n Diag(Stride->getExprLoc(), diag::warn_omp_section_is_char) << 1 << Stride->getSourceRange();"}} }, ["warn_omp_unknown_assumption_clause_missing_id"]={ [k]={M,D}, [l]=D, [h]={{nil,R,"warn_omp_unknown_assumption_clause_missing_id"}}, [b]={{nil,R,"valid %0 clauses start with %1; %select{token|tokens}2 will be ignored"}}, [f]={{nil,R,{"valid A clauses start with B; ",{"token","tokens"}," will be ignored"}}}, [e]=j, [a]="valid (.*?) clauses start with (.*?); (?:token|tokens) will be ignored", [c]=S, [i]={{nil,R,t}}, [d]={"38d18d93534d",1601621202,"[SVE] Add support to vectorize_width loop pragma for scalable vectors","[SVE] Add support to vectorize_width loop pragma for scalable vectors\n\nThis patch adds support for two new variants of the vectorize_width\npragma:\n\n1. vectorize_width(X[, fixed|scalable]) where an optional second\nparameter is passed to the vectorize_width pragma, which indicates if\nthe user wishes to use fixed width or scalable vectorization. For\nexample the user can now write something like:\n\n #pragma clang loop vectorize_width(4, fixed)\nor\n #pragma clang loop vectorize_width(4, scalable)\n\nIn the absence of a second parameter it is assumed the user wants\nfixed width vectorization, in order to maintain compatibility with\nexisting code.\n2. vectorize_width(fixed|scalable) where the width is left unspecified,\nbut the user hints what type of vectorization they prefer, either\nfixed width or scalable.\n\nI have implemented this by making use of the LLVM loop hint attribute:\n\n llvm.loop.vectorize.scalable.enable\n\nTests were added to\n\n clang/test/CodeGenCXX/pragma-loop.cpp\n\nfor both the \'fixed\' and \'scalable\' optional parameter.\n\nSee this thread for context: http://lists.llvm.org/pipermail/cfe-dev/2020-November/067262.html\n\nDifferential Revision: https://reviews.llvm.org/D89031"}, [g]={{L,1721,"/// `omp assumes` or `omp begin/end assumes` <clause> [[,]<clause>]...\n/// where\n///\n/// clause:\n/// \'ext_IMPL_DEFINED\'\n/// \'absent\' \'(\' directive-name [, directive-name]* \')\'\n/// \'contains\' \'(\' directive-name [, directive-name]* \')\'\n/// \'holds\' \'(\' scalar-expression \')\'\n/// \'no_openmp\'\n/// \'no_openmp_routines\'\n/// \'no_parallelism\'\n///\nvoid Parser::ParseOpenMPAssumesDirective(OpenMPDirectiveKind DKind, SourceLocation Loc) {\n // ...\n while (Tok.isNot(tok::annot_pragma_openmp_end)) {\n // ...\n // Handle unknown clauses by skipping them.\n if (Idx == -1) {\n Diag(StartLoc, diag::warn_omp_unknown_assumption_clause_missing_id) << llvm::omp::getOpenMPDirectiveName(DKind) << llvm::omp::getAllAssumeClauseOptions() << NextIsLPar;"}}, [m]={ ["clang/test/OpenMP/assumes_messages_attr.c"]={"clang/test/OpenMP/assumes_messages_attr.c:9:26: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:10:32: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:13:32: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:14:26: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:21:26: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:21:43: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:22:32: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:22:49: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:25:32: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:25:60: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:26:26: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:26:54: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:29:36: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:30:42: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:45:26: warning: valid assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:46:32: warning: valid begin assumes clauses start with \'ext_\', \'absent\', \'contains\', \'holds\', \'no_openmp\', \'no_openmp_routines\', \'no_parallelism\'; token will be ignored [-Wopenmp-clauses]"} } }, ["warn_omp_unknown_assumption_clause_without_args"]={ [k]={M,D}, [l]=D, [h]={{nil,R,"warn_omp_unknown_assumption_clause_without_args"}}, [b]={{nil,R,"%0 clause should not be followed by arguments; tokens will be ignored"}}, [f]={{nil,R,"A clause should not be followed by arguments; tokens will be ignored"}}, [e]=j, [a]="(.*?) clause should not be followed by arguments; tokens will be ignored", [c]=S, [i]={{nil,R,t}}, [d]={"38d18d93534d",1601621202,"[SVE] Add support to vectorize_width loop pragma for scalable vectors","[SVE] Add support to vectorize_width loop pragma for scalable vectors\n\nThis patch adds support for two new variants of the vectorize_width\npragma:\n\n1. vectorize_width(X[, fixed|scalable]) where an optional second\nparameter is passed to the vectorize_width pragma, which indicates if\nthe user wishes to use fixed width or scalable vectorization. For\nexample the user can now write something like:\n\n #pragma clang loop vectorize_width(4, fixed)\nor\n #pragma clang loop vectorize_width(4, scalable)\n\nIn the absence of a second parameter it is assumed the user wants\nfixed width vectorization, in order to maintain compatibility with\nexisting code.\n2. vectorize_width(fixed|scalable) where the width is left unspecified,\nbut the user hints what type of vectorization they prefer, either\nfixed width or scalable.\n\nI have implemented this by making use of the LLVM loop hint attribute:\n\n llvm.loop.vectorize.scalable.enable\n\nTests were added to\n\n clang/test/CodeGenCXX/pragma-loop.cpp\n\nfor both the \'fixed\' and \'scalable\' optional parameter.\n\nSee this thread for context: http://lists.llvm.org/pipermail/cfe-dev/2020-November/067262.html\n\nDifferential Revision: https://reviews.llvm.org/D89031"}, [g]={{L,1740,"/// `omp assumes` or `omp begin/end assumes` <clause> [[,]<clause>]...\n/// where\n///\n/// clause:\n/// \'ext_IMPL_DEFINED\'\n/// \'absent\' \'(\' directive-name [, directive-name]* \')\'\n/// \'contains\' \'(\' directive-name [, directive-name]* \')\'\n/// \'holds\' \'(\' scalar-expression \')\'\n/// \'no_openmp\'\n/// \'no_openmp_routines\'\n/// \'no_parallelism\'\n///\nvoid Parser::ParseOpenMPAssumesDirective(OpenMPDirectiveKind DKind, SourceLocation Loc) {\n // ...\n while (Tok.isNot(tok::annot_pragma_openmp_end)) {\n // ...\n if (NextIsLPar) {\n Diag(Tok.getLocation(), diag::warn_omp_unknown_assumption_clause_without_args) << II;"}}, [m]={ ["clang/test/OpenMP/assumes_messages_attr.c"]={"clang/test/OpenMP/assumes_messages_attr.c:17:35: warning: \'no_openmp\' clause should not be followed by arguments; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:18:41: warning: \'no_openmp\' clause should not be followed by arguments; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:49:33: warning: \'ext_123\' clause should not be followed by arguments; tokens will be ignored [-Wopenmp-clauses]","clang/test/OpenMP/assumes_messages_attr.c:50:39: warning: \'ext_123\' clause should not be followed by arguments; tokens will be ignored [-Wopenmp-clauses]"} } }, ["warn_omp_unterminated_declare_target"]={ [k]={M,kb}, [l]=kb, [h]={{nil,P,"warn_omp_unterminated_declare_target"}}, [b]={{nil,P,"expected \'#pragma omp end declare target\' at end of file to match \'#pragma omp %0\'"}}, [f]={{nil,P,"expected \'#pragma omp end declare target\' at end of file to match \'#pragma omp A\'"}}, [e]=j, [a]="expected \'\\#pragma omp end declare target\' at end of file to match \'\\#pragma omp (.*?)\'", [c]=Lb, [i]={{nil,P,fb}}, [d]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs","Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/classes (the\ntype information may be lost through a function pointer, a declaration\nor use of the underlying type without using the typedef, etc) but I\nthink there\'s still value in being able to attribute a typedef and have\nall return types written with that typedef pick up the\nwarn_unused_result behavior.\n\nSpecifically I\'d like to be able to annotate LLVMErrorRef (a wrapper for\nllvm::Error used in the C API - the underlying type is a raw pointer, so\nit can\'t be attributed itself) to reduce the chance of unhandled errors.\n\nDifferential Revision: https://reviews.llvm.org/D102122"}, [g]={{eb,23012,"void Sema::DiagnoseUnterminatedOpenMPDeclareTarget() {\n // ...\n Diag(DTCI.Loc, diag::warn_omp_unterminated_declare_target) << getOpenMPDirectiveName(DTCI.Kind);"}}, [m]={ ["clang/test/OpenMP/declare_target_messages.cpp"]={"clang/test/OpenMP/declare_target_messages.cpp:279:27: warning: expected \'#pragma omp end declare target\' at end of file to match \'#pragma omp begin declare target\' [-Wsource-uses-openmp]"} } }, ["warn_omp_used_different_allocator"]={ [k]={M,D}, [l]=D, [h]={{nil,p,"warn_omp_used_different_allocator"}}, [b]={{nil,p,"allocate directive specifies %select{default|\'%1\'}0 allocator while previously used %select{default|\'%3\'}2"}}, [f]={{nil,p,{"allocate directive specifies ",{"default","\'B\'"}," allocator while previously used ",{"default","\'D\'"}}}}, [e]=j, [a]="allocate directive specifies (?:default|\'(.*?)\') allocator while previously used (?:default|\'(.*?)\')", [c]=S, [i]={{nil,p,fb}}, [d]={"282555ad8268",1553027624,"[OPENMP]Warn if the different allocator is used for the variable.","[OPENMP]Warn if the different allocator is used for the variable.\n\nIf the allocator was specified for the variable and next one is found\nwith the different allocator, the warning is emitted, and the allocator\nis ignored.\n\nllvm-svn: 356513"}, [g]={{eb,3343,"static bool checkPreviousOMPAllocateAttribute(Sema &S, DSAStackTy *Stack, Expr *RefExpr, VarDecl *VD, OMPAllocateDeclAttr::AllocatorTypeTy AllocatorKind, Expr *Allocator) {\n // ...\n if (!AllocatorsMatch) {\n // ...\n S.Diag(AllocatorLoc, diag::warn_omp_used_different_allocator) << (Allocator ? 1 : 0) << AllocatorStream.str() << (PrevAllocator ? 1 : 0) << PrevAllocatorStream.str() << AllocatorRange;"}}, [m]={ ["clang/test/OpenMP/allocate_allocator_messages.cpp"]={"clang/test/OpenMP/allocate_allocator_messages.cpp:34:35: warning: allocate directive specifies \'omp_thread_mem_alloc\' allocator while previously used default [-Wopenmp-clauses]","clang/test/OpenMP/allocate_allocator_messages.cpp:43:22: warning: allocate directive specifies default allocator while previously used \'omp_thread_mem_alloc\' [-Wopenmp-clauses]","clang/test/OpenMP/allocate_allocator_messages.cpp:47:35: warning: allocate directive specifies \'omp_high_bw_mem_alloc\' allocator while previously used \'omp_thread_mem_alloc\' [-Wopenmp-clauses]"} } }, ["warn_on_superclass_use"]={ [h]="warn_on_superclass_use", [b]="class implementation may not have super class", [f]="class implementation may not have super class", [e]=j, [a]="class implementation may not have super class", [c]=wb, [i]=o, [d]={"34e3cef4836d",1266613134,"Start supporting declaration of ivars in @implementation","Start supporting declaration of ivars in @implementation\nblocks. WIP.\n\nllvm-svn: 96696"}, [g]={{vb,2168,"void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **ivars, unsigned numIvars, SourceLocation RBrace) {\n // ...\n if (LangOpts.ObjCRuntime.isNonFragile()) {\n if (ImpDecl->getSuperClass())\n Diag(ImpDecl->getLocation(), diag::warn_on_superclass_use);"}}, [m]={ ["clang/test/SemaObjC/ivar-in-implementations.m"]={"clang/test/SemaObjC/ivar-in-implementations.m:12:17: warning: class implementation may not have super class"} } }, ["warn_opencl_attr_deprecated_ignored"]={ [k]={Cb,cb}, [l]=cb, [h]="warn_opencl_attr_deprecated_ignored", [b]={{nil,F,"%0 attribute is deprecated and ignored in %1"},{H,nil,"%0 attribute is deprecated and ignored in OpenCL version %1"}}, [f]={{nil,F,"A attribute is deprecated and ignored in B"},{H,nil,"A attribute is deprecated and ignored in OpenCL version B"}}, [e]=j, [a]="(.*?) attribute is deprecated and ignored in (.*?)", [c]=Ab, [i]=o, [d]={"c4bb5df4ab28",1459422442,"[OpenCL] Added nosvm attribute for OpenCL v2.0.","[OpenCL] Added nosvm attribute for OpenCL v2.0.\n\nIt is not widely used and removed from OpenCL v2.1.\n\nThis change modifies Clang to parse the attribute for OpenCL\nbut ignores it afterwards.\n\nPatch by Liu Yaxun (Sam)!\n\nDifferential Revision: http://reviews.llvm.org/D17861\n\nllvm-svn: 265006"}, [g]={{V,8284,"static void handleOpenCLNoSVMAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (S.LangOpts.getOpenCLCompatibleVersion() < 200)\n // ...\n else\n S.Diag(AL.getLoc(), diag::warn_opencl_attr_deprecated_ignored) << AL << S.LangOpts.getOpenCLVersionString();"}}, [m]={ ["clang/test/SemaOpenCL/nosvm.cl"]={"clang/test/SemaOpenCL/nosvm.cl:7:30: warning: \'nosvm\' attribute is deprecated and ignored in C++ for OpenCL version 1.0 [-Wignored-attributes]"} } }, ["warn_opencl_generic_address_space_arg"]={ [k]={"conversion","non-gcc"}, [l]="conversion", [h]={{nil,K,"warn_opencl_generic_address_space_arg"}}, [b]={{nil,K,"passing non-generic address space pointer to %0 may cause dynamic conversion affecting performance"}}, [f]={{nil,K,"passing non-generic address space pointer to A may cause dynamic conversion affecting performance"}}, [e]=j, [a]="passing non\\-generic address space pointer to (.*?) may cause dynamic conversion affecting performance", [c]=" \\[(?:\\-Werror,)?\\-Wconversion[^\\]]*\\]", [i]={{nil,K,"Value Conversion Issue"}}, [d]={"1076cc2ffae3",1537438047,"[OpenCL] Diagnose redundant address space conversion","[OpenCL] Diagnose redundant address space conversion\n\nAdd a warning if a parameter with a named address space is passed\nto a to_addr builtin.\n\nFor example:\n\n int i;\n to_private(&i); // generate warning as conversion from private to private is redundant.\n\nPatch by Alistair Davies.\n\nDifferential Revision: https://reviews.llvm.org/D51411\n\nllvm-svn: 342638"}, [g]={{E,1868,"// OpenCL v2.0 s6.13.9 - Address space qualifier functions.\n// Performs semantic analysis for the to_global/local/private call.\n// \\param S Reference to the semantic analyzer.\n// \\param BuiltinID ID of the builtin function.\n// \\param Call A pointer to the builtin call.\n// \\return True if a semantic error has been found, false otherwise.\nstatic bool SemaOpenCLBuiltinToAddr(Sema &S, unsigned BuiltinID, CallExpr *Call) {\n // ...\n if (RT->getPointeeType().getAddressSpace() != LangAS::opencl_generic) {\n S.Diag(Call->getArg(0)->getBeginLoc(), diag::warn_opencl_generic_address_space_arg) << Call->getDirectCallee()->getNameInfo().getAsString() << Call->getArg(0)->getSourceRange();"}}, [m]={ ["clang/test/SemaOpenCL/to_addr_builtin.cl"]={"clang/test/SemaOpenCL/to_addr_builtin.cl:44:19: warning: passing non-generic address space pointer to to_global may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:52:20: warning: passing non-generic address space pointer to to_private may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:60:18: warning: passing non-generic address space pointer to to_local may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:67:20: warning: passing non-generic address space pointer to to_global may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:75:21: warning: passing non-generic address space pointer to to_private may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:83:19: warning: passing non-generic address space pointer to to_local may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:91:20: warning: passing non-generic address space pointer to to_global may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:98:21: warning: passing non-generic address space pointer to to_private may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:106:19: warning: passing non-generic address space pointer to to_local may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:114:35: warning: passing non-generic address space pointer to to_global may cause dynamic conversion affecting performance [-Wconversion]","clang/test/SemaOpenCL/to_addr_builtin.cl:122:29: warning: passing non-generic address space pointer to to_global may cause dynamic conversion affecting performance [-Wconversion]"} } }, ["warn_opencl_unsupported_core_feature"]={ [k]={"pedantic-core-features"}, [l]="pedantic-core-features", [h]={{nil,H,"warn_opencl_unsupported_core_feature"}}, [b]={{nil,H,"%0 is a core feature in %select{OpenCL C|C++ for OpenCL}1 version %2 but not supported on this target"}}, [f]={{nil,H,{"A is a core feature in ",{"OpenCL C","C++ for OpenCL"}," version C but not supported on this target"}}}, [e]=j, [a]="(.*?) is a core feature in (?:OpenCL C|C\\+\\+ for OpenCL) version (.*?) but not supported on this target", [c]=" \\[(?:\\-Werror,)?\\-Wpedantic\\-core\\-features[^\\]]*\\]", [i]={{nil,H,O}}, [d]={"f0efc0075131",1619110439,"[OpenCL] Introduce new method for validating OpenCL target","[OpenCL] Introduce new method for validating OpenCL target\n\nLanguage options are not available when a target is being created,\nthus, a new method is introduced. Also, some refactoring is done,\nsuch as removing OpenCL feature macros setting from TargetInfo.\n\nReviewed By: Anastasia\n\nDifferential Revision: https://reviews.llvm.org/D101087"}, [g]={{"clang/lib/Basic/Targets.cpp",867,"/// validateOpenCLTarget - Check that OpenCL target has valid\n/// options setting based on OpenCL version.\nbool TargetInfo::validateOpenCLTarget(const LangOptions &Opts, DiagnosticsEngine &Diags) const {\n // ...\n auto diagnoseNotSupportedCore = [&](llvm::StringRef Name, auto... OptArgs) {\n if (OpenCLOptions::isOpenCLOptionCoreIn(Opts, OptArgs...) && !hasFeatureEnabled(OpenCLFeaturesMap, Name))\n Diags.Report(diag::warn_opencl_unsupported_core_feature) << Name << Opts.OpenCLCPlusPlus << Opts.getOpenCLVersionTuple().getAsString();"}}, [m]={ ["clang/test/Misc/r600.unsupported_core.cl"]={"warning: cl_khr_byte_addressable_store is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]","warning: cl_khr_global_int32_base_atomics is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]","warning: cl_khr_global_int32_extended_atomics is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]","warning: cl_khr_local_int32_base_atomics is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]","warning: cl_khr_local_int32_extended_atomics is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]","warning: cl_khr_3d_image_writes is a core feature in OpenCL C version 2.0 but not supported on this target [-Wpedantic-core-features]"} } }, ["warn_operator_new_returns_null"]={ [k]={"new-returns-null"}, [l]="new-returns-null", [h]="warn_operator_new_returns_null", [b]="%0 should not return a null pointer unless it is declared \'throw()\'%select{| or \'noexcept\'}1", [f]={{nil,nil,{"A should not return a null pointer unless it is declared \'throw()\'",{T," or \'noexcept\'"}}}}, [e]=j, [a]="(.*?) should not return a null pointer unless it is declared \'throw\\(\\)\'(?:| or \'noexcept\')", [c]=" \\[(?:\\-Werror,)?\\-Wnew\\-returns\\-null[^\\]]*\\]", [i]=o, [d]={"2c6b449098dc",1389924573,"Issue a warning if a throwing operator new or operator new[] returns a null","Issue a warning if a throwing operator new or operator new[] returns a null\npointer, since this invokes undefined behavior. Based on a patch by Artyom\nSkrobov! Handling of dependent exception specifications and some additional\ntestcases by me.\n\nllvm-svn: 199452"}, [g]={{E,12959,"void Sema::CheckReturnValExpr(Expr *RetValExp, QualType lhsType, SourceLocation ReturnLoc, bool isObjCMethod, const AttrVec *Attrs, const FunctionDecl *FD) {\n // ...\n // C++11 [basic.stc.dynamic.allocation]p4:\n // If an allocation function declared with a non-throwing\n // exception-specification fails to allocate storage, it shall return\n // a null pointer. Any other allocation function that fails to allocate\n // storage shall indicate failure only by throwing an exception [...]\n if (FD) {\n // ...\n if (Op == OO_New || Op == OO_Array_New) {\n // ...\n if (!Proto->isNothrow(/*ResultIfDependent*/ true) && CheckNonNullExpr(*this, RetValExp))\n Diag(ReturnLoc, diag::warn_operator_new_returns_null) << FD << getLangOpts().CPlusPlus11;"}}, [m]={ ["clang/test/SemaCXX/warn-new-overaligned.cpp"]={"clang/test/SemaCXX/warn-new-overaligned.cpp:46:5: warning: \'operator new\' should not return a null pointer unless it is declared \'throw()\' or \'noexcept\' [-Wnew-returns-null]","clang/test/SemaCXX/warn-new-overaligned.cpp:68:5: warning: \'operator new[]\' should not return a null pointer unless it is declared \'throw()\' or \'noexcept\' [-Wnew-returns-null]"} } }, ["warn_option_invalid_ocl_version"]={ [k]={Bb}, [l]=Bb, [h]="warn_option_invalid_ocl_version", [b]={{nil,F,"%0 does not support the option \'%1\'"},{H,nil,"OpenCL version %0 does not support the option \'%1\'"}}, [f]={{nil,F,"A does not support the option \'B\'"},{H,nil,"OpenCL version A does not support the option \'B\'"}}, [e]=j, [a]="(.*?) does not support the option \'(.*?)\'", [c]=T, [i]=hc, [d]={"b5f176e9bdbd",1467229172,"[OpenCL] Allow -cl-std and other standard -cl- options in driver","[OpenCL] Allow -cl-std and other standard -cl- options in driver\n\nAllow -cl-std and other standard -cl- options from cc1 to driver.\n\nAdded a test for the options moved.\n\nPatch by Aaron En Ye Shi.\n\nDifferential Revision: http://reviews.llvm.org/D21031\n\nllvm-svn: 274150"}, [g]={{"clang/lib/Frontend/CompilerInvocation.cpp",550,"static bool FixupInvocation(CompilerInvocation &Invocation, DiagnosticsEngine &Diags, const ArgList &Args, InputKind IK) {\n // ...\n // -cl-strict-aliasing needs to emit diagnostic in the case where CL > 1.0.\n // This option should be deprecated for CL > 1.0 because\n // this option was added for compatibility with OpenCL 1.0.\n if (Args.getLastArg(OPT_cl_strict_aliasing) && (LangOpts.getOpenCLCompatibleVersion() > 100))\n Diags.Report(diag::warn_option_invalid_ocl_version) << LangOpts.getOpenCLVersionString() << Args.getLastArg(OPT_cl_strict_aliasing)->getAsString(Args);"}}, [m]={ ["clang/test/CodeGenOpenCL/cl-strict-aliasing.cl"]={"warning: OpenCL C version 1.2 does not support the option \'-cl-strict-aliasing\'"} } }, ["warn_os_log_format_narg"]={ [h]="warn_os_log_format_narg", [b]="os_log() \'%%n\' format specifier is not allowed", [f]="os_log() \'%n\' format specifier is not allowed", [e]="(?:error|fatal error)\\: ", [a]="os_log\\(\\) \'%n\' format specifier is not allowed", [c]=T, [i]=o, [d]={"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"}, [g]={{E,10838,"bool CheckPrintfHandler::HandlePrintfSpecifier(const analyze_printf::PrintfSpecifier &FS, const char *startSpecifier, unsigned specifierLen, const TargetInfo &Target) {\n // ...\n // %n is not allowed with os_log.\n if (FSType == Sema::FST_OSLog && CS.getKind() == ConversionSpecifier::nArg) {\n EmitFormatDiagnostic(S.PDiag(diag::warn_os_log_format_narg), getLocationOfByte(CS.getStart()),"}}, [m]={ ["clang/test/SemaObjC/format-strings-oslog.m"]={"clang/test/SemaObjC/format-strings-oslog.m:22:34: error: os_log() \'%n\' format specifier is not allowed"} } }, ["warn_out_of_range_compare"]={ [k]={u,v,w,"tautological-compare","tautological-constant-compare","tautological-constant-out-of-range-compare"}, [l]="tautological-constant-out-of-range-compare", [h]="warn_out_of_range_compare", [b]={{nil,x,"result of comparison of %select{constant %0|true|false}1 with %select{expression of type %2|boolean expression}3 is always %4"},{gb,nil,"comparison of %select{constant %0|true|false}1 with %select{expression of type %2|boolean expression}3 is always %select{false|true}4"}}, [f]={{nil,x,{"result of comparison of ",{"constant A",gc,ec}," with ",{"expression of type C","boolean expression"}," is always E"}},{gb,nil,{"comparison of ",{"constant A",gc,ec}," with ",{"expression of type C","boolean expression"}," is always ",{ec,gc}}}}, [e]=j, [a]="result of comparison of (?:constant (.*?)|true|false) with (?:expression of type (.*?)|boolean expression) is always (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wtautological\\-constant\\-out\\-of\\-range\\-compare[^\\]]*\\]", [i]=o, [d]={"2f4e33aba231",1348169801,"Improvements to my patch in r164143 per","Improvements to my patch in r164143 per\nRichard\'s comments. // rdar://12202422\n\nllvm-svn: 164316"}, [g]={{E,13737,"static int classifyConstantValue(Expr *Constant) {\n // ...\n // diag::warn_out_of_range_compare and diag::warn_tautological_bool_compare."},{E,13878,"static bool CheckTautologicalComparison(Sema &S, BinaryOperator *E, Expr *Constant, Expr *Other, const llvm::APSInt &Value, bool RhsConstant) {\n // ...\n // FIXME: We use a somewhat different formatting for the in-range cases and\n // cases involving boolean values for historical reasons. We should pick a\n // consistent way of presenting these diagnostics.\n if (!InRange || Other->isKnownToHaveBooleanValue()) {\n S.DiagRuntimeBehavior(E->getOperatorLoc(), E, S.PDiag(!InRange ? diag::warn_out_of_range_compare : diag::warn_tautological_bool_compare) << OS.str() << classifyConstantValue(Constant) << OtherT << OtherIsBooleanDespiteType << *Result << E->getLHS()->getSourceRange() << E->getRHS()->getSourceRange());"}}, [m]={ ["clang/test/Sema/outof-range-constant-compare.c"]={"clang/test/Sema/outof-range-constant-compare.c:10:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:12:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:14:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:16:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:18:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:20:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:23:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:25:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:27:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:29:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:31:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:33:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:35:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:37:11: warning: result of comparison of constant -1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:39:11: warning: result of comparison of constant -1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:41:11: warning: result of comparison of constant -1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:43:11: warning: result of comparison of constant -1311768465173141112 with expression of type \'int\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:45:11: warning: result of comparison of constant -1311768465173141112 with expression of type \'int\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:53:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:55:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:57:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:59:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:61:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:63:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:66:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:68:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:70:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:72:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always false [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:74:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:76:29: warning: result of comparison of constant 1311768465173141112 with expression of type \'short\' is always true [-Wtautological-constant-out-of-range-compare]","clang/test/Sema/outof-range-constant-compare.c:113:11: warning: result of comparison of constant 1311768465173141112 with expression of type \'enum E\' is always false [-Wtautological-constant-out-of-range-compare]"} } }, ["warn_overaligned_type"]={ [k]={"over-aligned"}, [l]="over-aligned", [h]="warn_overaligned_type", [b]="type %0 requires %1 bytes of alignment and the default allocator only guarantees %2 bytes", [f]="type A requires B bytes of alignment and the default allocator only guarantees C bytes", [e]=j, [a]="type (.*?) requires (.*?) bytes of alignment and the default allocator only guarantees (.*?) bytes", [c]=" \\[(?:\\-Werror,)?\\-Wover\\-aligned[^\\]]*\\]", [i]=o, [d]={"411fc65b4566",1327439741,"Add a new warning, -Wover-aligned, which detects attempts to use the default","Add a new warning, -Wover-aligned, which detects attempts to use the default\nallocator to construct an object which declares more alignment than the default\nallocator actually provides. Fixes PR9527!\n\nllvm-svn: 148857"}, [g]={{"clang/lib/Sema/SemaExprCXX.cpp",2364,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n // ...\n if (OperatorNew) {\n // ...\n // Warn if the type is over-aligned and is being allocated by (unaligned)\n // global operator new.\n if (PlacementArgs.empty() && !PassAlignment && (OperatorNew->isImplicit() || (OperatorNew->getBeginLoc().isValid() && getSourceManager().isInSystemHeader(OperatorNew->getBeginLoc())))) {\n if (Alignment > NewAlignment)\n Diag(StartLoc, diag::warn_overaligned_type) << AllocType << unsigned(Alignment / Context.getCharWidth()) << unsigned(NewAlignment / Context.getCharWidth());"}}, [m]={ ["clang/test/SemaCXX/warn-new-overaligned.cpp"]={"clang/test/SemaCXX/warn-new-overaligned.cpp:16:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]","clang/test/SemaCXX/warn-new-overaligned.cpp:17:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]","clang/test/SemaCXX/warn-new-overaligned.cpp:33:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]","clang/test/SemaCXX/warn-new-overaligned.cpp:34:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]","clang/test/SemaCXX/warn-new-overaligned.cpp:56:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]","clang/test/SemaCXX/warn-new-overaligned.cpp:77:3: warning: type \'Test\' requires 256 bytes of alignment and the default allocator only guarantees 16 bytes [-Wover-aligned]"} } }, ["warn_overloaded_shift_in_comparison"]={ [k]={u,v,"overloaded-shift-op-parentheses",Vb}, [l]="overloaded-shift-op-parentheses", [h]="warn_overloaded_shift_in_comparison", [b]="overloaded operator %select{>>|<<}0 has higher precedence than comparison operator", [f]={{nil,nil,{"overloaded operator ",{">>","<<"}," has higher precedence than comparison operator"}}}, [e]=j, [a]="overloaded operator (?:\\>\\>|\\<\\<) has higher precedence than comparison operator", [c]=" \\[(?:\\-Werror,)?\\-Woverloaded\\-shift\\-op\\-parentheses[^\\]]*\\]", [i]=o, [d]={"fe042e6aab26",1366164765,"Add warning group -Woverloaded-shift-op-parentheses to -Wparentheses. This","Add warning group -Woverloaded-shift-op-parentheses to -Wparentheses. This\nwill fire on code such as:\n\n cout << x == 0;\n\nwhich the compiler will intrepret as\n\n (cout << x) == 0;\n\nThis warning comes with two fixits attached to notes, one for parentheses to\nsilence the warning, and another to evaluate the comparison first.\n\nllvm-svn: 179662"}, [g]={{I,15870,"static void DiagnoseShiftCompare(Sema &S, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n S.Diag(OpLoc, diag::warn_overloaded_shift_in_comparison) << LHSExpr->getSourceRange() << RHSExpr->getSourceRange() << (Kind == OO_LessLess);"}}, [m]={ ["clang/test/Parser/cxx2a-spaceship.cpp"]={"clang/test/Parser/cxx2a-spaceship.cpp:13:21: warning: overloaded operator << has higher precedence than comparison operator [-Woverloaded-shift-op-parentheses]","clang/test/Parser/cxx2a-spaceship.cpp:17:21: warning: overloaded operator << has higher precedence than comparison operator [-Woverloaded-shift-op-parentheses]"} } }, ["warn_overloaded_virtual"]={ [k]={u,v,w,"overloaded-virtual"}, [l]="overloaded-virtual", [h]="warn_overloaded_virtual", [b]="%q0 hides overloaded virtual %select{function|functions}1", [f]={{nil,nil,{"A hides overloaded virtual ",{Yb,"functions"}}}}, [e]=j, [a]="(.*?) hides overloaded virtual (?:function|functions)", [c]=" \\[(?:\\-Werror,)?\\-Woverloaded\\-virtual[^\\]]*\\]", [i]=o, [d]={"7272d9cf36cd",1296756075,"Implement -Woverloaded-virtual.","Implement -Woverloaded-virtual.\n\nThe difference with gcc is that it warns if you overload virtual methods only if\nthe method doesn\'t also override any method. This is to cut down on the number of warnings\nand make it more useful like reported here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20423.\nIf we want to warn that not all overloads are overriden we can have an additional\nwarning like -Wpartial-override.\n\n-Woverloaded-virtual, unlike gcc, is added to -Wmost. Addresses rdar://8757630.\n\nllvm-svn: 124805"}, [g]={{Nb,10284,"/// Diagnose methods which overload virtual methods in a base class\n/// without overriding any.\nvoid Sema::DiagnoseHiddenVirtualMethods(CXXMethodDecl *MD) {\n // ...\n if (Diags.isIgnored(diag::warn_overloaded_virtual, MD->getLocation()))"},{Nb,10290,"/// Diagnose methods which overload virtual methods in a base class\n/// without overriding any.\nvoid Sema::DiagnoseHiddenVirtualMethods(CXXMethodDecl *MD) {\n // ...\n if (!OverloadedMethods.empty()) {\n Diag(MD->getLocation(), diag::warn_overloaded_virtual) << MD << (OverloadedMethods.size() > 1);"}}, [m]={ ["clang/test/SemaCXX/warn-overloaded-virtual.cpp"]={"clang/test/SemaCXX/warn-overloaded-virtual.cpp:9:8: warning: \'S1::foo\' hides overloaded virtual functions [-Woverloaded-virtual]","clang/test/SemaCXX/warn-overloaded-virtual.cpp:21:17: warning: \'MS1::foo\' hides overloaded virtual functions [-Woverloaded-virtual]","clang/test/SemaCXX/warn-overloaded-virtual.cpp:137:17: warning: \'(anonymous namespace)::B::foo\' hides overloaded virtual functions [-Woverloaded-virtual]"} } }, ["warn_overriding_method_missing_noescape"]={ [k]={"missing-noescape"}, [l]="missing-noescape", [h]={{nil,x,"warn_overriding_method_missing_noescape"}}, [b]={{nil,x,"parameter of overriding method should be annotated with __attribute__((noescape))"}}, [f]={{nil,x,"parameter of overriding method should be annotated with __attribute__((noescape))"}}, [e]=j, [a]="parameter of overriding method should be annotated with __attribute__\\(\\(noescape\\)\\)", [c]=" \\[(?:\\-Werror,)?\\-Wmissing\\-noescape[^\\]]*\\]", [i]={{nil,x,o}}, [d]={"fc587e6a5707",1505888571,"Add support for attribute \'noescape\'.","Add support for attribute \'noescape\'.\n\nThe attribute informs the compiler that the annotated pointer parameter\nof a function cannot escape and enables IRGen to attach attribute\n\'nocapture\' to parameters that are annotated with the attribute. That is\nthe only optimization that currently takes advantage of \'noescape\', but\nthere are other optimizations that will be added later that improves\nIRGen for ObjC blocks.\n\nrdar://problem/19886775\n\nDifferential Revision: https://reviews.llvm.org/D32520\n\nllvm-svn: 313720"}, [g]={{Nb,17983,"bool Sema::CheckOverridingFunctionAttributes(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n if (OldFT->hasExtParameterInfos()) {\n for (unsigned I = 0, E = OldFT->getNumParams(); I != E; ++I)\n // A parameter of the overriding method should be annotated with noescape\n // if the corresponding parameter of the overridden method is annotated.\n if (OldFT->getExtParameterInfo(I).isNoEscape() && !NewFT->getExtParameterInfo(I).isNoEscape()) {\n Diag(New->getParamDecl(I)->getLocation(), diag::warn_overriding_method_missing_noescape);"},{vb,118,"/// Issue a warning if the parameter of the overridden method is non-escaping\n/// but the parameter of the overriding method is not.\nstatic bool diagnoseNoescape(const ParmVarDecl *NewD, const ParmVarDecl *OldD, Sema &S) {\n if (OldD->hasAttr<NoEscapeAttr>() && !NewD->hasAttr<NoEscapeAttr>()) {\n S.Diag(NewD->getLocation(), diag::warn_overriding_method_missing_noescape);"}}, [m]={ ["clang/test/SemaObjCXX/noescape.mm"]={"clang/test/SemaObjCXX/noescape.mm:42:16: warning: parameter of overriding method should be annotated with __attribute__((noescape)) [-Wmissing-noescape]","clang/test/SemaObjCXX/noescape.mm:69:19: warning: parameter of overriding method should be annotated with __attribute__((noescape)) [-Wmissing-noescape]","clang/test/SemaObjCXX/noescape.mm:123:19: warning: parameter of overriding method should be annotated with __attribute__((noescape)) [-Wmissing-noescape]","clang/test/SemaObjCXX/noescape.mm:133:19: warning: parameter of overriding method should be annotated with __attribute__((noescape)) [-Wmissing-noescape]"} } }, ["warn_padded_struct_anon_field"]={ [k]={Wb}, [l]=Wb, [h]="warn_padded_struct_anon_field", [b]="padding %select{struct|interface|class}0 %1 with %2 %select{byte|bit}3%s2 to align anonymous bit-field", [f]={{nil,nil,{"padding ",{"struct","interface",Hb}," B with C ",{"byte","bit"},"C to align anonymous bit-field"}}}, [e]=j, [a]="padding (?:struct|interface|class) (.*?) with (.*?) (?:byte|bit)(.*?) to align anonymous bit\\-field", [c]=" \\[(?:\\-Werror,)?\\-Wpadded[^\\]]*\\]", [i]={{nil,K,O},{zb,nil,o}}, [d]={"ca0d0cd3b993",1285165944,"Implement -Wpadded and -Wpacked.","Implement -Wpadded and -Wpacked.\n\n-Wpadded warns when undesired padding is introduced in a struct. (rdar://7469556)\n-Wpacked warns if a struct is given the packed attribute, but the packed attribute has no effect\n on the layout or the size of the struct. Such structs may be mis-aligned for little benefit.\n\nThe warnings are emitted at the point where layout is calculated, that is at RecordLayoutBuilder.\nTo avoid calculating the layouts of all structs regardless of whether they are needed or not,\nI let the layouts be lazily constructed when needed. This has the disadvantage that the above warnings\nwill be emitted only when they are used for IR gen, and not e.g with -fsyntax-only:\n\n$ cat t.c\nstruct S {\n char c;\n int i;\n};\nvoid f(struct S* s) {}\n\n$ clang -fsyntax-only -Wpadded t.c\n$ clang -c -Wpadded t.c -o t.o\nt.c:3:7: warning: padding struct \'struct S\' with 3 bytes to align \'i\' [-Wpadded]\n int i;\n ^\n1 warning generated.\n\nThis is a good tradeoff between providing the warnings and not calculating layouts for all\nstructs in case the user has enabled a couple of rarely used warnings.\n\nllvm-svn: 114544"}, [g]={{"clang/lib/AST/RecordLayoutBuilder.cpp",2309,"void ItaniumRecordLayoutBuilder::CheckFieldPadding(uint64_t Offset, uint64_t UnpaddedOffset, uint64_t UnpackedOffset, unsigned UnpackedAlign, bool isPacked, const FieldDecl *D) {\n // ...\n // Warn if padding was introduced to the struct/class.\n if (!IsUnion && Offset > UnpaddedOffset) {\n // ...\n if (D->getIdentifier())\n // ...\n else\n Diag(D->getLocation(), diag::warn_padded_struct_anon_field) << getPaddingDiagFromTagKind(D->getParent()->getTagKind()) << Context.getTypeDeclType(D->getParent()) << PadSize << (InBits ? 1 : 0); // (byte|bit)"}} }, ["warn_padded_struct_field"]={ [k]={Wb}, [l]=Wb, [h]="warn_padded_struct_field", [b]="padding %select{struct|interface|class}0 %1 with %2 %select{byte|bit}3%s2 to align %4", [f]={{nil,nil,{"padding ",{"struct","interface",Hb}," B with C ",{"byte","bit"},"C to align E"}}}, [e]=j, [a]="padding (?:struct|interface|class) (.*?) with (.*?) (?:byte|bit)(.*?) to align (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wpadded[^\\]]*\\]", [i]={{nil,K,O},{zb,nil,o}}, [d]={"ca0d0cd3b993",1285165944,"Implement -Wpadded and -Wpacked.","Implement -Wpadded and -Wpacked.\n\n-Wpadded warns when undesired padding is introduced in a struct. (rdar://7469556)\n-Wpacked warns if a struct is given the packed attribute, but the packed attribute has no effect\n on the layout or the size of the struct. Such structs may be mis-aligned for little benefit.\n\nThe warnings are emitted at the point where layout is calculated, that is at RecordLayoutBuilder.\nTo avoid calculating the layouts of all structs regardless of whether they are needed or not,\nI let the layouts be lazily constructed when needed. This has the disadvantage that the above warnings\nwill be emitted only when they are used for IR gen, and not e.g with -fsyntax-only:\n\n$ cat t.c\nstruct S {\n char c;\n int i;\n};\nvoid f(struct S* s) {}\n\n$ clang -fsyntax-only -Wpadded t.c\n$ clang -c -Wpadded t.c -o t.o\nt.c:3:7: warning: padding struct \'struct S\' with 3 bytes to align \'i\' [-Wpadded]\n int i;\n ^\n1 warning generated.\n\nThis is a good tradeoff between providing the warnings and not calculating layouts for all\nstructs in case the user has enabled a couple of rarely used warnings.\n\nllvm-svn: 114544"}, [g]={{"clang/lib/AST/RecordLayoutBuilder.cpp",2302,"void ItaniumRecordLayoutBuilder::CheckFieldPadding(uint64_t Offset, uint64_t UnpaddedOffset, uint64_t UnpackedOffset, unsigned UnpackedAlign, bool isPacked, const FieldDecl *D) {\n // ...\n // Warn if padding was introduced to the struct/class.\n if (!IsUnion && Offset > UnpaddedOffset) {\n // ...\n if (D->getIdentifier())\n Diag(D->getLocation(), diag::warn_padded_struct_field) << getPaddingDiagFromTagKind(D->getParent()->getTagKind()) << Context.getTypeDeclType(D->getParent()) << PadSize << (InBits ? 1 : 0) // (byte|bit)"}}, [m]={ ["clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp"]={"clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:11:9: warning: padding struct \'S1\' with 1 byte to align \'s\' [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:12:8: warning: padding struct \'S1\' with 4 bytes to align \'l\' [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:35:5: warning: padding struct \'S5\' with 3 bytes to align \'u\' [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:52:7: warning: padding struct \'S8\' with 3 bytes to align \'i\' [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:73:8: warning: padding struct \'S12\' with 7 bits to align \'c\' [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:147:17: warning: padding struct \'S26\' with 7 bits to align \'b\' [-Wpadded]"} } }, ["warn_padded_struct_size"]={ [k]={Wb}, [l]=Wb, [h]="warn_padded_struct_size", [b]="padding size of %0 with %1 %select{byte|bit}2%s1 to alignment boundary", [f]={{nil,nil,{"padding size of A with B ",{"byte","bit"},"B to alignment boundary"}}}, [e]=j, [a]="padding size of (.*?) with (.*?) (?:byte|bit)(.*?) to alignment boundary", [c]=" \\[(?:\\-Werror,)?\\-Wpadded[^\\]]*\\]", [i]={{nil,K,O},{zb,nil,o}}, [d]={"ca0d0cd3b993",1285165944,"Implement -Wpadded and -Wpacked.","Implement -Wpadded and -Wpacked.\n\n-Wpadded warns when undesired padding is introduced in a struct. (rdar://7469556)\n-Wpacked warns if a struct is given the packed attribute, but the packed attribute has no effect\n on the layout or the size of the struct. Such structs may be mis-aligned for little benefit.\n\nThe warnings are emitted at the point where layout is calculated, that is at RecordLayoutBuilder.\nTo avoid calculating the layouts of all structs regardless of whether they are needed or not,\nI let the layouts be lazily constructed when needed. This has the disadvantage that the above warnings\nwill be emitted only when they are used for IR gen, and not e.g with -fsyntax-only:\n\n$ cat t.c\nstruct S {\n char c;\n int i;\n};\nvoid f(struct S* s) {}\n\n$ clang -fsyntax-only -Wpadded t.c\n$ clang -c -Wpadded t.c -o t.o\nt.c:3:7: warning: padding struct \'struct S\' with 3 bytes to align \'i\' [-Wpadded]\n int i;\n ^\n1 warning generated.\n\nThis is a good tradeoff between providing the warnings and not calculating layouts for all\nstructs in case the user has enabled a couple of rarely used warnings.\n\nllvm-svn: 114544"}, [g]={{"clang/lib/AST/RecordLayoutBuilder.cpp",2196,"void ItaniumRecordLayoutBuilder::FinishLayout(const NamedDecl *D) {\n // ...\n if (const RecordDecl *RD = dyn_cast<RecordDecl>(D)) {\n // Warn if padding was introduced to the struct/class/union.\n if (getSizeInBits() > UnpaddedSize) {\n // ...\n Diag(RD->getLocation(), diag::warn_padded_struct_size) << Context.getTypeDeclType(RD) << PadSize << (InBits ? 1 : 0); // (byte|bit)"}}, [m]={ ["clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp"]={"clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:15:8: warning: padding size of \'S2\' with 3 bytes to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:38:8: warning: padding size of \'S6\' with 30 bits to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:42:8: warning: padding size of \'S7\' with 7 bytes to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:76:8: warning: padding size of \'S13\' with 6 bits to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:90:8: warning: padding size of \'S16\' with 2 bytes to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:99:8: warning: padding size of \'S18\' with 2 bytes to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:114:8: warning: padding size of \'S21\' with 4 bits to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:124:8: warning: padding size of \'S23\' with 4 bits to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:140:8: warning: padding size of \'S25\' with 7 bits to alignment boundary [-Wpadded]","clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp:150:8: warning: padding size of \'S27\' with 7 bits to alignment boundary [-Wpadded]"} } }, ["warn_param_mismatched_alignment"]={ [k]={"align-mismatch"}, [l]="align-mismatch", [h]={{nil,H,"warn_param_mismatched_alignment"}}, [b]={{nil,F,"passing %0-byte aligned argument to %1-byte aligned parameter %2%select{| of %4}3 may result in an unaligned pointer access"},{H,H,"passing %0-byte aligned argument to %1-byte aligned parameter %2 of %3 may result in an unaligned pointer access"}}, [f]={{nil,F,{"passing A-byte aligned argument to B-byte aligned parameter C",{T," of E"}," may result in an unaligned pointer access"}},{H,H,"passing A-byte aligned argument to B-byte aligned parameter C of D may result in an unaligned pointer access"}}, [e]=j, [a]="passing (.*?)\\-byte aligned argument to (.*?)\\-byte aligned parameter (.*?)(?:| of (.*?)) may result in an unaligned pointer access", [c]=" \\[(?:\\-Werror,)?\\-Walign\\-mismatch[^\\]]*\\]", [i]={{nil,H,o}}, [d]={"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"}, [g]={{E,6643,"/// Warn if a pointer or reference argument passed to a function points to an\n/// object that is less aligned than the parameter. This can happen when\n/// creating a typedef with a lower alignment than the original type and then\n/// calling functions defined in terms of the original type.\nvoid Sema::CheckArgAlignment(SourceLocation Loc, NamedDecl *FDecl, StringRef ParamName, QualType ArgTy, QualType ParamTy) {\n // ...\n // If the argument is less aligned than the parameter, there is a\n // potential alignment issue.\n if (ArgAlign < ParamAlign)\n Diag(Loc, diag::warn_param_mismatched_alignment) << (int)ArgAlign.getQuantity() << (int)ParamAlign.getQuantity() << ParamName << (FDecl != nullptr) << FDecl;"}}, [m]={ ["clang/test/Sema/aix-attr-aligned-vector-warn.c"]={"clang/test/Sema/aix-attr-aligned-vector-warn.c:14:17: warning: passing 8-byte aligned argument to 16-byte aligned parameter 1 of \'escape\' may result in an unaligned pointer access [-Walign-mismatch]"} } }, ["warn_param_return_typestate_mismatch"]={ [k]={"consumed"}, [l]="consumed", [h]="warn_param_return_typestate_mismatch", [b]="parameter \'%0\' not in expected state when the function returns: expected \'%1\', observed \'%2\'", [f]="parameter \'A\' not in expected state when the function returns: expected \'B\', observed \'C\'", [e]=j, [a]="parameter \'(.*?)\' not in expected state when the function returns\\: expected \'(.*?)\', observed \'(.*?)\'", [c]=" \\[(?:\\-Werror,)?\\-Wconsumed[^\\]]*\\]", [i]=o, [d]={"36ea1dd4fc5e",1382050384,"Consumed Analysis: Allow parameters that are passed by non-const reference","Consumed Analysis: Allow parameters that are passed by non-const reference\nto be treated as return values, and marked with the \"returned_typestate\"\nattribute. Patch by chris.wailes@gmail.com; reviewed by delesley@google.com.\n\nllvm-svn: 192932"}, [g]={{Tb,2104,"class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {\n // ...\n void warnParamReturnTypestateMismatch(SourceLocation Loc, StringRef VariableName, StringRef ExpectedState, StringRef ObservedState) override {\n PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_param_return_typestate_mismatch) << VariableName << ExpectedState << ObservedState);"}}, [m]={ ["clang/test/SemaCXX/warn-consumed-analysis.cpp"]={"clang/test/SemaCXX/warn-consumed-analysis.cpp:425:6: warning: parameter \'Param\' not in expected state when the function returns: expected \'unconsumed\', observed \'consumed\' [-Wconsumed]","clang/test/SemaCXX/warn-consumed-analysis.cpp:429:5: warning: parameter \'Param\' not in expected state when the function returns: expected \'unconsumed\', observed \'consumed\' [-Wconsumed]"} } }, ["warn_param_typestate_mismatch"]={ [k]={"consumed"}, [l]="consumed", [h]="warn_param_typestate_mismatch", [b]="argument not in expected state; expected \'%0\', observed \'%1\'", [f]="argument not in expected state; expected \'A\', observed \'B\'", [e]=j, [a]="argument not in expected state; expected \'(.*?)\', observed \'(.*?)\'", [c]=" \\[(?:\\-Werror,)?\\-Wconsumed[^\\]]*\\]", [i]=o, [d]={"6939177ceab8",1382052233,"Consumed analysis: Add param_typestate attribute, which specifies that","Consumed analysis: Add param_typestate attribute, which specifies that\nfunction parameters must be in a particular state. Patch by\nchris.wailes@gmail.com. Reviewed by delesley@google.com.\n\nllvm-svn: 192934"}, [g]={{Tb,2114,"class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {\n // ...\n void warnParamTypestateMismatch(SourceLocation Loc, StringRef ExpectedState, StringRef ObservedState) override {\n PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_param_typestate_mismatch) << ExpectedState << ObservedState);"}}, [m]={ ["clang/test/SemaCXX/warn-consumed-analysis.cpp"]={"clang/test/SemaCXX/warn-consumed-analysis.cpp:458:34: warning: argument not in expected state; expected \'consumed\', observed \'unconsumed\' [-Wconsumed]","clang/test/SemaCXX/warn-consumed-analysis.cpp:476:15: warning: argument not in expected state; expected \'unconsumed\', observed \'consumed\' [-Wconsumed]","clang/test/SemaCXX/warn-consumed-analysis.cpp:477:32: warning: argument not in expected state; expected \'unconsumed\', observed \'consumed\' [-Wconsumed]","clang/test/SemaCXX/warn-consumed-analysis.cpp:479:22: warning: argument not in expected state; expected \'unconsumed\', observed \'consumed\' [-Wconsumed]","clang/test/SemaCXX/warn-consumed-analysis.cpp:480:9: warning: argument not in expected state; expected \'unconsumed\', observed \'consumed\' [-Wconsumed]","clang/test/SemaCXX/warn-consumed-analysis.cpp:481:9: warning: argument not in expected state; expected \'unconsumed\', observed \'consumed\' [-Wconsumed]"} } }, ["warn_parameter_size"]={ [k]={"large-by-value-copy"}, [l]="large-by-value-copy", [h]="warn_parameter_size", [b]="%0 is a large (%1 bytes) pass-by-value argument; pass it by reference instead ?", [f]="A is a large (B bytes) pass-by-value argument; pass it by reference instead ?", [e]=j, [a]="(.*?) is a large \\((.*?) bytes\\) pass\\-by\\-value argument; pass it by reference instead \\?", [c]=" \\[(?:\\-Werror,)?\\-Wlarge\\-by\\-value\\-copy[^\\]]*\\]", [i]=o, [d]={"af84ec0a9612",1290035514,"Introduce option -Wargument-larger-than[=N] which warns about function definitions if they take by-v...","Introduce option -Wargument-larger-than[=N] which warns about function definitions if they take by-value\nor return by-value any POD that is larger than some threshold (default is 64 bytes).\n\nImplements rdar://8548050.\n\nllvm-svn: 119583"}, [g]={{xb,14881,"void Sema::DiagnoseSizeOfParametersAndReturnValue(ArrayRef<ParmVarDecl *> Parameters, QualType ReturnTy, NamedDecl *D) {\n // ...\n // Warn if any parameter is pass-by-value and larger than the specified\n // threshold.\n for (const ParmVarDecl *Parameter : Parameters) {\n // ...\n if (Size > LangOpts.NumLargeByValueCopy)\n Diag(Parameter->getLocation(), diag::warn_parameter_size) << Parameter << Size;"}}, [m]={ ["clang/test/SemaCXX/warn-large-by-value-copy.cpp"]={"clang/test/SemaCXX/warn-large-by-value-copy.cpp:16:16: warning: \'s\' is a large (101 bytes) pass-by-value argument; pass it by reference instead ? [-Wlarge-by-value-copy]","clang/test/SemaCXX/warn-large-by-value-copy.cpp:19:29: warning: \'\' is a large (101 bytes) pass-by-value argument; pass it by reference instead ? [-Wlarge-by-value-copy]","clang/test/SemaCXX/warn-large-by-value-copy.cpp:24:35: warning: \'\' is a large (101 bytes) pass-by-value argument; pass it by reference instead ? [-Wlarge-by-value-copy]","clang/test/SemaCXX/warn-large-by-value-copy.cpp:43:18: warning: \'ts\' is a large (300 bytes) pass-by-value argument; pass it by reference instead ? [-Wlarge-by-value-copy]"} } }, ["warn_parens_disambiguated_as_function_declaration"]={ [k]={"vexing-parse"}, [l]="vexing-parse", [h]="warn_parens_disambiguated_as_function_declaration", [b]="parentheses were disambiguated as a function declaration", [f]="parentheses were disambiguated as a function declaration", [e]=j, [a]="parentheses were disambiguated as a function declaration", [c]=" \\[(?:\\-Werror,)?\\-Wvexing\\-parse[^\\]]*\\]", [i]=o, [d]={"943c44045551",1343683852,"Improvements to vexing-parse warnings. Make the no-parameters case more","Improvements to vexing-parse warnings. Make the no-parameters case more\naccurate by asking the parser whether there was an ambiguity rather than trying\nto reverse-engineer it from the DeclSpec. Make the with-parameters case have\nbetter diagnostics by using semantic information to drive the warning,\nimproving the diagnostics and adding a fixit.\n\nPatch by Nikola Smiljanic. Some minor changes by me to suppress diagnostics for\ndeclarations of the form \'T (*x)(...)\', which seem to have a very high false\npositive rate, and to reduce indentation in \'warnAboutAmbiguousFunction\'.\n\nllvm-svn: 160998"}, [g]={{nb,3860,"/// Produce an appropriate diagnostic for an ambiguity between a function\n/// declarator and a C++ direct-initializer.\nstatic void warnAboutAmbiguousFunction(Sema &S, Declarator &D, DeclaratorChunk &DeclType, QualType RT) {\n // ...\n S.Diag(DeclType.Loc, FTI.NumParams ? diag::warn_parens_disambiguated_as_function_declaration : diag::warn_empty_parens_are_function_decl) << ParenRange;"}}, [m]={ ["clang/test/SemaCXX/dcl_ambig_res.cpp"]={"clang/test/SemaCXX/dcl_ambig_res.cpp:16:6: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]","clang/test/SemaCXX/dcl_ambig_res.cpp:18:7: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]","clang/test/SemaCXX/dcl_ambig_res.cpp:73:8: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]"} } }, ["warn_parens_disambiguated_as_variable_declaration"]={ [k]={"vexing-parse"}, [l]="vexing-parse", [h]={{nil,x,"warn_parens_disambiguated_as_variable_declaration"}}, [b]={{nil,x,"parentheses were disambiguated as redundant parentheses around declaration of variable named %0"}}, [f]={{nil,x,"parentheses were disambiguated as redundant parentheses around declaration of variable named A"}}, [e]=j, [a]="parentheses were disambiguated as redundant parentheses around declaration of variable named (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wvexing\\-parse[^\\]]*\\]", [i]={{nil,x,o}}, [d]={"ac63d63543ca",1506729445,"Add a \"vexing parse\" warning for ambiguity between a variable declaration and a","Add a \"vexing parse\" warning for ambiguity between a variable declaration and a\nfunction-style cast.\n\nThis fires for cases such as\n\n T(x);\n\n... where \'x\' was previously declared and T is a type. This construct declares\na variable named \'x\' rather than the (probably expected) interpretation of a\nfunction-style cast of \'x\' to T.\n\nllvm-svn: 314570"}, [g]={{nb,4022,"/// Produce an appropriate diagnostic for a declarator with top-level\n/// parentheses.\nstatic void warnAboutRedundantParens(Sema &S, Declarator &D, QualType T) {\n // ...\n S.Diag(Paren.Loc, diag::warn_parens_disambiguated_as_variable_declaration) << ParenRange << D.getIdentifier();"}}, [m]={ ["clang/test/Parser/cxx0x-condition.cpp"]={"clang/test/Parser/cxx0x-condition.cpp:17:8: warning: parentheses were disambiguated as redundant parentheses around declaration of variable named \'a\' [-Wvexing-parse]","clang/test/Parser/cxx0x-condition.cpp:21:8: warning: parentheses were disambiguated as redundant parentheses around declaration of variable named \'n\' [-Wvexing-parse]"} } }, ["warn_pass_class_arg_to_vararg"]={ [k]={"class-varargs"}, [l]="class-varargs", [h]="warn_pass_class_arg_to_vararg", [b]="passing object of class type %0 through variadic %select{function|block|method|constructor}1%select{|; did you mean to call \'%3\'?}2", [f]={{nil,nil,{"passing object of class type A through variadic ",{Yb,"block","method","constructor"},{T,"; did you mean to call \'D\'?"}}}}, [e]=j, [a]="passing object of class type (.*?) through variadic (?:function|block|method|constructor)(?:|; did you mean to call \'(.*?)\'\\?)", [c]=" \\[(?:\\-Werror,)?\\-Wclass\\-varargs[^\\]]*\\]", [i]=o, [d]={"2868a736f88e",1393551399,"Add a -Wclass-varargs to warn on objects of any class type being passed through an ellipsis. Since C...","Add a -Wclass-varargs to warn on objects of any class type being passed through an ellipsis. Since C++11 relaxed the rules on this, we allow a lot more bad code through silently, such as:\n\n const char *format = \"%s\";\n std::experimental::string_view view = \"foo\";\n printf(format, view);\n\nIn this case, not only warn about a class type being used here, but also suggest that calling c_str() might be a good idea.\n\nllvm-svn: 202461"}, [g]={{I,1005,"void Sema::checkVariadicArgument(const Expr *E, VariadicCallType CT) {\n // ...\n case VAK_Valid:\n if (Ty->isRecordType()) {\n // ...\n DiagRuntimeBehavior(E->getBeginLoc(), nullptr, PDiag(diag::warn_pass_class_arg_to_vararg) << Ty << CT << hasCStrMethod(E) << \".c_str()\");"}}, [m]={ ["clang/test/SemaCXX/vararg-class.cpp"]={"clang/test/SemaCXX/vararg-class.cpp:15:5: warning: passing object of class type \'A\' through variadic function [-Wclass-varargs]","clang/test/SemaCXX/vararg-class.cpp:17:5: warning: passing object of class type \'C\' through variadic function; did you mean to call \'.c_str()\'? [-Wclass-varargs]","clang/test/SemaCXX/vararg-class.cpp:18:5: warning: passing object of class type \'D\' through variadic function; did you mean to call \'.c_str()\'? [-Wclass-varargs]","clang/test/SemaCXX/vararg-class.cpp:19:5: warning: passing object of class type \'E\' through variadic function [-Wclass-varargs]","clang/test/SemaCXX/vararg-class.cpp:20:5: warning: passing object of class type \'F\' through variadic function; did you mean to call \'.c_str()\'? [-Wclass-varargs]"} } }, ["warn_pessimizing_move_on_initialization"]={ [k]={u,v,w,"move","pessimizing-move"}, [l]="pessimizing-move", [h]="warn_pessimizing_move_on_initialization", [b]="moving a temporary object prevents copy elision", [f]="moving a temporary object prevents copy elision", [e]=j, [a]="moving a temporary object prevents copy elision", [c]=" \\[(?:\\-Werror,)?\\-Wpessimizing\\-move[^\\]]*\\]", [i]=o, [d]={"ac3eca536d3d",1430272337,"Add -Wpessimizing-move and -Wredundant-move warnings.","Add -Wpessimizing-move and -Wredundant-move warnings.\n\n-Wpessimizing-move warns when a call to std::move would prevent copy elision\nif the argument was not wrapped in a call. This happens when moving a local\nvariable in a return statement when the variable is the same type as the\nreturn type or using a move to create a new object from a temporary object.\n\n-Wredundant-move warns when an implicit move would already be made, so the\nstd::move call is not needed, such as when moving a local variable in a return\nthat is different from the return type.\n\nDifferential Revision: http://reviews.llvm.org/D7633\n\nllvm-svn: 236075"}, [g]={{Pb,8407,"/// Provide warnings when std::move is used on construction.\nstatic void CheckMoveOnConstruction(Sema &S, const Expr *InitExpr, bool IsReturnStmt) {\n // ...\n if (IsReturnStmt) {\n // ...\n } else {\n DiagID = diag::warn_pessimizing_move_on_initialization;"}}, [m]={ ["clang/test/SemaCXX/warn-pessmizing-move.cpp"]={"clang/test/SemaCXX/warn-pessmizing-move.cpp:62:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:67:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:89:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:94:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:105:9: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:110:9: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:121:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:127:8: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:133:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:139:8: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:147:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:152:10: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:157:11: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:162:11: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]"} } }, ["warn_pessimizing_move_on_return"]={ [k]={u,v,w,"move","pessimizing-move"}, [l]="pessimizing-move", [h]="warn_pessimizing_move_on_return", [b]="moving a local object in a return statement prevents copy elision", [f]="moving a local object in a return statement prevents copy elision", [e]=j, [a]="moving a local object in a return statement prevents copy elision", [c]=" \\[(?:\\-Werror,)?\\-Wpessimizing\\-move[^\\]]*\\]", [i]=o, [d]={"ac3eca536d3d",1430272337,"Add -Wpessimizing-move and -Wredundant-move warnings.","Add -Wpessimizing-move and -Wredundant-move warnings.\n\n-Wpessimizing-move warns when a call to std::move would prevent copy elision\nif the argument was not wrapped in a call. This happens when moving a local\nvariable in a return statement when the variable is the same type as the\nreturn type or using a move to create a new object from a temporary object.\n\n-Wredundant-move warns when an implicit move would already be made, so the\nstd::move call is not needed, such as when moving a local variable in a return\nthat is different from the return type.\n\nDifferential Revision: http://reviews.llvm.org/D7633\n\nllvm-svn: 236075"}, [g]={{Pb,8405,"/// Provide warnings when std::move is used on construction.\nstatic void CheckMoveOnConstruction(Sema &S, const Expr *InitExpr, bool IsReturnStmt) {\n // ...\n if (IsReturnStmt) {\n // ...\n // If we\'re returning a function parameter, copy elision\n // is not possible.\n if (isa<ParmVarDecl>(VD))\n // ...\n else\n DiagID = diag::warn_pessimizing_move_on_return;"}}, [m]={ ["clang/test/SemaCXX/warn-pessmizing-move.cpp"]={"clang/test/SemaCXX/warn-pessmizing-move.cpp:35:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:54:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:168:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:173:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:178:11: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:183:11: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:197:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:202:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:207:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:221:1: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:230:3: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]","clang/test/SemaCXX/warn-pessmizing-move.cpp:243:12: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]"} } }, ["warn_pointer_abs"]={ [k]={"absolute-value"}, [l]="absolute-value", [h]="warn_pointer_abs", [b]="taking the absolute value of %select{pointer|function|array}0 type %1 is suspicious", [f]={{nil,nil,{"taking the absolute value of ",{cc,Yb,"array"}," type B is suspicious"}}}, [e]=j, [a]="taking the absolute value of (?:pointer|function|array) type (.*?) is suspicious", [c]=" \\[(?:\\-Werror,)?\\-Wabsolute\\-value[^\\]]*\\]", [i]=o, [d]={"7f77eb90a54c",1447556674,"[Sema] Don\'t crash trying to diagnose abs called on a pointer type","[Sema] Don\'t crash trying to diagnose abs called on a pointer type\n\nClang tries to figure out if a call to abs is suspicious by looking\nthrough implicit casts to look at the underlying, implicitly converted\ntype.\nInterestingly, C has implicit conversions from pointer-ish types like\nfunction to less exciting types like int. This trips up our \'abs\'\nchecker because it doesn\'t know which variant of \'abs\' is appropriate.\n\nInstead, diagnose \'abs\' called on function types upfront. This sort of\nthing is highly suspicious and is likely indicative of a missing\npointer dereference/function call/array index operation.\n\nThis fixes PR25532.\n\nllvm-svn: 253156"}, [g]={{E,12041,"// Warn when using the wrong abs() function.\nvoid Sema::CheckAbsoluteValueFunction(const CallExpr *Call, const FunctionDecl *FDecl) {\n // ...\n // Taking the absolute value of a pointer is very suspicious, they probably\n // wanted to index into an array, dereference a pointer, call a function, etc.\n if (ArgType->isPointerType() || ArgType->canDecayToPointerType()) {\n // ...\n Diag(Call->getExprLoc(), diag::warn_pointer_abs) << DiagType << ArgType;"}}, [m]={ ["clang/test/Sema/warn-absolute-value.c"]={"clang/test/Sema/warn-absolute-value.c:784:10: warning: taking the absolute value of array type \'long long[1]\' is suspicious [-Wabsolute-value]","clang/test/Sema/warn-absolute-value.c:788:10: warning: taking the absolute value of pointer type \'long long (*)(void)\' is suspicious [-Wabsolute-value]","clang/test/Sema/warn-absolute-value.c:792:10: warning: taking the absolute value of pointer type \'void *\' is suspicious [-Wabsolute-value]","clang/test/Sema/warn-absolute-value.c:796:10: warning: taking the absolute value of function type \'long long (void)\' is suspicious [-Wabsolute-value]"} } }, ["warn_pointer_arith_null_ptr"]={ [k]={T,u,"extra","null-pointer-arithmetic"}, [l]="null-pointer-arithmetic", [h]={{nil,x,"warn_pointer_arith_null_ptr"}}, [b]={{nil,x,"performing pointer arithmetic on a null pointer has undefined behavior%select{| if the offset is nonzero}0"}}, [f]={{nil,x,{"performing pointer arithmetic on a null pointer has undefined behavior",{T," if the offset is nonzero"}}}}, [e]=j, [a]="performing pointer arithmetic on a null pointer has undefined behavior(?:| if the offset is nonzero)", [c]=" \\[(?:\\-Werror,)?\\-Wnull\\-pointer\\-arithmetic[^\\]]*\\]", [i]={{nil,x,o}}, [d]={"3d0a540857ed",1505852800,"Teach clang to tolerate the \'p = nullptr + n\' idiom used by glibc","Teach clang to tolerate the \'p = nullptr + n\' idiom used by glibc\n\nDifferential Revision: https://reviews.llvm.org/D37042\n\nllvm-svn: 313666"}, [g]={{I,11473,"/// Diagnose invalid arithmetic on a null pointer.\n///\n/// If \\p IsGNUIdiom is true, the operation is using the \'p = (i8*)nullptr + n\'\n/// idiom, which we recognize as a GNU extension.\n///\nstatic void diagnoseArithmeticOnNullPointer(Sema &S, SourceLocation Loc, Expr *Pointer, bool IsGNUIdiom) {\n if (IsGNUIdiom)\n // ...\n else\n S.Diag(Loc, diag::warn_pointer_arith_null_ptr) << S.getLangOpts().CPlusPlus << Pointer->getSourceRange();"}}, [m]={ ["clang/test/SemaCXX/nullptr-arithmetic.cpp"]={"clang/test/SemaCXX/nullptr-arithmetic.cpp:16:16: warning: performing pointer arithmetic on a null pointer has undefined behavior if the offset is nonzero [-Wnull-pointer-arithmetic]","clang/test/SemaCXX/nullptr-arithmetic.cpp:17:15: warning: performing pointer arithmetic on a null pointer has undefined behavior if the offset is nonzero [-Wnull-pointer-arithmetic]"} } }, ["warn_pointer_compare"]={ [k]={"pointer-compare"}, [l]="pointer-compare", [h]={{nil,A,"warn_pointer_compare"}}, [b]={{nil,A,"comparing a pointer to a null character constant; did you mean to compare to %select{NULL|(void *)0}0?"}}, [f]={{nil,A,{"comparing a pointer to a null character constant; did you mean to compare to ",{"NULL","(void *)0"},"?"}}}, [e]=j, [a]="comparing a pointer to a null character constant; did you mean to compare to (?:NULL|\\(void \\*\\)0)\\?", [c]=" \\[(?:\\-Werror,)?\\-Wpointer\\-compare[^\\]]*\\]", [i]={{nil,A,o}}, [d]={"f708f0a2430f",1565043340,"[Sema] Add -Wpointer-compare","[Sema] Add -Wpointer-compare\n\nThis patch adds a warning that diagnoses comparisons of pointers to\n\'\\0\'. This is often indicative of a bug (e.g. the user might\'ve\nforgotten to dereference the pointer).\n\nPatch by Elaina Guan!\n\nDifferential Revision: https://reviews.llvm.org/D65595\n\nllvm-svn: 367940"}, [g]={{I,12916,"void Sema::CheckPtrComparisonWithNullChar(ExprResult &E, ExprResult &NullE) {\n // ...\n if (!E.get()->getType()->isAnyPointerType() && E.get()->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNotNull) == Expr::NPCK_ZeroExpression) {\n if (const auto *CL = dyn_cast<CharacterLiteral>(E.get())) {\n if (CL->getValue() == 0)\n Diag(E.get()->getExprLoc(), diag::warn_pointer_compare) << NullValue << FixItHint::CreateReplacement(E.get()->getExprLoc(), NullValue ? \"NULL\" : \"(void *)0\");"},{I,13012,"void Sema::CheckPtrComparisonWithNullChar(ExprResult &E, ExprResult &NullE) {\n // ...\n if (!E.get()->getType()->isAnyPointerType() && E.get()->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNotNull) == Expr::NPCK_ZeroExpression) {\n if (const auto *CL = dyn_cast<CharacterLiteral>(E.get())) {\n // ...\n } else if (const auto *CE = dyn_cast<CStyleCastExpr>(E.get())) {\n // ...\n if (T == Context.CharTy)\n Diag(E.get()->getExprLoc(), diag::warn_pointer_compare) << NullValue << FixItHint::CreateReplacement(E.get()->getExprLoc(), NullValue ? \"NULL\" : \"(void *)0\");"}}, [m]={ ["clang/test/Sema/warn-nullchar-nullptr.c"]={"clang/test/Sema/warn-nullchar-nullptr.c:4:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:8:10: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:12:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:16:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:20:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:24:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:29:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:34:15: warning: comparing a pointer to a null character constant; did you mean to compare to (void *)0? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:39:15: warning: comparing a pointer to a null character constant; did you mean to compare to NULL? [-Wpointer-compare]","clang/test/Sema/warn-nullchar-nullptr.c:44:15: warning: comparing a pointer to a null character constant; did you mean to compare to NULL? [-Wpointer-compare]"} } }, ["warn_pointer_indirection_from_incompatible_type"]={ [k]={"undefined-reinterpret-cast"}, [l]="undefined-reinterpret-cast", [h]="warn_pointer_indirection_from_incompatible_type", [b]="dereference of type %1 that was reinterpret_cast from type %0 has undefined behavior", [f]="dereference of type B that was reinterpret_cast from type A has undefined behavior", [e]=j, [a]="dereference of type (.*?) that was reinterpret_cast from type (.*?) has undefined behavior", [c]=" \\[(?:\\-Werror,)?\\-Wundefined\\-reinterpret\\-cast[^\\]]*\\]", [i]=o, [d]={"69a2c924b9e8",1304360479,"Add a warning for when reinterpret_cast leads to undefined behavior, patch by Richard Trieu!","Add a warning for when reinterpret_cast leads to undefined behavior, patch by Richard Trieu!\n\nllvm-svn: 130703"}, [g]={{Mb,2039,"// Checks for undefined behavior in reinterpret_cast.\n// The cases that is checked for is:\n// *reinterpret_cast<T*>(&a)\n// reinterpret_cast<T&>(a)\n// where accessing \'a\' as type \'T\' will result in undefined behavior.\nvoid Sema::CheckCompatibleReinterpretCast(QualType SrcType, QualType DestType, bool IsDereference, SourceRange Range) {\n unsigned DiagID = IsDereference ? diag::warn_pointer_indirection_from_incompatible_type : diag::warn_undefined_reinterpret_cast;"}}, [m]={ ["clang/test/SemaCXX/reinterpret-cast.cpp"]={"clang/test/SemaCXX/reinterpret-cast.cpp:163:10: warning: dereference of type \'double *\' that was reinterpret_cast from type \'long *\' has undefined behavior [-Wundefined-reinterpret-cast]","clang/test/SemaCXX/reinterpret-cast.cpp:165:10: warning: dereference of type \'double *\' that was reinterpret_cast from type \'float *\' has undefined behavior [-Wundefined-reinterpret-cast]","clang/test/SemaCXX/reinterpret-cast.cpp:167:10: warning: dereference of type \'float *\' that was reinterpret_cast from type \'long *\' has undefined behavior [-Wundefined-reinterpret-cast]","clang/test/SemaCXX/reinterpret-cast.cpp:169:10: warning: dereference of type \'float *\' that was reinterpret_cast from type \'double *\' has undefined behavior [-Wundefined-reinterpret-cast]"} } }, ["warn_pointer_sub_null_ptr"]={ [k]={T,u,"extra","null-pointer-subtraction"}, [l]="null-pointer-subtraction", [h]={{nil,H,"warn_pointer_sub_null_ptr"}}, [b]={{nil,H,"performing pointer subtraction with a null pointer %select{has|may have}0 undefined behavior"}}, [f]={{nil,H,{"performing pointer subtraction with a null pointer ",{dc,"may have"}," undefined behavior"}}}, [e]=j, [a]="performing pointer subtraction with a null pointer (?:has|may have) undefined behavior", [c]=" \\[(?:\\-Werror,)?\\-Wnull\\-pointer\\-subtraction[^\\]]*\\]", [i]={{nil,H,o}}, [d]={"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"}, [g]={{I,11484,"/// Diagnose invalid subraction on a null pointer.\n///\nstatic void diagnoseSubtractionOnNullPointer(Sema &S, SourceLocation Loc, Expr *Pointer, bool BothNull) {\n // ...\n S.DiagRuntimeBehavior(Loc, Pointer, S.PDiag(diag::warn_pointer_sub_null_ptr) << S.getLangOpts().CPlusPlus << Pointer->getSourceRange());"}}, [m]={ ["clang/test/Sema/pointer-subtraction.c"]={"clang/test/Sema/pointer-subtraction.c:10:26: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:11:18: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:12:26: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:12:26: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:15:28: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:22:28: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]","clang/test/Sema/pointer-subtraction.c:27:3: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]"} } }, ["warn_pointer_to_enum_cast"]={ [k]={"pointer-to-enum-cast","pointer-to-int-cast"}, [l]="pointer-to-enum-cast", [h]={{nil,s,"warn_pointer_to_enum_cast"}}, [b]={{nil,s,"cast to smaller integer type %1 from %0"}}, [f]={{nil,s,"cast to smaller integer type B from A"}}, [e]=j, [a]="cast to smaller integer type (.*?) from (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wpointer\\-to\\-enum\\-cast[^\\]]*\\]", [i]={{nil,s,o}}, [d]={"931fcd3ba011",1576908663,"[WebAssembly] Improve clang diagnostics for wasm attributes","[WebAssembly] Improve clang diagnostics for wasm attributes\n\nThis patch addresses the review comments on r352930:\n\n - Removes redundant diagnostic checking code\n - Removes errnoneous use of diag::err_alias_is_definition, which\n turned out to be ineffective anyway since functions can be defined later\n in the translation unit and avoid detection.\n - Adds a test for various invalid cases for import_name and import_module.\n\nDifferential Revision: https://reviews.llvm.org/D59520"}, [g]={{Mb,3174,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n // If either type is a pointer, the other type has to be either an\n // integer or a pointer.\n if (!DestType->isArithmeticType()) {\n // ...\n } else if (!SrcType->isArithmeticType()) {\n // ...\n if ((Self.Context.getTypeSize(SrcType) > Self.Context.getTypeSize(DestType)) && !DestType->isBooleanType()) {\n // ...\n if (SrcType->isVoidPointerType())\n // ...\n else if (DestType->isEnumeralType())\n Diag = diag::warn_pointer_to_enum_cast;"}}, [m]={ ["clang/test/Sema/cast.c"]={"clang/test/Sema/cast.c:205:9: warning: cast to smaller integer type \'X\' from \'CharPtr\' (aka \'char *\') [-Wpointer-to-enum-cast]","clang/test/Sema/cast.c:210:9: warning: cast to smaller integer type \'X\' from \'CharPtr\' (aka \'char *\') [-Wpointer-to-enum-cast]"} } }, ["warn_pointer_to_int_cast"]={ [k]={"pointer-to-int-cast"}, [l]="pointer-to-int-cast", [h]={{nil,s,"warn_pointer_to_int_cast"}}, [b]={{nil,s,"cast to smaller integer type %1 from %0"}}, [f]={{nil,s,"cast to smaller integer type B from A"}}, [e]=j, [a]="cast to smaller integer type (.*?) from (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wpointer\\-to\\-int\\-cast[^\\]]*\\]", [i]={{nil,s,o}}, [d]={"931fcd3ba011",1576908663,"[WebAssembly] Improve clang diagnostics for wasm attributes","[WebAssembly] Improve clang diagnostics for wasm attributes\n\nThis patch addresses the review comments on r352930:\n\n - Removes redundant diagnostic checking code\n - Removes errnoneous use of diag::err_alias_is_definition, which\n turned out to be ineffective anyway since functions can be defined later\n in the translation unit and avoid detection.\n - Adds a test for various invalid cases for import_name and import_module.\n\nDifferential Revision: https://reviews.llvm.org/D59520"}, [g]={{Mb,2468,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n // ...\n if (DestType->isIntegralType(Self.Context)) {\n // ...\n // C++ 5.2.10p4: A pointer can be explicitly converted to any integral\n // type large enough to hold it; except in Microsoft mode, where the\n // integral type size doesn\'t matter (except we don\'t allow bool).\n if ((Self.Context.getTypeSize(SrcType) > Self.Context.getTypeSize(DestType))) {\n // ...\n if (MicrosoftException) {\n unsigned Diag = SrcType->isVoidPointerType() ? diag::warn_void_pointer_to_int_cast : diag::warn_pointer_to_int_cast;"},{Mb,3176,"/// Check the semantics of a C-style cast operation, in C.\nvoid CastOperation::CheckCStyleCast() {\n // ...\n // If either type is a pointer, the other type has to be either an\n // integer or a pointer.\n if (!DestType->isArithmeticType()) {\n // ...\n } else if (!SrcType->isArithmeticType()) {\n // ...\n if ((Self.Context.getTypeSize(SrcType) > Self.Context.getTypeSize(DestType)) && !DestType->isBooleanType()) {\n // ...\n if (SrcType->isVoidPointerType())\n // ...\n else if (DestType->isEnumeralType())\n // ...\n else\n Diag = diag::warn_pointer_to_int_cast;"}}, [m]={ ["clang/test/Sema/cast.c"]={"clang/test/Sema/cast.c:173:10: warning: cast to smaller integer type \'Int\' (aka \'int\') from \'CharPtr\' (aka \'char *\') [-Wpointer-to-int-cast]","clang/test/Sema/cast.c:181:9: warning: cast to smaller integer type \'Int\' (aka \'int\') from \'CharPtr\' (aka \'char *\') [-Wpointer-to-int-cast]"} } }, ["warn_poison_system_directories"]={ [k]={"poison-system-directories"}, [l]="poison-system-directories", [h]={{nil,A,"warn_poison_system_directories"}}, [b]={{nil,A,"include location \'%0\' is unsafe for cross-compilation"}}, [f]={{nil,A,"include location \'A\' is unsafe for cross-compilation"}}, [e]=j, [a]="include location \'(.*?)\' is unsafe for cross\\-compilation", [c]=" \\[(?:\\-Werror,)?\\-Wpoison\\-system\\-directories[^\\]]*\\]", [i]={{nil,A,O}}, [d]={"39f50da2a357",1568041174,"Support -fstack-clash-protection for x86","Support -fstack-clash-protection for x86\n\nImplement protection against the stack clash attack [0] through inline stack\nprobing.\n\nProbe stack allocation every PAGE_SIZE during frame lowering or dynamic\nallocation to make sure the page guard, if any, is touched when touching the\nstack, in a similar manner to GCC[1].\n\nThis extends the existing `probe-stack\' mechanism with a special value `inline-asm\'.\nTechnically the former uses function call before stack allocation while this\npatch provides inlined stack probes and chunk allocation.\n\nOnly implemented for x86.\n\n[0] https://www.qualys.com/2017/06/19/stack-clash/stack-clash.txt\n[1] https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00556.html\n\nDifferential Revision: https://reviews.llvm.org/D68720"}, [g]={{"clang/lib/Lex/InitHeaderSearch.cpp",153,"bool InitHeaderSearch::AddUnmappedPath(const Twine &Path, IncludeDirGroup Group, bool isFramework, std::optional<unsigned> UserEntryIdx) {\n // ...\n // If use system headers while cross-compiling, emit the warning.\n if (HasSysroot && (MappedPathStr.startswith(\"/usr/include\") || MappedPathStr.startswith(\"/usr/local/include\"))) {\n Headers.getDiags().Report(diag::warn_poison_system_directories) << MappedPathStr;"}}, [m]={ ["clang/test/Frontend/warning-poison-system-directories.c"]={"warning: include location \'/usr/include\' is unsafe for cross-compilation [-Wpoison-system-directories]"} } }, ["warn_potentially_direct_selector_expression"]={ [k]={"potentially-direct-selector","strict-potentially-direct-selector"}, [l]="potentially-direct-selector", [h]={{nil,s,"warn_potentially_direct_selector_expression"}}, [b]={{nil,s,"@selector expression formed with potentially direct selector %0"}}, [f]={{nil,s,"@selector expression formed with potentially direct selector A"}}, [e]=j, [a]="@selector expression formed with potentially direct selector (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wpotentially\\-direct\\-selector[^\\]]*\\]", [i]={{nil,s,o}}, [d]={"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"}, [g]={{ib,1334,"ExprResult Sema::ParseObjCSelectorExpression(Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors) {\n // ...\n if (!Method) {\n // ...\n } else {\n // ...\n if (onlyDirect) {\n // ...\n } else if (anyDirect) {\n // ...\n if (LikelyTargetMethod && LikelyTargetMethod->isDirectMethod()) {\n Diag(AtLoc, diag::warn_potentially_direct_selector_expression) << Sel;"}}, [m]={ ["clang/test/SemaObjC/potentially-direct-selector.m"]={"clang/test/SemaObjC/potentially-direct-selector.m:68:9: warning: @selector expression formed with potentially direct selector \'inBase\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:69:9: warning: @selector expression formed with potentially direct selector \'inBaseImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:70:9: warning: @selector expression formed with potentially direct selector \'inBaseCat\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:71:9: warning: @selector expression formed with potentially direct selector \'inBaseCatImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:72:9: warning: @selector expression formed with potentially direct selector \'inDerived\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:73:9: warning: @selector expression formed with potentially direct selector \'inDerivedImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:74:9: warning: @selector expression formed with potentially direct selector \'inDerivedCat\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:75:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:76:9: warning: @selector expression formed with potentially direct selector \'inDerivedClass\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:77:9: warning: @selector expression formed with potentially direct selector \'inBaseClass\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:78:9: warning: @selector expression formed with potentially direct selector \'inDerivedCatClass\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:99:9: warning: @selector expression formed with potentially direct selector \'inBase\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:100:9: warning: @selector expression formed with potentially direct selector \'inBaseImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:101:9: warning: @selector expression formed with potentially direct selector \'inBaseCat\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:102:9: warning: @selector expression formed with potentially direct selector \'inBaseCatImpl\' [-Wpotentially-direct-selector]","clang/test/SemaObjC/potentially-direct-selector.m:108:9: warning: @selector expression formed with potentially direct selector \'inBaseClass\' [-Wpotentially-direct-selector]"} } }, ["warn_pp_ambiguous_macro"]={ [k]={"ambiguous-macro"}, [l]="ambiguous-macro", [h]="warn_pp_ambiguous_macro", [b]="ambiguous expansion of macro %0", [f]="ambiguous expansion of macro A", [e]=j, [a]="ambiguous expansion of macro (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wambiguous\\-macro[^\\]]*\\]", [i]=B, [d]={"5968b1b71f88",1349989659,"Diagnose the expansion of ambiguous macro definitions. This can happen","Diagnose the expansion of ambiguous macro definitions. This can happen\nonly with modules, when two disjoint modules #define the same\nidentifier to different token sequences.\n\nllvm-svn: 165746"}, [g]={{"clang/lib/Lex/PPMacroExpansion.cpp",559,"/// HandleMacroExpandedIdentifier - If an identifier token is read that is to be\n/// expanded as a macro, handle it and return the next token as \'Identifier\'.\nbool Preprocessor::HandleMacroExpandedIdentifier(Token &Identifier, const MacroDefinition &M) {\n // ...\n // If the macro definition is ambiguous, complain.\n if (M.isAmbiguous()) {\n Diag(Identifier, diag::warn_pp_ambiguous_macro) << Identifier.getIdentifierInfo();"}}, [m]={ ["clang/test/Modules/macros2.c"]={"clang/test/Modules/macros2.c:14:1: warning: ambiguous expansion of macro \'TOP_OTHER_DEF_RIGHT_UNDEF\' [-Wambiguous-macro]","clang/test/Modules/macros2.c:37:3: warning: ambiguous expansion of macro \'LEFT_RIGHT_DIFFERENT\' [-Wambiguous-macro]","clang/test/Modules/macros2.c:40:3: warning: ambiguous expansion of macro \'LEFT_RIGHT_DIFFERENT2\' [-Wambiguous-macro]","clang/test/Modules/macros2.c:71:10: warning: ambiguous expansion of macro \'TOP_OTHER_REDEF1\' [-Wambiguous-macro]"} } }, ["warn_pp_convert_to_positive"]={ [h]="warn_pp_convert_to_positive", [b]="%select{left|right}0 side of operator converted from negative value to unsigned: %1", [f]={{nil,nil,{{"left","right"}," side of operator converted from negative value to unsigned: B"}}}, [e]=j, [a]="(?:left|right) side of operator converted from negative value to unsigned\\: (.*?)", [c]=wb, [i]=B, [d]={"7f5ff2175f68",1447466995,"Use %select to merge similar diagnostics. NFC","Use %select to merge similar diagnostics. NFC\n\nllvm-svn: 253119"}, [g]={{Eb,688,"/// EvaluateDirectiveSubExpr - Evaluate the subexpression whose first token is\n/// PeekTok, and whose precedence is PeekPrec. This returns the result in LHS.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation, such as division by zero warnings.\nstatic bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, Token &PeekTok, bool ValueLive, bool &IncludedUndefinedIds, Preprocessor &PP) {\n // ...\n while (true) {\n // ...\n default:\n // ...\n // If this just promoted something from signed to unsigned, and if the\n // value was negative, warn about it.\n if (ValueLive && Res.isUnsigned()) {\n if (!LHS.isUnsigned() && LHS.Val.isNegative())\n PP.Diag(OpLoc, diag::warn_pp_convert_to_positive) << 0 << toString(LHS.Val, 10, true) + \" to \" + toString(LHS.Val, 10, false) << LHS.getRange() << RHS.getRange();"},{Eb,693,"/// EvaluateDirectiveSubExpr - Evaluate the subexpression whose first token is\n/// PeekTok, and whose precedence is PeekPrec. This returns the result in LHS.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation, such as division by zero warnings.\nstatic bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, Token &PeekTok, bool ValueLive, bool &IncludedUndefinedIds, Preprocessor &PP) {\n // ...\n while (true) {\n // ...\n default:\n // ...\n // If this just promoted something from signed to unsigned, and if the\n // value was negative, warn about it.\n if (ValueLive && Res.isUnsigned()) {\n // ...\n if (!RHS.isUnsigned() && RHS.Val.isNegative())\n PP.Diag(OpLoc, diag::warn_pp_convert_to_positive) << 1 << toString(RHS.Val, 10, true) + \" to \" + toString(RHS.Val, 10, false) << LHS.getRange() << RHS.getRange();"}}, [m]={ ["clang/test/Preprocessor/overflow.c"]={"clang/test/Preprocessor/overflow.c:24:23: warning: right side of operator converted from negative value to unsigned: -1 to 18446744073709551615"} } }, ["warn_pp_date_time"]={ [k]={"date-time"}, [l]="date-time", [h]="warn_pp_date_time", [b]="expansion of date or time macro is not reproducible", [f]="expansion of date or time macro is not reproducible", [e]=j, [a]="expansion of date or time macro is not reproducible", [c]=" \\[(?:\\-Werror,)?\\-Wdate\\-time[^\\]]*\\]", [i]=B, [d]={"4f43e554081e",1402380531,"Implement -Wdate-time preprocessor warning","Implement -Wdate-time preprocessor warning\n\nThis GCC warning is useful for validating reproducible builds\nand might help when tracking down issues with modules too.\n\nllvm-svn: 210511"}, [g]={{"clang/lib/Lex/PPMacroExpansion.cpp",1573,"/// ExpandBuiltinMacro - If an identifier token is read that is to be expanded\n/// as a builtin macro, handle it and return the next token as \'Tok\'.\nvoid Preprocessor::ExpandBuiltinMacro(Token &Tok) {\n // ...\n if (II == Ident__LINE__) {\n // ...\n } else if (II == Ident__FILE__ || II == Ident__BASE_FILE__ || II == Ident__FILE_NAME__) {\n // ...\n } else if (II == Ident__DATE__) {\n Diag(Tok.getLocation(), diag::warn_pp_date_time);"},{"clang/lib/Lex/PPMacroExpansion.cpp",1583,"/// ExpandBuiltinMacro - If an identifier token is read that is to be expanded\n/// as a builtin macro, handle it and return the next token as \'Tok\'.\nvoid Preprocessor::ExpandBuiltinMacro(Token &Tok) {\n // ...\n if (II == Ident__LINE__) {\n // ...\n } else if (II == Ident__FILE__ || II == Ident__BASE_FILE__ || II == Ident__FILE_NAME__) {\n // ...\n } else if (II == Ident__DATE__) {\n // ...\n } else if (II == Ident__TIME__) {\n Diag(Tok.getLocation(), diag::warn_pp_date_time);"},{"clang/lib/Lex/PPMacroExpansion.cpp",1608,"/// ExpandBuiltinMacro - If an identifier token is read that is to be expanded\n/// as a builtin macro, handle it and return the next token as \'Tok\'.\nvoid Preprocessor::ExpandBuiltinMacro(Token &Tok) {\n // ...\n if (II == Ident__LINE__) {\n // ...\n } else if (II == Ident__FILE__ || II == Ident__BASE_FILE__ || II == Ident__FILE_NAME__) {\n // ...\n } else if (II == Ident__DATE__) {\n // ...\n } else if (II == Ident__TIME__) {\n // ...\n } else if (II == Ident__INCLUDE_LEVEL__) {\n // ...\n } else if (II == Ident__TIMESTAMP__) {\n Diag(Tok.getLocation(), diag::warn_pp_date_time);"}}, [m]={ ["clang/test/Preprocessor/SOURCE_DATE_EPOCH.c"]={"clang/test/Preprocessor/SOURCE_DATE_EPOCH.c:30:21: warning: expansion of date or time macro is not reproducible [-Wdate-time]","clang/test/Preprocessor/SOURCE_DATE_EPOCH.c:31:21: warning: expansion of date or time macro is not reproducible [-Wdate-time]","clang/test/Preprocessor/SOURCE_DATE_EPOCH.c:32:26: warning: expansion of date or time macro is not reproducible [-Wdate-time]"} } }, ["warn_pp_expr_overflow"]={ [h]="warn_pp_expr_overflow", [b]="integer overflow in preprocessor expression", [f]="integer overflow in preprocessor expression", [e]=j, [a]="integer overflow in preprocessor expression", [c]=wb, [i]=B, [d]={qb,1236199783,pb,ob}, [g]={{Eb,493,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n case tok::minus: {\n // ...\n // If this operator is live and overflowed, report the issue.\n if (Overflow && ValueLive)\n PP.Diag(Loc, diag::warn_pp_expr_overflow) << Result.getRange();"},{Eb,858,"/// EvaluateDirectiveSubExpr - Evaluate the subexpression whose first token is\n/// PeekTok, and whose precedence is PeekPrec. This returns the result in LHS.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation, such as division by zero warnings.\nstatic bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, Token &PeekTok, bool ValueLive, bool &IncludedUndefinedIds, Preprocessor &PP) {\n // ...\n while (true) {\n // ...\n // If this operator is live and overflowed, report the issue.\n if (Overflow && ValueLive)\n PP.Diag(OpLoc, diag::warn_pp_expr_overflow) << LHS.getRange() << RHS.getRange();"}}, [m]={ ["clang/test/Preprocessor/overflow.c"]={"clang/test/Preprocessor/overflow.c:4:23: warning: integer overflow in preprocessor expression","clang/test/Preprocessor/overflow.c:12:23: warning: integer overflow in preprocessor expression","clang/test/Preprocessor/overflow.c:20:23: warning: integer overflow in preprocessor expression"} } }, ["warn_pp_hdrstop_filename_ignored"]={ [k]={"clang-cl-pch"}, [l]="clang-cl-pch", [h]={{nil,K,"warn_pp_hdrstop_filename_ignored"}}, [b]={{nil,K,"#pragma hdrstop filename not supported, /Fp can be used to specify precompiled header filename"}}, [f]={{nil,K,"#pragma hdrstop filename not supported, /Fp can be used to specify precompiled header filename"}}, [e]=j, [a]="\\#pragma hdrstop filename not supported, \\/Fp can be used to specify precompiled header filename", [c]=" \\[(?:\\-Werror,)?\\-Wclang\\-cl\\-pch[^\\]]*\\]", [i]={{nil,K,B}}, [d]={"58df1affedc0",1536685844,"[clang-cl, PCH] Support for /Yc and /Yu without filename and #pragma hdrstop","[clang-cl, PCH] Support for /Yc and /Yu without filename and #pragma hdrstop\n\nWith clang-cl, when the user specifies /Yc or /Yu without a filename\nthe compiler uses a #pragma hdrstop in the main source file to\ndetermine the end of the PCH. If a header is specified with /Yc or\n/Yu #pragma hdrstop has no effect.\n\nThe optional #pragma hdrstop filename argument is not yet supported.\n\nDifferential Revision: https://reviews.llvm.org/D51391\n\nllvm-svn: 341963"}, [g]={{C,885,"void Preprocessor::HandlePragmaHdrstop(Token &Tok) {\n // ...\n if (Tok.is(tok::l_paren)) {\n Diag(Tok.getLocation(), diag::warn_pp_hdrstop_filename_ignored);"}}, [m]={ ["clang/test/PCH/pch-hdrstop-warn.cpp"]={"clang/test/PCH/pch-hdrstop-warn.cpp:10:16: warning: #pragma hdrstop filename not supported, /Fp can be used to specify precompiled header filename [-Wclang-cl-pch]"} } }, ["warn_pp_invalid_directive"]={ [k]={"unknown-directives"}, [l]="unknown-directives", [h]={{nil,P,"warn_pp_invalid_directive"}}, [b]={{nil,P,"invalid preprocessing directive%select{|, did you mean \'#%1\'?}0"}}, [f]={{nil,P,{"invalid preprocessing directive",{T,", did you mean \'#B\'?"}}}}, [e]=j, [a]="invalid preprocessing directive(?:|, did you mean \'\\#(.*?)\'\\?)", [c]=" \\[(?:\\-Werror,)?\\-Wunknown\\-directives[^\\]]*\\]", [i]={{nil,P,B}}, [d]={Db,1625925174,Gb,Fb}, [g]={{Qb,465,"void Preprocessor::SuggestTypoedDirective(const Token &Tok, StringRef Directive) const {\n // ...\n if (std::optional<StringRef> Sugg = findSimilarStr(Directive, Candidates)) {\n // ...\n Diag(Tok, diag::warn_pp_invalid_directive) << 1 << SuggValue << Hint;"}}, [m]={ ["clang/test/Preprocessor/suggest-typoed-directive.c"]={"clang/test/Preprocessor/suggest-typoed-directive.c:18:2: warning: invalid preprocessing directive, did you mean \'#if\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:19:2: warning: invalid preprocessing directive, did you mean \'#if\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:20:2: warning: invalid preprocessing directive, did you mean \'#ifdef\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:21:3: warning: invalid preprocessing directive, did you mean \'#elif\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:22:4: warning: invalid preprocessing directive, did you mean \'#elif\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:23:2: warning: invalid preprocessing directive, did you mean \'#elif\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:24:2: warning: invalid preprocessing directive, did you mean \'#elifdef\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:25:2: warning: invalid preprocessing directive, did you mean \'#elifdef\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:26:2: warning: invalid preprocessing directive, did you mean \'#elifndef\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:27:2: warning: invalid preprocessing directive, did you mean \'#else\'? [-Wunknown-directives]","clang/test/Preprocessor/suggest-typoed-directive.c:28:2: warning: invalid preprocessing directive, did you mean \'#endif\'? [-Wunknown-directives]"} } }, ["warn_pp_line_decimal"]={ [h]="warn_pp_line_decimal", [b]="%select{#line|GNU line marker}0 directive interprets number as decimal, not octal", [f]={{nil,nil,{{"#line","GNU line marker"}," directive interprets number as decimal, not octal"}}}, [e]=j, [a]="(?:\\#line|GNU line marker) directive interprets number as decimal, not octal", [c]=wb, [i]=B, [d]={"ca556cb3e365",1240011469,"implement PR3940: #line numbers not fully checked","implement PR3940: #line numbers not fully checked\n\nllvm-svn: 69403"}, [g]={{Qb,1390,"/// GetLineValue - Convert a numeric token into an unsigned value, emitting\n/// Diagnostic DiagID if it is invalid, and returning the value in Val.\nstatic bool GetLineValue(Token &DigitTok, unsigned &Val, unsigned DiagID, Preprocessor &PP, bool IsGNULineDirective = false) {\n // ...\n if (DigitTokBegin[0] == \'0\' && Val)\n PP.Diag(DigitTok.getLocation(), diag::warn_pp_line_decimal) << IsGNULineDirective;"}}, [m]={ ["clang/test/Preprocessor/line-directive.c"]={"foo.c:10:7: warning: #line directive interprets number as decimal, not octal","foo.c:12:3: warning: GNU line marker directive interprets number as decimal, not octal"} } }, ["warn_pp_macro_def_mismatch_with_pch"]={ [k]={"clang-cl-pch"}, [l]="clang-cl-pch", [h]={{nil,z,"warn_pp_macro_def_mismatch_with_pch"}}, [b]={{nil,z,"definition of macro %0 does not match definition in precompiled header"}}, [f]={{nil,z,"definition of macro A does not match definition in precompiled header"}}, [e]=j, [a]="definition of macro (.*?) does not match definition in precompiled header", [c]=" \\[(?:\\-Werror,)?\\-Wclang\\-cl\\-pch[^\\]]*\\]", [i]={{nil,z,B}}, [d]={"76675de15cfc",1530811333,"[clang-cl, PCH] Implement support for MS-style PCH through headers","[clang-cl, PCH] Implement support for MS-style PCH through headers\n\nImplement support for MS-style PCH through headers.\n\nThis enables support for /Yc and /Yu where the through header is either\non the command line or included in the source. It replaces the current\nsupport the requires the header also be specified with /FI.\n\nThis change adds a -cc1 option -pch-through-header that is used to either\nstart or stop compilation during PCH create or use.\n\nWhen creating a PCH, the compilation ends after compilation of the through\nheader.\n\nWhen using a PCH, tokens are skipped until after the through header is seen.\n\nPatch By: mikerice\nDifferential Revision: https://reviews.llvm.org/D46652\n\nllvm-svn: 336379"}, [g]={{Qb,3090,"/// HandleDefineDirective - Implements \\#define. This consumes the entire macro\n/// line then lets the caller lex the next real token.\nvoid Preprocessor::HandleDefineDirective(Token &DefineTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n // When skipping just warn about macros that do not match.\n if (SkippingUntilPCHThroughHeader) {\n // ...\n if (!OtherMI || !MI->isIdenticalTo(*OtherMI, *this,\n // ...\n Diag(MI->getDefinitionLoc(), diag::warn_pp_macro_def_mismatch_with_pch) << MacroNameTok.getIdentifierInfo();"}} }, ["warn_pp_macro_hides_keyword"]={ [k]={"keyword-macro","pedantic"}, [l]="keyword-macro", [h]="warn_pp_macro_hides_keyword", [b]="keyword is hidden by macro definition", [f]="keyword is hidden by macro definition", [e]=j, [a]="keyword is hidden by macro definition", [c]=" \\[(?:\\-Werror,)?\\-Wkeyword\\-macro[^\\]]*\\]", [i]=B, [d]={"1ecb41c09b7d",1417518369,"Emit warning if define or undef reserved identifier or keyword.","Emit warning if define or undef reserved identifier or keyword.\n\nSummary:\nThis change implements warnings if macro name is identical to a keyword or\nreserved identifier. The warnings are different depending on the \"danger\"\nof the operation. Defining macro that replaces a keyword is on by default.\nOther cases produce warning that is off by default but can be turned on\nusing option -Wreserved-id-macro.\n\nThis change fixes PR11488.\n\nReviewers: rnk\n\nReviewed By: rnk\n\nSubscribers: rnk, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D6194\n\nllvm-svn: 223114"}, [g]={{Qb,3069,"/// HandleDefineDirective - Implements \\#define. This consumes the entire macro\n/// line then lets the caller lex the next real token.\nvoid Preprocessor::HandleDefineDirective(Token &DefineTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n if (MacroShadowsKeyword && !isConfigurationPattern(MacroNameTok, MI, getLangOpts())) {\n Diag(MacroNameTok, diag::warn_pp_macro_hides_keyword);"}}, [m]={ ["clang/test/Preprocessor/macro-reserved.c"]={"clang/test/Preprocessor/macro-reserved.c:3:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:44:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:46:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:48:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:50:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:53:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:55:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]","clang/test/Preprocessor/macro-reserved.c:60:9: warning: keyword is hidden by macro definition [-Wkeyword-macro]"} } }, ["warn_pp_macro_is_reserved_id"]={ [k]={"reserved-id-macro","reserved-identifier","reserved-macro-identifier"}, [l]="reserved-macro-identifier", [h]="warn_pp_macro_is_reserved_id", [b]="macro name is a reserved identifier", [f]="macro name is a reserved identifier", [e]=j, [a]="macro name is a reserved identifier", [c]=" \\[(?:\\-Werror,)?\\-Wreserved\\-macro\\-identifier[^\\]]*\\]", [i]=B, [d]={"1ecb41c09b7d",1417518369,"Emit warning if define or undef reserved identifier or keyword.","Emit warning if define or undef reserved identifier or keyword.\n\nSummary:\nThis change implements warnings if macro name is identical to a keyword or\nreserved identifier. The warnings are different depending on the \"danger\"\nof the operation. Defining macro that replaces a keyword is on by default.\nOther cases produce warning that is off by default but can be turned on\nusing option -Wreserved-id-macro.\n\nThis change fixes PR11488.\n\nReviewers: rnk\n\nReviewed By: rnk\n\nSubscribers: rnk, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D6194\n\nllvm-svn: 223114"}, [g]={{Qb,368,"bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef, bool *ShadowFlag) {\n // ...\n if (!SourceMgr.isInSystemHeader(MacroNameLoc) && (SourceMgr.getBufferName(MacroNameLoc) != \"<built-in>\")) {\n // ...\n if (D == MD_ReservedMacro)\n Diag(MacroNameTok, diag::warn_pp_macro_is_reserved_id);"}}, [m]={ ["clang/test/Preprocessor/macro-reserved.c"]={"clang/test/Preprocessor/macro-reserved.c:62:9: warning: macro name is a reserved identifier [-Wreserved-macro-identifier]","clang/test/Preprocessor/macro-reserved.c:63:9: warning: macro name is a reserved identifier [-Wreserved-macro-identifier]","clang/test/Preprocessor/macro-reserved.c:64:9: warning: macro name is a reserved identifier [-Wreserved-macro-identifier]","clang/test/Preprocessor/macro-reserved.c:69:8: warning: macro name is a reserved identifier [-Wreserved-macro-identifier]","clang/test/Preprocessor/macro-reserved.c:70:8: warning: macro name is a reserved identifier [-Wreserved-macro-identifier]"} } }, ["warn_pp_objc_macro_redef_ignored"]={ [k]={"objc-macro-redefinition"}, [l]="objc-macro-redefinition", [h]="warn_pp_objc_macro_redef_ignored", [b]="ignoring redefinition of Objective-C qualifier macro", [f]="ignoring redefinition of Objective-C qualifier macro", [e]=j, [a]="ignoring redefinition of Objective\\-C qualifier macro", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-macro\\-redefinition[^\\]]*\\]", [i]=B, [d]={"83760378617d",1449790261,"In Objective-C, ignore attempts to redefine the ARC/GC qualifier macros.","In Objective-C, ignore attempts to redefine the ARC/GC qualifier macros.\n\nThis works around existing system headers which unconditionally\nredefine these macros.\n\nThis is reasonably safe to do because we used to warn about it anyway\n(outside of system headers). Continue to warn if the redefinition\nwould have changed the expansion. Still permit redefinition if the\nmacro is explicitly #undef\'ed first.\n\nrdar://23788307\n\nllvm-svn: 255311"}, [g]={{Qb,3118,"/// HandleDefineDirective - Implements \\#define. This consumes the entire macro\n/// line then lets the caller lex the next real token.\nvoid Preprocessor::HandleDefineDirective(Token &DefineTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n // Finally, if this identifier already had a macro defined for it, verify that\n // the macro bodies are identical, and issue diagnostics if they are not.\n if (const MacroInfo *OtherMI = getMacroInfo(MacroNameTok.getIdentifierInfo())) {\n // ...\n // In Objective-C, ignore attempts to directly redefine the builtin\n // definitions of the ownership qualifiers. It\'s still possible to\n // #undef them.\n if (getLangOpts().ObjC && SourceMgr.getFileID(OtherMI->getDefinitionLoc()) == getPredefinesFileID() && isObjCProtectedMacro(MacroNameTok.getIdentifierInfo())) {\n // Warn if it changes the tokens.\n if ((!getDiagnostics().getSuppressSystemWarnings() || !SourceMgr.isInSystemHeader(DefineTok.getLocation())) && !MI->isIdenticalTo(*OtherMI, *this,\n // ...\n Diag(MI->getDefinitionLoc(), diag::warn_pp_objc_macro_redef_ignored);"}}, [m]={ ["clang/test/Lexer/objc_macros.m"]={"clang/test/Lexer/objc_macros.m:3:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]","clang/test/Lexer/objc_macros.m:5:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]","clang/test/Lexer/objc_macros.m:7:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]","clang/test/Lexer/objc_macros.m:3:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]","clang/test/Lexer/objc_macros.m:5:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]","clang/test/Lexer/objc_macros.m:7:9: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]"} } }, ["warn_pp_undef_identifier"]={ [k]={"undef"}, [l]="undef", [h]="warn_pp_undef_identifier", [b]="%0 is not defined, evaluates to 0", [f]="A is not defined, evaluates to 0", [e]=j, [a]="(.*?) is not defined, evaluates to 0", [c]=" \\[(?:\\-Werror,)?\\-Wundef[^\\]]*\\]", [i]=B, [d]={qb,1236199783,pb,ob}, [g]={{Eb,260,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n default:\n // If this token\'s spelling is a pp-identifier, check to see if it is\n // \'defined\' or if it is a macro. Note that we check here because many\n // keywords are pp-identifiers, so we can\'t check the kind.\n if (IdentifierInfo *II = PeekTok.getIdentifierInfo()) {\n // ...\n if (!II->isCPlusPlusOperatorKeyword()) {\n // If this identifier isn\'t \'defined\' or one of the special\n // preprocessor keywords and it wasn\'t macro expanded, it turns\n // into a simple 0\n if (ValueLive) {\n PP.Diag(PeekTok, diag::warn_pp_undef_identifier) << II;"},{Eb,264,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n default:\n // If this token\'s spelling is a pp-identifier, check to see if it is\n // \'defined\' or if it is a macro. Note that we check here because many\n // keywords are pp-identifiers, so we can\'t check the kind.\n if (IdentifierInfo *II = PeekTok.getIdentifierInfo()) {\n // ...\n if (!II->isCPlusPlusOperatorKeyword()) {\n // If this identifier isn\'t \'defined\' or one of the special\n // preprocessor keywords and it wasn\'t macro expanded, it turns\n // into a simple 0\n if (ValueLive) {\n // ...\n if (DiagEngine.isIgnored(diag::warn_pp_undef_identifier, PeekTok.getLocation())) {"}}, [m]={ ["clang/test/Preprocessor/if_warning.c"]={"clang/test/Preprocessor/if_warning.c:5:5: error: \'foo\' is not defined, evaluates to 0 [-Werror,-Wundef]"} } }, ["warn_pp_undef_prefix"]={ [k]={"undef-prefix"}, [l]="undef-prefix", [h]={{nil,s,"warn_pp_undef_prefix"}}, [b]={{nil,s,"%0 is not defined, evaluates to 0"}}, [f]={{nil,s,"A is not defined, evaluates to 0"}}, [e]=j, [a]="(.*?) is not defined, evaluates to 0", [c]=" \\[(?:\\-Werror,)?\\-Wundef\\-prefix[^\\]]*\\]", [i]={{nil,s,B}}, [d]={"89a0c4066b0e",1593534486,"[clang][diagnostics] Add \'-Wundef-prefix\' warning option","[clang][diagnostics] Add \'-Wundef-prefix\' warning option\n\nSummary:\nAdd an `-Wundef-prefix=<arg1>,<arg2>...` option, which is similar to `-Wundef`, but only give warnings for undefined macros with the given prefixes.\n\nReviewers: ributzka, steven_wu, cishida, bruno, arphaman, rsmith\n\nReviewed By: ributzka, arphaman\n\nSubscribers: riccibruno, dexonsmith, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D80751\n\nThis patch was authored by Zixu Wang <zixu_wang@apple.com>"}, [g]={{Eb,273,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n default:\n // If this token\'s spelling is a pp-identifier, check to see if it is\n // \'defined\' or if it is a macro. Note that we check here because many\n // keywords are pp-identifiers, so we can\'t check the kind.\n if (IdentifierInfo *II = PeekTok.getIdentifierInfo()) {\n // ...\n if (!II->isCPlusPlusOperatorKeyword()) {\n // If this identifier isn\'t \'defined\' or one of the special\n // preprocessor keywords and it wasn\'t macro expanded, it turns\n // into a simple 0\n if (ValueLive) {\n // ...\n // If \'Wundef\' is enabled, do not emit \'undef-prefix\' diagnostics.\n if (DiagEngine.isIgnored(diag::warn_pp_undef_identifier, PeekTok.getLocation())) {\n // ...\n if (llvm::any_of(UndefPrefixes, [&IdentifierName](const std::string &Prefix) { return IdentifierName.startswith(Prefix); }))\n PP.Diag(PeekTok, diag::warn_pp_undef_prefix) << AddFlagValue{llvm::join(UndefPrefixes, \",\")} << II;"}} }, ["warn_pragma_align_expected_equal"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_align_expected_equal", [b]="expected \'=\' following \'#pragma %select{align|options align}0\' - ignored", [f]={{nil,nil,{"expected \'=\' following \'#pragma ",{"align","options align"},"\' - ignored"}}}, [e]=j, [a]="expected \'\\=\' following \'\\#pragma (?:align|options align)\' \\- ignored", [c]=y, [i]=t, [d]={"cb82acb884fb",1280603827,"Parser: Add support for #pragma align, which is just another spelling of #pragma","Parser: Add support for #pragma align, which is just another spelling of #pragma\noptions align.\n\nllvm-svn: 109952"}, [g]={{n,2269,"// #pragma \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'options \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'align\' \'(\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'} \')\'\nstatic void ParseAlignPragma(Preprocessor &PP, Token &FirstTok, bool IsOptions) {\n // ...\n if (PP.getLangOpts().XLPragmaPack) {\n // ...\n } else if (Tok.isNot(tok::equal)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_align_expected_equal) << IsOptions;"}}, [m]={ ["clang/test/Parser/pragma-options.c"]={"clang/test/Parser/pragma-options.c:4:96: warning: expected \'=\' following \'#pragma options align\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-options.c:14:80: warning: expected \'=\' following \'#pragma align\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_align_invalid_option"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_align_invalid_option", [b]="invalid alignment option in \'#pragma %select{align|options align}0\' - ignored", [f]={{nil,nil,{"invalid alignment option in \'#pragma ",{"align","options align"},"\' - ignored"}}}, [e]=j, [a]="invalid alignment option in \'\\#pragma (?:align|options align)\' \\- ignored", [c]=y, [i]=t, [d]={"cb82acb884fb",1280603827,"Parser: Add support for #pragma align, which is just another spelling of #pragma","Parser: Add support for #pragma align, which is just another spelling of #pragma\noptions align.\n\nllvm-svn: 109952"}, [g]={{n,2296,"// #pragma \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'options \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'align\' \'(\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'} \')\'\nstatic void ParseAlignPragma(Preprocessor &PP, Token &FirstTok, bool IsOptions) {\n // ...\n if (II->isStr(\"native\"))\n // ...\n else if (II->isStr(\"natural\"))\n // ...\n else if (II->isStr(\"packed\"))\n // ...\n else if (II->isStr(\"power\"))\n // ...\n else if (II->isStr(\"mac68k\"))\n // ...\n else if (II->isStr(\"reset\"))\n // ...\n else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_align_invalid_option) << IsOptions;"}}, [m]={ ["clang/test/Parser/pragma-options.c"]={"clang/test/Parser/pragma-options.c:6:104: warning: invalid alignment option in \'#pragma options align\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-options.c:16:88: warning: invalid alignment option in \'#pragma align\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_align_not_xl_compatible"]={ [k]={"aix-compat"}, [l]="aix-compat", [h]={{nil,F,"warn_pragma_align_not_xl_compatible"}}, [b]={{nil,F,"#pragma align(packed) may not be compatible with objects generated with AIX XL C/C++"}}, [f]={{nil,F,"#pragma align(packed) may not be compatible with objects generated with AIX XL C/C++"}}, [e]=j, [a]="\\#pragma align\\(packed\\) may not be compatible with objects generated with AIX XL C\\/C\\+\\+", [c]=" \\[(?:\\-Werror,)?\\-Waix\\-compat[^\\]]*\\]", [i]={{nil,F,o}}, [d]={"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"}, [g]={{xb,17845,"void Sema::ActOnTagFinishDefinition(Scope *S, Decl *TagD, SourceRange BraceRange) {\n // ...\n // Clangs implementation of #pragma align(packed) differs in bitfield layout\n // from XLs and instead matches the XL #pragma pack(1) behavior.\n if (Context.getTargetInfo().getTriple().isOSAIX() && AlignPackStack.hasValue()) {\n // ...\n // Only warn if there is at least 1 bitfield member.\n if (llvm::any_of(RD->fields(), [](const FieldDecl *FD) { return FD->isBitField(); }))\n Diag(BraceRange.getBegin(), diag::warn_pragma_align_not_xl_compatible);"}}, [m]={ ["clang/test/Sema/aix-pragma-align-packed-warn.c"]={"clang/test/Sema/aix-pragma-align-packed-warn.c:5:10: warning: #pragma align(packed) may not be compatible with objects generated with AIX XL C/C++ [-Waix-compat]","clang/test/Sema/aix-pragma-align-packed-warn.c:11:10: warning: #pragma align(packed) may not be compatible with objects generated with AIX XL C/C++ [-Waix-compat]"} } }, ["warn_pragma_attribute_unused"]={ [k]={"pragma-clang-attribute",r}, [l]="pragma-clang-attribute", [h]={{nil,gb,"warn_pragma_attribute_unused"}}, [b]={{nil,gb,"unused attribute %0 in \'#pragma clang attribute push\' region"}}, [f]={{nil,gb,"unused attribute A in \'#pragma clang attribute push\' region"}}, [e]=j, [a]="unused attribute (.*?) in \'\\#pragma clang attribute push\' region", [c]=" \\[(?:\\-Werror,)?\\-Wpragma\\-clang\\-attribute[^\\]]*\\]", [i]={{nil,gb,o}}, [d]={"0a849f47d2f7",1492508507,"Add #pragma clang attribute","Add #pragma clang attribute\n\nThe new \'#pragma clang attribute\' directive can be used to apply attributes to\nmultiple declarations. An attribute must satisfy the following conditions to\nbe supported by the pragma:\n- It must have a subject list that\'s defined in the TableGen file.\n- It must be documented.\n- It must not be late parsed.\n- It must have a GNU/C++11 spelling.\n\nDifferential Revision: https://reviews.llvm.org/D30009\n\nllvm-svn: 300539"}, [g]={{db,1083,"void Sema::ActOnPragmaAttributePop(SourceLocation PragmaLoc, const IdentifierInfo *Namespace) {\n // ...\n // Dig back through the stack trying to find the most recently pushed group\n // that in Namespace. Note that this works fine if no namespace is present,\n // think of push/pops without namespaces as having an implicit \"nullptr\"\n // namespace.\n for (size_t Index = PragmaAttributeStack.size(); Index;) {\n // ...\n if (PragmaAttributeStack[Index].Namespace == Namespace) {\n for (const PragmaAttributeEntry &Entry : PragmaAttributeStack[Index].Entries) {\n if (!Entry.IsUsed) {\n // ...\n Diag(Entry.Attribute->getLoc(), diag::warn_pragma_attribute_unused) << *Entry.Attribute;"}}, [m]={ ["clang/test/Sema/pragma-attribute.c"]={"clang/test/Sema/pragma-attribute.c:6:46: warning: unused attribute \'annotate\' in \'#pragma clang attribute push\' region [-Wpragma-clang-attribute]"} } }, ["warn_pragma_comment_ignored"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_comment_ignored", [b]="\'#pragma comment %0\' ignored", [f]="\'#pragma comment A\' ignored", [e]=j, [a]="\'\\#pragma comment (.*?)\' ignored", [c]=y, [i]=t, [d]={"99efc0361b2d",1427143302,"Adds a warning for unrecognized argument to #pragma comment() on PS4.","Adds a warning for unrecognized argument to #pragma comment() on PS4.\n\nPS4 target recognizes the #pragma comment() syntax as in -fms-extensions, but\nonly handles the case of #pragma comment(lib). This patch adds a warning if any\nother arguments are encountered.\n\nThis patch also refactors the code in ParsePragma.cpp a little bit to make it\nmore obvious that some codes are being shared between -fms-extensions and PS4.\n\nllvm-svn: 233015"}, [g]={{n,3116,"/// Handle the microsoft \\#pragma comment extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma comment(linker, \"foo\")\n/// \\endcode\n/// \'linker\' is one of five identifiers: compiler, exestr, lib, linker, user.\n/// \"foo\" is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters etc. See MSDN for more details.\nvoid PragmaCommentHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (PP.getTargetInfo().getTriple().isOSBinFormatELF() && Kind != PCK_Lib) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_comment_ignored) << II->getName();"}}, [m]={ ["clang/test/Preprocessor/pragma-comment-elf.c"]={"clang/test/Preprocessor/pragma-comment-elf.c:12:17: warning: \'#pragma comment linker\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:13:17: warning: \'#pragma comment linker\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:14:18: warning: \'#pragma comment linker\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:16:17: warning: \'#pragma comment user\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:17:17: warning: \'#pragma comment user\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:18:18: warning: \'#pragma comment user\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:20:17: warning: \'#pragma comment compiler\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:21:17: warning: \'#pragma comment compiler\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:22:18: warning: \'#pragma comment compiler\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:24:17: warning: \'#pragma comment exestr\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:25:17: warning: \'#pragma comment exestr\' ignored [-Wignored-pragmas]","clang/test/Preprocessor/pragma-comment-elf.c:26:18: warning: \'#pragma comment exestr\' ignored [-Wignored-pragmas]"} } }, ["warn_pragma_debug_dependent_argument"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_debug_dependent_argument", [b]="%select{value|type}0-dependent expression passed as an argument to debug command", [f]={{nil,nil,{{"value","type"},"-dependent expression passed as an argument to debug command"}}}, [e]=j, [a]="(?:value|type)\\-dependent expression passed as an argument to debug command", [c]=y, [i]=t, [d]={"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"}, [g]={{n,732,"void Parser::HandlePragmaDump() {\n // ...\n if (Tok.is(tok::eod)) {\n // ...\n } else if (NextToken().is(tok::eod)) {\n // ...\n } else {\n // ...\n if (!E.isUsable() || E.get()->containsErrors()) {\n // ...\n } else if (E.get()->getDependence() != ExprDependence::None) {\n PP.Diag(StartLoc, diag::warn_pragma_debug_dependent_argument) << E.get()->isTypeDependent() << SourceRange(StartLoc, Tok.getLocation());"}}, [m]={ ["clang/test/AST/ast-dump-lookups.cpp"]={"clang/test/AST/ast-dump-lookups.cpp:79:28: warning: type-dependent expression passed as an argument to debug command [-Wignored-pragmas]","clang/test/AST/ast-dump-lookups.cpp:80:28: warning: value-dependent expression passed as an argument to debug command [-Wignored-pragmas]"} } }, ["warn_pragma_debug_missing_argument"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_debug_missing_argument", [b]="missing argument to debug command \'%0\'", [f]="missing argument to debug command \'A\'", [e]=j, [a]="missing argument to debug command \'(.*?)\'", [c]=y, [i]=B, [d]={"ba3a4f917f2d",1452635966,"Improve AST dumping:","Improve AST dumping:\n\n 1) When dumping a declaration that declares a name for a type, also dump the named type.\n 2) Add a #pragma clang __debug dump X, that dumps the lookup results for X in\n the current context.\n\nllvm-svn: 257529"}, [g]={{C,1098,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (II->isStr(\"assert\")) {\n // ...\n } else if (II->isStr(\"crash\")) {\n // ...\n } else if (II->isStr(\"parser_crash\")) {\n // ...\n } else if (II->isStr(\"dump\")) {\n // ...\n } else if (II->isStr(\"diag_mapping\")) {\n // ...\n if (DiagName.is(tok::eod))\n // ...\n else if (DiagName.is(tok::string_literal) && !DiagName.hasUDSuffix()) {\n // ...\n } else {\n PP.Diag(DiagName, diag::warn_pragma_debug_missing_argument) << II->getName();"},{C,1114,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (II->isStr(\"assert\")) {\n // ...\n } else if (II->isStr(\"crash\")) {\n // ...\n } else if (II->isStr(\"parser_crash\")) {\n // ...\n } else if (II->isStr(\"dump\")) {\n // ...\n } else if (II->isStr(\"diag_mapping\")) {\n // ...\n } else if (II->isStr(\"llvm_fatal_error\")) {\n // ...\n } else if (II->isStr(\"llvm_unreachable\")) {\n // ...\n } else if (II->isStr(\"macro\")) {\n // ...\n if (MacroII)\n // ...\n else\n PP.Diag(MacroName, diag::warn_pragma_debug_missing_argument) << II->getName();"},{C,1166,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (II->isStr(\"assert\")) {\n // ...\n } else if (II->isStr(\"crash\")) {\n // ...\n } else if (II->isStr(\"parser_crash\")) {\n // ...\n } else if (II->isStr(\"dump\")) {\n // ...\n } else if (II->isStr(\"diag_mapping\")) {\n // ...\n } else if (II->isStr(\"llvm_fatal_error\")) {\n // ...\n } else if (II->isStr(\"llvm_unreachable\")) {\n // ...\n } else if (II->isStr(\"macro\")) {\n // ...\n } else if (II->isStr(\"module_map\")) {\n // ...\n } else if (II->isStr(\"overflow_stack\")) {\n // ...\n } else if (II->isStr(\"captured\")) {\n // ...\n } else if (II->isStr(\"modules\")) {\n // ...\n if (!DumpII) {\n PP.Diag(Kind, diag::warn_pragma_debug_missing_argument) << II->getName();"},{n,713,"void Parser::HandlePragmaDump() {\n // ...\n if (Tok.is(tok::eod)) {\n PP.Diag(Tok, diag::warn_pragma_debug_missing_argument) << \"dump\";"}} }, ["warn_pragma_debug_missing_command"]={ [k]={q,r}, [l]=q, [h]={{nil,hb,"warn_pragma_debug_missing_command"}}, [b]={{nil,hb,"missing debug command"}}, [f]={{nil,hb,"missing debug command"}}, [e]=j, [a]="missing debug command", [c]=y, [i]={{nil,hb,B}}, [d]={Db,1625925174,Gb,Fb}, [g]={{C,1059,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok, diag::warn_pragma_debug_missing_command);"}} }, ["warn_pragma_debug_unexpected_argument"]={ [k]={q,r}, [l]=q, [h]={{nil,hb,"warn_pragma_debug_unexpected_argument"}}, [b]={{nil,hb,"unexpected argument to debug command"}}, [f]={{nil,hb,"unexpected argument to debug command"}}, [e]=j, [a]="unexpected argument to debug command", [c]=y, [i]={{nil,hb,B}}, [d]={"31f4859c3e4d",1667168400,"[Clang] Allow additional mathematical symbols in identifiers.","[Clang] Allow additional mathematical symbols in identifiers.\n\nImplement the proposed UAX Profile\n\"Mathematical notation profile for default identifiers\".\n\nThis implements a not-yet approved Unicode for a vetted\nUAX31 identifier profile\nhttps://www.unicode.org/L2/L2022/22230-math-profile.pdf\n\nThis change mitigates the reported disruption caused\nby the implementation of UAX31 in C++ and C2x,\nas these mathematical symbols are commonly used in the\nscientific community.\n\nFixes #54732\n\nReviewed By: tahonermann, #clang-language-wg\n\nDifferential Revision: https://reviews.llvm.org/D137051"}, [g]={{C,1199,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (II->isStr(\"assert\")) {\n // ...\n } else if (II->isStr(\"crash\")) {\n // ...\n } else if (II->isStr(\"parser_crash\")) {\n // ...\n } else if (II->isStr(\"dump\")) {\n // ...\n } else if (II->isStr(\"diag_mapping\")) {\n // ...\n } else if (II->isStr(\"llvm_fatal_error\")) {\n // ...\n } else if (II->isStr(\"llvm_unreachable\")) {\n // ...\n } else if (II->isStr(\"macro\")) {\n // ...\n } else if (II->isStr(\"module_map\")) {\n // ...\n } else if (II->isStr(\"overflow_stack\")) {\n // ...\n } else if (II->isStr(\"captured\")) {\n // ...\n } else if (II->isStr(\"modules\")) {\n // ...\n } else if (II->isStr(\"sloc_usage\")) {\n // ...\n if (ArgToken.is(tok::numeric_constant) && PP.parseSimpleIntegerLiteral(ArgToken, Value)) {\n // ...\n } else if (ArgToken.isNot(tok::eod)) {\n PP.Diag(ArgToken, diag::warn_pragma_debug_unexpected_argument);"},{n,716,"void Parser::HandlePragmaDump() {\n // ...\n if (Tok.is(tok::eod)) {\n // ...\n } else if (NextToken().is(tok::eod)) {\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok, diag::warn_pragma_debug_unexpected_argument);"}} }, ["warn_pragma_debug_unexpected_command"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_debug_unexpected_command", [b]="unexpected debug command \'%0\'", [f]="unexpected debug command \'A\'", [e]=j, [a]="unexpected debug command \'(.*?)\'", [c]=y, [i]=B, [d]={"f2cf329ccd1b",1282084368,"Lex: Add #pragma clang __debug {llvm_fatal_error, llvm_unreachable}, for testing","Lex: Add #pragma clang __debug {llvm_fatal_error, llvm_unreachable}, for testing\nthose crash paths.\n\nllvm-svn: 111311"}, [g]={{C,1185,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (II->isStr(\"assert\")) {\n // ...\n } else if (II->isStr(\"crash\")) {\n // ...\n } else if (II->isStr(\"parser_crash\")) {\n // ...\n } else if (II->isStr(\"dump\")) {\n // ...\n } else if (II->isStr(\"diag_mapping\")) {\n // ...\n } else if (II->isStr(\"llvm_fatal_error\")) {\n // ...\n } else if (II->isStr(\"llvm_unreachable\")) {\n // ...\n } else if (II->isStr(\"macro\")) {\n // ...\n } else if (II->isStr(\"module_map\")) {\n // ...\n } else if (II->isStr(\"overflow_stack\")) {\n // ...\n } else if (II->isStr(\"captured\")) {\n // ...\n } else if (II->isStr(\"modules\")) {\n // ...\n if (!DumpII) {\n // ...\n } else if (DumpII->isStr(\"all\")) {\n // ...\n } else if (DumpII->isStr(\"visible\")) {\n // ...\n } else if (DumpII->isStr(\"building\")) {\n // ...\n } else {\n PP.Diag(Tok, diag::warn_pragma_debug_unexpected_command) << DumpII->getName();"},{C,1206,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (II->isStr(\"assert\")) {\n // ...\n } else if (II->isStr(\"crash\")) {\n // ...\n } else if (II->isStr(\"parser_crash\")) {\n // ...\n } else if (II->isStr(\"dump\")) {\n // ...\n } else if (II->isStr(\"diag_mapping\")) {\n // ...\n } else if (II->isStr(\"llvm_fatal_error\")) {\n // ...\n } else if (II->isStr(\"llvm_unreachable\")) {\n // ...\n } else if (II->isStr(\"macro\")) {\n // ...\n } else if (II->isStr(\"module_map\")) {\n // ...\n } else if (II->isStr(\"overflow_stack\")) {\n // ...\n } else if (II->isStr(\"captured\")) {\n // ...\n } else if (II->isStr(\"modules\")) {\n // ...\n } else if (II->isStr(\"sloc_usage\")) {\n // ...\n } else {\n PP.Diag(Tok, diag::warn_pragma_debug_unexpected_command) << II->getName();"}} }, ["warn_pragma_debug_unknown_module"]={ [k]={q,r}, [l]=q, [h]={{nil,p,"warn_pragma_debug_unknown_module"}}, [b]={{nil,p,"unknown module \'%0\'"}}, [f]={{nil,p,"unknown module \'A\'"}}, [e]=j, [a]="unknown module \'(.*?)\'", [c]=y, [i]={{nil,p,B}}, [d]={"77e53cbe8473",1555549021,"Add \'#pragma clang __debug module_map module.name\' to dump the module","Add \'#pragma clang __debug module_map module.name\' to dump the module\nmap being used for the module \'module.name\'.\n\nllvm-svn: 358632"}, [g]={{C,1126,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (II->isStr(\"assert\")) {\n // ...\n } else if (II->isStr(\"crash\")) {\n // ...\n } else if (II->isStr(\"parser_crash\")) {\n // ...\n } else if (II->isStr(\"dump\")) {\n // ...\n } else if (II->isStr(\"diag_mapping\")) {\n // ...\n } else if (II->isStr(\"llvm_fatal_error\")) {\n // ...\n } else if (II->isStr(\"llvm_unreachable\")) {\n // ...\n } else if (II->isStr(\"macro\")) {\n // ...\n } else if (II->isStr(\"module_map\")) {\n // ...\n for (auto IIAndLoc : ModuleName) {\n // ...\n if (!M) {\n PP.Diag(IIAndLoc.second, diag::warn_pragma_debug_unknown_module) << IIAndLoc.first;"}} }, ["warn_pragma_deprecated_macro_use"]={ [k]={Bb,"deprecated-pragma","pedantic-macros"}, [l]="deprecated-pragma", [h]={{nil,F,"warn_pragma_deprecated_macro_use"}}, [b]={{nil,F,"macro %0 has been marked as deprecated%select{|: %2}1"}}, [f]={{nil,F,{"macro A has been marked as deprecated",{T,": C"}}}}, [e]=j, [a]="macro (.*?) has been marked as deprecated(?:|\\: (.*?))", [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-pragma[^\\]]*\\]", [i]={{nil,F,hc}}, [d]={Db,1625925174,Gb,Fb}, [g]={{bc,1455,"void Preprocessor::emitMacroDeprecationWarning(const Token &Identifier) const {\n // ...\n if (Info.Message.empty())\n Diag(Identifier, diag::warn_pragma_deprecated_macro_use) << Identifier.getIdentifierInfo() << 0;"},{bc,1458,"void Preprocessor::emitMacroDeprecationWarning(const Token &Identifier) const {\n // ...\n if (Info.Message.empty())\n // ...\n else\n Diag(Identifier, diag::warn_pragma_deprecated_macro_use) << Identifier.getIdentifierInfo() << 1 << Info.Message;"}}, [m]={ ["clang/test/Lexer/deprecate-macro.c"]={"clang/test/Lexer/deprecate-macro.c:17:5: warning: macro \'bar\' has been marked as deprecated: bar is deprecated use 1 [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:35:5: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:39:13: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:43:8: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:47:9: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:55:10: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:73:7: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:80:10: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]","clang/test/Lexer/deprecate-macro.c:87:11: warning: macro \'foo\' has been marked as deprecated [-Wdeprecated-pragma]"} } }, ["warn_pragma_diagnostic_cannot_pop"]={ [k]={u,v,w,r,J}, [l]=J, [h]="warn_pragma_diagnostic_cannot_pop", [b]="pragma diagnostic pop could not pop, no matching push", [f]="pragma diagnostic pop could not pop, no matching push", [e]=j, [a]="pragma diagnostic pop could not pop, no matching push", [c]=bb, [i]=B, [d]={"3cc2648b476e",1283181334,"Now that GCC will have #pragma push/pop (in GCC 4.6), allow the","Now that GCC will have #pragma push/pop (in GCC 4.6), allow the\n#pragma without requiring it to be in the \"clang\" namespace, from\nLouis Gerbarg!\n\nllvm-svn: 112484"}, [g]={{C,1302,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (II->isStr(\"pop\")) {\n if (!PP.getDiagnostics().popMappings(DiagLoc))\n PP.Diag(Tok, diag::warn_pragma_diagnostic_cannot_pop);"},{C,1424,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n } else if (II && II->isStr(\"pop\")) {\n // ...\n if (!PP.getDiagnostics().popMappings(DiagLoc))\n PP.Diag(Tok, diag::warn_pragma_diagnostic_cannot_pop);"}}, [m]={ ["clang/test/Preprocessor/pushable-diagnostics.c"]={"clang/test/Preprocessor/pushable-diagnostics.c:3:106: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]","clang/test/Preprocessor/pushable-diagnostics.c:17:106: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]"} } }, ["warn_pragma_diagnostic_invalid"]={ [k]={u,v,w,r,J}, [l]=J, [h]="warn_pragma_diagnostic_invalid", [b]="pragma diagnostic expected \'error\', \'warning\', \'ignored\', \'fatal\', \'push\', or \'pop\'", [f]="pragma diagnostic expected \'error\', \'warning\', \'ignored\', \'fatal\', \'push\', or \'pop\'", [e]=j, [a]="pragma diagnostic expected \'error\', \'warning\', \'ignored\', \'fatal\', \'push\', or \'pop\'", [c]=bb, [i]=B, [d]={"504af1177d9c",1240183018,"implement \"#pragma GCC diagnostic\". Besides being a nice feature, this","implement \"#pragma GCC diagnostic\". Besides being a nice feature, this\nwill let us test for multiple different warning modes in the same\nfile in regression tests.\n\nThis implements rdar://2362963, a 10-year old feature request :)\n\nllvm-svn: 69560"}, [g]={{C,1290,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok, diag::warn_pragma_diagnostic_invalid);"},{C,1327,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (SV == diag::Severity()) {\n PP.Diag(Tok, diag::warn_pragma_diagnostic_invalid);"}}, [m]={ ["clang/test/Preprocessor/pushable-diagnostics.c"]={"clang/test/Preprocessor/pushable-diagnostics.c:5:138: warning: pragma diagnostic expected \'error\', \'warning\', \'ignored\', \'fatal\', \'push\', or \'pop\' [-Wunknown-pragmas]"} } }, ["warn_pragma_diagnostic_invalid_option"]={ [k]={u,v,w,r,J}, [l]=J, [h]="warn_pragma_diagnostic_invalid_option", [b]="pragma diagnostic expected option name (e.g. \"-Wundef\")", [f]="pragma diagnostic expected option name (e.g. \"-Wundef\")", [e]=j, [a]="pragma diagnostic expected option name \\(e\\.g\\. \"\\-Wundef\"\\)", [c]=bb, [i]=B, [d]={"504af1177d9c",1240183018,"implement \"#pragma GCC diagnostic\". Besides being a nice feature, this","implement \"#pragma GCC diagnostic\". Besides being a nice feature, this\nwill let us test for multiple different warning modes in the same\nfile in regression tests.\n\nThis implements rdar://2362963, a 10-year old feature request :)\n\nllvm-svn: 69560"}, [g]={{C,1345,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (WarningName.size() < 3 || WarningName[0] != \'-\' || (WarningName[1] != \'W\' && WarningName[1] != \'R\')) {\n PP.Diag(StringLoc, diag::warn_pragma_diagnostic_invalid_option);"}}, [m]={ ["clang/test/Preprocessor/pragma_diagnostic.c"]={"clang/test/Preprocessor/pragma_diagnostic.c:30:30: warning: pragma diagnostic expected option name (e.g. \"-Wundef\") [-Wunknown-pragmas]"} } }, ["warn_pragma_diagnostic_invalid_token"]={ [k]={u,v,w,r,J}, [l]=J, [h]="warn_pragma_diagnostic_invalid_token", [b]="unexpected token in pragma diagnostic", [f]="unexpected token in pragma diagnostic", [e]=j, [a]="unexpected token in pragma diagnostic", [c]=bb, [i]=B, [d]={"504af1177d9c",1240183018,"implement \"#pragma GCC diagnostic\". Besides being a nice feature, this","implement \"#pragma GCC diagnostic\". Besides being a nice feature, this\nwill let us test for multiple different warning modes in the same\nfile in regression tests.\n\nThis implements rdar://2362963, a 10-year old feature request :)\n\nllvm-svn: 69560"}, [g]={{C,1307,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (II->isStr(\"pop\")) {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok.getLocation(), diag::warn_pragma_diagnostic_invalid_token);"},{C,1315,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (II->isStr(\"pop\")) {\n // ...\n } else if (II->isStr(\"push\")) {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok.getLocation(), diag::warn_pragma_diagnostic_invalid_token);"},{C,1339,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_diagnostic_invalid_token);"}}, [m]={ ["clang/test/Preprocessor/pragma_diagnostic.c"]={"clang/test/Preprocessor/pragma_diagnostic.c:29:40: warning: unexpected token in pragma diagnostic [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_diagnostic.c:38:31: warning: unexpected token in pragma diagnostic [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_diagnostic.c:39:30: warning: unexpected token in pragma diagnostic [-Wunknown-pragmas]"} } }, ["warn_pragma_diagnostic_unknown_warning"]={ [k]={"unknown-warning-option"}, [l]="unknown-warning-option", [h]="warn_pragma_diagnostic_unknown_warning", [b]="unknown warning group \'%0\', ignored", [f]="unknown warning group \'A\', ignored", [e]=j, [a]="unknown warning group \'(.*?)\', ignored", [c]=" \\[(?:\\-Werror,)?\\-Wunknown\\-warning\\-option[^\\]]*\\]", [i]=B, [d]={"504af1177d9c",1240183018,"implement \"#pragma GCC diagnostic\". Besides being a nice feature, this","implement \"#pragma GCC diagnostic\". Besides being a nice feature, this\nwill let us test for multiple different warning modes in the same\nfile in regression tests.\n\nThis implements rdar://2362963, a 10-year old feature request :)\n\nllvm-svn: 69560"}, [g]={{C,1362,"/// PragmaDiagnosticHandler - e.g. \'\\#pragma GCC diagnostic ignored \"-Wformat\"\'\nstruct PragmaDiagnosticHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DiagToken) override {\n // ...\n if (unknownDiag)\n PP.Diag(StringLoc, diag::warn_pragma_diagnostic_unknown_warning) << WarningName;"}}, [m]={ ["clang/test/Preprocessor/pragma_diagnostic.c"]={"clang/test/Preprocessor/pragma_diagnostic.c:32:30: warning: unknown warning group \'-Winvalid-name\', ignored [-Wunknown-warning-option]"} } }, ["warn_pragma_exec_charset_expected"]={ [k]={u,v,w,r,J}, [l]=J, [h]={{nil,p,"warn_pragma_exec_charset_expected"}}, [b]={{nil,p,"#pragma execution_character_set expected \'%0\'"}}, [f]={{nil,p,"#pragma execution_character_set expected \'A\'"}}, [e]=j, [a]="\\#pragma execution_character_set expected \'(.*?)\'", [c]=bb, [i]={{nil,p,B}}, [d]={"0f56b22614c8",1552587137,"Add PragmaHandler for MSVC pragma execution_character_set","Add PragmaHandler for MSVC pragma execution_character_set\n\n__pragma(execution_character_set(push, \"UTF-8\")) is used in\nTraceLoggingProvider.h. This commit implements a no-op handler for\ncompatability, similar to how the flag -fexec_charset is handled.\n\nPatch by Matt Gardner!\n\nDifferential Revision: https://reviews.llvm.org/D58530\n\nllvm-svn: 356185"}, [g]={{C,1542,"/// \"\\#pragma execution_character_set(...)\". MSVC supports this pragma only\n/// for \"UTF-8\". We parse it and ignore it if UTF-8 is provided and warn\n/// otherwise to avoid -Wunknown-pragma warnings.\nstruct PragmaExecCharsetHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok, diag::warn_pragma_exec_charset_expected) << \"(\";"},{C,1580,"/// \"\\#pragma execution_character_set(...)\". MSVC supports this pragma only\n/// for \"UTF-8\". We parse it and ignore it if UTF-8 is provided and warn\n/// otherwise to avoid -Wunknown-pragma warnings.\nstruct PragmaExecCharsetHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok, diag::warn_pragma_exec_charset_expected) << \")\";"}}, [m]={ [mb]={"clang/test/Preprocessor/pragma_microsoft.c:244:85: warning: #pragma execution_character_set expected \'(\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:249:85: warning: #pragma execution_character_set expected \')\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:250:36: warning: #pragma execution_character_set expected \')\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:251:36: warning: #pragma execution_character_set expected \')\' [-Wunknown-pragmas]"} } }, ["warn_pragma_exec_charset_push_invalid"]={ [k]={u,v,w,r,J}, [l]=J, [h]={{nil,p,"warn_pragma_exec_charset_push_invalid"}}, [b]={{nil,p,"#pragma execution_character_set invalid value \'%0\', only \'UTF-8\' is supported"}}, [f]={{nil,p,"#pragma execution_character_set invalid value \'A\', only \'UTF-8\' is supported"}}, [e]=j, [a]="\\#pragma execution_character_set invalid value \'(.*?)\', only \'UTF\\-8\' is supported", [c]=bb, [i]={{nil,p,B}}, [d]={"0f56b22614c8",1552587137,"Add PragmaHandler for MSVC pragma execution_character_set","Add PragmaHandler for MSVC pragma execution_character_set\n\n__pragma(execution_character_set(push, \"UTF-8\")) is used in\nTraceLoggingProvider.h. This commit implements a no-op handler for\ncompatability, similar to how the flag -fexec_charset is handled.\n\nPatch by Matt Gardner!\n\nDifferential Revision: https://reviews.llvm.org/D58530\n\nllvm-svn: 356185"}, [g]={{C,1563,"/// \"\\#pragma execution_character_set(...)\". MSVC supports this pragma only\n/// for \"UTF-8\". We parse it and ignore it if UTF-8 is provided and warn\n/// otherwise to avoid -Wunknown-pragma warnings.\nstruct PragmaExecCharsetHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n // MSVC supports either of these, but nothing else.\n if (ExecCharset != \"UTF-8\" && ExecCharset != \"utf-8\") {\n PP.Diag(Tok, diag::warn_pragma_exec_charset_push_invalid) << ExecCharset;"}}, [m]={ [mb]={"clang/test/Preprocessor/pragma_microsoft.c:255:45: warning: #pragma execution_character_set invalid value \'asdf\', only \'UTF-8\' is supported [-Wunknown-pragmas]"} } }, ["warn_pragma_exec_charset_spec_invalid"]={ [k]={u,v,w,r,J}, [l]=J, [h]={{nil,p,"warn_pragma_exec_charset_spec_invalid"}}, [b]={{nil,p,"#pragma execution_character_set expected \'push\' or \'pop\'"}}, [f]={{nil,p,"#pragma execution_character_set expected \'push\' or \'pop\'"}}, [e]=j, [a]="\\#pragma execution_character_set expected \'push\' or \'pop\'", [c]=bb, [i]={{nil,p,B}}, [d]={"0f56b22614c8",1552587137,"Add PragmaHandler for MSVC pragma execution_character_set","Add PragmaHandler for MSVC pragma execution_character_set\n\n__pragma(execution_character_set(push, \"UTF-8\")) is used in\nTraceLoggingProvider.h. This commit implements a no-op handler for\ncompatability, similar to how the flag -fexec_charset is handled.\n\nPatch by Matt Gardner!\n\nDifferential Revision: https://reviews.llvm.org/D58530\n\nllvm-svn: 356185"}, [g]={{C,1575,"/// \"\\#pragma execution_character_set(...)\". MSVC supports this pragma only\n/// for \"UTF-8\". We parse it and ignore it if UTF-8 is provided and warn\n/// otherwise to avoid -Wunknown-pragma warnings.\nstruct PragmaExecCharsetHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n } else if (II && II->isStr(\"pop\")) {\n // ...\n } else {\n PP.Diag(Tok, diag::warn_pragma_exec_charset_spec_invalid);"}}, [m]={ [mb]={"clang/test/Preprocessor/pragma_microsoft.c:245:97: warning: #pragma execution_character_set expected \'push\' or \'pop\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:246:33: warning: #pragma execution_character_set expected \'push\' or \'pop\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:247:33: warning: #pragma execution_character_set expected \'push\' or \'pop\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:248:33: warning: #pragma execution_character_set expected \'push\' or \'pop\' [-Wunknown-pragmas]"} } }, ["warn_pragma_expected_action_or_r_paren"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_expected_action_or_r_paren", [b]="expected action or \')\' in \'#pragma %0\' - ignored", [f]="expected action or \')\' in \'#pragma A\' - ignored", [e]=j, [a]="expected action or \'\\)\' in \'\\#pragma (.*?)\' \\- ignored", [c]=y, [i]=t, [d]={Ob,1396996247,Xb,ac}, [g]={{n,1014,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n while (Tok.is(tok::comma)) {\n // ...\n if (!Tok.isAnyIdentifier()) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_action_or_r_paren) << PragmaName;"}}, [m]={ [Zb]={"clang/test/Sema/pragma-section.c:39:9: warning: expected action or \')\' in \'#pragma section\' - ignored [-Wignored-pragmas]","clang/test/Sema/pragma-section.c:44:9: warning: expected action or \')\' in \'#pragma section\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_expected_colon"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_expected_colon", [b]="missing \':\' after %0 - ignoring", [f]="missing \':\' after A - ignoring", [e]=j, [a]="missing \'\\:\' after (.*?) \\- ignoring", [c]=y, [i]=t, [d]={"7ce13fc940de",1297647773,"OpenCL: add support for __kernel, kernel keywords and EXTENSION,","OpenCL: add support for __kernel, kernel keywords and EXTENSION,\nFP_CONTRACT pragmas. Patch originally by ARM.\n\nllvm-svn: 125475"}, [g]={{L,3614,"/// Parses a comma-separated list of interop-types and a prefer_type list.\n///\nbool Parser::ParseOMPInteropInfo(OMPInteropInfo &InteropInfo, OpenMPClauseKind Kind) {\n // ...\n if (Kind == OMPC_init) {\n if (Tok.isNot(tok::colon) && (IsTarget || IsTargetSync))\n Diag(Tok, diag::warn_pragma_expected_colon) << \"interop types\";"},{L,3830,"/// Parsing of OpenMP clauses with single expressions and some additional\n/// argument like \'schedule\' or \'dist_schedule\'.\n///\n/// schedule-clause:\n/// \'schedule\' \'(\' [ modifier [ \',\' modifier ] \':\' ] kind [\',\' expression ]\n/// \')\'\n///\n/// if-clause:\n/// \'if\' \'(\' [ directive-name-modifier \':\' ] expression \')\'\n///\n/// defaultmap:\n/// \'defaultmap\' \'(\' modifier [ \':\' kind ] \')\'\n///\n/// device-clause:\n/// \'device\' \'(\' [ device-modifier \':\' ] expression \')\'\n///\nOMPClause *Parser::ParseOpenMPSingleExprWithArgClause(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, bool ParseOnly) {\n // ...\n if (Kind == OMPC_schedule) {\n // ...\n if (KindModifier > OMPC_SCHEDULE_unknown) {\n // ...\n // Parse \':\'\n if (Tok.is(tok::colon))\n // ...\n else\n Diag(Tok, diag::warn_pragma_expected_colon) << \"schedule modifier\";"},{L,3871,"/// Parsing of OpenMP clauses with single expressions and some additional\n/// argument like \'schedule\' or \'dist_schedule\'.\n///\n/// schedule-clause:\n/// \'schedule\' \'(\' [ modifier [ \',\' modifier ] \':\' ] kind [\',\' expression ]\n/// \')\'\n///\n/// if-clause:\n/// \'if\' \'(\' [ directive-name-modifier \':\' ] expression \')\'\n///\n/// defaultmap:\n/// \'defaultmap\' \'(\' modifier [ \':\' kind ] \')\'\n///\n/// device-clause:\n/// \'device\' \'(\' [ device-modifier \':\' ] expression \')\'\n///\nOMPClause *Parser::ParseOpenMPSingleExprWithArgClause(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, bool ParseOnly) {\n // ...\n if (Kind == OMPC_schedule) {\n // ...\n } else if (Kind == OMPC_dist_schedule) {\n // ...\n } else if (Kind == OMPC_defaultmap) {\n // ...\n // Parse \':\'\n if (Tok.is(tok::colon) || getLangOpts().OpenMP < 50) {\n if (Tok.is(tok::colon))\n // ...\n else if (Arg.back() != OMPC_DEFAULTMAP_MODIFIER_unknown)\n Diag(Tok, diag::warn_pragma_expected_colon) << \"defaultmap modifier\";"},{L,3902,"/// Parsing of OpenMP clauses with single expressions and some additional\n/// argument like \'schedule\' or \'dist_schedule\'.\n///\n/// schedule-clause:\n/// \'schedule\' \'(\' [ modifier [ \',\' modifier ] \':\' ] kind [\',\' expression ]\n/// \')\'\n///\n/// if-clause:\n/// \'if\' \'(\' [ directive-name-modifier \':\' ] expression \')\'\n///\n/// defaultmap:\n/// \'defaultmap\' \'(\' modifier [ \':\' kind ] \')\'\n///\n/// device-clause:\n/// \'device\' \'(\' [ device-modifier \':\' ] expression \')\'\n///\nOMPClause *Parser::ParseOpenMPSingleExprWithArgClause(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, bool ParseOnly) {\n // ...\n if (Kind == OMPC_schedule) {\n // ...\n } else if (Kind == OMPC_dist_schedule) {\n // ...\n } else if (Kind == OMPC_defaultmap) {\n // ...\n } else if (Kind == OMPC_order) {\n // ...\n if (KindModifier > OMPC_ORDER_unknown) {\n // ...\n // Parse \':\'\n if (Tok.is(tok::colon))\n // ...\n else\n Diag(Tok, diag::warn_pragma_expected_colon) << \"order modifier\";"},{L,4373,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n if (Tok.is(tok::colon))\n // ...\n else\n Diag(Tok, diag::warn_pragma_expected_colon) << \"reduction identifier\";"},{L,4419,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n } else if (Kind == OMPC_depend || Kind == OMPC_doacross) {\n // ...\n if (Tok.is(tok::colon)) {\n // ...\n } else if (Kind != OMPC_doacross || Tok.isNot(tok::r_paren)) {\n Diag(Tok, DKind == OMPD_ordered ? diag::warn_pragma_expected_colon_r_paren : diag::warn_pragma_expected_colon) << (Kind == OMPC_depend ? \"dependency type\" : \"dependence-type\");"},{L,4575,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n } else if (Kind == OMPC_depend || Kind == OMPC_doacross) {\n // ...\n } else if (Kind == OMPC_linear) {\n // ...\n } else if (Kind == OMPC_lastprivate) {\n // ...\n } else if (Kind == OMPC_map) {\n // ...\n } else if (Kind == OMPC_to || Kind == OMPC_from) {\n // ...\n if (!Data.MotionModifiers.empty() && Tok.isNot(tok::colon)) {\n if (!IsInvalidMapperModifier) {\n if (getLangOpts().OpenMP < 51)\n Diag(Tok, diag::warn_pragma_expected_colon) << \")\";"},{L,4577,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n } else if (Kind == OMPC_depend || Kind == OMPC_doacross) {\n // ...\n } else if (Kind == OMPC_linear) {\n // ...\n } else if (Kind == OMPC_lastprivate) {\n // ...\n } else if (Kind == OMPC_map) {\n // ...\n } else if (Kind == OMPC_to || Kind == OMPC_from) {\n // ...\n if (!Data.MotionModifiers.empty() && Tok.isNot(tok::colon)) {\n if (!IsInvalidMapperModifier) {\n if (getLangOpts().OpenMP < 51)\n // ...\n else\n Diag(Tok, diag::warn_pragma_expected_colon) << \"motion modifier\";"},{L,4637,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n } else if (Kind == OMPC_depend || Kind == OMPC_doacross) {\n // ...\n } else if (Kind == OMPC_linear) {\n // ...\n } else if (Kind == OMPC_lastprivate) {\n // ...\n } else if (Kind == OMPC_map) {\n // ...\n } else if (Kind == OMPC_to || Kind == OMPC_from) {\n // ...\n } else if (Kind == OMPC_allocate || (Kind == OMPC_affinity && Tok.is(tok::identifier) && PP.getSpelling(Tok) == \"iterator\")) {\n // ...\n } else if (Kind == OMPC_adjust_args) {\n // ...\n if (Data.ExtraModifier == OMPC_ADJUST_ARGS_unknown) {\n // ...\n } else {\n // ...\n ExpectAndConsume(tok::colon, diag::warn_pragma_expected_colon, \"adjust-op\");"},{n,2562,"void PragmaOpenCLExtensionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::colon)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_colon) << Ext;"}}, [m]={ ["clang/test/OpenMP/parallel_reduction_messages.c"]={"clang/test/OpenMP/parallel_reduction_messages.c:7:213: warning: missing \':\' after reduction identifier - ignoring [-Wignored-pragmas]","clang/test/OpenMP/parallel_reduction_messages.c:9:220: warning: missing \':\' after reduction identifier - ignoring [-Wignored-pragmas]","clang/test/OpenMP/parallel_reduction_messages.c:11:221: warning: missing \':\' after reduction identifier - ignoring [-Wignored-pragmas]"} } }, ["warn_pragma_expected_colon_r_paren"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_expected_colon_r_paren", [b]="missing \':\' or \')\' after %0 - ignoring", [f]="missing \':\' or \')\' after A - ignoring", [e]=j, [a]="missing \'\\:\' or \'\\)\' after (.*?) \\- ignoring", [c]=y, [i]=t, [d]={"eb4823503331",1450415156,"[OPENMP 4.5] Parsing/sema analysis for \'depend(source)\' clause in \'ordered\' directive.","[OPENMP 4.5] Parsing/sema analysis for \'depend(source)\' clause in \'ordered\' directive.\nOpenMP 4.5 adds \'depend(source)\' clause for \'ordered\' directive to support cross-iteration dependence. Patch adds parsing and semantic analysis for this construct.\n\nllvm-svn: 255986"}, [g]={{L,4418,"/// Parses clauses with list.\nbool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, OpenMPClauseKind Kind, SmallVectorImpl<Expr *> &Vars, Sema::OpenMPVarListDataTy &Data) {\n // ...\n // Handle reduction-identifier for reduction clause.\n if (Kind == OMPC_reduction || Kind == OMPC_task_reduction || Kind == OMPC_in_reduction) {\n // ...\n } else if (Kind == OMPC_depend || Kind == OMPC_doacross) {\n // ...\n if (Tok.is(tok::colon)) {\n // ...\n } else if (Kind != OMPC_doacross || Tok.isNot(tok::r_paren)) {\n Diag(Tok, DKind == OMPD_ordered ? diag::warn_pragma_expected_colon_r_paren : diag::warn_pragma_expected_colon) << (Kind == OMPC_depend ? \"dependency type\" : \"dependence-type\");"}}, [m]={ ["clang/test/OpenMP/ordered_messages.cpp"]={"clang/test/OpenMP/ordered_messages.cpp:190:376: warning: missing \':\' or \')\' after dependency type - ignoring [-Wignored-pragmas]","clang/test/OpenMP/ordered_messages.cpp:192:271: warning: missing \':\' or \')\' after dependency type - ignoring [-Wignored-pragmas]","clang/test/OpenMP/ordered_messages.cpp:369:376: warning: missing \':\' or \')\' after dependency type - ignoring [-Wignored-pragmas]","clang/test/OpenMP/ordered_messages.cpp:371:271: warning: missing \':\' or \')\' after dependency type - ignoring [-Wignored-pragmas]"} } }, ["warn_pragma_expected_comma"]={ [k]={q,r}, [l]=q, [h]={{nil,z,"warn_pragma_expected_comma"}}, [b]={{nil,z,"expected \',\' in \'#pragma %0\'"}}, [f]={{nil,z,"expected \',\' in \'#pragma A\'"}}, [e]=j, [a]="expected \',\' in \'\\#pragma (.*?)\'", [c]=y, [i]={{nil,z,t}}, [d]={"1bbe00e0ca2d",1521535991,"[ms] Parse #pragma optimize and ignore it behind its own flag","[ms] Parse #pragma optimize and ignore it behind its own flag\n\nThis allows users to turn off warnings about this pragma specifically,\nwhile still receiving warnings about other ignored pragmas.\n\nDifferential Revision: https://reviews.llvm.org/D44630\n\nllvm-svn: 327959"}, [g]={{n,1286,"bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::comma, diag::warn_pragma_expected_comma, PragmaName))"},{n,3760,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::comma, diag::warn_pragma_expected_comma, PragmaName))"}}, [m]={ ["clang/test/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:4:20: warning: expected \',\' in \'#pragma alloc_text\' [-Wignored-pragmas]"} } }, ["warn_pragma_expected_identifier"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_expected_identifier", [b]="expected identifier in \'#pragma %0\' - ignored", [f]="expected identifier in \'#pragma A\' - ignored", [e]=j, [a]="expected identifier in \'\\#pragma (.*?)\' \\- ignored", [c]=y, [i]=t, [d]={"fd14fade2ffc",1237847305,"Implement \'#pragma unused\'.","Implement \'#pragma unused\'.\n\nllvm-svn: 67569"}, [g]={{n,1293,"bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n while (true) {\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << PragmaName;"},{n,2001,"// #pragma GCC visibility comes in two variants:\n// \'push\' \'(\' [visibility] \')\'\n// \'pop\'\nvoid PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &VisTok) {\n // ...\n if (PushPop && PushPop->isStr(\"pop\")) {\n // ...\n } else if (PushPop && PushPop->isStr(\"push\")) {\n // ...\n if (!VisType) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"visibility\";"},{n,2012,"// #pragma GCC visibility comes in two variants:\n// \'push\' \'(\' [visibility] \')\'\n// \'pop\'\nvoid PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &VisTok) {\n // ...\n if (PushPop && PushPop->isStr(\"pop\")) {\n // ...\n } else if (PushPop && PushPop->isStr(\"push\")) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"visibility\";"},{n,2276,"// #pragma \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'options \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'align\' \'(\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'} \')\'\nstatic void ParseAlignPragma(Preprocessor &PP, Token &FirstTok, bool IsOptions) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << (IsOptions ? \"options\" : \"align\");"},{n,2432,"// #pragma weak identifier\n// #pragma weak identifier \'=\' identifier\nvoid PragmaWeakHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &WeakTok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"weak\";"},{n,2445,"// #pragma weak identifier\n// #pragma weak identifier \'=\' identifier\nvoid PragmaWeakHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &WeakTok) {\n // ...\n if (Tok.is(tok::equal)) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"weak\";"},{n,2493,"// #pragma redefine_extname identifier identifier\nvoid PragmaRedefineExtnameHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &RedefToken) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"redefine_extname\";"},{n,2502,"// #pragma redefine_extname identifier identifier\nvoid PragmaRedefineExtnameHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &RedefToken) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"redefine_extname\";"},{n,2553,"void PragmaOpenCLExtensionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"OPENCL\";"},{n,2688,"/// Handle \'#pragma pointers_to_members\'\n// The grammar for this pragma is as follows:\n//\n// <inheritance model> ::= (\'single\' | \'multiple\' | \'virtual\') \'_inheritance\'\n//\n// #pragma pointers_to_members \'(\' \'best_case\' \')\'\n// #pragma pointers_to_members \'(\' \'full_generality\' [\',\' inheritance-model] \')\'\n// #pragma pointers_to_members \'(\' inheritance-model \')\'\nvoid PragmaMSPointersToMembers::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (!Arg) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << \"pointers_to_members\";"},{n,3351,"void PragmaSTDC_FENV_ROUNDHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << PragmaName.getIdentifierInfo()->getName();"}}, [m]={ ["clang/test/Parser/pragma-weak.c"]={"clang/test/Parser/pragma-weak.c:7:77: warning: expected identifier in \'#pragma weak\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-weak.c:11:82: warning: expected identifier in \'#pragma weak\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-weak.c:12:81: warning: expected identifier in \'#pragma weak\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_expected_init_seg"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_expected_init_seg", [b]="expected \'compiler\', \'lib\', \'user\', or a string literal for the section name in \'#pragma %0\' - ignored", [f]="expected \'compiler\', \'lib\', \'user\', or a string literal for the section name in \'#pragma A\' - ignored", [e]=j, [a]="expected \'compiler\', \'lib\', \'user\', or a string literal for the section name in \'\\#pragma (.*?)\' \\- ignored", [c]=y, [i]=t, [d]={"1a711b169619",1405990385,"-fms-extensions: Implement half of #pragma init_seg","-fms-extensions: Implement half of #pragma init_seg\n\nSummary:\nThis pragma is very rare. We could *hypothetically* lower some uses of\nit down to @llvm.global_ctors, but given that GlobalOpt isn\'t able to\noptimize prioritized global ctors today, there\'s really no point.\n\nIf we wanted to do this in the future, I would check if the section used\nin the pragma started with \".CRT$XC\" and had up to two characters after\nit. Those two characters could form the 16-bit initialization priority\nthat we support in @llvm.global_ctors. We would have to teach LLVM to\nlower prioritized global ctors on COFF as well.\n\nThis should let us compile some silly uses of this pragma in WebKit /\nBlink.\n\nReviewers: rsmith, majnemer\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D4549\n\nllvm-svn: 213593"}, [g]={{n,1191,"// #pragma init_seg({ compiler | lib | user | \"section-name\" [, func-name]} )\nbool Parser::HandlePragmaMSInitSeg(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (!SegmentName) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_init_seg) << PragmaName;"}}, [m]={ ["clang/test/SemaCXX/pragma-init_seg.cpp"]={"clang/test/SemaCXX/pragma-init_seg.cpp:9:9: warning: expected \'compiler\', \'lib\', \'user\', or a string literal for the section name in \'#pragma init_seg\' - ignored [-Wignored-pragmas]","clang/test/SemaCXX/pragma-init_seg.cpp:10:9: warning: expected \'compiler\', \'lib\', \'user\', or a string literal for the section name in \'#pragma init_seg\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_expected_integer"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_expected_integer", [b]="expected integer between %0 and %1 inclusive in \'#pragma %2\' - ignored", [f]="expected integer between A and B inclusive in \'#pragma C\' - ignored", [e]=j, [a]="expected integer between (.*?) and (.*?) inclusive in \'\\#pragma (.*?)\' \\- ignored", [c]=y, [i]=t, [d]={"c0dca6ded731",1392249026,"MS ABI: Implement #pragma vtordisp() and clang-cl /vdN","MS ABI: Implement #pragma vtordisp() and clang-cl /vdN\n\nThese features are new in VS 2013 and are necessary in order to layout\nstd::ostream correctly. Currently we have an ABI incompatibility when\nself-hosting with the 2013 stdlib in our convertible_fwd_ostream wrapper\nin gtest.\n\nThis change adds another implicit attribute, MSVtorDispAttr, because\nimplicit attributes are currently the best way to make sure the\ninformation stays on class templates through instantiation.\n\nReviewers: majnemer\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2746\n\nllvm-svn: 201274"}, [g]={{n,2822,"/// Handle \'#pragma vtordisp\'\n// The grammar for this pragma is as follows:\n//\n// <vtordisp-mode> ::= (\'off\' | \'on\' | \'0\' | \'1\' | \'2\' )\n//\n// #pragma vtordisp \'(\' [\'push\' \',\'] vtordisp-mode \')\'\n// #pragma vtordisp \'(\' \'pop\' \')\'\n// #pragma vtordisp \'(\' \')\'\nvoid PragmaMSVtorDisp::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Action & Sema::PSK_Push || Action & Sema::PSK_Set) {\n // ...\n if (II && II->isStr(\"off\")) {\n // ...\n } else if (II && II->isStr(\"on\")) {\n // ...\n } else if (Tok.is(tok::numeric_constant) && PP.parseSimpleIntegerLiteral(Tok, Value)) {\n if (Value > 2) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_integer) << 0 << 2 << \"vtordisp\";"}}, [m]={ ["clang/test/SemaCXX/pragma-vtordisp.cpp"]={"clang/test/SemaCXX/pragma-vtordisp.cpp:15:25: warning: expected integer between 0 and 2 inclusive in \'#pragma vtordisp\' - ignored [-Wignored-pragmas]","clang/test/SemaCXX/pragma-vtordisp.cpp:32:19: warning: expected integer between 0 and 2 inclusive in \'#pragma vtordisp\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_expected_lparen"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_expected_lparen", [b]="missing \'(\' after \'#pragma %0\' - ignoring", [f]="missing \'(\' after \'#pragma A\' - ignoring", [e]=j, [a]="missing \'\\(\' after \'\\#pragma (.*?)\' \\- ignoring", [c]=y, [i]=t, [d]={"fd14fade2ffc",1237847305,"Implement \'#pragma unused\'.","Implement \'#pragma unused\'.\n\nllvm-svn: 67569"}, [g]={{n,276,"// \"\\#pragma fenv_access (on)\".\nstruct PragmaMSFenvAccessHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen) << PragmaName;"},{n,982,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_lparen) << PragmaName;"},{n,1063,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_lparen) << PragmaName;"},{n,1151,"// #pragma init_seg({ compiler | lib | user | \"section-name\" [, func-name]} )\nbool Parser::HandlePragmaMSInitSeg(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::l_paren, diag::warn_pragma_expected_lparen, PragmaName))"},{n,1210,"// #pragma strict_gs_check(pop)\n// #pragma strict_gs_check(push, \"on\" | \"off\")\n// #pragma strict_gs_check(\"on\" | \"off\")\nbool Parser::HandlePragmaMSStrictGuardStackCheck(StringRef PragmaName, SourceLocation PragmaLocation) {\n if (ExpectAndConsume(tok::l_paren, diag::warn_pragma_expected_lparen, PragmaName))"},{n,1261,"bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::l_paren, diag::warn_pragma_expected_lparen, PragmaName))"},{n,1994,"// #pragma GCC visibility comes in two variants:\n// \'push\' \'(\' [visibility] \')\'\n// \'pop\'\nvoid PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &VisTok) {\n // ...\n if (PushPop && PushPop->isStr(\"pop\")) {\n // ...\n } else if (PushPop && PushPop->isStr(\"push\")) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen) << \"visibility\";"},{n,2047,"// #pragma pack(...) comes in the following delicious flavors:\n// pack \'(\' [integer] \')\'\n// pack \'(\' \'show\' \')\'\n// pack \'(\' (\'push\' | \'pop\') [\',\' identifier] [, integer] \')\'\nvoid PragmaPackHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PackTok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen) << \"pack\";"},{n,2265,"// #pragma \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'options \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'align\' \'(\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'} \')\'\nstatic void ParseAlignPragma(Preprocessor &PP, Token &FirstTok, bool IsOptions) {\n // ...\n if (PP.getLangOpts().XLPragmaPack) {\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen) << \"align\";"},{n,2352,"// #pragma unused(identifier)\nvoid PragmaUnusedHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &UnusedTok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen) << \"unused\";"},{n,2681,"/// Handle \'#pragma pointers_to_members\'\n// The grammar for this pragma is as follows:\n//\n// <inheritance model> ::= (\'single\' | \'multiple\' | \'virtual\') \'_inheritance\'\n//\n// #pragma pointers_to_members \'(\' \'best_case\' \')\'\n// #pragma pointers_to_members \'(\' \'full_generality\' [\',\' inheritance-model] \')\'\n// #pragma pointers_to_members \'(\' inheritance-model \')\'\nvoid PragmaMSPointersToMembers::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(PointersToMembersLoc, diag::warn_pragma_expected_lparen) << \"pointers_to_members\";"},{n,2778,"/// Handle \'#pragma vtordisp\'\n// The grammar for this pragma is as follows:\n//\n// <vtordisp-mode> ::= (\'off\' | \'on\' | \'0\' | \'1\' | \'2\' )\n//\n// #pragma vtordisp \'(\' [\'push\' \',\'] vtordisp-mode \')\'\n// #pragma vtordisp \'(\' \'pop\' \')\'\n// #pragma vtordisp \'(\' \')\'\nvoid PragmaMSVtorDisp::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(VtorDispLoc, diag::warn_pragma_expected_lparen) << \"vtordisp\";"},{n,3671,"/// Handle the Microsoft \\#pragma intrinsic extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma intrinsic(memset)\n/// #pragma intrinsic(strlen, memcpy)\n/// \\endcode\n///\n/// Pragma intrisic tells the compiler to use a builtin version of the\n/// function. Clang does it anyway, so the pragma doesn\'t really do anything.\n/// Anyway, we emit a warning if the function specified in \\#pragma intrinsic\n/// isn\'t an intrinsic in clang and suggest to include intrin.h.\nvoid PragmaMSIntrinsicHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen) << \"intrinsic\";"},{n,3707,"bool Parser::HandlePragmaMSFunction(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::l_paren, diag::warn_pragma_expected_lparen, PragmaName))"},{n,3742,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::l_paren, diag::warn_pragma_expected_lparen, PragmaName))"}}, [m]={ ["clang/test/Parser/pragma-pack.c"]={"clang/test/Parser/pragma-pack.c:6:73: warning: missing \'(\' after \'#pragma pack\' - ignoring [-Wignored-pragmas]"} } }, ["warn_pragma_expected_non_wide_string"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_expected_non_wide_string", [b]="expected non-wide string literal in \'#pragma %0\'", [f]="expected non-wide string literal in \'#pragma A\'", [e]=j, [a]="expected non\\-wide string literal in \'\\#pragma (.*?)\'", [c]=y, [i]=t, [d]={"722b1df86968",1405642396,"Fix parsing certain kinds of strings in the MS section pragmas","Fix parsing certain kinds of strings in the MS section pragmas\n\nWe were crashing on the relevant test case inputs. Also, refactor this\ncode a bit so we can report failure and slurp the pragma tokens without\nreturning a diagnostic id. This is more consistent with the rest of the\nparser and sema code.\n\nllvm-svn: 213337"}, [g]={{n,997,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (SegmentName->getCharByteWidth() != 1) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_non_wide_string) << PragmaName;"},{n,1119,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n // ...\n if (SegmentName->getCharByteWidth() != 1) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_non_wide_string) << PragmaName;"},{n,1183,"// #pragma init_seg({ compiler | lib | user | \"section-name\" [, func-name]} )\nbool Parser::HandlePragmaMSInitSeg(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isAnyIdentifier()) {\n // ...\n } else if (Tok.is(tok::string_literal)) {\n // ...\n if (SegmentName->getCharByteWidth() != 1) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_non_wide_string) << PragmaName;"},{n,1272,"bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.is(tok::string_literal)) {\n // ...\n if (SegmentName->getCharByteWidth() != 1) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_non_wide_string) << PragmaName;"},{n,3755,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (OptimizationList->getCharByteWidth() != 1) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_non_wide_string) << PragmaName;"}}, [m]={ [Zb]={"clang/test/Sema/pragma-section.c:12:9: warning: expected non-wide string literal in \'#pragma data_seg\' [-Wignored-pragmas]"} } }, ["warn_pragma_expected_predicate"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_expected_predicate", [b]="expected %select{\'enable\', \'disable\', \'begin\' or \'end\'|\'disable\'}0 - ignoring", [f]={{nil,nil,{"expected ",{"\'enable\', \'disable\', \'begin\' or \'end\'","\'disable\'"}," - ignoring"}}}, [e]=j, [a]="expected (?:\'enable\', \'disable\', \'begin\' or \'end\'|\'disable\') \\- ignoring", [c]=y, [i]=t, [d]={"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"}, [g]={{n,902,"void Parser::HandlePragmaOpenCLExtension() {\n // ...\n // OpenCL 1.1 9.1: \"The all variant sets the behavior for all extensions,\n // overriding all previously issued extension directives, but only if the\n // behavior is set to disable.\"\n if (Name == \"all\") {\n if (State == Disable)\n // ...\n else\n PP.Diag(NameLoc, diag::warn_pragma_expected_predicate) << 1;"},{n,2568,"void PragmaOpenCLExtensionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_predicate) << 0;"},{n,2583,"void PragmaOpenCLExtensionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Pred->isStr(\"enable\")) {\n // ...\n } else if (Pred->isStr(\"disable\")) {\n // ...\n } else if (Pred->isStr(\"begin\"))\n // ...\n else if (Pred->isStr(\"end\"))\n // ...\n else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_predicate) << Ext->isStr(\"all\");"}}, [m]={ ["clang/test/Parser/opencl-pragma.cl"]={"clang/test/Parser/opencl-pragma.cl:10:40: warning: expected \'enable\', \'disable\', \'begin\' or \'end\' - ignoring [-Wignored-pragmas]","clang/test/Parser/opencl-pragma.cl:8:26: warning: expected \'disable\' - ignoring [-Wignored-pragmas]"} } }, ["warn_pragma_expected_punc"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_expected_punc", [b]="expected \')\' or \',\' in \'#pragma %0\'", [f]="expected \')\' or \',\' in \'#pragma A\'", [e]=j, [a]="expected \'\\)\' or \',\' in \'\\#pragma (.*?)\'", [c]=y, [i]=t, [d]={"88969810565a",1392059197,"Basic: Clean up malformed pragma diagnostics","Basic: Clean up malformed pragma diagnostics\n\nCreate a new diagnostic, -Wignored-pragmas and use it to handle any\ncase where a pragma would have a side effect but is ignored.\n\nllvm-svn: 201102"}, [g]={{n,1092,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isAnyIdentifier()) {\n // ...\n if (Action != Sema::PSK_Reset) {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n // If we\'ve got a comma, we either need a label or a string.\n if (Tok.isAnyIdentifier()) {\n // ...\n if (Tok.is(tok::comma))\n // ...\n else if (Tok.isNot(tok::r_paren)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_punc) << PragmaName;"},{n,1098,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isAnyIdentifier()) {\n // ...\n if (Action != Sema::PSK_Reset) {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n } else if (Tok.isNot(tok::r_paren)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_punc) << PragmaName;"},{n,1220,"// #pragma strict_gs_check(pop)\n// #pragma strict_gs_check(push, \"on\" | \"off\")\n// #pragma strict_gs_check(\"on\" | \"off\")\nbool Parser::HandlePragmaMSStrictGuardStackCheck(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.is(tok::identifier)) {\n // ...\n if (PushPop == \"push\") {\n // ...\n if (ExpectAndConsume(tok::comma, diag::warn_pragma_expected_punc, PragmaName))"},{n,2388,"// #pragma unused(identifier)\nvoid PragmaUnusedHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &UnusedTok) {\n // ...\n while (true) {\n // ...\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_punc) << \"unused\";"},{n,2790,"/// Handle \'#pragma vtordisp\'\n// The grammar for this pragma is as follows:\n//\n// <vtordisp-mode> ::= (\'off\' | \'on\' | \'0\' | \'1\' | \'2\' )\n//\n// #pragma vtordisp \'(\' [\'push\' \',\'] vtordisp-mode \')\'\n// #pragma vtordisp \'(\' \'pop\' \')\'\n// #pragma vtordisp \'(\' \')\'\nvoid PragmaMSVtorDisp::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (II) {\n if (II->isStr(\"push\")) {\n // ...\n if (Tok.isNot(tok::comma)) {\n PP.Diag(VtorDispLoc, diag::warn_pragma_expected_punc) << \"vtordisp\";"}} }, ["warn_pragma_expected_rparen"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_expected_rparen", [b]="missing \')\' after \'#pragma %0\' - ignoring", [f]="missing \')\' after \'#pragma A\' - ignoring", [e]=j, [a]="missing \'\\)\' after \'\\#pragma (.*?)\' \\- ignoring", [c]=y, [i]=t, [d]={"fd14fade2ffc",1237847305,"Implement \'#pragma unused\'.","Implement \'#pragma unused\'.\n\nllvm-svn: 67569"}, [g]={{n,298,"// \"\\#pragma fenv_access (on)\".\nstruct PragmaMSFenvAccessHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_rparen) << PragmaName;"},{n,1046,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_rparen) << PragmaName;"},{n,1128,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_rparen) << PragmaName;"},{n,1195,"// #pragma init_seg({ compiler | lib | user | \"section-name\" [, func-name]} )\nbool Parser::HandlePragmaMSInitSeg(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName) || ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{n,1246,"// #pragma strict_gs_check(pop)\n// #pragma strict_gs_check(push, \"on\" | \"off\")\n// #pragma strict_gs_check(\"on\" | \"off\")\nbool Parser::HandlePragmaMSStrictGuardStackCheck(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName))"},{n,1307,"bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName) || ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{n,2007,"// #pragma GCC visibility comes in two variants:\n// \'push\' \'(\' [visibility] \')\'\n// \'pop\'\nvoid PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &VisTok) {\n // ...\n if (PushPop && PushPop->isStr(\"pop\")) {\n // ...\n } else if (PushPop && PushPop->isStr(\"push\")) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_rparen) << \"visibility\";"},{n,2124,"// #pragma pack(...) comes in the following delicious flavors:\n// pack \'(\' [integer] \')\'\n// pack \'(\' \'show\' \')\'\n// pack \'(\' (\'push\' | \'pop\') [\',\' identifier] [, integer] \')\'\nvoid PragmaPackHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PackTok) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_rparen) << \"pack\";"},{n,2304,"// #pragma \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'options \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'align\' \'(\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'} \')\'\nstatic void ParseAlignPragma(Preprocessor &PP, Token &FirstTok, bool IsOptions) {\n // ...\n if (PP.getLangOpts().XLPragmaPack) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_rparen) << \"align\";"},{n,2835,"/// Handle \'#pragma vtordisp\'\n// The grammar for this pragma is as follows:\n//\n// <vtordisp-mode> ::= (\'off\' | \'on\' | \'0\' | \'1\' | \'2\' )\n//\n// #pragma vtordisp \'(\' [\'push\' \',\'] vtordisp-mode \')\'\n// #pragma vtordisp \'(\' \'pop\' \')\'\n// #pragma vtordisp \'(\' \')\'\nvoid PragmaMSVtorDisp::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n // Finish the pragma: \')\' $\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(VtorDispLoc, diag::warn_pragma_expected_rparen) << \"vtordisp\";"},{n,3692,"/// Handle the Microsoft \\#pragma intrinsic extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma intrinsic(memset)\n/// #pragma intrinsic(strlen, memcpy)\n/// \\endcode\n///\n/// Pragma intrisic tells the compiler to use a builtin version of the\n/// function. Clang does it anyway, so the pragma doesn\'t really do anything.\n/// Anyway, we emit a warning if the function specified in \\#pragma intrinsic\n/// isn\'t an intrinsic in clang and suggest to include intrin.h.\nvoid PragmaMSIntrinsicHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_rparen) << \"intrinsic\";"},{n,3728,"bool Parser::HandlePragmaMSFunction(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName) || ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{n,3779,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName))"}}, [m]={ ["clang/test/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:5:22: warning: missing \')\' after \'#pragma alloc_text\' - ignoring [-Wignored-pragmas]","clang/test/Sema/pragma-ms-alloc-text.cpp:15:22: warning: missing \')\' after \'#pragma alloc_text\' - ignoring [-Wignored-pragmas]"} } }, ["warn_pragma_expected_section_label_or_name"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_expected_section_label_or_name", [b]="expected a stack label or a string literal for the section name in \'#pragma %0\' - ignored", [f]="expected a stack label or a string literal for the section name in \'#pragma A\' - ignored", [e]=j, [a]="expected a stack label or a string literal for the section name in \'\\#pragma (.*?)\' \\- ignored", [c]=y, [i]=t, [d]={Ob,1396996247,Xb,ac}, [g]={{n,1109,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n if (Tok.isNot(tok::string_literal)) {\n unsigned DiagID = Action != Sema::PSK_Reset ? !SlotLabel.empty() ? diag::warn_pragma_expected_section_name : diag::warn_pragma_expected_section_label_or_name : diag::warn_pragma_expected_section_push_pop_or_name;"}}, [m]={ [Zb]={"clang/test/Sema/pragma-section.c:28:9: warning: expected a stack label or a string literal for the section name in \'#pragma bss_seg\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_expected_section_name"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_expected_section_name", [b]="expected a string literal for the section name in \'#pragma %0\' - ignored", [f]="expected a string literal for the section name in \'#pragma A\' - ignored", [e]=j, [a]="expected a string literal for the section name in \'\\#pragma (.*?)\' \\- ignored", [c]=y, [i]=t, [d]={Ob,1396996247,Xb,ac}, [g]={{n,988,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n // Parsing code for pragma section\n if (Tok.isNot(tok::string_literal)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_section_name) << PragmaName;"},{n,1108,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n if (Tok.isNot(tok::string_literal)) {\n unsigned DiagID = Action != Sema::PSK_Reset ? !SlotLabel.empty() ? diag::warn_pragma_expected_section_name : diag::warn_pragma_expected_section_label_or_name : diag::warn_pragma_expected_section_push_pop_or_name;"},{n,1281,"bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.is(tok::string_literal)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n } else {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_section_name) << PragmaName;"}}, [m]={ ["clang/test/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:3:9: warning: expected a string literal for the section name in \'#pragma alloc_text\' - ignored [-Wignored-pragmas]","clang/test/Sema/pragma-ms-alloc-text.cpp:7:9: warning: expected a string literal for the section name in \'#pragma alloc_text\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_expected_section_push_pop_or_name"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_expected_section_push_pop_or_name", [b]="expected push, pop or a string literal for the section name in \'#pragma %0\' - ignored", [f]="expected push, pop or a string literal for the section name in \'#pragma A\' - ignored", [e]=j, [a]="expected push, pop or a string literal for the section name in \'\\#pragma (.*?)\' \\- ignored", [c]=y, [i]=t, [d]={Ob,1396996247,Xb,ac}, [g]={{n,1077,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isAnyIdentifier()) {\n // ...\n if (PushPop == \"push\")\n // ...\n else if (PushPop == \"pop\")\n // ...\n else {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_section_push_pop_or_name) << PragmaName;"},{n,1110,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n if (Tok.isNot(tok::string_literal)) {\n unsigned DiagID = Action != Sema::PSK_Reset ? !SlotLabel.empty() ? diag::warn_pragma_expected_section_name : diag::warn_pragma_expected_section_label_or_name : diag::warn_pragma_expected_section_push_pop_or_name;"}}, [m]={ [Zb]={"clang/test/Sema/pragma-section.c:24:9: warning: expected push, pop or a string literal for the section name in \'#pragma bss_seg\' - ignored [-Wignored-pragmas]","clang/test/Sema/pragma-section.c:25:9: warning: expected push, pop or a string literal for the section name in \'#pragma bss_seg\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_expected_string"]={ [k]={q,r}, [l]=q, [h]={{nil,z,"warn_pragma_expected_string"}}, [b]={{nil,z,"expected string literal in \'#pragma %0\' - ignoring"}}, [f]={{nil,z,"expected string literal in \'#pragma A\' - ignoring"}}, [e]=j, [a]="expected string literal in \'\\#pragma (.*?)\' \\- ignoring", [c]=y, [i]={{nil,z,t}}, [d]={"1bbe00e0ca2d",1521535991,"[ms] Parse #pragma optimize and ignore it behind its own flag","[ms] Parse #pragma optimize and ignore it behind its own flag\n\nThis allows users to turn off warnings about this pragma specifically,\nwhile still receiving warnings about other ignored pragmas.\n\nDifferential Revision: https://reviews.llvm.org/D44630\n\nllvm-svn: 327959"}, [g]={{n,3747,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::string_literal)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_expected_string) << PragmaName;"}}, [m]={ [mb]={"clang/test/Preprocessor/pragma_microsoft.c:225:9: warning: expected string literal in \'#pragma optimize\' - ignoring [-Wignored-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:226:9: warning: expected string literal in \'#pragma optimize\' - ignoring [-Wignored-pragmas]"} } }, ["warn_pragma_extension_is_core"]={ [k]={"pedantic-core-features"}, [l]="pedantic-core-features", [h]="warn_pragma_extension_is_core", [b]="OpenCL extension %0 is core feature or supported optional core feature - ignoring", [f]="OpenCL extension A is core feature or supported optional core feature - ignoring", [e]=j, [a]="OpenCL extension (.*?) is core feature or supported optional core feature \\- ignoring", [c]=" \\[(?:\\-Werror,)?\\-Wpedantic\\-core\\-features[^\\]]*\\]", [i]=t, [d]={"64936ce91dba",1463154277,"[OpenCL] Add supported OpenCL extensions to target info.","[OpenCL] Add supported OpenCL extensions to target info.\n\nAdd supported OpenCL extensions to target info. It serves as default values to save the users of the burden setting each supported extensions and optional core features in command line.\n\nDifferential Revision: http://reviews.llvm.org/D19484\n\nllvm-svn: 269431"}, [g]={{n,918,"void Parser::HandlePragmaOpenCLExtension() {\n // ...\n // OpenCL 1.1 9.1: \"The all variant sets the behavior for all extensions,\n // overriding all previously issued extension directives, but only if the\n // behavior is set to disable.\"\n if (Name == \"all\") {\n // ...\n } else if (State == Begin) {\n // ...\n } else if (State == End) {\n // ...\n } else if (!Opt.isKnown(Name) || !Opt.isWithPragma(Name))\n // ...\n else if (Opt.isSupportedExtension(Name, getLangOpts()))\n // ...\n else if (Opt.isSupportedCoreOrOptionalCore(Name, getLangOpts()))\n PP.Diag(NameLoc, diag::warn_pragma_extension_is_core) << Ident;"}}, [m]={ ["clang/test/Misc/amdgcn.languageOptsOpenCL.cl"]={"clang/test/Misc/amdgcn.languageOptsOpenCL.cl:57:26: warning: OpenCL extension \'cl_khr_byte_addressable_store\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:65:26: warning: OpenCL extension \'cl_khr_global_int32_base_atomics\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:73:26: warning: OpenCL extension \'cl_khr_global_int32_extended_atomics\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:81:26: warning: OpenCL extension \'cl_khr_local_int32_base_atomics\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:89:26: warning: OpenCL extension \'cl_khr_local_int32_extended_atomics\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:98:26: warning: OpenCL extension \'cl_khr_fp64\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:107:26: warning: OpenCL extension \'cl_khr_3d_image_writes\' is core feature or supported optional core feature - ignoring [-Wpedantic-core-features]"} } }, ["warn_pragma_extra_tokens_at_eol"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_extra_tokens_at_eol", [b]="extra tokens at end of \'#pragma %0\' - ignored", [f]="extra tokens at end of \'#pragma A\' - ignored", [e]=j, [a]="extra tokens at end of \'\\#pragma (.*?)\' \\- ignored", [c]=y, [i]=t, [d]={"f5867dd51a83",1244162998,"Add parser support for #pragma weak.","Add parser support for #pragma weak.\n\nllvm-svn: 72907"}, [g]={{n,305,"// \"\\#pragma fenv_access (on)\".\nstruct PragmaMSFenvAccessHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << PragmaName;"},{n,1051,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::eof)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_extra_tokens_at_eol) << PragmaName;"},{n,1133,"bool Parser::HandlePragmaMSSegment(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.isNot(tok::eof)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_extra_tokens_at_eol) << PragmaName;"},{n,1197,"// #pragma init_seg({ compiler | lib | user | \"section-name\" [, func-name]} )\nbool Parser::HandlePragmaMSInitSeg(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName) || ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{n,1250,"// #pragma strict_gs_check(pop)\n// #pragma strict_gs_check(push, \"on\" | \"off\")\n// #pragma strict_gs_check(\"on\" | \"off\")\nbool Parser::HandlePragmaMSStrictGuardStackCheck(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{n,1309,"bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName) || ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{n,1422,"bool Parser::HandlePragmaLoopHint(LoopHint &Hint) {\n // ...\n // Validate the argument.\n if (StateOption) {\n // ...\n if (Toks.size() > 2)\n Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << PragmaLoopHintString(Info->PragmaName, Info->Option);"},{n,1439,"bool Parser::HandlePragmaLoopHint(LoopHint &Hint) {\n // ...\n // Validate the argument.\n if (StateOption) {\n // ...\n } else if (OptionInfo && OptionInfo->getName() == \"vectorize_width\") {\n // ...\n // Look for vectorize_width(fixed|scalable)\n if (IsScalableStr == \"scalable\" || IsScalableStr == \"fixed\") {\n // ...\n if (Toks.size() > 2) {\n Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << PragmaLoopHintString(Info->PragmaName, Info->Option);"},{n,1478,"bool Parser::HandlePragmaLoopHint(LoopHint &Hint) {\n // ...\n // Validate the argument.\n if (StateOption) {\n // ...\n } else if (OptionInfo && OptionInfo->getName() == \"vectorize_width\") {\n // ...\n // Look for vectorize_width(fixed|scalable)\n if (IsScalableStr == \"scalable\" || IsScalableStr == \"fixed\") {\n // ...\n } else {\n // ...\n // Tokens following an error in an ill-formed constant expression will\n // remain in the token stream and must be removed.\n if (Tok.isNot(tok::eof)) {\n Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << PragmaLoopHintString(Info->PragmaName, Info->Option);"},{n,1503,"bool Parser::HandlePragmaLoopHint(LoopHint &Hint) {\n // ...\n // Validate the argument.\n if (StateOption) {\n // ...\n } else if (OptionInfo && OptionInfo->getName() == \"vectorize_width\") {\n // ...\n } else {\n // ...\n // Tokens following an error in an ill-formed constant expression will\n // remain in the token stream and must be removed.\n if (Tok.isNot(tok::eof)) {\n Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << PragmaLoopHintString(Info->PragmaName, Info->Option);"},{n,2019,"// #pragma GCC visibility comes in two variants:\n// \'push\' \'(\' [visibility] \')\'\n// \'pop\'\nvoid PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &VisTok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"visibility\";"},{n,2131,"// #pragma pack(...) comes in the following delicious flavors:\n// pack \'(\' [integer] \')\'\n// pack \'(\' \'show\' \')\'\n// pack \'(\' (\'push\' | \'pop\') [\',\' identifier] [, integer] \')\'\nvoid PragmaPackHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PackTok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"pack\";"},{n,2179,"// #pragma ms_struct on\n// #pragma ms_struct off\nvoid PragmaMSStructHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &MSStructTok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"ms_struct\";"},{n,2312,"// #pragma \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'options \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'align\' \'(\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'} \')\'\nstatic void ParseAlignPragma(Preprocessor &PP, Token &FirstTok, bool IsOptions) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << (IsOptions ? \"options\" : \"align\");"},{n,2394,"// #pragma unused(identifier)\nvoid PragmaUnusedHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &UnusedTok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"unused\";"},{n,2454,"// #pragma weak identifier\n// #pragma weak identifier \'=\' identifier\nvoid PragmaWeakHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &WeakTok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"weak\";"},{n,2511,"// #pragma redefine_extname identifier identifier\nvoid PragmaRedefineExtnameHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &RedefToken) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"redefine_extname\";"},{n,2591,"void PragmaOpenCLExtensionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"OPENCL EXTENSION\";"},{n,2750,"/// Handle \'#pragma pointers_to_members\'\n// The grammar for this pragma is as follows:\n//\n// <inheritance model> ::= (\'single\' | \'multiple\' | \'virtual\') \'_inheritance\'\n//\n// #pragma pointers_to_members \'(\' \'best_case\' \')\'\n// #pragma pointers_to_members \'(\' \'full_generality\' [\',\' inheritance-model] \')\'\n// #pragma pointers_to_members \'(\' inheritance-model \')\'\nvoid PragmaMSPointersToMembers::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"pointers_to_members\";"},{n,2841,"/// Handle \'#pragma vtordisp\'\n// The grammar for this pragma is as follows:\n//\n// <vtordisp-mode> ::= (\'off\' | \'on\' | \'0\' | \'1\' | \'2\' )\n//\n// #pragma vtordisp \'(\' [\'push\' \',\'] vtordisp-mode \')\'\n// #pragma vtordisp \'(\' \'pop\' \')\'\n// #pragma vtordisp \'(\' \')\'\nvoid PragmaMSVtorDisp::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"vtordisp\";"},{n,2996,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"float_control\";"},{n,3318,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"clang fp\";"},{n,3373,"void PragmaSTDC_FENV_ROUNDHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"STDC FENV_ROUND\";"},{n,3566,"/// Handle the \\#pragma clang loop directive.\n/// #pragma clang \'loop\' loop-hints\n///\n/// loop-hints:\n/// loop-hint loop-hints[opt]\n///\n/// loop-hint:\n/// \'vectorize\' \'(\' loop-hint-keyword \')\'\n/// \'interleave\' \'(\' loop-hint-keyword \')\'\n/// \'unroll\' \'(\' unroll-hint-keyword \')\'\n/// \'vectorize_predicate\' \'(\' loop-hint-keyword \')\'\n/// \'vectorize_width\' \'(\' loop-hint-value \')\'\n/// \'interleave_count\' \'(\' loop-hint-value \')\'\n/// \'unroll_count\' \'(\' loop-hint-value \')\'\n/// \'pipeline\' \'(\' disable \')\'\n/// \'pipeline_initiation_interval\' \'(\' loop-hint-value \')\'\n///\n/// loop-hint-keyword:\n/// \'enable\'\n/// \'disable\'\n/// \'assume_safety\'\n///\n/// unroll-hint-keyword:\n/// \'enable\'\n/// \'disable\'\n/// \'full\'\n///\n/// loop-hint-value:\n/// constant-expression\n///\n/// Specifying vectorize(enable) or vectorize_width(_value_) instructs llvm to\n/// try vectorizing the instructions of the loop it precedes. Specifying\n/// interleave(enable) or interleave_count(_value_) instructs llvm to try\n/// interleaving multiple iterations of the loop it precedes. The width of the\n/// vector instructions is specified by vectorize_width() and the number of\n/// interleaved loop iterations is specified by interleave_count(). Specifying a\n/// value of 1 effectively disables vectorization/interleaving, even if it is\n/// possible and profitable, and 0 is invalid. The loop vectorizer currently\n/// only works on inner loops.\n///\n/// The unroll and unroll_count directives control the concatenation\n/// unroller. Specifying unroll(enable) instructs llvm to unroll the loop\n/// completely if the trip count is known at compile time and unroll partially\n/// if the trip count is not known. Specifying unroll(full) is similar to\n/// unroll(enable) but will unroll the loop only if the trip count is known at\n/// compile time. Specifying unroll(disable) disables unrolling for the\n/// loop. Specifying unroll_count(_value_) instructs llvm to try to unroll the\n/// loop the number of times indicated by the value.\nvoid PragmaLoopHintHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"clang loop\";"},{n,3613,"/// Handle the loop unroll optimization pragmas.\n/// #pragma unroll\n/// #pragma unroll unroll-hint-value\n/// #pragma unroll \'(\' unroll-hint-value \')\'\n/// #pragma nounroll\n/// #pragma unroll_and_jam\n/// #pragma unroll_and_jam unroll-hint-value\n/// #pragma unroll_and_jam \'(\' unroll-hint-value \')\'\n/// #pragma nounroll_and_jam\n///\n/// unroll-hint-value:\n/// constant-expression\n///\n/// Loop unrolling hints can be specified with \'#pragma unroll\' or\n/// \'#pragma nounroll\'. \'#pragma unroll\' can take a numeric argument optionally\n/// contained in parentheses. With no argument the directive instructs llvm to\n/// try to unroll the loop completely. A positive integer argument can be\n/// specified to indicate the number of times the loop should be unrolled. To\n/// maximize compatibility with other compilers the unroll count argument can be\n/// specified with or without parentheses. Specifying, \'#pragma nounroll\'\n/// disables unrolling of the loop.\nvoid PragmaUnrollHintHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.is(tok::eod)) {\n // ...\n } else if (PragmaName.getIdentifierInfo()->getName() == \"nounroll\" || PragmaName.getIdentifierInfo()->getName() == \"nounroll_and_jam\") {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << PragmaName.getIdentifierInfo()->getName();"},{n,3636,"/// Handle the loop unroll optimization pragmas.\n/// #pragma unroll\n/// #pragma unroll unroll-hint-value\n/// #pragma unroll \'(\' unroll-hint-value \')\'\n/// #pragma nounroll\n/// #pragma unroll_and_jam\n/// #pragma unroll_and_jam unroll-hint-value\n/// #pragma unroll_and_jam \'(\' unroll-hint-value \')\'\n/// #pragma nounroll_and_jam\n///\n/// unroll-hint-value:\n/// constant-expression\n///\n/// Loop unrolling hints can be specified with \'#pragma unroll\' or\n/// \'#pragma nounroll\'. \'#pragma unroll\' can take a numeric argument optionally\n/// contained in parentheses. With no argument the directive instructs llvm to\n/// try to unroll the loop completely. A positive integer argument can be\n/// specified to indicate the number of times the loop should be unrolled. To\n/// maximize compatibility with other compilers the unroll count argument can be\n/// specified with or without parentheses. Specifying, \'#pragma nounroll\'\n/// disables unrolling of the loop.\nvoid PragmaUnrollHintHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.is(tok::eod)) {\n // ...\n } else if (PragmaName.getIdentifierInfo()->getName() == \"nounroll\" || PragmaName.getIdentifierInfo()->getName() == \"nounroll_and_jam\") {\n // ...\n } else {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"unroll\";"},{n,3699,"/// Handle the Microsoft \\#pragma intrinsic extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma intrinsic(memset)\n/// #pragma intrinsic(strlen, memcpy)\n/// \\endcode\n///\n/// Pragma intrisic tells the compiler to use a builtin version of the\n/// function. Clang does it anyway, so the pragma doesn\'t really do anything.\n/// Anyway, we emit a warning if the function specified in \\#pragma intrinsic\n/// isn\'t an intrinsic in clang and suggest to include intrin.h.\nvoid PragmaMSIntrinsicHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"intrinsic\";"},{n,3730,"bool Parser::HandlePragmaMSFunction(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::r_paren, diag::warn_pragma_expected_rparen, PragmaName) || ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{n,3791,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (ExpectAndConsume(tok::eof, diag::warn_pragma_extra_tokens_at_eol, PragmaName))"},{n,3954,"/// Handle the #pragma clang attribute directive.\n///\n/// The syntax is:\n/// \\code\n/// #pragma clang attribute push (attribute, subject-set)\n/// #pragma clang attribute push\n/// #pragma clang attribute (attribute, subject-set)\n/// #pragma clang attribute pop\n/// \\endcode\n///\n/// There are also \'namespace\' variants of push and pop directives. The bare\n/// \'#pragma clang attribute (attribute, subject-set)\' version doesn\'t require a\n/// namespace, since it always applies attributes to the most recently pushed\n/// group, regardless of namespace.\n/// \\code\n/// #pragma clang attribute namespace.push (attribute, subject-set)\n/// #pragma clang attribute namespace.push\n/// #pragma clang attribute namespace.pop\n/// \\endcode\n///\n/// The subject-set clause defines the set of declarations which receive the\n/// attribute. Its exact syntax is described in the LanguageExtensions document\n/// in Clang\'s documentation.\n///\n/// This directive instructs the compiler to begin/finish applying the specified\n/// attribute to the set of attribute-specific declarations in the active range\n/// of the pragma.\nvoid PragmaAttributeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (Tok.isNot(tok::eod))\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"clang attribute\";"},{n,3989,"// Handle \'#pragma clang max_tokens 12345\'.\nvoid PragmaMaxTokensHereHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"clang max_tokens_here\";"},{n,4021,"// Handle \'#pragma clang max_tokens_total 12345\'.\nvoid PragmaMaxTokensTotalHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"clang max_tokens_total\";"},{n,4055,"// Handle \'#pragma clang riscv intrinsic vector\'.\n// \'#pragma clang riscv intrinsic sifive_vector\'.\nvoid PragmaRISCVHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << \"clang riscv intrinsic\";"}}, [m]={ ["clang/test/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:14:29: warning: extra tokens at end of \'#pragma alloc_text\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_final_macro"]={ [k]={"final-macro","pedantic-macros"}, [l]="final-macro", [h]={{nil,F,"warn_pragma_final_macro"}}, [b]={{nil,F,"macro %0 has been marked as final and should not be %select{undefined|redefined}1"}}, [f]={{nil,F,{"macro A has been marked as final and should not be ",{"undefined","redefined"}}}}, [e]=j, [a]="macro (.*?) has been marked as final and should not be (?:undefined|redefined)", [c]=" \\[(?:\\-Werror,)?\\-Wfinal\\-macro[^\\]]*\\]", [i]={{nil,F,B}}, [d]={Db,1625925174,Gb,Fb}, [g]={{bc,1485,"void Preprocessor::emitFinalMacroWarning(const Token &Identifier, bool IsUndef) const {\n // ...\n Diag(Identifier, diag::warn_pragma_final_macro) << Identifier.getIdentifierInfo() << (IsUndef ? 0 : 1);"}}, [m]={ ["clang/test/Lexer/final-macro.c"]={"clang/test/Lexer/final-macro.c:10:9: warning: macro \'Foo\' has been marked as final and should not be redefined [-Wfinal-macro]","clang/test/Lexer/final-macro.c:14:9: warning: macro \'Foo\' has been marked as final and should not be redefined [-Wfinal-macro]","clang/test/Lexer/final-macro.c:23:8: warning: macro \'Foo\' has been marked as final and should not be undefined [-Wfinal-macro]","clang/test/Lexer/final-macro.c:25:9: warning: macro \'Foo\' has been marked as final and should not be redefined [-Wfinal-macro]","clang/test/Lexer/Inputs/final-macro-system.h:2:8: warning: macro \'SYSTEM_MACRO\' has been marked as final and should not be undefined [-Wfinal-macro]","clang/test/Lexer/Inputs/final-macro-system.h:4:9: warning: macro \'SYSTEM_MACRO\' has been marked as final and should not be redefined [-Wfinal-macro]"} } }, ["warn_pragma_force_cuda_host_device_bad_arg"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_force_cuda_host_device_bad_arg", [b]="incorrect use of #pragma clang force_cuda_host_device begin|end", [f]="incorrect use of #pragma clang force_cuda_host_device begin|end", [e]=j, [a]="incorrect use of \\#pragma clang force_cuda_host_device begin\\|end", [c]=y, [i]=t, [d]={"67a78a6cc021",1475964958,"[CUDA] Add #pragma clang force_cuda_host_device_{begin,end} pragmas.","[CUDA] Add #pragma clang force_cuda_host_device_{begin,end} pragmas.\n\nSummary:\nThese cause us to consider all functions in-between to be __host__\n__device__.\n\nYou can nest these pragmas; you just can\'t have more \'end\'s than\n\'begin\'s.\n\nReviewers: rsmith\n\nSubscribers: tra, jhen, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D24975\n\nllvm-svn: 283677"}, [g]={{n,3807,"void PragmaForceCUDAHostDeviceHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (!Info || (!Info->isStr(\"begin\") && !Info->isStr(\"end\"))) {\n PP.Diag(FirstTok.getLocation(), diag::warn_pragma_force_cuda_host_device_bad_arg);"},{n,3820,"void PragmaForceCUDAHostDeviceHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (!Tok.is(tok::eod))\n PP.Diag(FirstTok.getLocation(), diag::warn_pragma_force_cuda_host_device_bad_arg);"}}, [m]={ ["clang/test/Parser/cuda-force-host-device.cu"]={"clang/test/Parser/cuda-force-host-device.cu:29:15: warning: incorrect use of #pragma clang force_cuda_host_device begin|end [-Wignored-pragmas]","clang/test/Parser/cuda-force-host-device.cu:32:15: warning: incorrect use of #pragma clang force_cuda_host_device begin|end [-Wignored-pragmas]","clang/test/Parser/cuda-force-host-device.cu:35:15: warning: incorrect use of #pragma clang force_cuda_host_device begin|end [-Wignored-pragmas]"} } }, ["warn_pragma_fp_ignored"]={ [k]={q,r}, [l]=q, [h]={{nil,R,"warn_pragma_fp_ignored"}}, [b]={{nil,R,"\'#pragma %0\' is not supported on this target - ignored"}}, [f]={{nil,R,"\'#pragma A\' is not supported on this target - ignored"}}, [e]=j, [a]="\'\\#pragma (.*?)\' is not supported on this target \\- ignored", [c]=y, [i]={{nil,R,t}}, [d]={"38d18d93534d",1601621202,"[SVE] Add support to vectorize_width loop pragma for scalable vectors","[SVE] Add support to vectorize_width loop pragma for scalable vectors\n\nThis patch adds support for two new variants of the vectorize_width\npragma:\n\n1. vectorize_width(X[, fixed|scalable]) where an optional second\nparameter is passed to the vectorize_width pragma, which indicates if\nthe user wishes to use fixed width or scalable vectorization. For\nexample the user can now write something like:\n\n #pragma clang loop vectorize_width(4, fixed)\nor\n #pragma clang loop vectorize_width(4, scalable)\n\nIn the absence of a second parameter it is assumed the user wants\nfixed width vectorization, in order to maintain compatibility with\nexisting code.\n2. vectorize_width(fixed|scalable) where the width is left unspecified,\nbut the user hints what type of vectorization they prefer, either\nfixed width or scalable.\n\nI have implemented this by making use of the LLVM loop hint attribute:\n\n llvm.loop.vectorize.scalable.enable\n\nTests were added to\n\n clang/test/CodeGenCXX/pragma-loop.cpp\n\nfor both the \'fixed\' and \'scalable\' optional parameter.\n\nSee this thread for context: http://lists.llvm.org/pipermail/cfe-dev/2020-November/067262.html\n\nDifferential Revision: https://reviews.llvm.org/D89031"}, [g]={{n,113,"/// PragmaSTDC_FENV_ACCESSHandler - \"\\#pragma STDC FENV_ACCESS ...\".\nstruct PragmaSTDC_FENV_ACCESSHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (!PP.getTargetInfo().hasStrictFP() && !PP.getLangOpts().ExpStrictFP) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_fp_ignored) << PragmaName.getIdentifierInfo()->getName();"},{n,268,"// \"\\#pragma fenv_access (on)\".\nstruct PragmaMSFenvAccessHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (!PP.getTargetInfo().hasStrictFP() && !PP.getLangOpts().ExpStrictFP) {\n PP.Diag(FirstToken.getLocation(), diag::warn_pragma_fp_ignored) << PragmaName;"},{n,2906,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (!PP.getTargetInfo().hasStrictFP() && !PP.getLangOpts().ExpStrictFP) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_fp_ignored) << PragmaName.getIdentifierInfo()->getName();"},{n,3344,"void PragmaSTDC_FENV_ROUNDHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (!PP.getTargetInfo().hasStrictFP() && !PP.getLangOpts().ExpStrictFP) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_fp_ignored) << PragmaName.getIdentifierInfo()->getName();"}}, [m]={ ["clang/test/Parser/pragma-fp-warn.c"]={"clang/test/Parser/pragma-fp-warn.c:15:9: warning: \'#pragma float_control\' is not supported on this target - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-fp-warn.c:17:14: warning: \'#pragma FENV_ACCESS\' is not supported on this target - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-fp-warn.c:19:14: warning: \'#pragma FENV_ROUND\' is not supported on this target - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_ignored"]={ [k]={u,v,w,r,J}, [l]=J, [h]="warn_pragma_ignored", [b]="unknown pragma ignored", [f]="unknown pragma ignored", [e]=j, [a]="unknown pragma ignored", [c]=bb, [i]=B, [d]={"21656f22dbb9",1240175426,"basic support for -Wunknown-pragmas, more coming.","basic support for -Wunknown-pragmas, more coming.\n\nllvm-svn: 69547"}, [g]={{C,120,"void PragmaNamespace::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (!Handler) {\n PP.Diag(Tok, diag::warn_pragma_ignored);"}}, [m]={ ["clang/test/Preprocessor/_Pragma.c"]={"clang/test/Preprocessor/_Pragma.c:6:1: warning: unknown pragma ignored [-Wunknown-pragmas]","clang/test/Preprocessor/_Pragma.c:8:1: warning: unknown pragma ignored [-Wunknown-pragmas]"} } }, ["warn_pragma_include_alias_expected"]={ [k]={u,v,w,r,J}, [l]=J, [h]="warn_pragma_include_alias_expected", [b]="pragma include_alias expected \'%0\'", [f]="pragma include_alias expected \'A\'", [e]=j, [a]="pragma include_alias expected \'(.*?)\'", [c]=bb, [i]=B, [d]={"cd5092dfba30",1330575529,"Implements support for #pragma include_alias in ms compatibility mode. Fixes PR10705.","Implements support for #pragma include_alias in ms compatibility mode. Fixes PR10705.\n\nllvm-svn: 151800"}, [g]={{C,695,"void Preprocessor::HandlePragmaIncludeAlias(Token &Tok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n Diag(Tok, diag::warn_pragma_include_alias_expected) << \"(\";"},{C,717,"void Preprocessor::HandlePragmaIncludeAlias(Token &Tok) {\n // ...\n if (Tok.isNot(tok::comma)) {\n Diag(Tok, diag::warn_pragma_include_alias_expected) << \",\";"},{C,736,"void Preprocessor::HandlePragmaIncludeAlias(Token &Tok) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::warn_pragma_include_alias_expected) << \")\";"}}, [m]={ [mb]={"clang/test/Preprocessor/pragma_microsoft.c:89:31: warning: pragma include_alias expected \',\' [-Wunknown-pragmas]"} } }, ["warn_pragma_include_alias_expected_filename"]={ [k]={u,v,w,r,J}, [l]=J, [h]="warn_pragma_include_alias_expected_filename", [b]="pragma include_alias expected include filename", [f]="pragma include_alias expected include filename", [e]=j, [a]="pragma include_alias expected include filename", [c]=bb, [i]=B, [d]={"611306eae6c9",1330728714,"Adding support for #pragma include_alias in MS compatibility mode. This implements PR 10705.","Adding support for #pragma include_alias in MS compatibility mode. This implements PR 10705.\n\nllvm-svn: 151949"}, [g]={{C,709,"void Preprocessor::HandlePragmaIncludeAlias(Token &Tok) {\n // ...\n if (SourceFilenameTok.is(tok::header_name)) {\n // ...\n } else {\n Diag(Tok, diag::warn_pragma_include_alias_expected_filename);"},{C,729,"void Preprocessor::HandlePragmaIncludeAlias(Token &Tok) {\n // ...\n if (ReplaceFilenameTok.is(tok::header_name)) {\n // ...\n } else {\n Diag(Tok, diag::warn_pragma_include_alias_expected_filename);"}}, [m]={ [mb]={"clang/test/Preprocessor/pragma_microsoft.c:96:22: warning: pragma include_alias expected include filename [-Wunknown-pragmas]"} } }, ["warn_pragma_include_alias_mismatch_angle"]={ [k]={u,v,w,r,J}, [l]=J, [h]="warn_pragma_include_alias_mismatch_angle", [b]="angle-bracketed include <%0> cannot be aliased to double-quoted include \"%1\"", [f]="angle-bracketed include <A> cannot be aliased to double-quoted include \"B\"", [e]=j, [a]="angle\\-bracketed include \\<(.*?)\\> cannot be aliased to double\\-quoted include \"(.*?)\"", [c]=bb, [i]=B, [d]={"611306eae6c9",1330728714,"Adding support for #pragma include_alias in MS compatibility mode. This implements PR 10705.","Adding support for #pragma include_alias in MS compatibility mode. This implements PR 10705.\n\nllvm-svn: 151949"}, [g]={{C,754,"void Preprocessor::HandlePragmaIncludeAlias(Token &Tok) {\n // ...\n if (!SourceFileName.empty() && !ReplaceFileName.empty() && (SourceIsAngled != ReplaceIsAngled)) {\n // ...\n if (SourceIsAngled)\n DiagID = diag::warn_pragma_include_alias_mismatch_angle;"}}, [m]={ [mb]={"clang/test/Preprocessor/pragma_microsoft.c:87:23: warning: angle-bracketed include <bar.h> cannot be aliased to double-quoted include \"bar.h\" [-Wunknown-pragmas]"} } }, ["warn_pragma_include_alias_mismatch_quote"]={ [k]={u,v,w,r,J}, [l]=J, [h]="warn_pragma_include_alias_mismatch_quote", [b]="double-quoted include \"%0\" cannot be aliased to angle-bracketed include <%1>", [f]="double-quoted include \"A\" cannot be aliased to angle-bracketed include <B>", [e]=j, [a]="double\\-quoted include \"(.*?)\" cannot be aliased to angle\\-bracketed include \\<(.*?)\\>", [c]=bb, [i]=B, [d]={"611306eae6c9",1330728714,"Adding support for #pragma include_alias in MS compatibility mode. This implements PR 10705.","Adding support for #pragma include_alias in MS compatibility mode. This implements PR 10705.\n\nllvm-svn: 151949"}, [g]={{C,756,"void Preprocessor::HandlePragmaIncludeAlias(Token &Tok) {\n // ...\n if (!SourceFileName.empty() && !ReplaceFileName.empty() && (SourceIsAngled != ReplaceIsAngled)) {\n // ...\n if (SourceIsAngled)\n // ...\n else\n DiagID = diag::warn_pragma_include_alias_mismatch_quote;"}}, [m]={ [mb]={"clang/test/Preprocessor/pragma_microsoft.c:88:23: warning: double-quoted include \"foo.h\" cannot be aliased to angle-bracketed include <bar.h> [-Wunknown-pragmas]"} } }, ["warn_pragma_init_seg_unsupported_target"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_init_seg_unsupported_target", [b]="\'#pragma init_seg\' is only supported when targeting a Microsoft environment", [f]="\'#pragma init_seg\' is only supported when targeting a Microsoft environment", [e]=j, [a]="\'\\#pragma init_seg\' is only supported when targeting a Microsoft environment", [c]=y, [i]=t, [d]={"ad2986efcefe",1407998108,"Parse: Don\'t attempt to act on #pragma init_seg when not targeting MSVC","Parse: Don\'t attempt to act on #pragma init_seg when not targeting MSVC\n\nIt doesn\'t really make sense to try and do stuff with #pragma init_seg\nwhen targeting non-Microsoft platforms; notions like library vs user\ninitializers don\'t exist for other targets.\n\nThis fixes PR20639.\n\nllvm-svn: 215618"}, [g]={{n,1147,"// #pragma init_seg({ compiler | lib | user | \"section-name\" [, func-name]} )\nbool Parser::HandlePragmaMSInitSeg(StringRef PragmaName, SourceLocation PragmaLocation) {\n if (getTargetInfo().getTriple().getEnvironment() != llvm::Triple::MSVC) {\n PP.Diag(PragmaLocation, diag::warn_pragma_init_seg_unsupported_target);"}}, [m]={ ["clang/test/SemaCXX/pragma-init_seg.cpp"]={"clang/test/SemaCXX/pragma-init_seg.cpp:21:9: warning: \'#pragma init_seg\' is only supported when targeting a Microsoft environment [-Wignored-pragmas]"} } }, ["warn_pragma_intrinsic_builtin"]={ [k]={"ignored-pragma-intrinsic",q,r}, [l]="ignored-pragma-intrinsic", [h]="warn_pragma_intrinsic_builtin", [b]="%0 is not a recognized builtin%select{|; consider including <intrin.h> to access non-builtin intrinsics}1", [f]={{nil,nil,{"A is not a recognized builtin",{T,"; consider including <intrin.h> to access non-builtin intrinsics"}}}}, [e]=j, [a]="(.*?) is not a recognized builtin(?:|; consider including \\<intrin\\.h\\> to access non\\-builtin intrinsics)", [c]=" \\[(?:\\-Werror,)?\\-Wignored\\-pragma\\-intrinsic[^\\]]*\\]", [i]=t, [d]={"3f1ec62a8397",1473266312,"Parsing MS pragma intrinsic","Parsing MS pragma intrinsic\n\nParse pragma intrinsic, display warning if the function isn\'t a builtin\nfunction in clang and suggest including intrin.h.\n\nPatch by Albert Gutowski!\n\nReviewers: aaron.ballman, rnk\n\nSubscribers: aaron.ballman, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D23944\n\nllvm-svn: 280825"}, [g]={{n,3682,"/// Handle the Microsoft \\#pragma intrinsic extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma intrinsic(memset)\n/// #pragma intrinsic(strlen, memcpy)\n/// \\endcode\n///\n/// Pragma intrisic tells the compiler to use a builtin version of the\n/// function. Clang does it anyway, so the pragma doesn\'t really do anything.\n/// Anyway, we emit a warning if the function specified in \\#pragma intrinsic\n/// isn\'t an intrinsic in clang and suggest to include intrin.h.\nvoid PragmaMSIntrinsicHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (!II->getBuiltinID())\n PP.Diag(Tok.getLocation(), diag::warn_pragma_intrinsic_builtin) << II << SuggestIntrinH;"},{n,3717,"bool Parser::HandlePragmaMSFunction(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (!II->getBuiltinID())\n PP.Diag(Tok.getLocation(), diag::warn_pragma_intrinsic_builtin) << II << SuggestIntrinH;"}}, [m]={ [mb]={"clang/test/Preprocessor/pragma_microsoft.c:179:19: warning: \'asdf\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:180:19: warning: \'main\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:186:19: warning: \'asdf\' is not a recognized builtin [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:189:19: warning: \'asdf\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:195:19: warning: \'asdf\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:201:19: warning: \'asdf\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:207:18: warning: \'asdf\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:208:18: warning: \'main\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:214:18: warning: \'asdf\' is not a recognized builtin [-Wignored-pragma-intrinsic]","clang/test/Preprocessor/pragma_microsoft.c:217:18: warning: \'asdf\' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics [-Wignored-pragma-intrinsic]"} } }, ["warn_pragma_invalid_action"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_invalid_action", [b]="unknown action for \'#pragma %0\' - ignored", [f]="unknown action for \'#pragma A\' - ignored", [e]=j, [a]="unknown action for \'\\#pragma (.*?)\' \\- ignored", [c]=y, [i]=t, [d]={"c0dca6ded731",1392249026,"MS ABI: Implement #pragma vtordisp() and clang-cl /vdN","MS ABI: Implement #pragma vtordisp() and clang-cl /vdN\n\nThese features are new in VS 2013 and are necessary in order to layout\nstd::ostream correctly. Currently we have an ABI incompatibility when\nself-hosting with the 2013 stdlib in our convertible_fwd_ostream wrapper\nin gtest.\n\nThis change adds another implicit attribute, MSVtorDispAttr, because\nimplicit attributes are currently the best way to make sure the\ninformation stays on class templates through instantiation.\n\nReviewers: majnemer\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2746\n\nllvm-svn: 201274"}, [g]={{n,1239,"// #pragma strict_gs_check(pop)\n// #pragma strict_gs_check(push, \"on\" | \"off\")\n// #pragma strict_gs_check(\"on\" | \"off\")\nbool Parser::HandlePragmaMSStrictGuardStackCheck(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Action & Sema::PSK_Push || Action & Sema::PSK_Set) {\n // ...\n if (II && II->isStr(\"off\")) {\n // ...\n } else if (II && II->isStr(\"on\")) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_invalid_action) << PragmaName;"},{n,2078,"// #pragma pack(...) comes in the following delicious flavors:\n// pack \'(\' [integer] \')\'\n// pack \'(\' \'show\' \')\'\n// pack \'(\' (\'push\' | \'pop\') [\',\' identifier] [, integer] \')\'\nvoid PragmaPackHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PackTok) {\n // ...\n if (Tok.is(tok::numeric_constant)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n if (II->isStr(\"show\")) {\n // ...\n } else {\n if (II->isStr(\"push\")) {\n // ...\n } else if (II->isStr(\"pop\")) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_invalid_action) << \"pack\";"},{n,2827,"/// Handle \'#pragma vtordisp\'\n// The grammar for this pragma is as follows:\n//\n// <vtordisp-mode> ::= (\'off\' | \'on\' | \'0\' | \'1\' | \'2\' )\n//\n// #pragma vtordisp \'(\' [\'push\' \',\'] vtordisp-mode \')\'\n// #pragma vtordisp \'(\' \'pop\' \')\'\n// #pragma vtordisp \'(\' \')\'\nvoid PragmaMSVtorDisp::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Action & Sema::PSK_Push || Action & Sema::PSK_Set) {\n // ...\n if (II && II->isStr(\"off\")) {\n // ...\n } else if (II && II->isStr(\"on\")) {\n // ...\n } else if (Tok.is(tok::numeric_constant) && PP.parseSimpleIntegerLiteral(Tok, Value)) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_invalid_action) << \"vtordisp\";"}}, [m]={ ["clang/test/Parser/pragma-pack.c"]={"clang/test/Parser/pragma-pack.c:10:73: warning: unknown action for \'#pragma pack\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_invalid_argument"]={ [k]={q,r}, [l]=q, [h]={{nil,z,"warn_pragma_invalid_argument"}}, [b]={{nil,z,"unexpected argument \'%0\' to \'#pragma %1\'%select{|; expected %3}2"}}, [f]={{nil,z,{"unexpected argument \'A\' to \'#pragma B\'",{T,"; expected D"}}}}, [e]=j, [a]="unexpected argument \'(.*?)\' to \'\\#pragma (.*?)\'(?:|; expected (.*?))", [c]=y, [i]={{nil,z,t}}, [d]={"1bbe00e0ca2d",1521535991,"[ms] Parse #pragma optimize and ignore it behind its own flag","[ms] Parse #pragma optimize and ignore it behind its own flag\n\nThis allows users to turn off warnings about this pragma specifically,\nwhile still receiving warnings about other ignored pragmas.\n\nDifferential Revision: https://reviews.llvm.org/D44630\n\nllvm-svn: 327959"}, [g]={{n,3771,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (!II || (!II->isStr(\"on\") && !II->isStr(\"off\"))) {\n PP.Diag(PragmaLocation, diag::warn_pragma_invalid_argument) << PP.getSpelling(Tok) << PragmaName << /*Expected=*/true << \"\'on\' or \'off\'\";"},{n,3785,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n // TODO: Add support for \"sgty\"\n if (!OptimizationList->getString().empty()) {\n PP.Diag(PragmaLocation, diag::warn_pragma_invalid_argument) << OptimizationList->getString() << PragmaName << /*Expected=*/true << \"\\\"\\\"\";"},{n,4039,"// Handle \'#pragma clang riscv intrinsic vector\'.\n// \'#pragma clang riscv intrinsic sifive_vector\'.\nvoid PragmaRISCVHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (!II || !II->isStr(\"intrinsic\")) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_invalid_argument) << PP.getSpelling(Tok) << \"riscv\" << /*Expected=*/true << \"\'intrinsic\'\";"},{n,4047,"// Handle \'#pragma clang riscv intrinsic vector\'.\n// \'#pragma clang riscv intrinsic sifive_vector\'.\nvoid PragmaRISCVHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (!II || !(II->isStr(\"vector\") || II->isStr(\"sifive_vector\"))) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_invalid_argument) << PP.getSpelling(Tok) << \"riscv\" << /*Expected=*/true << \"\'vector\' or \'sifive_vector\'\";"}}, [m]={ ["clang/test/Sema/riscv-bad-intrinsic-pragma.c"]={"clang/test/Sema/riscv-bad-intrinsic-pragma.c:4:31: warning: unexpected argument \'vvvv\' to \'#pragma riscv\'; expected \'vector\' or \'sifive_vector\' [-Wignored-pragmas]","clang/test/Sema/riscv-bad-intrinsic-pragma.c:7:21: warning: unexpected argument \'what\' to \'#pragma riscv\'; expected \'intrinsic\' [-Wignored-pragmas]","clang/test/Sema/riscv-bad-intrinsic-pragma.c:9:21: warning: unexpected argument \'int\' to \'#pragma riscv\'; expected \'intrinsic\' [-Wignored-pragmas]"} } }, ["warn_pragma_invalid_specific_action"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_invalid_specific_action", [b]="unknown action \'%1\' for \'#pragma %0\' - ignored", [f]="unknown action \'B\' for \'#pragma A\' - ignored", [e]=j, [a]="unknown action \'(.*?)\' for \'\\#pragma (.*?)\' \\- ignored", [c]=y, [i]=t, [d]={Ob,1396996247,Xb,ac}, [g]={{n,1032,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n while (Tok.is(tok::comma)) {\n // ...\n if (Flag == ASTContext::PSF_None || Flag == ASTContext::PSF_Invalid) {\n PP.Diag(PragmaLocation, Flag == ASTContext::PSF_None ? diag::warn_pragma_invalid_specific_action : diag::warn_pragma_unsupported_action) << PragmaName << Tok.getIdentifierInfo()->getName();"}}, [m]={ [Zb]={"clang/test/Sema/pragma-section.c:41:9: warning: unknown action \'bogus\' for \'#pragma section\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_message"]={ [k]={"#pragma-messages"}, [l]="#pragma-messages", [h]="warn_pragma_message", [b]="%0", [f]="A", [e]=j, [a]="(.*?)", [c]=" \\[(?:\\-Werror,)?\\-W\\#pragma\\-messages[^\\]]*\\]", [i]="#pragma message Directive", [d]={"30c924b3e874",1277572299,"Implement support for #pragma message, patch by Michael Spencer!","Implement support for #pragma message, patch by Michael Spencer!\n\nllvm-svn: 106950"}, [g]={{C,1678,"/// PragmaMessageHandler - Handle the microsoft and gcc \\#pragma message\n/// extension. The syntax is:\n/// \\code\n/// #pragma message(string)\n/// \\endcode\n/// OR, in GCC mode:\n/// \\code\n/// #pragma message string\n/// \\endcode\n/// string is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters, etc... See MSDN for more details.\n/// Also handles \\#pragma GCC warning and \\#pragma GCC error which take the same\n/// form as \\#pragma message.\nstruct PragmaMessageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n PP.Diag(MessageLoc, (Kind == PPCallbacks::PMK_Error) ? diag::err_pragma_message : diag::warn_pragma_message) << MessageString;"},{"clang/utils/TableGen/ClangDiagnosticsEmitter.cpp",1407,"/// /* DiagArray1 */ diag::warn_pragma_message,"}}, [m]={ ["clang/test/Lexer/pragma-operators.cpp"]={"clang/test/Lexer/pragma-operators.cpp:37:65: warning: \"Hello\", world! [-W#pragma-messages]"} } }, ["warn_pragma_missing_argument"]={ [k]={q,r}, [l]=q, [h]={{nil,z,"warn_pragma_missing_argument"}}, [b]={{nil,z,"missing argument to \'#pragma %0\'%select{|; expected %2}1"}}, [f]={{nil,z,{"missing argument to \'#pragma A\'",{T,"; expected C"}}}}, [e]=j, [a]="missing argument to \'\\#pragma (.*?)\'(?:|; expected (.*?))", [c]=y, [i]={{nil,z,t}}, [d]={"1bbe00e0ca2d",1521535991,"[ms] Parse #pragma optimize and ignore it behind its own flag","[ms] Parse #pragma optimize and ignore it behind its own flag\n\nThis allows users to turn off warnings about this pragma specifically,\nwhile still receiving warnings about other ignored pragmas.\n\nDifferential Revision: https://reviews.llvm.org/D44630\n\nllvm-svn: 327959"}, [g]={{n,3765,"// #pragma optimize(\"gsty\", on|off)\nbool Parser::HandlePragmaMSOptimize(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n if (Tok.is(tok::eof) || Tok.is(tok::r_paren)) {\n PP.Diag(PragmaLocation, diag::warn_pragma_missing_argument) << PragmaName << /*Expected=*/true << \"\'on\' or \'off\'\";"}}, [m]={ [mb]={"clang/test/Preprocessor/pragma_microsoft.c:228:9: warning: missing argument to \'#pragma optimize\'; expected \'on\' or \'off\' [-Wignored-pragmas]"} } }, ["warn_pragma_ms_fenv_access"]={ [k]={q,r}, [l]=q, [h]={{nil,F,"warn_pragma_ms_fenv_access"}}, [b]={{nil,F,"incorrect use of \'#pragma fenv_access (on|off)\' - ignored"}}, [f]={{nil,F,"incorrect use of \'#pragma fenv_access (on|off)\' - ignored"}}, [e]=j, [a]="incorrect use of \'\\#pragma fenv_access \\(on\\|off\\)\' \\- ignored", [c]=y, [i]={{nil,F,t}}, [d]={"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"}, [g]={{n,282,"// \"\\#pragma fenv_access (on)\".\nstruct PragmaMSFenvAccessHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_ms_fenv_access);"},{n,294,"// \"\\#pragma fenv_access (on)\".\nstruct PragmaMSFenvAccessHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (II->isStr(\"on\")) {\n // ...\n } else if (II->isStr(\"off\")) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_ms_fenv_access);"}}, [m]={ ["clang/test/Parser/pragma-fenv_access-ms.c"]={"clang/test/Parser/pragma-fenv_access-ms.c:9:83: warning: incorrect use of \'#pragma fenv_access (on|off)\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_ms_struct"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_ms_struct", [b]="incorrect use of \'#pragma ms_struct on|off\' - ignored", [f]="incorrect use of \'#pragma ms_struct on|off\' - ignored", [e]=j, [a]="incorrect use of \'\\#pragma ms_struct on\\|off\' \\- ignored", [c]=y, [i]=t, [d]={"743dda49d972",1303757355,"Recognize gcc\'s ms_struct pragma (and ignore for now).","Recognize gcc\'s ms_struct pragma (and ignore for now).\nThis is wip.\n\nllvm-svn: 130138"}, [g]={{n,2162,"// #pragma ms_struct on\n// #pragma ms_struct off\nvoid PragmaMSStructHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &MSStructTok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_ms_struct);"},{n,2174,"// #pragma ms_struct on\n// #pragma ms_struct off\nvoid PragmaMSStructHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &MSStructTok) {\n // ...\n if (II->isStr(\"on\")) {\n // ...\n } else if (II->isStr(\"off\") || II->isStr(\"reset\"))\n // ...\n else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_ms_struct);"}}, [m]={ ["clang/test/Sema/pragma-ms_struct.c"]={"clang/test/Sema/pragma-ms_struct.c:9:96: warning: incorrect use of \'#pragma ms_struct on|off\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_omp_ignored"]={ [k]={M,kb}, [l]=kb, [h]="warn_pragma_omp_ignored", [b]="unexpected \'#pragma omp ...\' in program", [f]="unexpected \'#pragma omp ...\' in program", [e]=j, [a]="unexpected \'\\#pragma omp \\.\\.\\.\' in program", [c]=Lb, [i]=t, [d]={"5d61097dd909",1351328745,"Feature:","Feature:\n OpenMP support.\n\nSub-Feature:\n Support for \"#pragma omp ...\" registration with\n Preprocessor.\n\nFiles Changed/Added:\n * include/clang/Basic/DiagnosticGroups.td (C)\n * include/clang/Basic/DiagnosticParseKinds.td (C)\n * include/clang/Basic/TokenKinds.def (C)\n * include/clang/Parse/Parser.h (C)\n * lib/Parse/Parser.cpp (C)\n\nTest Cases Changed/Added:\n * test/Preprocessor/pragma_omp.c (A)\n * test/Preprocessor/pragma_omp_ignored_warning.c (A)\n\nllvm-svn: 166869"}, [g]={{n,2619,"/// Handle \'#pragma omp ...\' when OpenMP is disabled.\n///\nvoid PragmaNoOpenMPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstTok) {\n if (!PP.getDiagnostics().isIgnored(diag::warn_pragma_omp_ignored, FirstTok.getLocation())) {"},{n,2621,"/// Handle \'#pragma omp ...\' when OpenMP is disabled.\n///\nvoid PragmaNoOpenMPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstTok) {\n if (!PP.getDiagnostics().isIgnored(diag::warn_pragma_omp_ignored, FirstTok.getLocation())) {\n PP.Diag(FirstTok, diag::warn_pragma_omp_ignored);"},{n,2622,"/// Handle \'#pragma omp ...\' when OpenMP is disabled.\n///\nvoid PragmaNoOpenMPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstTok) {\n if (!PP.getDiagnostics().isIgnored(diag::warn_pragma_omp_ignored, FirstTok.getLocation())) {\n // ...\n PP.getDiagnostics().setSeverity(diag::warn_pragma_omp_ignored, diag::Severity::Ignored, SourceLocation());"}}, [m]={ ["clang/test/OpenMP/option_warn.c"]={"clang/test/OpenMP/option_warn.c:7:9: warning: unexpected \'#pragma omp ...\' in program [-Wsource-uses-openmp]"} } }, ["warn_pragma_options_align_reset_failed"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_options_align_reset_failed", [b]="#pragma options align=reset failed: %0", [f]="#pragma options align=reset failed: A", [e]=j, [a]="\\#pragma options align\\=reset failed\\: (.*?)", [c]=y, [i]=o, [d]={"69dac58e7d42",1274918680,"Sema: Support for #pragma options align={reset,natural}. \'#pragma options align\'","Sema: Support for #pragma options align={reset,natural}. \'#pragma options align\'\nshares the stack with \'#pragma pack\', who knew!?\n\nllvm-svn: 104786"}, [g]={{db,261,"void Sema::ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc) {\n // ...\n case POAK_Reset:\n // ...\n if (AlignPackStack.Stack.empty()) {\n if (AlignPackStack.CurrentValue.getAlignMode() != AlignPackInfo::Native || AlignPackStack.CurrentValue.IsPackAttr()) {\n // ...\n } else {\n Diag(PragmaLoc, diag::warn_pragma_options_align_reset_failed) << \"stack empty\";"}}, [m]={ ["clang/test/Sema/pragma-pack-and-options-align.c"]={"clang/test/Sema/pragma-pack-and-options-align.c:51:84: warning: #pragma options align=reset failed: stack empty [-Wignored-pragmas]"} } }, ["warn_pragma_options_expected_align"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_options_expected_align", [b]="expected \'align\' following \'#pragma options\' - ignored", [f]="expected \'align\' following \'#pragma options\' - ignored", [e]=j, [a]="expected \'align\' following \'\\#pragma options\' \\- ignored", [c]=y, [i]=t, [d]={"75c9be7e8048",1274916546,"Parse: Add support for \'#pragma options align\'.","Parse: Add support for \'#pragma options align\'.\n\nAlso, fix a source location bug with the rparen in #pragma pack.\n\nllvm-svn: 104784"}, [g]={{n,2257,"// #pragma \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'options \'align\' \'=\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'}\n// #pragma \'align\' \'(\' {\'native\',\'natural\',\'mac68k\',\'power\',\'reset\'} \')\'\nstatic void ParseAlignPragma(Preprocessor &PP, Token &FirstTok, bool IsOptions) {\n // ...\n if (IsOptions) {\n // ...\n if (Tok.isNot(tok::identifier) || !Tok.getIdentifierInfo()->isStr(\"align\")) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_options_expected_align);"}}, [m]={ ["clang/test/Parser/pragma-options.c"]={"clang/test/Parser/pragma-options.c:3:88: warning: expected \'align\' following \'#pragma options\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_pack_invalid_alignment"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_pack_invalid_alignment", [b]="expected #pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\'", [f]="expected #pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\'", [e]=j, [a]="expected \\#pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\'", [c]=y, [i]=o, [d]={qb,1236199783,pb,ob}, [g]={{db,347,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n if (Alignment) {\n // ...\n // pack(0) is like pack(), which just works out since that is what\n // we use 0 for in PackAttr.\n if (Alignment->isTypeDependent() || !Val || !(*Val == 0 || Val->isPowerOf2()) || Val->getZExtValue() > 16) {\n Diag(PragmaLoc, diag::warn_pragma_pack_invalid_alignment);"}}, [m]={ ["clang/test/Sema/pragma-pack.c"]={"clang/test/Sema/pragma-pack.c:4:74: warning: expected #pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\' [-Wignored-pragmas]"} } }, ["warn_pragma_pack_malformed"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_pack_malformed", [b]="expected integer or identifier in \'#pragma pack\' - ignored", [f]="expected integer or identifier in \'#pragma pack\' - ignored", [e]=j, [a]="expected integer or identifier in \'\\#pragma pack\' \\- ignored", [c]=y, [i]=t, [d]={qb,1236199783,pb,ob}, [g]={{n,2099,"// #pragma pack(...) comes in the following delicious flavors:\n// pack \'(\' [integer] \')\'\n// pack \'(\' \'show\' \')\'\n// pack \'(\' (\'push\' | \'pop\') [\',\' identifier] [, integer] \')\'\nvoid PragmaPackHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PackTok) {\n // ...\n if (Tok.is(tok::numeric_constant)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n if (II->isStr(\"show\")) {\n // ...\n } else {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n if (Tok.is(tok::numeric_constant)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n if (Tok.isNot(tok::numeric_constant)) {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_pack_malformed);"},{n,2109,"// #pragma pack(...) comes in the following delicious flavors:\n// pack \'(\' [integer] \')\'\n// pack \'(\' \'show\' \')\'\n// pack \'(\' (\'push\' | \'pop\') [\',\' identifier] [, integer] \')\'\nvoid PragmaPackHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PackTok) {\n // ...\n if (Tok.is(tok::numeric_constant)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n if (II->isStr(\"show\")) {\n // ...\n } else {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n if (Tok.is(tok::numeric_constant)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::warn_pragma_pack_malformed);"}}, [m]={ ["clang/test/Parser/pragma-pack.c"]={"clang/test/Parser/pragma-pack.c:14:94: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:15:94: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:16:94: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:19:97: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:20:96: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:21:96: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]","clang/test/Parser/pragma-pack.c:32:76: warning: expected integer or identifier in \'#pragma pack\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_pack_modified_after_include"]={ [k]={ic,r}, [l]=ic, [h]={{nil,x,"warn_pragma_pack_modified_after_include"}}, [b]={{nil,K,"the current #pragma pack alignment value is modified in the included file"},{zb,x,"the current #pragma pack aligment value is modified in the included file"}}, [f]={{nil,K,"the current #pragma pack alignment value is modified in the included file"},{zb,x,"the current #pragma pack aligment value is modified in the included file"}}, [e]=j, [a]="the current \\#pragma pack alignment value is modified in the included file", [c]=" \\[(?:\\-Werror,)?\\-Wpragma\\-pack[^\\]]*\\]", [i]={{nil,x,o}}, [d]={"ad273341a452",1500398631,"Add a warning for missing \'#pragma pack (pop)\' and suspicious uses","Add a warning for missing \'#pragma pack (pop)\' and suspicious uses\nof \'#pragma pack\' in included files\n\nThis commit adds a new -Wpragma-pack warning. It warns in the following cases:\n\n- When a translation unit is missing terminating #pragma pack (pop) directives.\n- When entering an included file if the current alignment value as determined\n by \'#pragma pack\' directives is different from the default alignment value.\n- When leaving an included file that changed the state of the current alignment\n value.\n\nrdar://10184173\n\nDifferential Revision: https://reviews.llvm.org/D35484\n\nllvm-svn: 308327"}, [g]={{db,471,"void Sema::DiagnoseNonDefaultPragmaAlignPack(PragmaAlignPackDiagnoseKind Kind, SourceLocation IncludeLoc) {\n // ...\n // Warn about modified alignment after #includes.\n if (PrevAlignPackState.CurrentValue != AlignPackStack.CurrentValue) {\n Diag(IncludeLoc, diag::warn_pragma_pack_modified_after_include);"}}, [m]={ ["clang/test/Sema/misleading-pragma-align-pack-diagnostics.c"]={"clang/test/Sema/misleading-pragma-align-pack-diagnostics.c:15:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]"} } }, ["warn_pragma_pack_no_pop_eof"]={ [k]={ic,r}, [l]=ic, [h]={{nil,x,"warn_pragma_pack_no_pop_eof"}}, [b]={{nil,x,"unterminated \'#pragma pack (push, ...)\' at end of file"}}, [f]={{nil,x,"unterminated \'#pragma pack (push, ...)\' at end of file"}}, [e]=j, [a]="unterminated \'\\#pragma pack \\(push, \\.\\.\\.\\)\' at end of file", [c]=" \\[(?:\\-Werror,)?\\-Wpragma\\-pack[^\\]]*\\]", [i]={{nil,x,o}}, [d]={"ad273341a452",1500398631,"Add a warning for missing \'#pragma pack (pop)\' and suspicious uses","Add a warning for missing \'#pragma pack (pop)\' and suspicious uses\nof \'#pragma pack\' in included files\n\nThis commit adds a new -Wpragma-pack warning. It warns in the following cases:\n\n- When a translation unit is missing terminating #pragma pack (pop) directives.\n- When entering an included file if the current alignment value as determined\n by \'#pragma pack\' directives is different from the default alignment value.\n- When leaving an included file that changed the state of the current alignment\n value.\n\nrdar://10184173\n\nDifferential Revision: https://reviews.llvm.org/D35484\n\nllvm-svn: 308327"}, [g]={{db,485,"void Sema::DiagnoseUnterminatedPragmaAlignPack() {\n // ...\n // FIXME: AlignPackStack may contain both #pragma align and #pragma pack\n // information, diagnostics below might not be accurate if we have mixed\n // pragmas.\n for (const auto &StackSlot : llvm::reverse(AlignPackStack.Stack)) {\n Diag(StackSlot.PragmaPushLocation, diag::warn_pragma_pack_no_pop_eof);"}}, [m]={ ["clang/test/FixIt/fixit-pragma-pack.c"]={"clang/test/FixIt/fixit-pragma-pack.c:3:9: warning: unterminated \'#pragma pack (push, ...)\' at end of file [-Wpragma-pack]"} } }, ["warn_pragma_pack_non_default_at_include"]={ [k]={ic,"pragma-pack-suspicious-include",r}, [l]="pragma-pack-suspicious-include", [h]={{nil,x,"warn_pragma_pack_non_default_at_include"}}, [b]={{nil,x,"non-default #pragma pack value changes the alignment of struct or union members in the included file"}}, [f]={{nil,x,"non-default #pragma pack value changes the alignment of struct or union members in the included file"}}, [e]=j, [a]="non\\-default \\#pragma pack value changes the alignment of struct or union members in the included file", [c]=" \\[(?:\\-Werror,)?\\-Wpragma\\-pack\\-suspicious\\-include[^\\]]*\\]", [i]={{nil,x,o}}, [d]={"ad273341a452",1500398631,"Add a warning for missing \'#pragma pack (pop)\' and suspicious uses","Add a warning for missing \'#pragma pack (pop)\' and suspicious uses\nof \'#pragma pack\' in included files\n\nThis commit adds a new -Wpragma-pack warning. It warns in the following cases:\n\n- When a translation unit is missing terminating #pragma pack (pop) directives.\n- When entering an included file if the current alignment value as determined\n by \'#pragma pack\' directives is different from the default alignment value.\n- When leaving an included file that changed the state of the current alignment\n value.\n\nrdar://10184173\n\nDifferential Revision: https://reviews.llvm.org/D35484\n\nllvm-svn: 308327"}, [g]={{db,466,"void Sema::DiagnoseNonDefaultPragmaAlignPack(PragmaAlignPackDiagnoseKind Kind, SourceLocation IncludeLoc) {\n // ...\n // FIXME: AlignPackStack may contain both #pragma align and #pragma pack\n // information, diagnostics below might not be accurate if we have mixed\n // pragmas.\n if (PrevAlignPackState.ShouldWarnOnInclude) {\n // ...\n Diag(IncludeLoc, diag::warn_pragma_pack_non_default_at_include);"}}, [m]={ ["clang/test/SemaObjC/suspicious-pragma-pack.m"]={"clang/test/SemaObjC/suspicious-pragma-pack.m:4:9: warning: non-default #pragma pack value changes the alignment of struct or union members in the included file [-Wpragma-pack-suspicious-include]"} } }, ["warn_pragma_pack_pop_identifier_and_alignment"]={ [h]={{nil,z,"warn_pragma_pack_pop_identifier_and_alignment"}}, [b]={{nil,z,"specifying both a name and alignment to \'pop\' is undefined"}}, [f]={{nil,z,"specifying both a name and alignment to \'pop\' is undefined"}}, [e]=j, [a]="specifying both a name and alignment to \'pop\' is undefined", [c]=wb, [i]={{nil,z,o}}, [d]={"2a8c18d99118",1523027672,"Fix typos in clang","Fix typos in clang\n\nFound via codespell -q 3 -I ../clang-whitelist.txt\nWhere whitelist consists of:\n\n archtype\n cas\n classs\n checkk\n compres\n definit\n frome\n iff\n inteval\n ith\n lod\n methode\n nd\n optin\n ot\n pres\n statics\n te\n thru\n\nPatch by luzpaz! (This is a subset of D44188 that applies cleanly with a few\nfiles that have dubious fixes reverted.)\n\nDifferential revision: https://reviews.llvm.org/D44188\n\nllvm-svn: 329399"}, [g]={{db,376,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n // MSDN, C/C++ Preprocessor Reference > Pragma Directives > pack:\n // \"#pragma pack(pop, identifier, n) is undefined\"\n if (Action & Sema::PSK_Pop) {\n if (Alignment && !SlotLabel.empty())\n Diag(PragmaLoc, diag::warn_pragma_pack_pop_identifier_and_alignment);"}} }, ["warn_pragma_pack_show"]={ [h]="warn_pragma_pack_show", [b]="value of #pragma pack(show) == %0", [f]="value of #pragma pack(show) == A", [e]=j, [a]="value of \\#pragma pack\\(show\\) \\=\\= (.*?)", [c]=wb, [i]=o, [d]={qb,1236199783,pb,ob}, [g]={{db,367,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n if (Action == Sema::PSK_Show) {\n // ...\n if (ModeVal == AlignPackInfo::Mac68k && (IsXLPragma || CurVal.IsAlignAttr()))\n Diag(PragmaLoc, diag::warn_pragma_pack_show) << \"mac68k\";"},{db,369,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n if (Action == Sema::PSK_Show) {\n // ...\n if (ModeVal == AlignPackInfo::Mac68k && (IsXLPragma || CurVal.IsAlignAttr()))\n // ...\n else\n Diag(PragmaLoc, diag::warn_pragma_pack_show) << AlignmentVal;"}}, [m]={ ["clang/test/Sema/pragma-pack.c"]={"clang/test/Sema/pragma-pack.c:3:69: warning: value of #pragma pack(show) == 8","clang/test/Sema/pragma-pack.c:5:69: warning: value of #pragma pack(show) == 8","clang/test/Sema/pragma-pack.c:7:69: warning: value of #pragma pack(show) == 4","clang/test/Sema/pragma-pack.c:9:69: warning: value of #pragma pack(show) == 8","clang/test/Sema/pragma-pack.c:12:70: warning: value of #pragma pack(show) == 16","clang/test/Sema/pragma-pack.c:14:70: warning: value of #pragma pack(show) == 16","clang/test/Sema/pragma-pack.c:17:69: warning: value of #pragma pack(show) == 8","clang/test/Sema/pragma-pack.c:19:69: warning: value of #pragma pack(show) == 1","clang/test/Sema/pragma-pack.c:21:69: warning: value of #pragma pack(show) == 2","clang/test/Sema/pragma-pack.c:26:70: warning: value of #pragma pack(show) == 16"} } }, ["warn_pragma_pop_failed"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_pop_failed", [b]="#pragma %0(pop, ...) failed: %1", [f]="#pragma A(pop, ...) failed: B", [e]=j, [a]="\\#pragma (.*?)\\(pop, \\.\\.\\.\\) failed\\: (.*?)", [c]=y, [i]=o, [d]={"c0dca6ded731",1392249026,"MS ABI: Implement #pragma vtordisp() and clang-cl /vdN","MS ABI: Implement #pragma vtordisp() and clang-cl /vdN\n\nThese features are new in VS 2013 and are necessary in order to layout\nstd::ostream correctly. Currently we have an ABI incompatibility when\nself-hosting with the 2013 stdlib in our convertible_fwd_ostream wrapper\nin gtest.\n\nThis change adds another implicit attribute, MSVtorDispAttr, because\nimplicit attributes are currently the best way to make sure the\ninformation stays on class templates through instantiation.\n\nReviewers: majnemer\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2746\n\nllvm-svn: 201274"}, [g]={{db,380,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n // MSDN, C/C++ Preprocessor Reference > Pragma Directives > pack:\n // \"#pragma pack(pop, identifier, n) is undefined\"\n if (Action & Sema::PSK_Pop) {\n // ...\n if (AlignPackStack.Stack.empty()) {\n // ...\n Diag(PragmaLoc, diag::warn_pragma_pop_failed) << \"pack\""},{db,593,"void Sema::ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value) {\n // ...\n case PFC_Pop:\n if (FpPragmaStack.Stack.empty()) {\n Diag(Loc, diag::warn_pragma_pop_failed) << \"float_control\""},{db,615,"void Sema::ActOnPragmaMSVtorDisp(PragmaMsStackAction Action, SourceLocation PragmaLoc, MSVtorDispMode Mode) {\n if (Action & PSK_Pop && VtorDispStack.Stack.empty())\n Diag(PragmaLoc, diag::warn_pragma_pop_failed) << \"vtordisp\""},{db,748,"/// Called on well formed \\#pragma bss_seg().\nvoid Sema::ActOnPragmaMSSeg(SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, StringLiteral *SegmentName, llvm::StringRef PragmaName) {\n // ...\n if (Action & PSK_Pop && Stack->Stack.empty())\n Diag(PragmaLocation, diag::warn_pragma_pop_failed) << PragmaName << \"stack empty\";"},{db,767,"/// Called on well formed \\#pragma strict_gs_check().\nvoid Sema::ActOnPragmaMSStrictGuardStackCheck(SourceLocation PragmaLocation, PragmaMsStackAction Action, bool Value) {\n if (Action & PSK_Pop && StrictGuardStackCheckStack.Stack.empty())\n Diag(PragmaLocation, diag::warn_pragma_pop_failed) << \"strict_gs_check\""}}, [m]={ ["clang/test/Sema/pragma-pack-and-options-align.c"]={"clang/test/Sema/pragma-pack-and-options-align.c:52:79: warning: #pragma pack(pop, ...) failed: stack empty [-Wignored-pragmas]"} } }, ["warn_pragma_pop_macro_no_push"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_pop_macro_no_push", [b]="pragma pop_macro could not pop \'%0\', no matching push_macro", [f]="pragma pop_macro could not pop \'A\', no matching push_macro", [e]=j, [a]="pragma pop_macro could not pop \'(.*?)\', no matching push_macro", [c]=y, [i]=B, [d]={"c0a585d63c6c",1282060545,"Implement #pragma push_macro, patch by Francois Pichet!","Implement #pragma push_macro, patch by Francois Pichet!\n\nllvm-svn: 111234"}, [g]={{C,681,"/// Handle \\#pragma pop_macro.\n///\n/// The syntax is:\n/// \\code\n/// #pragma pop_macro(\"macro\")\n/// \\endcode\nvoid Preprocessor::HandlePragmaPopMacro(Token &PopMacroTok) {\n // ...\n if (iter != PragmaPushMacroInfo.end()) {\n // ...\n } else {\n Diag(MessageLoc, diag::warn_pragma_pop_macro_no_push) << IdentInfo->getName();"}} }, ["warn_pragma_restrict_expansion_macro_use"]={ [k]={"pedantic-macros","restrict-expansion"}, [l]="restrict-expansion", [h]={{nil,F,"warn_pragma_restrict_expansion_macro_use"}}, [b]={{nil,F,"macro %0 has been marked as unsafe for use in headers%select{|: %2}1"}}, [f]={{nil,F,{"macro A has been marked as unsafe for use in headers",{T,": C"}}}}, [e]=j, [a]="macro (.*?) has been marked as unsafe for use in headers(?:|\\: (.*?))", [c]=" \\[(?:\\-Werror,)?\\-Wrestrict\\-expansion[^\\]]*\\]", [i]={{nil,F,B}}, [d]={Db,1625925174,Gb,Fb}, [g]={{bc,1470,"void Preprocessor::emitRestrictExpansionWarning(const Token &Identifier) const {\n // ...\n if (Info.Message.empty())\n Diag(Identifier, diag::warn_pragma_restrict_expansion_macro_use) << Identifier.getIdentifierInfo() << 0;"},{bc,1473,"void Preprocessor::emitRestrictExpansionWarning(const Token &Identifier) const {\n // ...\n if (Info.Message.empty())\n // ...\n else\n Diag(Identifier, diag::warn_pragma_restrict_expansion_macro_use) << Identifier.getIdentifierInfo() << 1 << Info.Message;"}}, [m]={ ["clang/test/Lexer/unsafe-macro.c"]={"clang/test/Lexer/Inputs/unsafe-macro-2.h:2:5: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:6:13: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:10:8: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:14:9: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:18:15: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:21:15: warning: macro \'UNSAFE_MACRO_2\' has been marked as unsafe for use in headers [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:34:7: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:41:10: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]","clang/test/Lexer/Inputs/unsafe-macro-2.h:48:11: warning: macro \'UNSAFE_MACRO\' has been marked as unsafe for use in headers: Don\'t use this! [-Wrestrict-expansion]"} } }, ["warn_pragma_unknown_extension"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_unknown_extension", [b]={{nil,P,"OpenCL extension %0 unknown or does not require pragma - ignoring"},{F,nil,"unknown OpenCL extension %0 - ignoring"}}, [f]={{nil,P,"OpenCL extension A unknown or does not require pragma - ignoring"},{F,nil,"unknown OpenCL extension A - ignoring"}}, [e]=j, [a]="OpenCL extension (.*?) unknown or does not require pragma \\- ignoring", [c]=y, [i]=t, [d]={"7ce13fc940de",1297647773,"OpenCL: add support for __kernel, kernel keywords and EXTENSION,","OpenCL: add support for __kernel, kernel keywords and EXTENSION,\nFP_CONTRACT pragmas. Patch originally by ARM.\n\nllvm-svn: 125475"}, [g]={{n,914,"void Parser::HandlePragmaOpenCLExtension() {\n // ...\n // OpenCL 1.1 9.1: \"The all variant sets the behavior for all extensions,\n // overriding all previously issued extension directives, but only if the\n // behavior is set to disable.\"\n if (Name == \"all\") {\n // ...\n } else if (State == Begin) {\n // ...\n } else if (State == End) {\n // ...\n } else if (!Opt.isKnown(Name) || !Opt.isWithPragma(Name))\n PP.Diag(NameLoc, diag::warn_pragma_unknown_extension) << Ident;"}}, [m]={ ["clang/test/Parser/opencl-pragma.cl"]={"clang/test/Parser/opencl-pragma.cl:5:26: warning: OpenCL extension \'cl_no_such_extension\' unknown or does not require pragma - ignoring [-Wignored-pragmas]"} } }, ["warn_pragma_unroll_cuda_value_in_parens"]={ [k]={"cuda-compat"}, [l]="cuda-compat", [h]="warn_pragma_unroll_cuda_value_in_parens", [b]="argument to \'#pragma unroll\' should not be in parentheses in CUDA C/C++", [f]="argument to \'#pragma unroll\' should not be in parentheses in CUDA C/C++", [e]=j, [a]="argument to \'\\#pragma unroll\' should not be in parentheses in CUDA C\\/C\\+\\+", [c]=" \\[(?:\\-Werror,)?\\-Wcuda\\-compat[^\\]]*\\]", [i]=t, [d]={"bd26f5ea4d9c",1405966114,"Add support for \'#pragma unroll\'.","Add support for \'#pragma unroll\'.\n\nllvm-svn: 213574"}, [g]={{n,3633,"/// Handle the loop unroll optimization pragmas.\n/// #pragma unroll\n/// #pragma unroll unroll-hint-value\n/// #pragma unroll \'(\' unroll-hint-value \')\'\n/// #pragma nounroll\n/// #pragma unroll_and_jam\n/// #pragma unroll_and_jam unroll-hint-value\n/// #pragma unroll_and_jam \'(\' unroll-hint-value \')\'\n/// #pragma nounroll_and_jam\n///\n/// unroll-hint-value:\n/// constant-expression\n///\n/// Loop unrolling hints can be specified with \'#pragma unroll\' or\n/// \'#pragma nounroll\'. \'#pragma unroll\' can take a numeric argument optionally\n/// contained in parentheses. With no argument the directive instructs llvm to\n/// try to unroll the loop completely. A positive integer argument can be\n/// specified to indicate the number of times the loop should be unrolled. To\n/// maximize compatibility with other compilers the unroll count argument can be\n/// specified with or without parentheses. Specifying, \'#pragma nounroll\'\n/// disables unrolling of the loop.\nvoid PragmaUnrollHintHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.is(tok::eod)) {\n // ...\n } else if (PragmaName.getIdentifierInfo()->getName() == \"nounroll\" || PragmaName.getIdentifierInfo()->getName() == \"nounroll_and_jam\") {\n // ...\n } else {\n // ...\n // In CUDA, the argument to \'#pragma unroll\' should not be contained in\n // parentheses.\n if (PP.getLangOpts().CUDA && ValueInParens)\n PP.Diag(Info->Toks[0].getLocation(), diag::warn_pragma_unroll_cuda_value_in_parens);"}}, [m]={ ["clang/test/Parser/warn-cuda-compat.cu"]={"clang/test/Parser/warn-cuda-compat.cu:9:114: warning: argument to \'#pragma unroll\' should not be in parentheses in CUDA C/C++ [-Wcuda-compat]"} } }, ["warn_pragma_unsupported_action"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_unsupported_action", [b]="known but unsupported action \'%1\' for \'#pragma %0\' - ignored", [f]="known but unsupported action \'B\' for \'#pragma A\' - ignored", [e]=j, [a]="known but unsupported action \'(.*?)\' for \'\\#pragma (.*?)\' \\- ignored", [c]=y, [i]=t, [d]={Ob,1396996247,Xb,ac}, [g]={{n,1033,"bool Parser::HandlePragmaMSSection(StringRef PragmaName, SourceLocation PragmaLocation) {\n // ...\n while (Tok.is(tok::comma)) {\n // ...\n if (Flag == ASTContext::PSF_None || Flag == ASTContext::PSF_Invalid) {\n PP.Diag(PragmaLocation, Flag == ASTContext::PSF_None ? diag::warn_pragma_invalid_specific_action : diag::warn_pragma_unsupported_action) << PragmaName << Tok.getIdentifierInfo()->getName();"}}, [m]={ [Zb]={"clang/test/Sema/pragma-section.c:42:9: warning: known but unsupported action \'nopage\' for \'#pragma section\' - ignored [-Wignored-pragmas]"} } }, ["warn_pragma_unsupported_extension"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_unsupported_extension", [b]="unsupported OpenCL extension %0 - ignoring", [f]="unsupported OpenCL extension A - ignoring", [e]=j, [a]="unsupported OpenCL extension (.*?) \\- ignoring", [c]=y, [i]=t, [d]={"64936ce91dba",1463154277,"[OpenCL] Add supported OpenCL extensions to target info.","[OpenCL] Add supported OpenCL extensions to target info.\n\nAdd supported OpenCL extensions to target info. It serves as default values to save the users of the burden setting each supported extensions and optional core features in command line.\n\nDifferential Revision: http://reviews.llvm.org/D19484\n\nllvm-svn: 269431"}, [g]={{n,920,"void Parser::HandlePragmaOpenCLExtension() {\n // ...\n // OpenCL 1.1 9.1: \"The all variant sets the behavior for all extensions,\n // overriding all previously issued extension directives, but only if the\n // behavior is set to disable.\"\n if (Name == \"all\") {\n // ...\n } else if (State == Begin) {\n // ...\n } else if (State == End) {\n // ...\n } else if (!Opt.isKnown(Name) || !Opt.isWithPragma(Name))\n // ...\n else if (Opt.isSupportedExtension(Name, getLangOpts()))\n // ...\n else if (Opt.isSupportedCoreOrOptionalCore(Name, getLangOpts()))\n // ...\n else\n PP.Diag(NameLoc, diag::warn_pragma_unsupported_extension) << Ident;"}}, [m]={ ["clang/test/Misc/amdgcn.languageOptsOpenCL.cl"]={"clang/test/Misc/amdgcn.languageOptsOpenCL.cl:115:26: warning: unsupported OpenCL extension \'cl_khr_gl_msaa_sharing\' - ignoring [-Wignored-pragmas]","clang/test/Misc/amdgcn.languageOptsOpenCL.cl:133:26: warning: unsupported OpenCL extension \'cl_khr_srgb_image_writes\' - ignoring [-Wignored-pragmas]"} } }, ["warn_pragma_unused_expected_var"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_unused_expected_var", [b]="expected \'#pragma unused\' argument to be a variable name", [f]="expected \'#pragma unused\' argument to be a variable name", [e]=j, [a]="expected \'\\#pragma unused\' argument to be a variable name", [c]=y, [i]=t, [d]={"fd14fade2ffc",1237847305,"Implement \'#pragma unused\'.","Implement \'#pragma unused\'.\n\nllvm-svn: 67569"}, [g]={{n,2372,"// #pragma unused(identifier)\nvoid PragmaUnusedHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &UnusedTok) {\n // ...\n while (true) {\n // ...\n if (LexID) {\n // ...\n PP.Diag(Tok.getLocation(), diag::warn_pragma_unused_expected_var);"}}, [m]={ ["clang/test/Sema/pragma-unused.c"]={"clang/test/Sema/pragma-unused.c:14:20: warning: expected \'#pragma unused\' argument to be a variable name [-Wignored-pragmas]","clang/test/Sema/pragma-unused.c:15:18: warning: expected \'#pragma unused\' argument to be a variable name [-Wignored-pragmas]","clang/test/Sema/pragma-unused.c:24:18: warning: expected \'#pragma unused\' argument to be a variable name [-Wignored-pragmas]"} } }, ["warn_pragma_unused_expected_var_arg"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_unused_expected_var_arg", [b]="only variables can be arguments to \'#pragma unused\'", [f]="only variables can be arguments to \'#pragma unused\'", [e]=j, [a]="only variables can be arguments to \'\\#pragma unused\'", [c]=y, [i]=o, [d]={"ff115a2f351d",1296152208,"Allow #pragma unused to be used on global variables like gcc. Fixes rdar://8793832.","Allow #pragma unused to be used on global variables like gcc. Fixes rdar://8793832.\n\nllvm-svn: 124383"}, [g]={{db,839,"void Sema::ActOnPragmaUnused(const Token &IdTok, Scope *curScope, SourceLocation PragmaLoc) {\n // ...\n if (!VD) {\n Diag(PragmaLoc, diag::warn_pragma_unused_expected_var_arg) << Name << SourceRange(IdTok.getLocation());"}} }, ["warn_pragma_unused_undeclared_var"]={ [k]={q,r}, [l]=q, [h]="warn_pragma_unused_undeclared_var", [b]="undeclared variable %0 used as an argument for \'#pragma unused\'", [f]="undeclared variable A used as an argument for \'#pragma unused\'", [e]=j, [a]="undeclared variable (.*?) used as an argument for \'\\#pragma unused\'", [c]=y, [i]=o, [d]={"fb50bf5a6f16",1249341897,"Per advice that Doug Gregor gave me several months ago, clean up the","Per advice that Doug Gregor gave me several months ago, clean up the\nimplementation of \'#pragma unused\' by not constructing intermediate\nDeclRefExprs, but instead do the name lookup directly. The\nimplementation is greatly simplified.\n\nAlong the way, degrade \'#pragma unused(undeclaredvariable)\' to a\nwarning instead of being a hard error. This implements:\n\n<rdar://problem/6761874> [sema] allow #pragma unused to reference undefined variable (with warning)\n\nllvm-svn: 78019"}, [g]={{db,832,"void Sema::ActOnPragmaUnused(const Token &IdTok, Scope *curScope, SourceLocation PragmaLoc) {\n // ...\n if (Lookup.empty()) {\n Diag(PragmaLoc, diag::warn_pragma_unused_undeclared_var) << Name << SourceRange(IdTok.getLocation());"}}, [m]={ ["clang/test/Sema/pragma-unused.c"]={"clang/test/Sema/pragma-unused.c:19:11: warning: undeclared variable \'x\' used as an argument for \'#pragma unused\' [-Wignored-pragmas]","clang/test/Sema/pragma-unused.c:36:11: warning: undeclared variable \'undeclared\' used as an argument for \'#pragma unused\' [-Wignored-pragmas]","clang/test/Sema/pragma-unused.c:36:11: warning: undeclared variable \'undefined\' used as an argument for \'#pragma unused\' [-Wignored-pragmas]"} } }, ["warn_pragma_warning_expected"]={ [k]={u,v,w,r,J}, [l]=J, [h]="warn_pragma_warning_expected", [b]="#pragma warning expected \'%0\'", [f]="#pragma warning expected \'A\'", [e]=j, [a]="\\#pragma warning expected \'(.*?)\'", [c]=bb, [i]=B, [d]={"881dff36831f",1379109630,"Lex and ignore Microsoft\'s #pragma warning(...)","Lex and ignore Microsoft\'s #pragma warning(...)\n\nSummary:\nThis fixes PR17145 and avoids unknown pragma warnings.\n\nThis change does not attempt to map MSVC warning numbers to clang\nwarning flags. Perhaps in the future we will implement a mapping for\nsome common subset of Microsoft warnings, but for now we don\'t.\n\nReviewers: rsmith\n\nCC: cfe-commits\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D1652\n\nllvm-svn: 190726"}, [g]={{C,1395,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok, diag::warn_pragma_warning_expected) << \"(\";"},{C,1473,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n } else if (II && II->isStr(\"pop\")) {\n // ...\n } else {\n // #pragma warning( warning-specifier : warning-number-list\n // [; warning-specifier : warning-number-list...] )\n while (true) {\n // ...\n if (Tok.isNot(tok::colon)) {\n PP.Diag(Tok, diag::warn_pragma_warning_expected) << \":\";"},{C,1516,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok, diag::warn_pragma_warning_expected) << \")\";"}}, [m]={ [mb]={"clang/test/Preprocessor/pragma_microsoft.c:154:54: warning: #pragma warning expected \'(\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:157:22: warning: #pragma warning expected \')\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:159:59: warning: #pragma warning expected \')\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:162:20: warning: #pragma warning expected \')\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:166:25: warning: #pragma warning expected \':\' [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:168:25: warning: #pragma warning expected \':\' [-Wunknown-pragmas]"} } }, ["warn_pragma_warning_expected_number"]={ [k]={u,v,w,r,J}, [l]=J, [h]="warn_pragma_warning_expected_number", [b]="#pragma warning expected a warning number", [f]="#pragma warning expected a warning number", [e]=j, [a]="\\#pragma warning expected a warning number", [c]=bb, [i]=B, [d]={"881dff36831f",1379109630,"Lex and ignore Microsoft\'s #pragma warning(...)","Lex and ignore Microsoft\'s #pragma warning(...)\n\nSummary:\nThis fixes PR17145 and avoids unknown pragma warnings.\n\nThis change does not attempt to map MSVC warning numbers to clang\nwarning flags. Perhaps in the future we will implement a mapping for\nsome common subset of Microsoft warnings, but for now we don\'t.\n\nReviewers: rsmith\n\nCC: cfe-commits\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D1652\n\nllvm-svn: 190726"}, [g]={{C,1484,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n } else if (II && II->isStr(\"pop\")) {\n // ...\n } else {\n // #pragma warning( warning-specifier : warning-number-list\n // [; warning-specifier : warning-number-list...] )\n while (true) {\n // ...\n while (Tok.is(tok::numeric_constant)) {\n // ...\n if (!PP.parseSimpleIntegerLiteral(Tok, Value) || Value == 0 || Value > INT_MAX) {\n PP.Diag(Tok, diag::warn_pragma_warning_expected_number);"}}, [m]={ [mb]={"clang/test/Preprocessor/pragma_microsoft.c:167:28: warning: #pragma warning expected a warning number [-Wunknown-pragmas]"} } }, ["warn_pragma_warning_push_level"]={ [k]={u,v,w,r,J}, [l]=J, [h]="warn_pragma_warning_push_level", [b]="#pragma warning(push, level) requires a level between 0 and 4", [f]="#pragma warning(push, level) requires a level between 0 and 4", [e]=j, [a]="\\#pragma warning\\(push, level\\) requires a level between 0 and 4", [c]=bb, [i]=B, [d]={"881dff36831f",1379109630,"Lex and ignore Microsoft\'s #pragma warning(...)","Lex and ignore Microsoft\'s #pragma warning(...)\n\nSummary:\nThis fixes PR17145 and avoids unknown pragma warnings.\n\nThis change does not attempt to map MSVC warning numbers to clang\nwarning flags. Perhaps in the future we will implement a mapping for\nsome common subset of Microsoft warnings, but for now we don\'t.\n\nReviewers: rsmith\n\nCC: cfe-commits\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D1652\n\nllvm-svn: 190726"}, [g]={{C,1413,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n if (Level < 0 || Level > 4) {\n PP.Diag(Tok, diag::warn_pragma_warning_push_level);"}}, [m]={ ["clang/test/Preprocessor/pragma_microsoft.cpp"]={"clang/test/Preprocessor/pragma_microsoft.cpp:3:23: warning: #pragma warning(push, level) requires a level between 0 and 4 [-Wunknown-pragmas]"} } }, ["warn_pragma_warning_spec_invalid"]={ [k]={u,v,w,r,J}, [l]=J, [h]="warn_pragma_warning_spec_invalid", [b]="#pragma warning expected \'push\', \'pop\', \'default\', \'disable\', \'error\', \'once\', \'suppress\', 1, 2, 3, or 4", [f]="#pragma warning expected \'push\', \'pop\', \'default\', \'disable\', \'error\', \'once\', \'suppress\', 1, 2, 3, or 4", [e]=j, [a]="\\#pragma warning expected \'push\', \'pop\', \'default\', \'disable\', \'error\', \'once\', \'suppress\', 1, 2, 3, or 4", [c]=bb, [i]=B, [d]={"881dff36831f",1379109630,"Lex and ignore Microsoft\'s #pragma warning(...)","Lex and ignore Microsoft\'s #pragma warning(...)\n\nSummary:\nThis fixes PR17145 and avoids unknown pragma warnings.\n\nThis change does not attempt to map MSVC warning numbers to clang\nwarning flags. Perhaps in the future we will implement a mapping for\nsome common subset of Microsoft warnings, but for now we don\'t.\n\nReviewers: rsmith\n\nCC: cfe-commits\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D1652\n\nllvm-svn: 190726"}, [g]={{C,1433,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n } else if (II && II->isStr(\"pop\")) {\n // ...\n } else {\n // #pragma warning( warning-specifier : warning-number-list\n // [; warning-specifier : warning-number-list...] )\n while (true) {\n // ...\n if (!II && !Tok.is(tok::numeric_constant)) {\n PP.Diag(Tok, diag::warn_pragma_warning_spec_invalid);"},{C,1469,"/// \"\\#pragma warning(...)\". MSVC\'s diagnostics do not map cleanly to clang\'s\n/// diagnostics, so we don\'t really implement this pragma. We parse it and\n/// ignore it to avoid -Wunknown-pragma warnings.\nstruct PragmaWarningHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (II && II->isStr(\"push\")) {\n // ...\n } else if (II && II->isStr(\"pop\")) {\n // ...\n } else {\n // #pragma warning( warning-specifier : warning-number-list\n // [; warning-specifier : warning-number-list...] )\n while (true) {\n // ...\n if (!SpecifierValid) {\n PP.Diag(Tok, diag::warn_pragma_warning_spec_invalid);"}}, [m]={ [mb]={"clang/test/Preprocessor/pragma_microsoft.c:146:18: warning: #pragma warning expected \'push\', \'pop\', \'default\', \'disable\', \'error\', \'once\', \'suppress\', 1, 2, 3, or 4 [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:155:132: warning: #pragma warning expected \'push\', \'pop\', \'default\', \'disable\', \'error\', \'once\', \'suppress\', 1, 2, 3, or 4 [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:156:17: warning: #pragma warning expected \'push\', \'pop\', \'default\', \'disable\', \'error\', \'once\', \'suppress\', 1, 2, 3, or 4 [-Wunknown-pragmas]","clang/test/Preprocessor/pragma_microsoft.c:169:17: warning: #pragma warning expected \'push\', \'pop\', \'default\', \'disable\', \'error\', \'once\', \'suppress\', 1, 2, 3, or 4 [-Wunknown-pragmas]"} } }, ["warn_pre_c2x_compat_attributes"]={ [k]={"pre-c2x-compat","pre-c2x-compat-pedantic"}, [l]="pre-c2x-compat", [h]="warn_pre_c2x_compat_attributes", [b]="[[]] attributes are incompatible with C standards before C2x", [f]="[[]] attributes are incompatible with C standards before C2x", [e]=j, [a]="\\[\\[\\]\\] attributes are incompatible with C standards before C2x", [c]=" \\[(?:\\-Werror,)?\\-Wpre\\-c2x\\-compat[^\\]]*\\]", [i]=t, [d]={"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"}, [g]={{"clang/lib/Parse/ParseDeclCXX.cpp",4527,"/// Parse a C++11 or C2x attribute-specifier.\n///\n/// [C++11] attribute-specifier:\n/// \'[\' \'[\' attribute-list \']\' \']\'\n/// alignment-specifier\n///\n/// [C++11] attribute-list:\n/// attribute[opt]\n/// attribute-list \',\' attribute[opt]\n/// attribute \'...\'\n/// attribute-list \',\' attribute \'...\'\n///\n/// [C++11] attribute:\n/// attribute-token attribute-argument-clause[opt]\n///\n/// [C++11] attribute-token:\n/// identifier\n/// attribute-scoped-token\n///\n/// [C++11] attribute-scoped-token:\n/// attribute-namespace \'::\' identifier\n///\n/// [C++11] attribute-namespace:\n/// identifier\nvoid Parser::ParseCXX11AttributeSpecifierInternal(ParsedAttributes &Attrs, CachedTokens &OpenMPTokens, SourceLocation *EndLoc) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n Diag(OpenLoc, getLangOpts().C2x ? diag::warn_pre_c2x_compat_attributes : diag::warn_ext_c2x_attributes);"}}, [m]={ ["clang/test/Sema/c2x-attr.c"]={"clang/test/Sema/c2x-attr.c:4:1: warning: [[]] attributes are incompatible with C standards before C2x [-Wpre-c2x-compat]"} } }, ["warn_precedence_bitwise_conditional"]={ [k]={u,v,"bitwise-conditional-parentheses",Vb}, [l]="bitwise-conditional-parentheses", [h]={{nil,A,"warn_precedence_bitwise_conditional"}}, [b]={{nil,A,"operator \'?:\' has lower precedence than \'%0\'; \'%0\' will be evaluated first"}}, [f]={{nil,A,"operator \'?:\' has lower precedence than \'A\'; \'A\' will be evaluated first"}}, [e]=j, [a]="operator \'\\?\\:\' has lower precedence than \'(.*?)\'; \'(.*?)\' will be evaluated first", [c]=" \\[(?:\\-Werror,)?\\-Wbitwise\\-conditional\\-parentheses[^\\]]*\\]", [i]={{nil,A,o}}, [d]={"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"}, [g]={{I,9508,"/// DiagnoseConditionalPrecedence - Emit a warning when a conditional operator\n/// and binary operator are mixed in a way that suggests the programmer assumed\n/// the conditional operator has higher precedence, for example:\n/// \"int x = a + someBinaryCondition ? 1 : 2\".\nstatic void DiagnoseConditionalPrecedence(Sema &Self, SourceLocation OpLoc, Expr *Condition, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n unsigned DiagID = BinaryOperator::isBitwiseOp(CondOpcode) ? diag::warn_precedence_bitwise_conditional : diag::warn_precedence_conditional;"}}, [m]={ ["clang/test/Sema/parentheses.c"]={"clang/test/Sema/parentheses.c:97:30: warning: operator \'?:\' has lower precedence than \'|\'; \'|\' will be evaluated first [-Wbitwise-conditional-parentheses]","clang/test/Sema/parentheses.c:102:16: warning: operator \'?:\' has lower precedence than \'|\'; \'|\' will be evaluated first [-Wbitwise-conditional-parentheses]","clang/test/Sema/parentheses.c:103:16: warning: operator \'?:\' has lower precedence than \'&\'; \'&\' will be evaluated first [-Wbitwise-conditional-parentheses]"} } }, ["warn_precedence_bitwise_rel"]={ [k]={u,v,Vb}, [l]=Vb, [h]="warn_precedence_bitwise_rel", [b]="%0 has lower precedence than %1; %1 will be evaluated first", [f]="A has lower precedence than B; B will be evaluated first", [e]=j, [a]="(.*?) has lower precedence than (.*?); (.*?) will be evaluated first", [c]=" \\[(?:\\-Werror,)?\\-Wparentheses[^\\]]*\\]", [i]=o, [d]={"4302824fe260",1256570655,"Implement a warning for mixing bitwise logical with comparison ops. Fixes PR5297.","Implement a warning for mixing bitwise logical with comparison ops. Fixes PR5297.\n\nllvm-svn: 85117"}, [g]={{I,15763,"/// DiagnoseBitwisePrecedence - Emit a warning when bitwise and comparison\n/// operators are mixed in a way that suggests that the programmer forgot that\n/// comparison operators have higher precedence. The most typical example of\n/// such code is \"flags & 0x0020 != 0\", which is equivalent to \"flags & 1\".\nstatic void DiagnoseBitwisePrecedence(Sema &Self, BinaryOperatorKind Opc, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n Self.Diag(OpLoc, diag::warn_precedence_bitwise_rel) << DiagRange << BinaryOperator::getOpcodeStr(Opc) << OpStr;"}}, [m]={ ["clang/test/CodeGen/2008-10-13-FrontendCrash.c"]={"clang/test/CodeGen/2008-10-13-FrontendCrash.c:8:18: warning: ^ has lower precedence than !=; != will be evaluated first [-Wparentheses]"} } }, ["warn_precedence_conditional"]={ [k]={u,v,Vb}, [l]=Vb, [h]="warn_precedence_conditional", [b]="operator \'?:\' has lower precedence than \'%0\'; \'%0\' will be evaluated first", [f]="operator \'?:\' has lower precedence than \'A\'; \'A\' will be evaluated first", [e]=j, [a]="operator \'\\?\\:\' has lower precedence than \'(.*?)\'; \'(.*?)\' will be evaluated first", [c]=" \\[(?:\\-Werror,)?\\-Wparentheses[^\\]]*\\]", [i]=o, [d]={"cf9bac4bc9dd",1307124036,"Warn about missing parentheses for conditional operator.","Warn about missing parentheses for conditional operator.\n\nWarn in cases such as \"x + someCondition ? 42 : 0;\",\nwhere the condition expression looks arithmetic, and has\na right-hand side that looks boolean.\n\nThis (partly) addresses http://llvm.org/bugs/show_bug.cgi?id=9969\n\nllvm-svn: 132565"}, [g]={{I,9516,"/// DiagnoseConditionalPrecedence - Emit a warning when a conditional operator\n/// and binary operator are mixed in a way that suggests the programmer assumed\n/// the conditional operator has higher precedence, for example:\n/// \"int x = a + someBinaryCondition ? 1 : 2\".\nstatic void DiagnoseConditionalPrecedence(Sema &Self, SourceLocation OpLoc, Expr *Condition, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n unsigned DiagID = BinaryOperator::isBitwiseOp(CondOpcode) ? diag::warn_precedence_bitwise_conditional : diag::warn_precedence_conditional;"}}, [m]={ ["clang/test/Misc/caret-diags-macros.c"]={"clang/test/Misc/caret-diags-macros.c:125:38: warning: operator \'?:\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wparentheses]","clang/test/Misc/caret-diags-macros.c:139:9: warning: operator \'?:\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wparentheses]","clang/test/Misc/caret-diags-macros.c:158:9: warning: operator \'?:\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wparentheses]","clang/test/Misc/caret-diags-macros.c:174:21: warning: operator \'?:\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wparentheses]"} } }, ["warn_printf_ObjCflags_without_ObjCConversion"]={ [k]={u,v,N,w}, [l]=N, [h]="warn_printf_ObjCflags_without_ObjCConversion", [b]="object format flags cannot be used with \'%0\' conversion specifier", [f]="object format flags cannot be used with \'A\' conversion specifier", [e]=j, [a]="object format flags cannot be used with \'(.*?)\' conversion specifier", [c]=lb, [i]=X, [d]={"2b4177190923",1435815556,"Parse \'technical term\' format specifier.","Parse \'technical term\' format specifier.\n\nObjective-C format strings now support modifier flags\nthat can be attached to a \'@\' conversion. Currently\nthe only one supported, as of iOS 9 and OS X 10.11,\nis the new \"technical term\", denoted by the flag \"tt\",\nfor example:\n\n %[tt]@\n\ninstead of just:\n\n %@\n\nThe \'tt\' stands for \"technical term\", which is used\nby the string-localization facilities on Darwin to\nadd the appropriate spacing or quotation depending\nthe language locale.\n\nImplements <rdar://problem/20374720>.\n\nllvm-svn: 241243"}, [g]={{E,10660,"void CheckPrintfHandler::HandleObjCFlagsWithNonObjCConversion(const char *flagsStart, const char *flagsEnd, const char *conversionPosition) {\n // ...\n auto diag = diag::warn_printf_ObjCflags_without_ObjCConversion;"}}, [m]={ ["clang/test/SemaObjC/format-strings-objc.m"]={"clang/test/SemaObjC/format-strings-objc.m:289:27: warning: object format flags cannot be used with \'s\' conversion specifier [-Wformat]"} } }, ["warn_printf_asterisk_missing_arg"]={ [k]={u,v,N,w}, [l]=N, [h]="warn_printf_asterisk_missing_arg", [b]="\'%select{*|.*}0\' specified field %select{width|precision}0 is missing a matching \'int\' argument", [f]={{nil,nil,{"\'",{"*",".*"},"\' specified field ",{"width","precision"}," is missing a matching \'int\' argument"}}}, [e]=j, [a]="\'(?:\\*|\\.\\*)\' specified field (?:width|precision) is missing a matching \'int\' argument", [c]=lb, [i]=X, [d]={"d166819c26a8",1267234863,"For printf format string checking, add support for positional format strings.","For printf format string checking, add support for positional format strings.\nAlong the way, coelesce some of the diagnostics.\n\nllvm-svn: 97297"}, [g]={{E,10541,"bool CheckPrintfHandler::HandleAmount(const analyze_format_string::OptionalAmount &Amt, unsigned k, const char *startSpecifier, unsigned specifierLen) {\n if (Amt.hasDataArgument()) {\n if (ArgPassingKind != Sema::FAPK_VAList) {\n // ...\n if (argIndex >= NumDataArgs) {\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_asterisk_missing_arg) << k, getLocationOfByte(Amt.getStart()),"}}, [m]={ [Ib]={"clang/test/Sema/format-strings.c:238:13: warning: \'*\' specified field width is missing a matching \'int\' argument [-Wformat]","clang/test/Sema/format-strings.c:239:13: warning: \'.*\' specified field precision is missing a matching \'int\' argument [-Wformat]","clang/test/Sema/format-strings.c:290:13: warning: \'*\' specified field width is missing a matching \'int\' argument [-Wformat]","clang/test/Sema/format-strings.c:291:14: warning: \'.*\' specified field precision is missing a matching \'int\' argument [-Wformat]","clang/test/Sema/format-strings.c:402:14: warning: \'*\' specified field width is missing a matching \'int\' argument [-Wformat]","clang/test/Sema/format-strings.c:605:10: warning: \'*\' specified field width is missing a matching \'int\' argument [-Wformat]","clang/test/Sema/format-strings.c:606:13: warning: \'*\' specified field width is missing a matching \'int\' argument [-Wformat]"} } }, ["warn_printf_asterisk_wrong_type"]={ [k]={u,v,N,w}, [l]=N, [h]="warn_printf_asterisk_wrong_type", [b]="field %select{width|precision}0 should have type %1, but argument has type %2", [f]={{nil,nil,{"field ",{"width","precision"}," should have type B, but argument has type C"}}}, [e]=j, [a]="field (?:width|precision) should have type (.*?), but argument has type (.*?)", [c]=lb, [i]=X, [d]={"d166819c26a8",1267234863,"For printf format string checking, add support for positional format strings.","For printf format string checking, add support for positional format strings.\nAlong the way, coelesce some of the diagnostics.\n\nllvm-svn: 97297"}, [g]={{E,10566,"bool CheckPrintfHandler::HandleAmount(const analyze_format_string::OptionalAmount &Amt, unsigned k, const char *startSpecifier, unsigned specifierLen) {\n if (Amt.hasDataArgument()) {\n if (ArgPassingKind != Sema::FAPK_VAList) {\n // ...\n if (!AT.matchesType(S.Context, T)) {\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_asterisk_wrong_type) << k << AT.getRepresentativeTypeName(S.Context) << T << Arg->getSourceRange(), getLocationOfByte(Amt.getStart()),"}}, [m]={ ["clang/test/SemaObjC/format-strings-oslog.m"]={"clang/test/SemaObjC/format-strings-oslog.m:19:35: warning: field precision should have type \'int\', but argument has type \'void *\' [-Wformat]","clang/test/SemaObjC/format-strings-oslog.m:55:36: warning: field precision should have type \'int\', but argument has type \'void *\' [-Wformat]"} } }, ["warn_printf_data_arg_not_used"]={ [k]={u,v,N,"format-extra-args",w}, [l]="format-extra-args", [h]="warn_printf_data_arg_not_used", [b]="data argument not used by format string", [f]="data argument not used by format string", [e]=j, [a]="data argument not used by format string", [c]=" \\[(?:\\-Werror,)?\\-Wformat\\-extra\\-args[^\\]]*\\]", [i]=X, [d]={"4a49d9818b4e",1267211921,"For printf format string checking, move the tracking of the data argument index out of","For printf format string checking, move the tracking of the data argument index out of\nSema and into analyze_printf::ParseFormatString(). Also use a bitvector to determine\nwhat arguments have been covered (instead of just checking to see if the last argument consumed is the max argument). This is prep. for support positional arguments (an IEEE extension).\n\nllvm-svn: 97248"}, [g]={{E,10284,"void UncoveredArgHandler::Diagnose(Sema &S, bool IsFunctionCall, const Expr *ArgExpr) {\n // ...\n PartialDiagnostic PDiag = S.PDiag(diag::warn_printf_data_arg_not_used);"}}, [m]={ ["clang/test/SemaOpenCL/printf-format-string-warnings.cl"]={"clang/test/SemaOpenCL/printf-format-string-warnings.cl:11:32: warning: data argument not used by format string [-Wformat-extra-args]"} } }, ["warn_printf_empty_objc_flag"]={ [k]={u,v,N,w}, [l]=N, [h]="warn_printf_empty_objc_flag", [b]="missing object format flag", [f]="missing object format flag", [e]=j, [a]="missing object format flag", [c]=lb, [i]=X, [d]={"2b4177190923",1435815556,"Parse \'technical term\' format specifier.","Parse \'technical term\' format specifier.\n\nObjective-C format strings now support modifier flags\nthat can be attached to a \'@\' conversion. Currently\nthe only one supported, as of iOS 9 and OS X 10.11,\nis the new \"technical term\", denoted by the flag \"tt\",\nfor example:\n\n %[tt]@\n\ninstead of just:\n\n %@\n\nThe \'tt\' stands for \"technical term\", which is used\nby the string-localization facilities on Darwin to\nadd the appropriate spacing or quotation depending\nthe language locale.\n\nImplements <rdar://problem/20374720>.\n\nllvm-svn: 241243"}, [g]={{E,10639,"void CheckPrintfHandler::HandleEmptyObjCModifierFlag(const char *startFlag, unsigned flagLen) {\n // ...\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_empty_objc_flag), getLocationOfByte(startFlag),"}}, [m]={ ["clang/test/SemaObjC/format-strings-objc.m"]={"clang/test/SemaObjC/format-strings-objc.m:281:13: warning: missing object format flag [-Wformat]"} } }, ["warn_printf_format_string_contains_null_char"]={ [k]={u,v,N,w}, [l]=N, [h]="warn_printf_format_string_contains_null_char", [b]="format string contains \'\\0\' within the string body", [f]="format string contains \'\\0\' within the string body", [e]=j, [a]="format string contains \'\\\\0\' within the string body", [c]=lb, [i]=X, [d]={"5a8987ca5113",1237025389,"Update tablegen diagnostic files to be in sync with the def files.","Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"}, [g]={{E,10243,"void CheckFormatHandler::HandleNullChar(const char *nullCharacter) {\n if (!isa<ObjCStringLiteral>(OrigFormatExpr)) {\n // ...\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_format_string_contains_null_char), getLocationOfByte(nullCharacter), /*IsStringLocation*/ true, getFormatStringRange());"}}, [m]={ ["clang/test/Sema/warn-fortify-source.c"]={"clang/test/Sema/warn-fortify-source.c:102:43: warning: format string contains \'\\0\' within the string body [-Wformat]","clang/test/Sema/warn-fortify-source.c:103:43: warning: format string contains \'\\0\' within the string body [-Wformat]","clang/test/Sema/warn-fortify-source.c:153:21: warning: format string contains \'\\0\' within the string body [-Wformat]","clang/test/Sema/warn-fortify-source.c:154:24: warning: format string contains \'\\0\' within the string body [-Wformat]"} } }, ["warn_printf_format_string_not_null_terminated"]={ [k]={u,v,N,w}, [l]=N, [h]="warn_printf_format_string_not_null_terminated", [b]="format string is not null-terminated", [f]="format string is not null-terminated", [e]=j, [a]="format string is not null\\-terminated", [c]=lb, [i]=X, [d]={"6c6a4f4081a8",1392915938,"Sema: Emit a warning for non-null terminated format strings and other pathological cases.","Sema: Emit a warning for non-null terminated format strings and other pathological cases.\n\nPR18905.\n\nllvm-svn: 201795"}, [g]={{E,11647,"static void CheckFormatString(Sema &S, const FormatStringLiteral *FExpr, const Expr *OrigFormatExpr, ArrayRef<const Expr *> Args, Sema::FormatArgumentPassingKind APK, unsigned format_idx, unsigned firstDataArg, Sema::FormatStringType Type, bool inFunctionCall, Sema::VariadicCallType CallType, llvm::SmallBitVector &CheckedVarArgs, UncoveredArgHandler &UncoveredArg, bool IgnoreStringsWithoutSpecifiers) {\n // ...\n // Emit a warning if the string literal is truncated and does not contain an\n // embedded null character.\n if (TypeSize <= StrRef.size() && !StrRef.substr(0, TypeSize).contains(\'\\0\')) {\n CheckFormatHandler::EmitFormatDiagnostic(S, inFunctionCall, Args[format_idx], S.PDiag(diag::warn_printf_format_string_not_null_terminated), FExpr->getBeginLoc(),"}}, [m]={ [Ib]={"clang/test/Sema/format-strings.c:657:10: warning: format string is not null-terminated [-Wformat]","clang/test/Sema/format-strings.c:660:10: warning: format string is not null-terminated [-Wformat]"} } }, ["warn_printf_ignored_flag"]={ [k]={u,v,N,w}, [l]=N, [h]="warn_printf_ignored_flag", [b]="flag \'%0\' is ignored when flag \'%1\' is present", [f]="flag \'A\' is ignored when flag \'B\' is present", [e]=j, [a]="flag \'(.*?)\' is ignored when flag \'(.*?)\' is present", [c]=lb, [i]=X, [d]={"b49ec6907b32",1276801227,"Bug 7377: Fixed several bad printf format string bugs.","Bug 7377: Fixed several bad printf format string bugs.\n- Added warning for undefined behavior when using field specifier\n- Added warning for undefined behavior when using length modifier\n- Fixed warnings for invalid flags\n- Added warning for ignored flags\n- Added fixits for the above warnings\n- Fixed accuracy of detecting several undefined behavior conditions\n- Receive normal warnings in addition to security warnings when using %n\n- Fix bug where \'+\' flag would remain on unsigned conversion suggestions\n\nSummary of changes:\n- Added expanded tests\n- Added/expanded warnings\n- Added position info to OptionalAmounts for fixits\n- Extracted optional flags to a wrapper class with position info for fixits\n- Added several methods to validate a FormatSpecifier by component, each checking for undefined behavior\n- Fixed conversion specifier checking to conform to C99 standard\n- Added hooks to detect the invalid states in CheckPrintfHandler::HandleFormatSpecifier\n\nNote: warnings involving the \' \' (space) flag are temporarily disabled until whitespace highlighting no longer triggers assertions. I will make a post about this on cfe-dev shortly.\n\nM test/Sema/format-strings.c\nM include/clang/Basic/DiagnosticSemaKinds.td\nM include/clang/Analysis/Analyses/PrintfFormatString.h\nM lib/Analysis/PrintfFormatString.cpp\nM lib/Sema/SemaChecking.cpp\n\nllvm-svn: 106233"}, [g]={{E,10627,"void CheckPrintfHandler::HandleIgnoredFlag(const analyze_printf::PrintfSpecifier &FS, const analyze_printf::OptionalFlag &ignoredFlag, const analyze_printf::OptionalFlag &flag, const char *startSpecifier, unsigned specifierLen) {\n // ...\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_ignored_flag) << ignoredFlag.toString() << flag.toString(), getLocationOfByte(ignoredFlag.getPosition()),"}}, [m]={ [Ib]={"clang/test/Sema/format-strings.c:459:12: warning: flag \' \' is ignored when flag \'+\' is present [-Wformat]","clang/test/Sema/format-strings.c:460:13: warning: flag \' \' is ignored when flag \'+\' is present [-Wformat]","clang/test/Sema/format-strings.c:461:12: warning: flag \'0\' is ignored when flag \'-\' is present [-Wformat]","clang/test/Sema/format-strings.c:462:13: warning: flag \'0\' is ignored when flag \'-\' is present [-Wformat]","clang/test/Sema/format-strings.c:626:10: warning: flag \'0\' is ignored when flag \'-\' is present [-Wformat]","clang/test/Sema/format-strings.c:627:13: warning: flag \'0\' is ignored when flag \'-\' is present [-Wformat]"} } }, ["warn_printf_incomplete_specifier"]={ [k]={u,v,N,w}, [l]=N, [h]="warn_printf_incomplete_specifier", [b]="incomplete format specifier", [f]="incomplete format specifier", [e]=j, [a]="incomplete format specifier", [c]=lb, [i]=X, [d]={"c22f78ddfdde",1264734981,"Alternate format string checking: issue warnings for incomplete format specifiers.","Alternate format string checking: issue warnings for incomplete format specifiers.\n\nIn addition, move ParseFormatString() and FormatStringHandler() from\nthe clang::analyze_printf to the clang namespace. Hopefully this will\nresolve some link errors on Linux.\n\nllvm-svn: 94794"}, [g]={{E,10117,"void CheckFormatHandler::HandleIncompleteSpecifier(const char *startSpecifier, unsigned specifierLen) {\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_incomplete_specifier), getLocationOfByte(startSpecifier),"}}, [m]={ ["clang/test/Sema/block-printf-attribute-1.c"]={"clang/test/Sema/block-printf-attribute-1.c:20:18: warning: incomplete format specifier [-Wformat]"} } }, ["warn_printf_insufficient_data_args"]={ [k]={u,v,N,"format-insufficient-args",w}, [l]="format-insufficient-args", [h]="warn_printf_insufficient_data_args", [b]="more \'%%\' conversions than data arguments", [f]="more \'%\' conversions than data arguments", [e]=j, [a]="more \'%\' conversions than data arguments", [c]=" \\[(?:\\-Werror,)?\\-Wformat\\-insufficient\\-args[^\\]]*\\]", [i]=X, [d]={"5a8987ca5113",1237025389,"Update tablegen diagnostic files to be in sync with the def files.","Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"}, [g]={{E,10372,"bool CheckFormatHandler::CheckNumArgs(const analyze_format_string::FormatSpecifier &FS, const analyze_format_string::ConversionSpecifier &CS, const char *startSpecifier, unsigned specifierLen, unsigned argIndex) {\n if (argIndex >= NumDataArgs) {\n PartialDiagnostic PDiag = FS.usesPositionalArg() ? (S.PDiag(diag::warn_printf_positional_arg_exceeds_data_args) << (argIndex + 1) << NumDataArgs) : S.PDiag(diag::warn_printf_insufficient_data_args);"}}, [m]={ ["clang/test/Sema/attr-format_arg.c"]={"clang/test/Sema/attr-format_arg.c:12:15: warning: more \'%\' conversions than data arguments [-Wformat-insufficient-args]","clang/test/Sema/attr-format_arg.c:15:17: warning: more \'%\' conversions than data arguments [-Wformat-insufficient-args]"} } }, ["warn_printf_invalid_objc_flag"]={ [k]={u,v,N,w}, [l]=N, [h]="warn_printf_invalid_objc_flag", [b]="\'%0\' is not a valid object format flag", [f]="\'A\' is not a valid object format flag", [e]=j, [a]="\'(.*?)\' is not a valid object format flag", [c]=lb, [i]=X, [d]={"2b4177190923",1435815556,"Parse \'technical term\' format specifier.","Parse \'technical term\' format specifier.\n\nObjective-C format strings now support modifier flags\nthat can be attached to a \'@\' conversion. Currently\nthe only one supported, as of iOS 9 and OS X 10.11,\nis the new \"technical term\", denoted by the flag \"tt\",\nfor example:\n\n %[tt]@\n\ninstead of just:\n\n %@\n\nThe \'tt\' stands for \"technical term\", which is used\nby the string-localization facilities on Darwin to\nadd the appropriate spacing or quotation depending\nthe language locale.\n\nImplements <rdar://problem/20374720>.\n\nllvm-svn: 241243"}, [g]={{E,10650,"void CheckPrintfHandler::HandleInvalidObjCModifierFlag(const char *startFlag, unsigned flagLen) {\n // ...\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_invalid_objc_flag) << flag, getLocationOfByte(startFlag),"}}, [m]={ ["clang/test/SemaObjC/format-strings-objc.m"]={"clang/test/SemaObjC/format-strings-objc.m:287:13: warning: \'blark\' is not a valid object format flag [-Wformat]"} } }, ["warn_printf_narg_not_supported"]={ [k]={u,v,N,w}, [l]=N, [h]={{nil,F,"warn_printf_narg_not_supported"}}, [b]={{nil,F,"\'%%n\' specifier not supported on this platform"}}, [f]={{nil,F,"\'%n\' specifier not supported on this platform"}}, [e]=j, [a]="\'%n\' specifier not supported on this platform", [c]=lb, [i]={{nil,F,X}}, [d]={"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"}, [g]={{E,10876,"bool CheckPrintfHandler::HandlePrintfSpecifier(const analyze_printf::PrintfSpecifier &FS, const char *startSpecifier, unsigned specifierLen, const TargetInfo &Target) {\n // ...\n if (CS.getKind() == ConversionSpecifier::nArg && (Triple.isAndroid() || Triple.isOSFuchsia())) {\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_narg_not_supported), getLocationOfByte(CS.getStart()),"}}, [m]={ [Ib]={"clang/test/Sema/format-strings.c:166:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:168:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:169:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:170:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:171:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:174:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:175:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:176:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:179:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:180:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:181:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:184:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:185:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:186:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:189:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:190:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:191:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:194:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:195:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:440:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:442:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:452:13: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:454:14: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:733:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:735:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:738:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:745:12: warning: \'%n\' specifier not supported on this platform [-Wformat]","clang/test/Sema/format-strings.c:746:12: warning: \'%n\' specifier not supported on this platform [-Wformat]"} } }, ["warn_printf_nonsensical_flag"]={ [k]={u,v,N,w}, [l]=N, [h]="warn_printf_nonsensical_flag", [b]="flag \'%0\' results in undefined behavior with \'%1\' conversion specifier", [f]="flag \'A\' results in undefined behavior with \'B\' conversion specifier", [e]=j, [a]="flag \'(.*?)\' results in undefined behavior with \'(.*?)\' conversion specifier", [c]=lb, [i]=X, [d]={"d31b2637abd2",1265880461,"Patch by Cristian Draghici:","Patch by Cristian Draghici:\n\nEnhance the printf format string checking when using the format\nspecifier flags \' \', \'0\', \'+\' with the \'p\' or \'s\' conversions (since\nthey are nonsensical and undefined). This is similar to GCC\'s\nchecking.\n\nAlso warning when a precision is used with the \'p\' conversin\nspecifier, since it has no meaning.\n\nllvm-svn: 95869"}, [g]={{E,10611,"void CheckPrintfHandler::HandleFlag(const analyze_printf::PrintfSpecifier &FS, const analyze_printf::OptionalFlag &flag, const char *startSpecifier, unsigned specifierLen) {\n // ...\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_nonsensical_flag) << flag.toString() << CS.toString(), getLocationOfByte(flag.getPosition()),"}}, [m]={ [Ib]={"clang/test/Sema/format-strings.c:333:12: warning: flag \'+\' results in undefined behavior with \'p\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:334:12: warning: flag \' \' results in undefined behavior with \'p\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:335:12: warning: flag \'0\' results in undefined behavior with \'p\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:337:12: warning: flag \'+\' results in undefined behavior with \'s\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:339:12: warning: flag \' \' results in undefined behavior with \'s\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:341:12: warning: flag \'0\' results in undefined behavior with \'s\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:432:12: warning: flag \'#\' results in undefined behavior with \'p\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:440:12: warning: flag \'#\' results in undefined behavior with \'n\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:442:12: warning: flag \'-\' results in undefined behavior with \'n\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:514:12: warning: flag \'\'\' results in undefined behavior with \'p\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:515:12: warning: flag \'\'\' results in undefined behavior with \'b\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:516:12: warning: flag \'\'\' results in undefined behavior with \'B\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:618:10: warning: flag \'0\' results in undefined behavior with \'s\' conversion specifier [-Wformat]","clang/test/Sema/format-strings.c:619:12: warning: flag \'0\' results in undefined behavior with \'s\' conversion specifier [-Wformat]"} } }, ["warn_printf_nonsensical_optional_amount"]={ [k]={u,v,N,w}, [l]=N, [h]="warn_printf_nonsensical_optional_amount", [b]="%select{field width|precision}0 used with \'%1\' conversion specifier, resulting in undefined behavior", [f]={{nil,nil,{{"field width","precision"}," used with \'B\' conversion specifier, resulting in undefined behavior"}}}, [e]=j, [a]="(?:field width|precision) used with \'(.*?)\' conversion specifier, resulting in undefined behavior", [c]=lb, [i]=X, [d]={"b49ec6907b32",1276801227,"Bug 7377: Fixed several bad printf format string bugs.","Bug 7377: Fixed several bad printf format string bugs.\n- Added warning for undefined behavior when using field specifier\n- Added warning for undefined behavior when using length modifier\n- Fixed warnings for invalid flags\n- Added warning for ignored flags\n- Added fixits for the above warnings\n- Fixed accuracy of detecting several undefined behavior conditions\n- Receive normal warnings in addition to security warnings when using %n\n- Fix bug where \'+\' flag would remain on unsigned conversion suggestions\n\nSummary of changes:\n- Added expanded tests\n- Added/expanded warnings\n- Added position info to OptionalAmounts for fixits\n- Extracted optional flags to a wrapper class with position info for fixits\n- Added several methods to validate a FormatSpecifier by component, each checking for undefined behavior\n- Fixed conversion specifier checking to conform to C99 standard\n- Added hooks to detect the invalid states in CheckPrintfHandler::HandleFormatSpecifier\n\nNote: warnings involving the \' \' (space) flag are temporarily disabled until whitespace highlighting no longer triggers assertions. I will make a post about this on cfe-dev shortly.\n\nM test/Sema/format-strings.c\nM include/clang/Basic/DiagnosticSemaKinds.td\nM include/clang/Analysis/Analyses/PrintfFormatString.h\nM lib/Analysis/PrintfFormatString.cpp\nM lib/Sema/SemaChecking.cpp\n\nllvm-svn: 106233"}, [g]={{E,10596,"void CheckPrintfHandler::HandleInvalidAmount(const analyze_printf::PrintfSpecifier &FS, const analyze_printf::OptionalAmount &Amt, unsigned type, const char *startSpecifier, unsigned specifierLen) {\n // ...\n EmitFormatDiagnostic(S.PDiag(diag::warn_printf_nonsensical_optional_amount) << type << CS.toString(), getLocationOfByte(Amt.getStart()),"}}, [m]={ [Ib]={"clang/test/Sema/format-strings.c:332:12: warning: precision used with \'p\' conversion specifier, resulting in undefined behavior [-Wformat]","clang/test/Sema/format-strings.c:447:12: warning: precision used with \'c\' conversion specifier, resulting in undefined behavior [-Wformat]","clang/test/Sema/format-strings.c:452:12: warning: field width used with \'n\' conversion specifier, resulting in undefined behavior [-Wformat]","clang/test/Sema/format-strings.c:454:12: warning: precision used with \'n\' conversion specifier, resulting in undefined behavior [-Wformat]","clang/test/Sema/format-strings.c:614:10: warning: precision used with \'p\' conversion specifier, resulting in undefined behavior [-Wformat]","clang/test/Sema/format-strings.c:615:12: warning: precision used with \'p\' conversion specifier, resulting in undefined behavior [-Wformat]"} } }, ["warn_printf_positional_arg_exceeds_data_args"]={ [k]={u,v,N,w}, [l]=N, [h]="warn_printf_positional_arg_exceeds_data_args", [b]="data argument position \'%0\' exceeds the number of data arguments (%1)", [f]="data argument position \'A\' exceeds the number of data arguments (B)", [e]=j, [a]="data argument position \'(.*?)\' exceeds the number of data arguments \\((.*?)\\)", [c]=lb, [i]=X, [d]={"4d745dd5cb3c",1269489552,"Fix two bugs in format-string checking:","Fix two bugs in format-string checking:\n(1) Do not assume the data arguments start after the format string\n(2) Do not use the fact that a function is variadic to treat it like a va_list printf function\n\nFixes PR 6697.\n\nllvm-svn: 99480"}, [g]={{E,10370,"bool CheckFormatHandler::CheckNumArgs(const analyze_format_string::FormatSpecifier &FS, const analyze_format_string::ConversionSpecifier &CS, const char *startSpecifier, unsigned specifierLen, unsigned argIndex) {\n if (argIndex >= NumDataArgs) {\n PartialDiagnostic PDiag = FS.usesPositionalArg() ? (S.PDiag(diag::warn_printf_positional_arg_exceeds_data_args) << (argIndex + 1) << NumDataArgs) : S.PDiag(diag::warn_printf_insufficient_data_args);"}}, [m]={ [Ib]={"clang/test/Sema/format-strings.c:415:24: warning: data argument position \'2\' exceeds the number of data arguments (1) [-Wformat]","clang/test/Sema/format-strings.c:416:25: warning: data argument position \'18\' exceeds the number of data arguments (1) [-Wformat]","clang/test/Sema/format-strings.c:573:10: warning: data argument position \'18\' exceeds the number of data arguments (2) [-Wformat]","clang/test/Sema/format-strings.c:574:15: warning: data argument position \'18\' exceeds the number of data arguments (2) [-Wformat]"} } }, ["warn_private_extern"]={ [k]={u,v,w,"private-extern"}, [l]="private-extern", [h]="warn_private_extern", [b]="use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated", [f]="use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated", [e]=j, [a]="use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated", [c]=" \\[(?:\\-Werror,)?\\-Wprivate\\-extern[^\\]]*\\]", [i]=o, [d]={"05f4e7181a1e",1345056146,"Patch to warn about __private_extern__ on tentative definitions","Patch to warn about __private_extern__ on tentative definitions\nas it does something unexpected (but gcc compatible).\nSuggest use of __attribute__((visibility(\"hidden\")))\non declaration instead. // rdar://7703982\n\nllvm-svn: 161972"}, [g]={{xb,13781,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n // ...\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n // ...\n case VarDecl::DeclarationOnly:\n // ...\n if (!Type->isDependentType() && !Var->isInvalidDecl() && Var->getStorageClass() == SC_PrivateExtern) {\n Diag(Var->getLocation(), diag::warn_private_extern);"}}, [m]={ ["clang/test/Sema/tentative-decls.c"]={"clang/test/Sema/tentative-decls.c:36:24: warning: use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated [-Wprivate-extern]"} } }, ["warn_profile_data_misexpect"]={ [k]={"misexpect"}, [l]="misexpect", [h]={{nil,A,"warn_profile_data_misexpect"}}, [b]={{nil,A,"Potential performance regression from use of __builtin_expect(): Annotation was correct on %0 of profiled executions."}}, [f]={{nil,A,"Potential performance regression from use of __builtin_expect(): Annotation was correct on A of profiled executions."}}, [e]=j, [a]="Potential performance regression from use of __builtin_expect\\(\\)\\: Annotation was correct on (.*?) of profiled executions\\.", [c]=" \\[(?:\\-Werror,)?\\-Wmisexpect[^\\]]*\\]", [i]={{nil,A,"Instrumentation Issue"}}, [d]={"a10802fd73f9",1568085099,"clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM","clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM\n\nThis patch contains the basic functionality for reporting potentially\nincorrect usage of __builtin_expect() by comparing the developer\'s\nannotation against a collected PGO profile. A more detailed proposal and\ndiscussion appears on the CFE-dev mailing list\n(http://lists.llvm.org/pipermail/cfe-dev/2019-July/062971.html) and a\nprototype of the initial frontend changes appear here in D65300\n\nWe revised the work in D65300 by moving the misexpect check into the\nLLVM backend, and adding support for IR and sampling based profiles, in\naddition to frontend instrumentation.\n\nWe add new misexpect metadata tags to those instructions directly\ninfluenced by the llvm.expect intrinsic (branch, switch, and select)\nwhen lowering the intrinsics. The misexpect metadata contains\ninformation about the expected target of the intrinsic so that we can\ncheck against the correct PGO counter when emitting diagnostics, and the\ncompiler\'s values for the LikelyBranchWeight and UnlikelyBranchWeight.\nWe use these branch weight values to determine when to emit the\ndiagnostic to the user.\n\nA future patch should address the comment at the top of\nLowerExpectIntrisic.cpp to hoist the LikelyBranchWeight and\nUnlikelyBranchWeight values into a shared space that can be accessed\noutside of the LowerExpectIntrinsic pass. Once that is done, the\nmisexpect metadata can be updated to be smaller.\n\nIn the long term, it is possible to reconstruct portions of the\nmisexpect metadata from the existing profile data. However, we have\navoided this to keep the code simple, and because some kind of metadata\ntag will be required to identify which branch/switch/select instructions\nare influenced by the use of llvm.expect\n\nPatch By: paulkirth\nDifferential Revision: https://reviews.llvm.org/D66324\n\nllvm-svn: 371484"}, [g]={{"clang/lib/CodeGen/CodeGenAction.cpp",870,"void BackendConsumer::MisExpectDiagHandler(const llvm::DiagnosticInfoMisExpect &D) {\n // ...\n Diags.Report(Loc, diag::warn_profile_data_misexpect) << D.getMsg().str();"},{"clang/lib/Frontend/CompilerInvocation.cpp",4427,"bool CompilerInvocation::CreateFromArgsImpl(CompilerInvocation &Res, ArrayRef<const char *> CommandLineArgs, DiagnosticsEngine &Diags, const char *Argv0) {\n // ...\n for (auto Warning : Res.getDiagnosticOpts().Warnings) {\n if (Warning == \"misexpect\" && !Diags.isIgnored(diag::warn_profile_data_misexpect, SourceLocation())) {"}} }, ["warn_profile_data_missing"]={ [k]={"profile-instr-missing"}, [l]="profile-instr-missing", [h]={{nil,gb,"warn_profile_data_missing"}}, [b]={{nil,gb,"profile data may be incomplete: of %0 function%s0, %1 %plural{1:has|:have}1 no data"}}, [f]={{nil,gb,{"profile data may be incomplete: of A functionA, B ",{dc,"have"}," no data"}}}, [e]=j, [a]="profile data may be incomplete\\: of (.*?) function(.*?), (.*?) (?:has|have) no data", [c]=" \\[(?:\\-Werror,)?\\-Wprofile\\-instr\\-missing[^\\]]*\\]", [i]={{nil,gb,"Instrumentation Issue"}}, [d]={"96d6ca7e8c4f",1493314258,"[Profile] Add off-by-default -Wprofile-instr-missing warning","[Profile] Add off-by-default -Wprofile-instr-missing warning\n\nClang warns that a profile is out-of-date if it can\'t find a profile\nrecord for any function in a TU. This warning became noisy after llvm\nstarted allowing dead-stripping of instrumented functions.\n\nTo fix this, this patch changes the existing profile out-of-date warning\n(-Wprofile-instr-out-of-date) so that it only complains about mismatched\ndata. Further, it introduces a new, off-by-default warning about missing\nfunction data (-Wprofile-instr-missing).\n\nDifferential Revision: https://reviews.llvm.org/D28867\n\nllvm-svn: 301570"}, [g]={{"clang/lib/CodeGen/CodeGenModule.cpp",710,"void InstrProfStats::reportDiagnostics(DiagnosticsEngine &Diags, StringRef MainFile) {\n // ...\n if (VisitedInMainFile > 0 && VisitedInMainFile == MissingInMainFile) {\n // ...\n } else {\n // ...\n if (Missing > 0)\n Diags.Report(diag::warn_profile_data_missing) << Visited << Missing;"}}, [m]={ ["clang/test/Profile/c-outdated-data.c"]={"warning: profile data may be incomplete: of 3 functions, 1 has no data [-Wprofile-instr-missing]"} } }, ["warn_profile_data_out_of_date"]={ [k]={"profile-instr-out-of-date"}, [l]="profile-instr-out-of-date", [h]="warn_profile_data_out_of_date", [b]="profile data may be out of date: of %0 function%s0, %1 %plural{1:has|:have}1 no data and %2 %plural{1:has|:have}2 mismatched data that will be ignored", [f]={{nil,gb,{"profile data may be out of date: of A functionA, B ",{dc,"have"}," mismatched data that will be ignored"}},{nil,nil,{"profile data may be out of date: of A functionA, B ",{dc,"have"}," no data and C ",{dc,"have"}," mismatched data that will be ignored"}}}, [e]=j, [a]="profile data may be out of date\\: of (.*?) function(.*?), (.*?) (?:has|have) mismatched data that will be ignored", [c]=" \\[(?:\\-Werror,)?\\-Wprofile\\-instr\\-out\\-of\\-date[^\\]]*\\]", [i]="Instrumentation Issue", [d]={"e2ef2a09ef26",1397596955,"CodeGen: Emit warnings for out of date profile data during PGO","CodeGen: Emit warnings for out of date profile data during PGO\n\nThis adds a warning that triggers when profile data doesn\'t match for\nthe source that\'s being compiled with -fprofile-instr-use=. This fires\nonly once per translation unit, as warning on every mismatched\nfunction would be quite noisy.\n\nllvm-svn: 206322"}, [g]={{"clang/lib/CodeGen/CodeGenModule.cpp",707,"void InstrProfStats::reportDiagnostics(DiagnosticsEngine &Diags, StringRef MainFile) {\n // ...\n if (VisitedInMainFile > 0 && VisitedInMainFile == MissingInMainFile) {\n // ...\n } else {\n if (Mismatched > 0)\n Diags.Report(diag::warn_profile_data_out_of_date) << Visited << Mismatched;"}}, [m]={ ["clang/test/Profile/profile-summary.c"]={"warning: profile data may be out of date: of 3 functions, 3 have mismatched data that will be ignored [-Wprofile-instr-out-of-date]"} } }, ["warn_profile_data_unprofiled"]={ [k]={"profile-instr-unprofiled"}, [l]="profile-instr-unprofiled", [h]="warn_profile_data_unprofiled", [b]="no profile data available for file \"%0\"", [f]="no profile data available for file \"A\"", [e]=j, [a]="no profile data available for file \"(.*?)\"", [c]=" \\[(?:\\-Werror,)?\\-Wprofile\\-instr\\-unprofiled[^\\]]*\\]", [i]="Instrumentation Issue", [d]={"40b8ba1496e5",1403747107,"CodeGen: Improve warnings about uninstrumented files when profiling","CodeGen: Improve warnings about uninstrumented files when profiling\n\nImprove the warning when building with -fprofile-instr-use and a file\nappears not to have been profiled at all. This keys on whether a\nfunction is defined in the main file or not to avoid false negatives\nwhen one includes a header with functions that have been profiled.\n\nllvm-svn: 211760"}, [g]={{"clang/lib/CodeGen/CodeGenModule.cpp",704,"void InstrProfStats::reportDiagnostics(DiagnosticsEngine &Diags, StringRef MainFile) {\n // ...\n if (VisitedInMainFile > 0 && VisitedInMainFile == MissingInMainFile) {\n // ...\n Diags.Report(diag::warn_profile_data_unprofiled) << MainFile;"}}, [m]={ ["clang/test/Profile/c-unprofiled.c"]={"warning: no profile data available for file \"c-unprofiled.c\" [-Wprofile-instr-unprofiled]"} } }, ["warn_property_access_suggest"]={ [k]={"property-access-dot-syntax"}, [l]="property-access-dot-syntax", [h]="warn_property_access_suggest", [b]="property %0 not found on object of type %1; did you mean to access property %2?", [f]="property A not found on object of type B; did you mean to access property C?", [e]=j, [a]="property (.*?) not found on object of type (.*?); did you mean to access property (.*?)\\?", [c]=" \\[(?:\\-Werror,)?\\-Wproperty\\-access\\-dot\\-syntax[^\\]]*\\]", [i]=o, [d]={"0b1d28866c36",1407537204,"Objective-C [qoi]. Issue warning and fixit if property-dot syntax","Objective-C [qoi]. Issue warning and fixit if property-dot syntax\nuse mis-cased property name (which is currently accepted silently\ndue to the way property setters are named). rdar://17911746\n\nllvm-svn: 215250"}, [g]={{ib,2084,"/// HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an\n/// objective C interface. This is a property reference expression.\nExprResult Sema::HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super) {\n // ...\n // Special warning if member name used in a property-dot for a setter accessor\n // does not use a property with same name; e.g. obj.X = ... for a property with\n // name \'x\'.\n if (Setter && Setter->isImplicit() && Setter->isPropertyAccessor() && !IFace->FindPropertyDeclaration(Member, ObjCPropertyQueryKind::OBJC_PR_query_instance)) {\n if (const ObjCPropertyDecl *PDecl = Setter->findPropertyDecl()) {\n // Do not warn if user is using property-dot syntax to make call to\n // user named setter.\n if (!(PDecl->getPropertyAttributes() & ObjCPropertyAttribute::kind_setter))\n Diag(MemberLoc, diag::warn_property_access_suggest) << MemberName << QualType(OPT, 0) << PDecl->getName() << FixItHint::CreateReplacement(MemberLoc, PDecl->getName());"}}, [m]={ ["clang/test/SemaObjC/property-user-setter.m"]={"clang/test/SemaObjC/property-user-setter.m:127:8: warning: property \'P\' not found on object of type \'rdar11363363 *\'; did you mean to access property p? [-Wproperty-access-dot-syntax]","clang/test/SemaObjC/property-user-setter.m:128:8: warning: property \'q\' not found on object of type \'rdar11363363 *\'; did you mean to access property Q? [-Wproperty-access-dot-syntax]","clang/test/SemaObjC/property-user-setter.m:135:15: warning: property \'R\' not found on object of type \'rdar11363363 *\'; did you mean to access property r? [-Wproperty-access-dot-syntax]"} } }, ["warn_property_attr_mismatch"]={ [k]={Rb}, [l]=Rb, [h]="warn_property_attr_mismatch", [b]="property attribute in class extension does not match the primary class", [f]="property attribute in class extension does not match the primary class", [e]=j, [a]="property attribute in class extension does not match the primary class", [c]=" \\[(?:\\-Werror,)?\\-Wproperty\\-attribute\\-mismatch[^\\]]*\\]", [i]=o, [d]={qb,1236199783,pb,ob}, [g]={{Q,492,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // ...\n // Check for consistency with the previous declaration, if there is one.\n if (PIDecl) {\n // ...\n if (ExistingOwnership && NewOwnership != ExistingOwnership) {\n // If the ownership was written explicitly, complain.\n if (getOwnershipRule(AttributesAsWritten)) {\n Diag(AtLoc, diag::warn_property_attr_mismatch);"}}, [m]={ ["clang/test/SemaObjC/property-in-class-extension-1.m"]={"clang/test/SemaObjC/property-in-class-extension-1.m:42:1: warning: property attribute in class extension does not match the primary class [-Wproperty-attribute-mismatch]"} } }, ["warn_property_attribute"]={ [k]={Rb}, [l]=Rb, [h]="warn_property_attribute", [b]="\'%1\' attribute on property %0 does not match the property inherited from %2", [f]="\'B\' attribute on property A does not match the property inherited from C", [e]=j, [a]="\'(.*?)\' attribute on property (.*?) does not match the property inherited from (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wproperty\\-attribute\\-mismatch[^\\]]*\\]", [i]=o, [d]={qb,1236199783,pb,ob}, [g]={{Q,399,"/// Check for a mismatch in the atomicity of the given properties.\nstatic void checkAtomicPropertyMismatch(Sema &S, ObjCPropertyDecl *OldProperty, ObjCPropertyDecl *NewProperty, bool PropagateAtomicity) {\n // ...\n S.Diag(NewProperty->getLocation(), diag::warn_property_attribute) << NewProperty->getDeclName() << \"atomic\" << OldContextName;"},{Q,1655,"/// DiagnosePropertyMismatch - Compares two properties for their\n/// attributes and types and warns on a variety of inconsistencies.\n///\nvoid Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *inheritedName, bool OverridingProtocolProperty) {\n // ...\n // We allow readonly properties without an explicit ownership\n // (assign/unsafe_unretained/weak/retain/strong/copy) in super class\n // to be overridden by a property with any explicit ownership in the subclass.\n if (!OverridingProtocolProperty && !getOwnershipRule(SAttr) && getOwnershipRule(CAttr))\n // ...\n else {\n // ...\n if ((CAttr & ObjCPropertyAttribute::kind_copy) != (SAttr & ObjCPropertyAttribute::kind_copy))\n Diag(Property->getLocation(), diag::warn_property_attribute) << Property->getDeclName() << \"copy\" << inheritedName;"},{Q,1665,"/// DiagnosePropertyMismatch - Compares two properties for their\n/// attributes and types and warns on a variety of inconsistencies.\n///\nvoid Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *inheritedName, bool OverridingProtocolProperty) {\n // ...\n // We allow readonly properties without an explicit ownership\n // (assign/unsafe_unretained/weak/retain/strong/copy) in super class\n // to be overridden by a property with any explicit ownership in the subclass.\n if (!OverridingProtocolProperty && !getOwnershipRule(SAttr) && getOwnershipRule(CAttr))\n // ...\n else {\n // ...\n if ((CAttr & ObjCPropertyAttribute::kind_copy) != (SAttr & ObjCPropertyAttribute::kind_copy))\n // ...\n else if (!(SAttr & ObjCPropertyAttribute::kind_readonly)) {\n // ...\n if (CStrong != SStrong)\n Diag(Property->getLocation(), diag::warn_property_attribute) << Property->getDeclName() << \"retain (or strong)\" << inheritedName;"},{Q,1679,"/// DiagnosePropertyMismatch - Compares two properties for their\n/// attributes and types and warns on a variety of inconsistencies.\n///\nvoid Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *inheritedName, bool OverridingProtocolProperty) {\n // ...\n // Readonly properties from protocols can be implemented as \"readwrite\"\n // with a custom setter name.\n if (Property->getSetterName() != SuperProperty->getSetterName() && !(SuperProperty->isReadOnly() && isa<ObjCProtocolDecl>(SuperProperty->getDeclContext()))) {\n Diag(Property->getLocation(), diag::warn_property_attribute) << Property->getDeclName() << \"setter\" << inheritedName;"},{Q,1684,"/// DiagnosePropertyMismatch - Compares two properties for their\n/// attributes and types and warns on a variety of inconsistencies.\n///\nvoid Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *inheritedName, bool OverridingProtocolProperty) {\n // ...\n if (Property->getGetterName() != SuperProperty->getGetterName()) {\n Diag(Property->getLocation(), diag::warn_property_attribute) << Property->getDeclName() << \"getter\" << inheritedName;"}}, [m]={ ["clang/test/SemaObjC/property-ownership-attr.m"]={"clang/test/SemaObjC/property-ownership-attr.m:17:22: warning: \'copy\' attribute on property \'z\' does not match the property inherited from \'P\' [-Wproperty-attribute-mismatch]"} } }, ["warn_property_getter_owning_mismatch"]={ [h]="warn_property_getter_owning_mismatch", [b]="property declared as returning non-retained objects; getter returning retained objects", [f]="property declared as returning non-retained objects; getter returning retained objects", [e]=j, [a]="property declared as returning non\\-retained objects; getter returning retained objects", [c]=wb, [i]=o, [d]={"f4105f5cfeb3",1308961066,"objc-arc/mrc: Allow ns_returns_not_retained attribute on properties","objc-arc/mrc: Allow ns_returns_not_retained attribute on properties\nto turn off warning on those properties which follow Cocoa naming\nconvention for retaining objects and yet they were not meant for\nsuch purposes. Also, perform consistancy checking for declared\ngetters of such methods. // rdar://9636091\n\nllvm-svn: 133849"}, [g]={{Q,1482,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n if (ObjCMethodDecl *getterMethod = property->getGetterMethodDecl()) {\n // ...\n if (property->hasAttr<NSReturnsNotRetainedAttr>() && !getterMethod->hasAttr<NSReturnsNotRetainedAttr>()) {\n Diag(getterMethod->getLocation(), diag::warn_property_getter_owning_mismatch);"}}, [m]={ ["clang/test/SemaObjC/property-ns-returns-not-retained-attr.m"]={"clang/test/SemaObjC/property-ns-returns-not-retained-attr.m:11:1: warning: property declared as returning non-retained objects; getter returning retained objects"} } }, ["warn_property_implicitly_mismatched"]={ [k]={"objc-property-implicit-mismatch"}, [l]="objc-property-implicit-mismatch", [h]="warn_property_implicitly_mismatched", [b]="primary property declaration is implicitly strong while redeclaration in class extension is weak", [f]="primary property declaration is implicitly strong while redeclaration in class extension is weak", [e]=j, [a]="primary property declaration is implicitly strong while redeclaration in class extension is weak", [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-implicit\\-mismatch[^\\]]*\\]", [i]=o, [d]={"7196487de91a",1382747739,"ObjectiveC arc. Warn when an implicitly \'strong\' property ","ObjectiveC arc. Warn when an implicitly \'strong\' property \nis redeclared as \'weak\' in class extension.\n// rdar://15304886\n\nllvm-svn: 193453"}, [g]={{Q,506,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // ...\n // Check for consistency with the previous declaration, if there is one.\n if (PIDecl) {\n // ...\n // If the redeclaration is \'weak\' but the original property is not,\n if ((Attributes & ObjCPropertyAttribute::kind_weak) && !(PIDecl->getPropertyAttributesAsWritten() & ObjCPropertyAttribute::kind_weak) && PIDecl->getType()->getAs<ObjCObjectPointerType>() && PIDecl->getType().getObjCLifetime() == Qualifiers::OCL_None) {\n Diag(AtLoc, diag::warn_property_implicitly_mismatched);"}}, [m]={ ["clang/test/SemaObjC/arc-decls.m"]={"clang/test/SemaObjC/arc-decls.m:166:1: warning: primary property declaration is implicitly strong while redeclaration in class extension is weak [-Wobjc-property-implicit-mismatch]"} } }, ["warn_property_method_deprecated"]={ [k]={Bb,"deprecated-declarations"}, [l]="deprecated-declarations", [h]="warn_property_method_deprecated", [b]="property access is using %0 method which is deprecated", [f]="property access is using A method which is deprecated", [e]=j, [a]="property access is using (.*?) method which is deprecated", [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-declarations[^\\]]*\\]", [i]=hc, [d]={"89ea9610b306",1402939541,"Objective-C. Diagnose when property access is using declared","Objective-C. Diagnose when property access is using declared\nproperty accessor methods which have become deprecated\nor available. // rdar://15951801\n\nllvm-svn: 211039"}, [g]={{"clang/lib/Sema/SemaAvailability.cpp",437,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n case AR_Deprecated:\n diag = !ObjCPropertyAccess ? diag::warn_deprecated : diag::warn_property_method_deprecated;"}}, [m]={ ["clang/test/SemaObjC/property-deprecated-warning.m"]={"clang/test/SemaObjC/property-deprecated-warning.m:168:6: warning: property access is using \'setX:\' method which is deprecated [-Wdeprecated-declarations]"} } }, ["warn_property_redecl_getter_mismatch"]={ [k]={Rb}, [l]=Rb, [h]="warn_property_redecl_getter_mismatch", [b]="getter name mismatch between property redeclaration (%1) and its original declaration (%0)", [f]="getter name mismatch between property redeclaration (B) and its original declaration (A)", [e]=j, [a]="getter name mismatch between property redeclaration \\((.*?)\\) and its original declaration \\((.*?)\\)", [c]=" \\[(?:\\-Werror,)?\\-Wproperty\\-attribute\\-mismatch[^\\]]*\\]", [i]=o, [d]={"9dd25b769642",1449788529,"Objective-C properties: merge attributes when redeclaring \'readonly\' as \'readwrite\' in an extension.","Objective-C properties: merge attributes when redeclaring \'readonly\' as \'readwrite\' in an extension.\n\nr251874 stopped back-patching the AST when an Objective-C \'readonly\'\nproperty is redeclared in a class extension as \'readwrite\'. However,\nit did not properly handle merging of Objective-C property attributes\n(e.g., getter name, ownership, atomicity) to the redeclaration,\nleading to bad metadata. Merge (and check!) those property attributes\nso we get the right metadata and reasonable ASTs. Fixes\nrdar://problem/23823989.\n\nllvm-svn: 255309"}, [g]={{Q,475,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // ...\n // Check for consistency with the previous declaration, if there is one.\n if (PIDecl) {\n // ...\n // Check for consistency of getters.\n if (PIDecl->getGetterName() != GetterSel) {\n // If the getter was written explicitly, complain.\n if (AttributesAsWritten & ObjCPropertyAttribute::kind_getter) {\n Diag(AtLoc, diag::warn_property_redecl_getter_mismatch) << PIDecl->getGetterName() << GetterSel;"}}, [m]={ ["clang/test/SemaObjC/property-3.m"]={"clang/test/SemaObjC/property-3.m:41:1: warning: getter name mismatch between property redeclaration (\'wasAvailable\') and its original declaration (\'isAvailable\') [-Wproperty-attribute-mismatch]"} } }, ["warn_property_types_are_incompatible"]={ [k]={"incompatible-property-type"}, [l]="incompatible-property-type", [h]="warn_property_types_are_incompatible", [b]="property type %0 is incompatible with type %1 inherited from %2", [f]="property type A is incompatible with type B inherited from C", [e]=j, [a]="property type (.*?) is incompatible with type (.*?) inherited from (.*?)", [c]=" \\[(?:\\-Werror,)?\\-Wincompatible\\-property\\-type[^\\]]*\\]", [i]=o, [d]={qb,1236199783,pb,ob}, [g]={{Q,1702,"/// DiagnosePropertyMismatch - Compares two properties for their\n/// attributes and types and warns on a variety of inconsistencies.\n///\nvoid Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *inheritedName, bool OverridingProtocolProperty) {\n // ...\n if (!Context.propertyTypesAreCompatible(LHSType, RHSType)) {\n // ...\n if (!isObjCPointerConversion(RHSType, LHSType, ConvertedType, IncompatibleObjC) || IncompatibleObjC) {\n Diag(Property->getLocation(), diag::warn_property_types_are_incompatible) << Property->getType() << SuperProperty->getType() << inheritedName;"}}, [m]={ ["clang/test/SemaObjC/property-category-3.m"]={"clang/test/SemaObjC/property-category-3.m:15:17: warning: property type \'float\' is incompatible with type \'int\' inherited from \'P\' [-Wincompatible-property-type]"} } }, ["warn_protocol_property_mismatch"]={ [k]={"protocol-property-synthesis-ambiguity"}, [l]="protocol-property-synthesis-ambiguity", [h]="warn_protocol_property_mismatch", [b]="property of type %0 was selected for synthesis", [f]="property of type A was selected for synthesis", [e]=j, [a]="property (?:of type (.*?)|with attribute \'(.*?)\'|without attribute \'(.*?)\'|with getter (.*?)|with setter (.*?)) was selected for synthesis", [c]=" \\[(?:\\-Werror,)?\\-Wprotocol\\-property\\-synthesis\\-ambiguity[^\\]]*\\]", [i]=o, [d]={"0ebf87959fff",1369084824,"Objective-C [qoi]: When an class conforms to multiple","Objective-C [qoi]: When an class conforms to multiple\nprotocols that declare the same property of incompatible\ntypes, issue a warning when class implementation synthesizes \nthe property. // rdar://13075400\n\nllvm-svn: 182316"}, [g]={{Q,970,"/// SelectPropertyForSynthesisFromProtocols - Finds the most appropriate\n/// property declaration that should be synthesised in all of the inherited\n/// protocols. It also diagnoses properties declared in inherited protocols with\n/// mismatched types or attributes, since any of them can be candidate for\n/// synthesis.\nstatic ObjCPropertyDecl *SelectPropertyForSynthesisFromProtocols(Sema &S, SourceLocation AtLoc, ObjCInterfaceDecl *ClassDecl, ObjCPropertyDecl *Property) {\n // ...\n // Diagnose incompability.\n {\n // ...\n auto Diag = S.Diag(Property->getLocation(), Property != OriginalProperty || HasIncompatibleAttributes ? diag::err_protocol_property_mismatch : diag::warn_protocol_property_mismatch);"}}, [m]={ ["clang/test/SemaObjC/property-ambiguous-synthesis.m"]={"clang/test/SemaObjC/property-ambiguous-synthesis.m:10:18: warning: property of type \'double\' was selected for synthesis [-Wprotocol-property-synthesis-ambiguity]","clang/test/SemaObjC/property-ambiguous-synthesis.m:10:18: warning: property of type \'double\' was selected for synthesis [-Wprotocol-property-synthesis-ambiguity]","clang/test/SemaObjC/property-ambiguous-synthesis.m:5:23: warning: property of type \'id\' was selected for synthesis [-Wprotocol-property-synthesis-ambiguity]"} } }, ["warn_pt_guarded_pass_by_reference"]={ [k]={"thread-safety","thread-safety-reference"}, [l]="thread-safety-reference", [h]="warn_pt_guarded_pass_by_reference", [b]={{nil,z,"passing the value that %1 points to by reference requires holding %0 %select{\'%2\'|\'%2\' exclusively}3"},{x,nil,"passing the value that \'%1\' points to by reference requires holding %0 %select{\'%2\'|\'%2\' exclusively}3"}}, [f]={{nil,z,{"passing the value that B points to by reference requires holding A ",{"\'C\'","\'C\' exclusively"}}},{x,nil,{"passing the value that \'B\' points to by reference requires holding A ",{"\'C\'","\'C\' exclusively"}}}}, [e]=j, [a]="passing the value that (.*?) points to by reference requires holding (.*?) (?:\'(.*?)\'|\'(.*?)\' exclusively)", [c]=" \\[(?:\\-Werror,)?\\-Wthread\\-safety\\-reference[^\\]]*\\]", [i]=o, [d]={"c60dc2cfb9ad",1411081346,"Thread Safety Analysis: add new warning flag, -Wthread-safety-reference, which","Thread Safety Analysis: add new warning flag, -Wthread-safety-reference, which\nwarns when a guarded variable is passed by reference as a function argument.\nThis is released as a separate warning flag, because it could potentially\nbreak existing code that uses thread safety analysis.\n\nllvm-svn: 218087"}, [g]={{Tb,1973,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleMutexNotHeld(StringRef Kind, const NamedDecl *D, ProtectedOperationKind POK, Name LockName, LockKind LK, SourceLocation Loc, Name *PossibleMatch) override {\n // ...\n if (PossibleMatch) {\n // ...\n case POK_PtPassByRef:\n DiagID = diag::warn_pt_guarded_pass_by_reference;"},{Tb,2003,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleMutexNotHeld(StringRef Kind, const NamedDecl *D, ProtectedOperationKind POK, Name LockName, LockKind LK, SourceLocation Loc, Name *PossibleMatch) override {\n // ...\n if (PossibleMatch) {\n // ...\n } else {\n // ...\n case POK_PtPassByRef:\n DiagID = diag::warn_pt_guarded_pass_by_reference;"}}, [m]={ ["clang/test/SemaCXX/warn-thread-safety-analysis.cpp"]={"clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5560:13: warning: passing the value that \'foop\' points to by reference requires holding mutex \'mu\' [-Wthread-safety-reference]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5561:17: warning: passing the value that \'foop\' points to by reference requires holding mutex \'mu\' [-Wthread-safety-reference]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5562:12: warning: passing the value that \'foop\' points to by reference requires holding mutex \'mu\' [-Wthread-safety-reference]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5563:16: warning: passing the value that \'foop\' points to by reference requires holding mutex \'mu\' [-Wthread-safety-reference]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5564:21: warning: passing the value that \'foop\' points to by reference requires holding mutex \'mu\' [-Wthread-safety-reference]"} } }, ["warn_ptr_arith_exceeds_bounds"]={ [k]={"array-bounds-pointer-arithmetic"}, [l]="array-bounds-pointer-arithmetic", [h]="warn_ptr_arith_exceeds_bounds", [b]={{nil,hb,"the pointer incremented by %0 refers past the end of the array (that has type %1)"},{P,nil,"the pointer incremented by %0 refers past the end of the array (that contains %1 element%s2)"}}, [f]={{nil,hb,"the pointer incremented by A refers past the end of the array (that has type B)"},{P,nil,"the pointer incremented by A refers past the end of the array (that contains B elementC)"}}, [e]=j, [a]="the pointer incremented by (.*?) refers past the end of the array \\(that has type (.*?)\\)", [c]=" \\[(?:\\-Werror,)?\\-Warray\\-bounds\\-pointer\\-arithmetic[^\\]]*\\]", [i]=o, [d]={"980bdb9dfb55",1311645148,"Expand array bounds checking to work in the presence of unary & and *,","Expand array bounds checking to work in the presence of unary & and *,\nand to work with pointer arithmetic in addition to array indexing.\n\nThe new pointer arithmetic porition of the array bounds checking can be\nturned on by -Warray-bounds-pointer-arithmetic (and is off by default).\n\nllvm-svn: 136046"}, [g]={{E,17169,"void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr, const ArraySubscriptExpr *ASE, bool AllowOnePastEnd, bool IndexNegated) {\n // ...\n if (index.isUnsigned() || !index.isNegative()) {\n // ...\n unsigned DiagID = ASE ? diag::warn_array_index_exceeds_bounds : diag::warn_ptr_arith_exceeds_bounds;"}}, [m]={ ["clang/test/SemaCXX/array-bounds-ptr-arith.cpp"]={"clang/test/SemaCXX/array-bounds-ptr-arith.cpp:10:11: warning: the pointer incremented by 14 refers past the end of the array (that has type \'const char[13]\') [-Warray-bounds-pointer-arithmetic]","clang/test/SemaCXX/array-bounds-ptr-arith.cpp:15:11: warning: the pointer incremented by 14 refers past the end of the array (that has type \'const char[13]\') [-Warray-bounds-pointer-arithmetic]","clang/test/SemaCXX/array-bounds-ptr-arith.cpp:25:18: warning: the pointer incremented by 60 refers past the end of the array (that has type \'double[2]\') [-Warray-bounds-pointer-arithmetic]","clang/test/SemaCXX/array-bounds-ptr-arith.cpp:29:11: warning: the pointer incremented by 6 refers past the end of the array (that has type \'char[5]\') [-Warray-bounds-pointer-arithmetic]","clang/test/SemaCXX/array-bounds-ptr-arith.cpp:31:32: warning: the pointer incremented by 6 refers past the end of the array (that has type \'char[5]\') [-Warray-bounds-pointer-arithmetic]"} } }, ["warn_ptr_arith_exceeds_max_addressable_bounds"]={ [k]={"array-bounds"}, [l]="array-bounds", [h]={{nil,H,"warn_ptr_arith_exceeds_max_addressable_bounds"}}, [b]={{nil,H,"the pointer incremented by %0 refers past the last possible element for an array in %1-bit address space containing %2-bit (%3-byte) elements (max possible %4 element%s5)"}}, [f]={{nil,H,"the pointer incremented by A refers past the last possible element for an array in B-bit address space containing C-bit (D-byte) elements (max possible E elementF)"}}, [e]=j, [a]="the pointer incremented by (.*?) refers past the last possible element for an array in (.*?)\\-bit address space containing (.*?)\\-bit \\((.*?)\\-byte\\) elements \\(max possible (.*?) element(.*?)\\)", [c]=" \\[(?:\\-Werror,)?\\-Warray\\-bounds[^\\]]*\\]", [i]={{nil,H,o}}, [d]={"da55e9ba1273",1600125132,"[Sema] Address-space sensitive index check for unbounded arrays","[Sema] Address-space sensitive index check for unbounded arrays\n\nCheck applied to unbounded (incomplete) arrays and pointers\nto spot cases where the computed address is beyond the\nlargest possible addressable extent of the array, based\non the address space in which the array is delcared, or\nwhich the pointer refers to.\n\nCheck helps to avoid cases of nonsense pointer math and\narray indexing which could lead to linker failures or\nruntime exceptions. Of particular interest when building\nfor embedded systems with small address spaces.\n\nReviewed By: aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D86796"}, [g]={{E,17079,"void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr, const ArraySubscriptExpr *ASE, bool AllowOnePastEnd, bool IndexNegated) {\n // ...\n if (IsUnboundedArray) {\n // ...\n if (index.isUnsigned() || !index.isNegative()) {\n // ...\n unsigned DiagID = ASE ? diag::warn_array_index_exceeds_max_addressable_bounds : diag::warn_ptr_arith_exceeds_max_addressable_bounds;"}}, [m]={ ["clang/test/Sema/const-eval.c"]={"clang/test/Sema/const-eval.c:145:48: warning: the pointer incremented by 18446744073709551615 refers past the last possible element for an array in 64-bit address space containing 64-bit (8-byte) elements (max possible 2305843009213693952 elements) [-Warray-bounds]","clang/test/Sema/const-eval.c:146:18: warning: the pointer incremented by 18446744073709551615 refers past the last possible element for an array in 64-bit address space containing 64-bit (8-byte) elements (max possible 2305843009213693952 elements) [-Warray-bounds]","clang/test/Sema/const-eval.c:147:22: warning: the pointer incremented by 18446744073709551615 refers past the last possible element for an array in 64-bit address space containing 128-bit (16-byte) elements (max possible 1152921504606846976 elements) [-Warray-bounds]"} } }, ["warn_ptr_arith_precedes_bounds"]={ [k]={"array-bounds-pointer-arithmetic"}, [l]="array-bounds-pointer-arithmetic", [h]="warn_ptr_arith_precedes_bounds", [b]="the pointer decremented by %0 refers before the beginning of the array", [f]="the pointer decremented by A refers before the beginning of the array", [e]=j, [a]="the pointer decremented by (.*?) refers before the beginning of the array", [c]=" \\[(?:\\-Werror,)?\\-Warray\\-bounds\\-pointer\\-arithmetic[^\\]]*\\]", [i]=o, [d]={"980bdb9dfb55",1311645148,"Expand array bounds checking to work in the presence of unary & and *,","Expand array bounds checking to work in the presence of unary & and *,\nand to work with pointer arithmetic in addition to array indexing.\n\nThe new pointer arithmetic porition of the array bounds checking can be\nturned on by -Warray-bounds-pointer-arithmetic (and is off by default).\n\nllvm-svn: 136046"}, [g]={{E,17180,"void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr, const ArraySubscriptExpr *ASE, bool AllowOnePastEnd, bool IndexNegated) {\n // ...\n if (index.isUnsigned() || !index.isNegative()) {\n // ...\n } else {\n // ...\n if (!ASE) {\n DiagID = diag::warn_ptr_arith_precedes_bounds;"}}, [m]={ ["clang/test/SemaCXX/array-bounds-ptr-arith.cpp"]={"clang/test/SemaCXX/array-bounds-ptr-arith.cpp:9:11: warning: the pointer decremented by 6 refers before the beginning of the array [-Warray-bounds-pointer-arithmetic]","clang/test/SemaCXX/array-bounds-ptr-arith.cpp:14:11: warning: the pointer decremented by 6 refers before the beginning of the array [-Warray-bounds-pointer-arithmetic]"} } } };