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