1//==--- DiagnosticGroups.td - Diagnostic Group Definitions ----------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10def ImplicitFunctionDeclare : DiagGroup<"implicit-function-declaration">; 11def ImplicitInt : DiagGroup<"implicit-int">; 12 13// Aggregation warning settings. 14def Implicit : DiagGroup<"implicit", [ 15 ImplicitFunctionDeclare, 16 ImplicitInt 17]>; 18 19// Empty DiagGroups are recognized by clang but ignored. 20def : DiagGroup<"abi">; 21def AbsoluteValue : DiagGroup<"absolute-value">; 22def AddressOfTemporary : DiagGroup<"address-of-temporary">; 23def : DiagGroup<"aggregate-return">; 24def GNUAlignofExpression : DiagGroup<"gnu-alignof-expression">; 25def AmbigMemberTemplate : DiagGroup<"ambiguous-member-template">; 26def GNUAnonymousStruct : DiagGroup<"gnu-anonymous-struct">; 27def GNUAutoType : DiagGroup<"gnu-auto-type">; 28def ArrayBounds : DiagGroup<"array-bounds">; 29def ArrayBoundsPointerArithmetic : DiagGroup<"array-bounds-pointer-arithmetic">; 30def Availability : DiagGroup<"availability">; 31def Section : DiagGroup<"section">; 32def AutoImport : DiagGroup<"auto-import">; 33def CXX14BinaryLiteral : DiagGroup<"c++14-binary-literal">; 34def GNUBinaryLiteral : DiagGroup<"gnu-binary-literal">; 35def GNUCompoundLiteralInitializer : DiagGroup<"gnu-compound-literal-initializer">; 36def BitFieldConstantConversion : DiagGroup<"bitfield-constant-conversion">; 37def BitFieldWidth : DiagGroup<"bitfield-width">; 38def ConstantConversion : 39 DiagGroup<"constant-conversion", [ BitFieldConstantConversion ] >; 40def LiteralConversion : DiagGroup<"literal-conversion">; 41def StringConversion : DiagGroup<"string-conversion">; 42def SignConversion : DiagGroup<"sign-conversion">; 43def PointerBoolConversion : DiagGroup<"pointer-bool-conversion">; 44def UndefinedBoolConversion : DiagGroup<"undefined-bool-conversion">; 45def BoolConversion : DiagGroup<"bool-conversion", [PointerBoolConversion, 46 UndefinedBoolConversion]>; 47def IntConversion : DiagGroup<"int-conversion">; 48def EnumConversion : DiagGroup<"enum-conversion">; 49def FloatConversion : DiagGroup<"float-conversion">; 50def DoublePromotion : DiagGroup<"double-promotion">; 51def EnumTooLarge : DiagGroup<"enum-too-large">; 52def UnsupportedNan : DiagGroup<"unsupported-nan">; 53def NonLiteralNullConversion : DiagGroup<"non-literal-null-conversion">; 54def NullConversion : DiagGroup<"null-conversion">; 55def ImplicitConversionFloatingPointToBool : 56 DiagGroup<"implicit-conversion-floating-point-to-bool">; 57def ObjCLiteralConversion : DiagGroup<"objc-literal-conversion">; 58def BadArrayNewLength : DiagGroup<"bad-array-new-length">; 59def MacroRedefined : DiagGroup<"macro-redefined">; 60def BuiltinMacroRedefined : DiagGroup<"builtin-macro-redefined">; 61def BuiltinRequiresHeader : DiagGroup<"builtin-requires-header">; 62def C99Compat : DiagGroup<"c99-compat">; 63def CXXCompat: DiagGroup<"c++-compat">; 64def ExternCCompat : DiagGroup<"extern-c-compat">; 65def KeywordCompat : DiagGroup<"keyword-compat">; 66def GNUCaseRange : DiagGroup<"gnu-case-range">; 67def CastAlign : DiagGroup<"cast-align">; 68def CastQual : DiagGroup<"cast-qual">; 69def : DiagGroup<"char-align">; 70def Comment : DiagGroup<"comment">; 71def GNUComplexInteger : DiagGroup<"gnu-complex-integer">; 72def GNUConditionalOmittedOperand : DiagGroup<"gnu-conditional-omitted-operand">; 73def ConfigMacros : DiagGroup<"config-macros">; 74def : DiagGroup<"ctor-dtor-privacy">; 75def GNUDesignator : DiagGroup<"gnu-designator">; 76def GNUStringLiteralOperatorTemplate : 77 DiagGroup<"gnu-string-literal-operator-template">; 78 79def DeleteIncomplete : DiagGroup<"delete-incomplete">; 80def DeleteNonVirtualDtor : DiagGroup<"delete-non-virtual-dtor">; 81def AbstractFinalClass : DiagGroup<"abstract-final-class">; 82 83def CXX11CompatDeprecatedWritableStr : 84 DiagGroup<"c++11-compat-deprecated-writable-strings">; 85 86def DeprecatedAttributes : DiagGroup<"deprecated-attributes">; 87def DeprecatedDeclarations : DiagGroup<"deprecated-declarations">; 88def UnavailableDeclarations : DiagGroup<"unavailable-declarations">; 89def PartialAvailability : DiagGroup<"partial-availability">; 90def DeprecatedImplementations :DiagGroup<"deprecated-implementations">; 91def DeprecatedIncrementBool : DiagGroup<"deprecated-increment-bool">; 92def DeprecatedRegister : DiagGroup<"deprecated-register">; 93def DeprecatedWritableStr : DiagGroup<"deprecated-writable-strings", 94 [CXX11CompatDeprecatedWritableStr]>; 95// FIXME: Why is DeprecatedImplementations not in this group? 96def Deprecated : DiagGroup<"deprecated", [DeprecatedAttributes, 97 DeprecatedDeclarations, 98 DeprecatedIncrementBool, 99 DeprecatedRegister, 100 DeprecatedWritableStr]>, 101 DiagCategory<"Deprecations">; 102 103def LibLTO : DiagGroup<"liblto">; 104def : DiagGroup<"disabled-optimization">; 105def : DiagGroup<"discard-qual">; 106def : DiagGroup<"div-by-zero">; 107 108def DocumentationHTML : DiagGroup<"documentation-html">; 109def DocumentationUnknownCommand : DiagGroup<"documentation-unknown-command">; 110def DocumentationPedantic : DiagGroup<"documentation-pedantic", 111 [DocumentationUnknownCommand]>; 112def DocumentationDeprecatedSync : DiagGroup<"documentation-deprecated-sync">; 113def Documentation : DiagGroup<"documentation", 114 [DocumentationHTML, 115 DocumentationDeprecatedSync]>; 116 117def EmptyBody : DiagGroup<"empty-body">; 118def Exceptions : DiagGroup<"exceptions">; 119 120def GNUEmptyInitializer : DiagGroup<"gnu-empty-initializer">; 121def GNUEmptyStruct : DiagGroup<"gnu-empty-struct">; 122def ExtraTokens : DiagGroup<"extra-tokens">; 123def CXX11ExtraSemi : DiagGroup<"c++11-extra-semi">; 124def ExtraSemi : DiagGroup<"extra-semi", [CXX11ExtraSemi]>; 125 126def GNUFlexibleArrayInitializer : DiagGroup<"gnu-flexible-array-initializer">; 127def GNUFlexibleArrayUnionMember : DiagGroup<"gnu-flexible-array-union-member">; 128def GNUFoldingConstant : DiagGroup<"gnu-folding-constant">; 129def FormatExtraArgs : DiagGroup<"format-extra-args">; 130def FormatZeroLength : DiagGroup<"format-zero-length">; 131 132// Warnings for C++1y code which is not compatible with prior C++ standards. 133def CXXPre14Compat : DiagGroup<"c++98-c++11-compat">; 134def CXXPre14CompatPedantic : DiagGroup<"c++98-c++11-compat-pedantic", 135 [CXXPre14Compat]>; 136def CXXPre1zCompat : DiagGroup<"c++98-c++11-c++14-compat">; 137def CXXPre1zCompatPedantic : DiagGroup<"c++98-c++11-c++14-compat-pedantic", 138 [CXXPre1zCompat]>; 139 140def CXX98CompatBindToTemporaryCopy : 141 DiagGroup<"c++98-compat-bind-to-temporary-copy">; 142def CXX98CompatLocalTypeTemplateArgs : 143 DiagGroup<"c++98-compat-local-type-template-args">; 144def CXX98CompatUnnamedTypeTemplateArgs : 145 DiagGroup<"c++98-compat-unnamed-type-template-args">; 146 147def CXX98Compat : DiagGroup<"c++98-compat", 148 [CXX98CompatLocalTypeTemplateArgs, 149 CXX98CompatUnnamedTypeTemplateArgs, 150 CXXPre14Compat, 151 CXXPre1zCompat]>; 152// Warnings for C++11 features which are Extensions in C++98 mode. 153def CXX98CompatPedantic : DiagGroup<"c++98-compat-pedantic", 154 [CXX98Compat, 155 CXX98CompatBindToTemporaryCopy, 156 CXXPre14CompatPedantic, 157 CXXPre1zCompatPedantic]>; 158 159def CXX11Narrowing : DiagGroup<"c++11-narrowing">; 160 161def CXX11WarnOverrideMethod : DiagGroup<"inconsistent-missing-override">; 162 163// Original name of this warning in Clang 164def : DiagGroup<"c++0x-narrowing", [CXX11Narrowing]>; 165 166// Name of this warning in GCC 167def : DiagGroup<"narrowing", [CXX11Narrowing]>; 168 169def CXX11CompatReservedUserDefinedLiteral : 170 DiagGroup<"c++11-compat-reserved-user-defined-literal">; 171def ReservedUserDefinedLiteral : 172 DiagGroup<"reserved-user-defined-literal", 173 [CXX11CompatReservedUserDefinedLiteral]>; 174 175def CXX11Compat : DiagGroup<"c++11-compat", 176 [CXX11Narrowing, 177 CXX11CompatReservedUserDefinedLiteral, 178 CXX11CompatDeprecatedWritableStr, 179 CXXPre14Compat, 180 CXXPre1zCompat]>; 181def : DiagGroup<"c++0x-compat", [CXX11Compat]>; 182def CXX11CompatPedantic : DiagGroup<"c++11-compat-pedantic", 183 [CXXPre14CompatPedantic, 184 CXXPre1zCompatPedantic]>; 185 186def CXX14Compat : DiagGroup<"c++14-compat", [CXXPre1zCompat]>; 187def CXX14CompatPedantic : DiagGroup<"c++14-compat-pedantic", 188 [CXXPre1zCompatPedantic]>; 189 190def CXX1zCompat : DiagGroup<"c++1z-compat", [DeprecatedRegister, 191 DeprecatedIncrementBool]>; 192 193def : DiagGroup<"effc++">; 194def DivZero : DiagGroup<"division-by-zero">; 195def ExitTimeDestructors : DiagGroup<"exit-time-destructors">; 196def FlexibleArrayExtensions : DiagGroup<"flexible-array-extensions">; 197def FourByteMultiChar : DiagGroup<"four-char-constants">; 198def GlobalConstructors : DiagGroup<"global-constructors">; 199def BitwiseOpParentheses: DiagGroup<"bitwise-op-parentheses">; 200def LogicalOpParentheses: DiagGroup<"logical-op-parentheses">; 201def LogicalNotParentheses: DiagGroup<"logical-not-parentheses">; 202def ShiftOpParentheses: DiagGroup<"shift-op-parentheses">; 203def OverloadedShiftOpParentheses: DiagGroup<"overloaded-shift-op-parentheses">; 204def DanglingElse: DiagGroup<"dangling-else">; 205def DanglingField : DiagGroup<"dangling-field">; 206def DistributedObjectModifiers : DiagGroup<"distributed-object-modifiers">; 207def FlagEnum : DiagGroup<"flag-enum">; 208def IncrementBool : DiagGroup<"increment-bool", [DeprecatedIncrementBool]>; 209def InfiniteRecursion : DiagGroup<"infinite-recursion">; 210def GNUImaginaryConstant : DiagGroup<"gnu-imaginary-constant">; 211def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">; 212def : DiagGroup<"import">; 213def GNUIncludeNext : DiagGroup<"gnu-include-next">; 214def IncompatibleMSStruct : DiagGroup<"incompatible-ms-struct">; 215def IncompatiblePointerTypesDiscardsQualifiers 216 : DiagGroup<"incompatible-pointer-types-discards-qualifiers">; 217def IncompatiblePointerTypes 218 : DiagGroup<"incompatible-pointer-types", 219 [IncompatiblePointerTypesDiscardsQualifiers]>; 220def IncompleteUmbrella : DiagGroup<"incomplete-umbrella">; 221def NonModularIncludeInFrameworkModule 222 : DiagGroup<"non-modular-include-in-framework-module">; 223def NonModularIncludeInModule : DiagGroup<"non-modular-include-in-module", 224 [NonModularIncludeInFrameworkModule]>; 225def IncompleteModule : DiagGroup<"incomplete-module", 226 [IncompleteUmbrella, NonModularIncludeInModule]>; 227 228def CXX11InlineNamespace : DiagGroup<"c++11-inline-namespace">; 229def InvalidNoreturn : DiagGroup<"invalid-noreturn">; 230def InvalidSourceEncoding : DiagGroup<"invalid-source-encoding">; 231def KNRPromotedParameter : DiagGroup<"knr-promoted-parameter">; 232def : DiagGroup<"init-self">; 233def : DiagGroup<"inline">; 234def : DiagGroup<"invalid-pch">; 235def GNULabelsAsValue : DiagGroup<"gnu-label-as-value">; 236def LiteralRange : DiagGroup<"literal-range">; 237def LocalTypeTemplateArgs : DiagGroup<"local-type-template-args", 238 [CXX98CompatLocalTypeTemplateArgs]>; 239def RangeLoopAnalysis : DiagGroup<"range-loop-analysis">; 240def ForLoopAnalysis : DiagGroup<"for-loop-analysis">; 241def LoopAnalysis : DiagGroup<"loop-analysis", [ForLoopAnalysis, 242 RangeLoopAnalysis]>; 243def MalformedWarningCheck : DiagGroup<"malformed-warning-check">; 244def Main : DiagGroup<"main">; 245def MainReturnType : DiagGroup<"main-return-type">; 246def MissingBraces : DiagGroup<"missing-braces">; 247def MissingDeclarations: DiagGroup<"missing-declarations">; 248def : DiagGroup<"missing-format-attribute">; 249def : DiagGroup<"missing-include-dirs">; 250def MissingNoreturn : DiagGroup<"missing-noreturn">; 251def MultiChar : DiagGroup<"multichar">; 252def : DiagGroup<"nested-externs">; 253def CXX11LongLong : DiagGroup<"c++11-long-long">; 254def LongLong : DiagGroup<"long-long", [CXX11LongLong]>; 255def ImplicitlyUnsignedLiteral : DiagGroup<"implicitly-unsigned-literal">; 256def MethodSignatures : DiagGroup<"method-signatures">; 257def MismatchedParameterTypes : DiagGroup<"mismatched-parameter-types">; 258def MismatchedReturnTypes : DiagGroup<"mismatched-return-types">; 259def MismatchedTags : DiagGroup<"mismatched-tags">; 260def MissingFieldInitializers : DiagGroup<"missing-field-initializers">; 261def ModuleBuild : DiagGroup<"module-build">; 262def ModuleConflict : DiagGroup<"module-conflict">; 263def ModuleFileExtension : DiagGroup<"module-file-extension">; 264def NewlineEOF : DiagGroup<"newline-eof">; 265def Nullability : DiagGroup<"nullability">; 266def NullabilityDeclSpec : DiagGroup<"nullability-declspec">; 267def NullableToNonNullConversion : DiagGroup<"nullable-to-nonnull-conversion">; 268def NullabilityCompleteness : DiagGroup<"nullability-completeness">; 269def NullArithmetic : DiagGroup<"null-arithmetic">; 270def NullCharacter : DiagGroup<"null-character">; 271def NullDereference : DiagGroup<"null-dereference">; 272def InitializerOverrides : DiagGroup<"initializer-overrides">; 273def NonNull : DiagGroup<"nonnull">; 274def NonPODVarargs : DiagGroup<"non-pod-varargs">; 275def ClassVarargs : DiagGroup<"class-varargs", [NonPODVarargs]>; 276def : DiagGroup<"nonportable-cfstrings">; 277def NonVirtualDtor : DiagGroup<"non-virtual-dtor">; 278def OveralignedType : DiagGroup<"over-aligned">; 279def OldStyleCast : DiagGroup<"old-style-cast">; 280def : DiagGroup<"old-style-definition">; 281def OutOfLineDeclaration : DiagGroup<"out-of-line-declaration">; 282def : DiagGroup<"overflow">; 283def ForwardClassReceiver : DiagGroup<"receiver-forward-class">; 284def MethodAccess : DiagGroup<"objc-method-access">; 285def ObjCReceiver : DiagGroup<"receiver-expr">; 286// FIXME: Remove this when Xcode removes the warning setting. 287def : DiagGroup<"receiver-is-weak">; 288def OperatorNewReturnsNull : DiagGroup<"new-returns-null">; 289def OverlengthStrings : DiagGroup<"overlength-strings">; 290def OverloadedVirtual : DiagGroup<"overloaded-virtual">; 291def PrivateExtern : DiagGroup<"private-extern">; 292def SelTypeCast : DiagGroup<"cast-of-sel-type">; 293def FunctionDefInObjCContainer : DiagGroup<"function-def-in-objc-container">; 294def BadFunctionCast : DiagGroup<"bad-function-cast">; 295def ObjCPropertyImpl : DiagGroup<"objc-property-implementation">; 296def ObjCPropertyNoAttribute : DiagGroup<"objc-property-no-attribute">; 297def ObjCProtocolQualifiers : DiagGroup<"objc-protocol-qualifiers">; 298def ObjCMissingSuperCalls : DiagGroup<"objc-missing-super-calls">; 299def ObjCDesignatedInit : DiagGroup<"objc-designated-initializers">; 300def ObjCRetainBlockProperty : DiagGroup<"objc-noncopy-retain-block-property">; 301def ObjCReadonlyPropertyHasSetter : DiagGroup<"objc-readonly-with-setter-property">; 302def ObjCInvalidIBOutletProperty : DiagGroup<"invalid-iboutlet">; 303def ObjCRootClass : DiagGroup<"objc-root-class">; 304def ObjCPointerIntrospectPerformSelector : DiagGroup<"deprecated-objc-pointer-introspection-performSelector">; 305def ObjCPointerIntrospect : DiagGroup<"deprecated-objc-pointer-introspection", [ObjCPointerIntrospectPerformSelector]>; 306def ObjCMultipleMethodNames : DiagGroup<"objc-multiple-method-names">; 307def DeprecatedObjCIsaUsage : DiagGroup<"deprecated-objc-isa-usage">; 308def ExplicitInitializeCall : DiagGroup<"explicit-initialize-call">; 309def Packed : DiagGroup<"packed">; 310def Padded : DiagGroup<"padded">; 311def PessimizingMove : DiagGroup<"pessimizing-move">; 312def PointerArith : DiagGroup<"pointer-arith">; 313def PoundWarning : DiagGroup<"#warnings">; 314def PoundPragmaMessage : DiagGroup<"#pragma-messages">, 315 DiagCategory<"#pragma message Directive">; 316def : DiagGroup<"pointer-to-int-cast">; 317def : DiagGroup<"redundant-decls">; 318def RedeclaredClassMember : DiagGroup<"redeclared-class-member">; 319def GNURedeclaredEnum : DiagGroup<"gnu-redeclared-enum">; 320def RedundantMove : DiagGroup<"redundant-move">; 321def Register : DiagGroup<"register", [DeprecatedRegister]>; 322def ReturnStackAddress : DiagGroup<"return-stack-address">; 323def ReturnTypeCLinkage : DiagGroup<"return-type-c-linkage">; 324def ReturnType : DiagGroup<"return-type", [ReturnTypeCLinkage]>; 325def BindToTemporaryCopy : DiagGroup<"bind-to-temporary-copy", 326 [CXX98CompatBindToTemporaryCopy]>; 327def SelfAssignmentField : DiagGroup<"self-assign-field">; 328def SelfAssignment : DiagGroup<"self-assign", [SelfAssignmentField]>; 329def SelfMove : DiagGroup<"self-move">; 330def SemiBeforeMethodBody : DiagGroup<"semicolon-before-method-body">; 331def Sentinel : DiagGroup<"sentinel">; 332def MissingMethodReturnType : DiagGroup<"missing-method-return-type">; 333def Shadow : DiagGroup<"shadow">; 334def Shorten64To32 : DiagGroup<"shorten-64-to-32">; 335def : DiagGroup<"sign-promo">; 336def SignCompare : DiagGroup<"sign-compare">; 337def : DiagGroup<"stack-protector">; 338def : DiagGroup<"switch-default">; 339def : DiagGroup<"synth">; 340def SizeofArrayArgument : DiagGroup<"sizeof-array-argument">; 341def SizeofArrayDecay : DiagGroup<"sizeof-array-decay">; 342def SizeofPointerMemaccess : DiagGroup<"sizeof-pointer-memaccess">; 343def StaticInInline : DiagGroup<"static-in-inline">; 344def StaticLocalInInline : DiagGroup<"static-local-in-inline">; 345def GNUStaticFloatInit : DiagGroup<"gnu-static-float-init">; 346def StaticFloatInit : DiagGroup<"static-float-init", [GNUStaticFloatInit]>; 347def GNUStatementExpression : DiagGroup<"gnu-statement-expression">; 348def StringCompare : DiagGroup<"string-compare">; 349def StringPlusInt : DiagGroup<"string-plus-int">; 350def StringPlusChar : DiagGroup<"string-plus-char">; 351def StrncatSize : DiagGroup<"strncat-size">; 352def TautologicalOutOfRangeCompare : DiagGroup<"tautological-constant-out-of-range-compare">; 353def TautologicalPointerCompare : DiagGroup<"tautological-pointer-compare">; 354def TautologicalOverlapCompare : DiagGroup<"tautological-overlap-compare">; 355def TautologicalUndefinedCompare : DiagGroup<"tautological-undefined-compare">; 356def TautologicalCompare : DiagGroup<"tautological-compare", 357 [TautologicalOutOfRangeCompare, 358 TautologicalPointerCompare, 359 TautologicalOverlapCompare, 360 TautologicalUndefinedCompare]>; 361def HeaderHygiene : DiagGroup<"header-hygiene">; 362def DuplicateDeclSpecifier : DiagGroup<"duplicate-decl-specifier">; 363def CompareDistinctPointerType : DiagGroup<"compare-distinct-pointer-types">; 364def GNUUnionCast : DiagGroup<"gnu-union-cast">; 365def GNUVariableSizedTypeNotAtEnd : DiagGroup<"gnu-variable-sized-type-not-at-end">; 366def Varargs : DiagGroup<"varargs">; 367 368def Unsequenced : DiagGroup<"unsequenced">; 369// GCC name for -Wunsequenced 370def : DiagGroup<"sequence-point", [Unsequenced]>; 371 372// Preprocessor warnings. 373def AmbiguousMacro : DiagGroup<"ambiguous-macro">; 374def KeywordAsMacro : DiagGroup<"keyword-macro">; 375def ReservedIdAsMacro : DiagGroup<"reserved-id-macro">; 376 377// Just silence warnings about -Wstrict-aliasing for now. 378def : DiagGroup<"strict-aliasing=0">; 379def : DiagGroup<"strict-aliasing=1">; 380def : DiagGroup<"strict-aliasing=2">; 381def : DiagGroup<"strict-aliasing">; 382 383// Just silence warnings about -Wstrict-overflow for now. 384def : DiagGroup<"strict-overflow=0">; 385def : DiagGroup<"strict-overflow=1">; 386def : DiagGroup<"strict-overflow=2">; 387def : DiagGroup<"strict-overflow=3">; 388def : DiagGroup<"strict-overflow=4">; 389def : DiagGroup<"strict-overflow=5">; 390def : DiagGroup<"strict-overflow">; 391 392def InvalidOffsetof : DiagGroup<"invalid-offsetof">; 393def : DiagGroup<"strict-prototypes">; 394def StrictSelector : DiagGroup<"strict-selector-match">; 395def MethodDuplicate : DiagGroup<"duplicate-method-match">; 396def ObjCCStringFormat : DiagGroup<"cstring-format-directive">; 397def CoveredSwitchDefault : DiagGroup<"covered-switch-default">; 398def SwitchBool : DiagGroup<"switch-bool">; 399def SwitchEnum : DiagGroup<"switch-enum">; 400def Switch : DiagGroup<"switch">; 401def ImplicitFallthroughPerFunction : 402 DiagGroup<"implicit-fallthrough-per-function">; 403def ImplicitFallthrough : DiagGroup<"implicit-fallthrough", 404 [ImplicitFallthroughPerFunction]>; 405def InvalidPPToken : DiagGroup<"invalid-pp-token">; 406def Trigraphs : DiagGroup<"trigraphs">; 407 408def : DiagGroup<"type-limits">; 409def UndefinedReinterpretCast : DiagGroup<"undefined-reinterpret-cast">; 410def ReinterpretBaseClass : DiagGroup<"reinterpret-base-class">; 411def Unicode : DiagGroup<"unicode">; 412def UninitializedMaybe : DiagGroup<"conditional-uninitialized">; 413def UninitializedSometimes : DiagGroup<"sometimes-uninitialized">; 414def UninitializedStaticSelfInit : DiagGroup<"static-self-init">; 415def Uninitialized : DiagGroup<"uninitialized", [UninitializedSometimes, 416 UninitializedStaticSelfInit]>; 417def UnknownPragmas : DiagGroup<"unknown-pragmas">; 418def IgnoredPragmas : DiagGroup<"ignored-pragmas">; 419def Pragmas : DiagGroup<"pragmas", [UnknownPragmas, IgnoredPragmas]>; 420def UnknownWarningOption : DiagGroup<"unknown-warning-option">; 421def NSobjectAttribute : DiagGroup<"NSObject-attribute">; 422def IndependentClassAttribute : DiagGroup<"IndependentClass-attribute">; 423def UnknownAttributes : DiagGroup<"unknown-attributes">; 424def IgnoredAttributes : DiagGroup<"ignored-attributes">; 425def Attributes : DiagGroup<"attributes", [UnknownAttributes, 426 IgnoredAttributes]>; 427def UnknownSanitizers : DiagGroup<"unknown-sanitizers">; 428def UnnamedTypeTemplateArgs : DiagGroup<"unnamed-type-template-args", 429 [CXX98CompatUnnamedTypeTemplateArgs]>; 430def UnsupportedFriend : DiagGroup<"unsupported-friend">; 431def UnusedArgument : DiagGroup<"unused-argument">; 432def UnusedCommandLineArgument : DiagGroup<"unused-command-line-argument">; 433def IgnoredOptimizationArgument : DiagGroup<"ignored-optimization-argument">; 434def InvalidCommandLineArgument : DiagGroup<"invalid-command-line-argument", 435 [IgnoredOptimizationArgument]>; 436def UnusedComparison : DiagGroup<"unused-comparison">; 437def UnusedExceptionParameter : DiagGroup<"unused-exception-parameter">; 438def UnneededInternalDecl : DiagGroup<"unneeded-internal-declaration">; 439def UnneededMemberFunction : DiagGroup<"unneeded-member-function">; 440def UnusedPrivateField : DiagGroup<"unused-private-field">; 441def UnusedFunction : DiagGroup<"unused-function", [UnneededInternalDecl]>; 442def UnusedMemberFunction : DiagGroup<"unused-member-function", 443 [UnneededMemberFunction]>; 444def UnusedLabel : DiagGroup<"unused-label">; 445def UnusedParameter : DiagGroup<"unused-parameter">; 446def UnusedResult : DiagGroup<"unused-result">; 447def PotentiallyEvaluatedExpression : DiagGroup<"potentially-evaluated-expression">; 448def UnevaluatedExpression : DiagGroup<"unevaluated-expression", 449 [PotentiallyEvaluatedExpression]>; 450def UnusedValue : DiagGroup<"unused-value", [UnusedComparison, UnusedResult, 451 UnevaluatedExpression]>; 452def UnusedConstVariable : DiagGroup<"unused-const-variable">; 453def UnusedVariable : DiagGroup<"unused-variable", 454 [UnusedConstVariable]>; 455def UnusedLocalTypedef : DiagGroup<"unused-local-typedef">; 456def UnusedPropertyIvar : DiagGroup<"unused-property-ivar">; 457def UnusedGetterReturnValue : DiagGroup<"unused-getter-return-value">; 458def UsedButMarkedUnused : DiagGroup<"used-but-marked-unused">; 459def UserDefinedLiterals : DiagGroup<"user-defined-literals">; 460def Reorder : DiagGroup<"reorder">; 461def UndeclaredSelector : DiagGroup<"undeclared-selector">; 462def ImplicitAtomic : DiagGroup<"implicit-atomic-properties">; 463def CustomAtomic : DiagGroup<"custom-atomic-properties">; 464def AtomicProperties : DiagGroup<"atomic-properties", 465 [ImplicitAtomic, CustomAtomic]>; 466def ARCUnsafeRetainedAssign : DiagGroup<"arc-unsafe-retained-assign">; 467def ARCRetainCycles : DiagGroup<"arc-retain-cycles">; 468def ARCNonPodMemAccess : DiagGroup<"arc-non-pod-memaccess">; 469def AutomaticReferenceCounting : DiagGroup<"arc", 470 [ARCUnsafeRetainedAssign, 471 ARCRetainCycles, 472 ARCNonPodMemAccess]>; 473def ARCRepeatedUseOfWeakMaybe : DiagGroup<"arc-maybe-repeated-use-of-weak">; 474def ARCRepeatedUseOfWeak : DiagGroup<"arc-repeated-use-of-weak", 475 [ARCRepeatedUseOfWeakMaybe]>; 476def ObjCBridge : DiagGroup<"bridge-cast">; 477 478def DeallocInCategory:DiagGroup<"dealloc-in-category">; 479def SelectorTypeMismatch : DiagGroup<"selector-type-mismatch">; 480def Selector : DiagGroup<"selector", [SelectorTypeMismatch]>; 481def Protocol : DiagGroup<"protocol">; 482def AtProtocol : DiagGroup<"at-protocol">; 483def PropertyAccessDotSyntax: DiagGroup<"property-access-dot-syntax">; 484def PropertyAttr : DiagGroup<"property-attribute-mismatch">; 485def SuperSubClassMismatch : DiagGroup<"super-class-method-mismatch">; 486def OverridingMethodMismatch : DiagGroup<"overriding-method-mismatch">; 487def VariadicMacros : DiagGroup<"variadic-macros">; 488def VectorConversion : DiagGroup<"vector-conversion">; // clang specific 489def VexingParse : DiagGroup<"vexing-parse">; 490def VLA : DiagGroup<"vla">; 491def VLAExtension : DiagGroup<"vla-extension">; 492def VolatileRegisterVar : DiagGroup<"volatile-register-var">; 493def Visibility : DiagGroup<"visibility">; 494def ZeroLengthArray : DiagGroup<"zero-length-array">; 495def GNUZeroLineDirective : DiagGroup<"gnu-zero-line-directive">; 496def GNUZeroVariadicMacroArguments : DiagGroup<"gnu-zero-variadic-macro-arguments">; 497def Fallback : DiagGroup<"fallback">; 498 499// This covers both the deprecated case (in C++98) 500// and the extension case (in C++11 onwards). 501def WritableStrings : DiagGroup<"writable-strings", [DeprecatedWritableStr]>; 502 503// GCC calls -Wdeprecated-writable-strings -Wwrite-strings. 504// 505// Bizarrely, this warning flag enables -fconst-strings in C. This is 506// GCC-compatible, but really weird. 507// 508// FIXME: Should this affect C++11 (where this is an error, 509// not just deprecated) or not? 510def GCCWriteStrings : DiagGroup<"write-strings" , [WritableStrings]>; 511 512def CharSubscript : DiagGroup<"char-subscripts">; 513def LargeByValueCopy : DiagGroup<"large-by-value-copy">; 514def DuplicateArgDecl : DiagGroup<"duplicate-method-arg">; 515 516// Unreachable code warning groups. 517// 518// The goal is make -Wunreachable-code on by default, in -Wall, or at 519// least actively used, with more noisy versions of the warning covered 520// under separate flags. 521// 522def UnreachableCodeLoopIncrement : DiagGroup<"unreachable-code-loop-increment">; 523def UnreachableCode : DiagGroup<"unreachable-code", 524 [UnreachableCodeLoopIncrement]>; 525def UnreachableCodeBreak : DiagGroup<"unreachable-code-break">; 526def UnreachableCodeReturn : DiagGroup<"unreachable-code-return">; 527def UnreachableCodeAggressive : DiagGroup<"unreachable-code-aggressive", 528 [UnreachableCode, 529 UnreachableCodeBreak, 530 UnreachableCodeReturn]>; 531 532// Aggregation warning settings. 533 534// Populate -Waddress with warnings from other groups. 535def : DiagGroup<"address", [PointerBoolConversion, 536 StringCompare, 537 TautologicalPointerCompare]>; 538 539// -Widiomatic-parentheses contains warnings about 'idiomatic' 540// missing parentheses; it is off by default. We do not include it 541// in -Wparentheses because most users who use -Wparentheses explicitly 542// do not want these warnings. 543def ParenthesesOnEquality : DiagGroup<"parentheses-equality">; 544def Parentheses : DiagGroup<"parentheses", 545 [LogicalOpParentheses, 546 LogicalNotParentheses, 547 BitwiseOpParentheses, 548 ShiftOpParentheses, 549 OverloadedShiftOpParentheses, 550 ParenthesesOnEquality, 551 DanglingElse]>; 552 553// -Wconversion has its own warnings, but we split a few out for 554// legacy reasons: 555// - some people want just 64-to-32 warnings 556// - conversion warnings with constant sources are on by default 557// - conversion warnings for literals are on by default 558// - bool-to-pointer conversion warnings are on by default 559// - __null-to-integer conversion warnings are on by default 560def Conversion : DiagGroup<"conversion", 561 [BoolConversion, 562 ConstantConversion, 563 EnumConversion, 564 FloatConversion, 565 Shorten64To32, 566 IntConversion, 567 LiteralConversion, 568 NonLiteralNullConversion, // (1-1)->pointer (etc) 569 NullConversion, // NULL->non-pointer 570 ObjCLiteralConversion, 571 SignConversion, 572 StringConversion]>, 573 DiagCategory<"Value Conversion Issue">; 574 575def Unused : DiagGroup<"unused", 576 [UnusedArgument, UnusedFunction, UnusedLabel, 577 // UnusedParameter, (matches GCC's behavior) 578 // UnusedMemberFunction, (clean-up llvm before enabling) 579 UnusedPrivateField, UnusedLocalTypedef, 580 UnusedValue, UnusedVariable, UnusedPropertyIvar]>, 581 DiagCategory<"Unused Entity Issue">; 582 583// Format settings. 584def FormatInvalidSpecifier : DiagGroup<"format-invalid-specifier">; 585def FormatSecurity : DiagGroup<"format-security">; 586def FormatNonStandard : DiagGroup<"format-non-iso">; 587def FormatY2K : DiagGroup<"format-y2k">; 588def FormatPedantic : DiagGroup<"format-pedantic">; 589def Format : DiagGroup<"format", 590 [FormatExtraArgs, FormatZeroLength, NonNull, 591 FormatSecurity, FormatY2K, FormatInvalidSpecifier]>, 592 DiagCategory<"Format String Issue">; 593def FormatNonLiteral : DiagGroup<"format-nonliteral">; 594def Format2 : DiagGroup<"format=2", 595 [FormatNonLiteral, FormatSecurity, FormatY2K]>; 596 597def TypeSafety : DiagGroup<"type-safety">; 598 599def IntToVoidPointerCast : DiagGroup<"int-to-void-pointer-cast">; 600def IntToPointerCast : DiagGroup<"int-to-pointer-cast", 601 [IntToVoidPointerCast]>; 602 603def Move : DiagGroup<"move", [PessimizingMove, RedundantMove, SelfMove]>; 604 605def Extra : DiagGroup<"extra", [ 606 MissingFieldInitializers, 607 IgnoredQualifiers, 608 InitializerOverrides, 609 SemiBeforeMethodBody, 610 MissingMethodReturnType, 611 SignCompare, 612 UnusedParameter 613 ]>; 614 615def Most : DiagGroup<"most", [ 616 CharSubscript, 617 Comment, 618 DeleteNonVirtualDtor, 619 Format, 620 Implicit, 621 InfiniteRecursion, 622 MismatchedTags, 623 MissingBraces, 624 Move, 625 MultiChar, 626 Reorder, 627 ReturnType, 628 SelfAssignment, 629 SelfMove, 630 SizeofArrayArgument, 631 SizeofArrayDecay, 632 StringPlusInt, 633 Trigraphs, 634 Uninitialized, 635 UnknownPragmas, 636 Unused, 637 VolatileRegisterVar, 638 ObjCMissingSuperCalls, 639 ObjCDesignatedInit, 640 OverloadedVirtual, 641 PrivateExtern, 642 SelTypeCast, 643 ExternCCompat 644 ]>; 645 646// Thread Safety warnings 647def ThreadSafetyAttributes : DiagGroup<"thread-safety-attributes">; 648def ThreadSafetyAnalysis : DiagGroup<"thread-safety-analysis">; 649def ThreadSafetyPrecise : DiagGroup<"thread-safety-precise">; 650def ThreadSafetyReference : DiagGroup<"thread-safety-reference">; 651def ThreadSafetyNegative : DiagGroup<"thread-safety-negative">; 652def ThreadSafety : DiagGroup<"thread-safety", 653 [ThreadSafetyAttributes, 654 ThreadSafetyAnalysis, 655 ThreadSafetyPrecise, 656 ThreadSafetyReference]>; 657def ThreadSafetyVerbose : DiagGroup<"thread-safety-verbose">; 658def ThreadSafetyBeta : DiagGroup<"thread-safety-beta">; 659 660// Uniqueness Analysis warnings 661def Consumed : DiagGroup<"consumed">; 662 663// Note that putting warnings in -Wall will not disable them by default. If a 664// warning should be active _only_ when -Wall is passed in, mark it as 665// DefaultIgnore in addition to putting it here. 666def All : DiagGroup<"all", [Most, Parentheses, Switch, SwitchBool]>; 667 668// Warnings that should be in clang-cl /w4. 669def : DiagGroup<"CL4", [All, Extra]>; 670 671// Warnings enabled by -pedantic. This is magically filled in by TableGen. 672def Pedantic : DiagGroup<"pedantic">; 673 674// Aliases. 675def : DiagGroup<"", [Extra]>; // -W = -Wextra 676def : DiagGroup<"endif-labels", [ExtraTokens]>; // -Wendif-labels=-Wextra-tokens 677def : DiagGroup<"comments", [Comment]>; // -Wcomments = -Wcomment 678def : DiagGroup<"conversion-null", 679 [NullConversion]>; // -Wconversion-null = -Wnull-conversion 680def : DiagGroup<"bool-conversions", 681 [BoolConversion]>; // -Wbool-conversions = -Wbool-conversion 682def : DiagGroup<"int-conversions", 683 [IntConversion]>; // -Wint-conversions = -Wint-conversion 684def : DiagGroup<"vector-conversions", 685 [VectorConversion]>; // -Wvector-conversions = -Wvector-conversion 686def : DiagGroup<"unused-local-typedefs", [UnusedLocalTypedef]>; 687 // -Wunused-local-typedefs = -Wunused-local-typedef 688 689// A warning group for warnings that we want to have on by default in clang, 690// but which aren't on by default in GCC. 691def NonGCC : DiagGroup<"non-gcc", 692 [SignCompare, Conversion, LiteralRange]>; 693 694// A warning group for warnings about using C++11 features as extensions in 695// earlier C++ versions. 696def CXX11 : DiagGroup<"c++11-extensions", [CXX11ExtraSemi, CXX11InlineNamespace, 697 CXX11LongLong]>; 698 699// A warning group for warnings about using C++14 features as extensions in 700// earlier C++ versions. 701def CXX14 : DiagGroup<"c++14-extensions", [CXX14BinaryLiteral]>; 702 703// A warning group for warnings about using C++1z features as extensions in 704// earlier C++ versions. 705def CXX1z : DiagGroup<"c++1z-extensions">; 706 707def : DiagGroup<"c++0x-extensions", [CXX11]>; 708def : DiagGroup<"c++1y-extensions", [CXX14]>; 709 710def DelegatingCtorCycles : 711 DiagGroup<"delegating-ctor-cycles">; 712 713// A warning group for warnings about using C11 features as extensions. 714def C11 : DiagGroup<"c11-extensions">; 715 716// A warning group for warnings about using C99 features as extensions. 717def C99 : DiagGroup<"c99-extensions">; 718 719// A warning group for warnings about GCC extensions. 720def GNU : DiagGroup<"gnu", [GNUAlignofExpression, GNUAnonymousStruct, 721 GNUAutoType, 722 GNUBinaryLiteral, GNUCaseRange, 723 GNUComplexInteger, GNUCompoundLiteralInitializer, 724 GNUConditionalOmittedOperand, GNUDesignator, 725 GNUEmptyInitializer, GNUEmptyStruct, 726 VLAExtension, GNUFlexibleArrayInitializer, 727 GNUFlexibleArrayUnionMember, GNUFoldingConstant, 728 GNUImaginaryConstant, GNUIncludeNext, 729 GNULabelsAsValue, 730 RedeclaredClassMember, GNURedeclaredEnum, 731 GNUStatementExpression, GNUStaticFloatInit, 732 GNUStringLiteralOperatorTemplate, 733 GNUUnionCast, GNUVariableSizedTypeNotAtEnd, 734 ZeroLengthArray, GNUZeroLineDirective, 735 GNUZeroVariadicMacroArguments]>; 736// A warning group for warnings about code that clang accepts but gcc doesn't. 737def GccCompat : DiagGroup<"gcc-compat">; 738 739// Warnings for Microsoft extensions. 740def MicrosoftCharize : DiagGroup<"microsoft-charize">; 741def MicrosoftInclude : DiagGroup<"microsoft-include">; 742def MicrosoftCppMacro : DiagGroup<"microsoft-cpp-macro">; 743def MicrosoftFixedEnum : DiagGroup<"microsoft-fixed-enum">; 744def MicrosoftSealed : DiagGroup<"microsoft-sealed">; 745def MicrosoftUnqualifiedFriend : DiagGroup<"microsoft-unqualified-friend">; 746def MicrosoftExceptionSpec : DiagGroup<"microsoft-exception-spec">; 747def MicrosoftUsingDecl : DiagGroup<"microsoft-using-decl">; 748def MicrosoftMutableReference : DiagGroup<"microsoft-mutable-reference">; 749def MicrosoftPureDefinition : DiagGroup<"microsoft-pure-definition">; 750def MicrosoftUnionMemberReference : DiagGroup< 751 "microsoft-union-member-reference">; 752def MicrosoftExplicitConstructorCall : DiagGroup< 753 "microsoft-explicit-constructor-call">; 754def MicrosoftEnumValue : DiagGroup<"microsoft-enum-value">; 755def MicrosoftDefaultArgRedefinition : 756 DiagGroup<"microsoft-default-arg-redefinition">; 757def MicrosoftTemplate : DiagGroup<"microsoft-template">; 758def MicrosoftRedeclareStatic : DiagGroup<"microsoft-redeclare-static">; 759def MicrosoftEnumForwardReference : 760 DiagGroup<"microsoft-enum-forward-reference">; 761def MicrosoftGoto : DiagGroup<"microsoft-goto">; 762def MicrosoftFlexibleArray : DiagGroup<"microsoft-flexible-array">; 763def MicrosoftExtraQualification : DiagGroup<"microsoft-extra-qualification">; 764def MicrosoftCast : DiagGroup<"microsoft-cast">; 765def MicrosoftConstInit : DiagGroup<"microsoft-const-init">; 766def MicrosoftVoidPseudoDtor : DiagGroup<"microsoft-void-pseudo-dtor">; 767def MicrosoftAnonTag : DiagGroup<"microsoft-anon-tag">; 768// Aliases. 769def : DiagGroup<"msvc-include", [MicrosoftInclude]>; 770 // -Wmsvc-include = -Wmicrosoft-include 771 772// Warnings group for warnings about Microsoft extensions. 773def Microsoft : DiagGroup<"microsoft", 774 [MicrosoftCharize, MicrosoftInclude, MicrosoftCppMacro, MicrosoftFixedEnum, 775 MicrosoftSealed, MicrosoftUnqualifiedFriend, MicrosoftExceptionSpec, 776 MicrosoftUsingDecl, MicrosoftMutableReference, MicrosoftPureDefinition, 777 MicrosoftUnionMemberReference, MicrosoftExplicitConstructorCall, 778 MicrosoftEnumValue, MicrosoftDefaultArgRedefinition, MicrosoftTemplate, 779 MicrosoftRedeclareStatic, MicrosoftEnumForwardReference, MicrosoftGoto, 780 MicrosoftFlexibleArray, MicrosoftExtraQualification, MicrosoftCast, 781 MicrosoftConstInit, MicrosoftVoidPseudoDtor, MicrosoftAnonTag]>; 782 783def ObjCNonUnifiedException : DiagGroup<"objc-nonunified-exceptions">; 784 785def ObjCProtocolMethodImpl : DiagGroup<"objc-protocol-method-implementation">; 786 787def ObjCNoPropertyAutoSynthesis : DiagGroup<"objc-property-synthesis">; 788 789// ObjC API warning groups. 790def ObjCRedundantLiteralUse : DiagGroup<"objc-redundant-literal-use">; 791def ObjCRedundantAPIUse : DiagGroup<"objc-redundant-api-use", [ 792 ObjCRedundantLiteralUse 793 ]>; 794 795def ObjCCocoaAPI : DiagGroup<"objc-cocoa-api", [ 796 ObjCRedundantAPIUse 797 ]>; 798 799def ObjCStringComparison : DiagGroup<"objc-string-compare">; 800def ObjCStringConcatenation : DiagGroup<"objc-string-concatenation">; 801def ObjCLiteralComparison : DiagGroup<"objc-literal-compare", [ 802 ObjCStringComparison 803 ]>; 804 805// Inline ASM warnings. 806def ASMOperandWidths : DiagGroup<"asm-operand-widths">; 807def ASM : DiagGroup<"asm", [ 808 ASMOperandWidths 809 ]>; 810 811// OpenMP warnings. 812def SourceUsesOpenMP : DiagGroup<"source-uses-openmp">; 813def OpenMPClauses : DiagGroup<"openmp-clauses">; 814def OpenMPLoopForm : DiagGroup<"openmp-loop-form">; 815 816// Backend warnings. 817def BackendInlineAsm : DiagGroup<"inline-asm">; 818def BackendFrameLargerThanEQ : DiagGroup<"frame-larger-than=">; 819def BackendPlugin : DiagGroup<"backend-plugin">; 820def RemarkBackendPlugin : DiagGroup<"remark-backend-plugin">; 821def BackendOptimizationRemark : DiagGroup<"pass">; 822def BackendOptimizationRemarkMissed : DiagGroup<"pass-missed">; 823def BackendOptimizationRemarkAnalysis : DiagGroup<"pass-analysis">; 824def BackendOptimizationFailure : DiagGroup<"pass-failed">; 825 826// Instrumentation based profiling warnings. 827def ProfileInstrOutOfDate : DiagGroup<"profile-instr-out-of-date">; 828def ProfileInstrUnprofiled : DiagGroup<"profile-instr-unprofiled">; 829 830// AddressSanitizer frontent instrumentation remarks. 831def SanitizeAddressRemarks : DiagGroup<"sanitize-address">; 832 833// Issues with serialized diagnostics. 834def SerializedDiagnostics : DiagGroup<"serialized-diagnostics">; 835 836// A warning group for warnings about code that clang accepts when 837// compiling CUDA C/C++ but which is not compatible with the CUDA spec. 838def CudaCompat : DiagGroup<"cuda-compat">; 839 840// A warning group for things that will change semantics in the future. 841def FutureCompat : DiagGroup<"future-compat">; 842 843def InvalidOrNonExistentDirectory : DiagGroup<"invalid-or-nonexistent-directory">; 844 845def OptionIgnored : DiagGroup<"option-ignored">; 846