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