1 //==--- DiagnosticGroups.td - Diagnostic Group Definitions ----------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 def ImplicitFunctionDeclare : DiagGroup<"implicit-function-declaration">;
11 def ImplicitInt : DiagGroup<"implicit-int">;
13 // Aggregation warning settings.
14 def Implicit : DiagGroup<"implicit", [
15 ImplicitFunctionDeclare,
19 // Empty DiagGroups are recognized by clang but ignored.
20 def : DiagGroup<"abi">;
21 def AbsoluteValue : DiagGroup<"absolute-value">;
22 def AddressOfTemporary : DiagGroup<"address-of-temporary">;
23 def : DiagGroup<"aggregate-return">;
24 def GNUAlignofExpression : DiagGroup<"gnu-alignof-expression">;
25 def AmbigMemberTemplate : DiagGroup<"ambiguous-member-template">;
26 def GNUAnonymousStruct : DiagGroup<"gnu-anonymous-struct">;
27 def GNUAutoType : DiagGroup<"gnu-auto-type">;
28 def ArrayBounds : DiagGroup<"array-bounds">;
29 def ArrayBoundsPointerArithmetic : DiagGroup<"array-bounds-pointer-arithmetic">;
30 def AutoDisableVptrSanitizer : DiagGroup<"auto-disable-vptr-sanitizer">;
31 def Availability : DiagGroup<"availability">;
32 def Section : DiagGroup<"section">;
33 def AutoImport : DiagGroup<"auto-import">;
34 def FrameworkHdrQuotedInclude : DiagGroup<"quoted-include-in-framework-header">;
35 def FrameworkIncludePrivateFromPublic :
36 DiagGroup<"framework-include-private-from-public">;
37 def FrameworkHdrAtImport : DiagGroup<"atimport-in-framework-header">;
38 def CXX14BinaryLiteral : DiagGroup<"c++14-binary-literal">;
39 def CXXPre14CompatBinaryLiteral : DiagGroup<"c++98-c++11-compat-binary-literal">;
40 def GNUBinaryLiteral : DiagGroup<"gnu-binary-literal">;
41 def BinaryLiteral : DiagGroup<"binary-literal", [CXX14BinaryLiteral,
42 CXXPre14CompatBinaryLiteral,
44 def GNUCompoundLiteralInitializer : DiagGroup<"gnu-compound-literal-initializer">;
45 def BitFieldConstantConversion : DiagGroup<"bitfield-constant-conversion">;
46 def BitFieldEnumConversion : DiagGroup<"bitfield-enum-conversion">;
47 def BitFieldWidth : DiagGroup<"bitfield-width">;
48 def CoroutineMissingUnhandledException :
49 DiagGroup<"coroutine-missing-unhandled-exception">;
50 def Coroutine : DiagGroup<"coroutine", [CoroutineMissingUnhandledException]>;
51 def ConstantConversion :
52 DiagGroup<"constant-conversion", [ BitFieldConstantConversion ] >;
53 def LiteralConversion : DiagGroup<"literal-conversion">;
54 def StringConversion : DiagGroup<"string-conversion">;
55 def SignConversion : DiagGroup<"sign-conversion">;
56 def PointerBoolConversion : DiagGroup<"pointer-bool-conversion">;
57 def UndefinedBoolConversion : DiagGroup<"undefined-bool-conversion">;
58 def BoolConversion : DiagGroup<"bool-conversion", [PointerBoolConversion,
59 UndefinedBoolConversion]>;
60 def IntConversion : DiagGroup<"int-conversion">;
61 def EnumConversion : DiagGroup<"enum-conversion">;
63 def FloatOverflowConversion : DiagGroup<"float-overflow-conversion">;
64 def FloatZeroConversion : DiagGroup<"float-zero-conversion">;
66 DiagGroup<"float-conversion", [FloatOverflowConversion,
67 FloatZeroConversion]>;
69 def DoublePromotion : DiagGroup<"double-promotion">;
70 def EnumTooLarge : DiagGroup<"enum-too-large">;
71 def UnsupportedNan : DiagGroup<"unsupported-nan">;
72 def UnsupportedAbs : DiagGroup<"unsupported-abs">;
73 def UnsupportedCB : DiagGroup<"unsupported-cb">;
74 def UnsupportedGPOpt : DiagGroup<"unsupported-gpopt">;
75 def UnsupportedTargetOpt : DiagGroup<"unsupported-target-opt">;
76 def NonLiteralNullConversion : DiagGroup<"non-literal-null-conversion">;
77 def NullConversion : DiagGroup<"null-conversion">;
78 def ImplicitConversionFloatingPointToBool :
79 DiagGroup<"implicit-conversion-floating-point-to-bool">;
80 def ObjCLiteralConversion : DiagGroup<"objc-literal-conversion">;
81 def MacroRedefined : DiagGroup<"macro-redefined">;
82 def BuiltinMacroRedefined : DiagGroup<"builtin-macro-redefined">;
83 def BuiltinRequiresHeader : DiagGroup<"builtin-requires-header">;
84 def C99Compat : DiagGroup<"c99-compat">;
85 def CXXCompat: DiagGroup<"c++-compat">;
86 def ExternCCompat : DiagGroup<"extern-c-compat">;
87 def KeywordCompat : DiagGroup<"keyword-compat">;
88 def GNUCaseRange : DiagGroup<"gnu-case-range">;
89 def CastAlign : DiagGroup<"cast-align">;
90 def CastQual : DiagGroup<"cast-qual">;
91 def : DiagGroup<"char-align">;
92 def Comment : DiagGroup<"comment">;
93 def GNUComplexInteger : DiagGroup<"gnu-complex-integer">;
94 def GNUConditionalOmittedOperand : DiagGroup<"gnu-conditional-omitted-operand">;
95 def ConfigMacros : DiagGroup<"config-macros">;
96 def : DiagGroup<"ctor-dtor-privacy">;
97 def GNUDesignator : DiagGroup<"gnu-designator">;
98 def GNUStringLiteralOperatorTemplate :
99 DiagGroup<"gnu-string-literal-operator-template">;
100 def UndefinedVarTemplate : DiagGroup<"undefined-var-template">;
101 def UndefinedFuncTemplate : DiagGroup<"undefined-func-template">;
102 def MissingNoEscape : DiagGroup<"missing-noescape">;
104 def DeleteIncomplete : DiagGroup<"delete-incomplete">;
105 def DeleteNonVirtualDtor : DiagGroup<"delete-non-virtual-dtor">;
106 def AbstractFinalClass : DiagGroup<"abstract-final-class">;
108 def CXX11CompatDeprecatedWritableStr :
109 DiagGroup<"c++11-compat-deprecated-writable-strings">;
111 def DeprecatedAttributes : DiagGroup<"deprecated-attributes">;
112 def DeprecatedDeclarations : DiagGroup<"deprecated-declarations">;
113 def UnavailableDeclarations : DiagGroup<"unavailable-declarations">;
114 def UnguardedAvailabilityNew : DiagGroup<"unguarded-availability-new">;
115 def UnguardedAvailability : DiagGroup<"unguarded-availability",
116 [UnguardedAvailabilityNew]>;
117 // partial-availability is an alias of unguarded-availability.
118 def : DiagGroup<"partial-availability", [UnguardedAvailability]>;
119 def DeprecatedDynamicExceptionSpec
120 : DiagGroup<"deprecated-dynamic-exception-spec">;
121 def DeprecatedImplementations :DiagGroup<"deprecated-implementations">;
122 def DeprecatedIncrementBool : DiagGroup<"deprecated-increment-bool">;
123 def DeprecatedRegister : DiagGroup<"deprecated-register">;
124 def DeprecatedThisCapture : DiagGroup<"deprecated-this-capture">;
125 def DeprecatedWritableStr : DiagGroup<"deprecated-writable-strings",
126 [CXX11CompatDeprecatedWritableStr]>;
127 // FIXME: Why is DeprecatedImplementations not in this group?
128 def Deprecated : DiagGroup<"deprecated", [DeprecatedAttributes,
129 DeprecatedDeclarations,
130 DeprecatedDynamicExceptionSpec,
131 DeprecatedIncrementBool,
133 DeprecatedThisCapture,
134 DeprecatedWritableStr]>,
135 DiagCategory<"Deprecations">;
137 def DynamicExceptionSpec
138 : DiagGroup<"dynamic-exception-spec", [DeprecatedDynamicExceptionSpec]>;
140 def LibLTO : DiagGroup<"liblto">;
141 def : DiagGroup<"disabled-optimization">;
142 def : DiagGroup<"discard-qual">;
143 def DivZero : DiagGroup<"division-by-zero">;
144 def : DiagGroup<"div-by-zero", [DivZero]>;
146 def DocumentationHTML : DiagGroup<"documentation-html">;
147 def DocumentationUnknownCommand : DiagGroup<"documentation-unknown-command">;
148 def DocumentationPedantic : DiagGroup<"documentation-pedantic",
149 [DocumentationUnknownCommand]>;
150 def DocumentationDeprecatedSync : DiagGroup<"documentation-deprecated-sync">;
151 def Documentation : DiagGroup<"documentation",
153 DocumentationDeprecatedSync]>;
155 def EmptyBody : DiagGroup<"empty-body">;
156 def Exceptions : DiagGroup<"exceptions">;
158 def GNUEmptyInitializer : DiagGroup<"gnu-empty-initializer">;
159 def GNUEmptyStruct : DiagGroup<"gnu-empty-struct">;
160 def ExtraTokens : DiagGroup<"extra-tokens">;
161 def CXX98CompatExtraSemi : DiagGroup<"c++98-compat-extra-semi">;
162 def CXX11ExtraSemi : DiagGroup<"c++11-extra-semi">;
163 def ExtraSemi : DiagGroup<"extra-semi", [CXX98CompatExtraSemi,
166 def GNUFlexibleArrayInitializer : DiagGroup<"gnu-flexible-array-initializer">;
167 def GNUFlexibleArrayUnionMember : DiagGroup<"gnu-flexible-array-union-member">;
168 def GNUFoldingConstant : DiagGroup<"gnu-folding-constant">;
169 def FormatExtraArgs : DiagGroup<"format-extra-args">;
170 def FormatZeroLength : DiagGroup<"format-zero-length">;
172 def InvalidIOSDeploymentTarget : DiagGroup<"invalid-ios-deployment-target">;
174 def CXX17CompatMangling : DiagGroup<"c++17-compat-mangling">;
175 def : DiagGroup<"c++1z-compat-mangling", [CXX17CompatMangling]>;
176 // Name of this warning in GCC.
177 def NoexceptType : DiagGroup<"noexcept-type", [CXX17CompatMangling]>;
179 // Warnings for C++1y code which is not compatible with prior C++ standards.
180 def CXXPre14Compat : DiagGroup<"c++98-c++11-compat">;
181 def CXXPre14CompatPedantic : DiagGroup<"c++98-c++11-compat-pedantic",
183 CXXPre14CompatBinaryLiteral]>;
184 def CXXPre17Compat : DiagGroup<"c++98-c++11-c++14-compat">;
185 def CXXPre17CompatPedantic : DiagGroup<"c++98-c++11-c++14-compat-pedantic",
187 def CXXPre2aCompat : DiagGroup<"c++98-c++11-c++14-c++17-compat">;
188 def CXXPre2aCompatPedantic : DiagGroup<"c++98-c++11-c++14-c++17-compat-pedantic",
191 def CXX98CompatBindToTemporaryCopy :
192 DiagGroup<"c++98-compat-bind-to-temporary-copy">;
193 def CXX98CompatLocalTypeTemplateArgs :
194 DiagGroup<"c++98-compat-local-type-template-args">;
195 def CXX98CompatUnnamedTypeTemplateArgs :
196 DiagGroup<"c++98-compat-unnamed-type-template-args">;
198 def CXX98Compat : DiagGroup<"c++98-compat",
199 [CXX98CompatLocalTypeTemplateArgs,
200 CXX98CompatUnnamedTypeTemplateArgs,
204 // Warnings for C++11 features which are Extensions in C++98 mode.
205 def CXX98CompatPedantic : DiagGroup<"c++98-compat-pedantic",
207 CXX98CompatBindToTemporaryCopy,
208 CXX98CompatExtraSemi,
209 CXXPre14CompatPedantic,
210 CXXPre17CompatPedantic,
211 CXXPre2aCompatPedantic]>;
213 def CXX11Narrowing : DiagGroup<"c++11-narrowing">;
215 def CXX11WarnOverrideDestructor :
216 DiagGroup<"inconsistent-missing-destructor-override">;
217 def CXX11WarnOverrideMethod : DiagGroup<"inconsistent-missing-override">;
219 // Original name of this warning in Clang
220 def : DiagGroup<"c++0x-narrowing", [CXX11Narrowing]>;
222 // Name of this warning in GCC
223 def : DiagGroup<"narrowing", [CXX11Narrowing]>;
225 def CXX11CompatReservedUserDefinedLiteral :
226 DiagGroup<"c++11-compat-reserved-user-defined-literal">;
227 def ReservedUserDefinedLiteral :
228 DiagGroup<"reserved-user-defined-literal",
229 [CXX11CompatReservedUserDefinedLiteral]>;
231 def CXX11Compat : DiagGroup<"c++11-compat",
233 CXX11CompatReservedUserDefinedLiteral,
234 CXX11CompatDeprecatedWritableStr,
238 def : DiagGroup<"c++0x-compat", [CXX11Compat]>;
239 def CXX11CompatPedantic : DiagGroup<"c++11-compat-pedantic",
241 CXXPre14CompatPedantic,
242 CXXPre17CompatPedantic,
243 CXXPre2aCompatPedantic]>;
245 def CXX14Compat : DiagGroup<"c++14-compat", [CXXPre17Compat,
247 def CXX14CompatPedantic : DiagGroup<"c++14-compat-pedantic",
249 CXXPre17CompatPedantic,
250 CXXPre2aCompatPedantic]>;
252 def CXX17Compat : DiagGroup<"c++17-compat", [DeprecatedRegister,
253 DeprecatedIncrementBool,
256 def CXX17CompatPedantic : DiagGroup<"c++17-compat-pedantic",
258 CXXPre2aCompatPedantic]>;
259 def : DiagGroup<"c++1z-compat", [CXX17Compat]>;
261 def CXX2aCompat : DiagGroup<"c++2a-compat">;
262 def CXX2aCompatPedantic : DiagGroup<"c++2a-compat-pedantic",
265 def ExitTimeDestructors : DiagGroup<"exit-time-destructors">;
266 def FlexibleArrayExtensions : DiagGroup<"flexible-array-extensions">;
267 def FourByteMultiChar : DiagGroup<"four-char-constants">;
268 def GlobalConstructors : DiagGroup<"global-constructors">;
269 def BitwiseOpParentheses: DiagGroup<"bitwise-op-parentheses">;
270 def LogicalOpParentheses: DiagGroup<"logical-op-parentheses">;
271 def LogicalNotParentheses: DiagGroup<"logical-not-parentheses">;
272 def ShiftOpParentheses: DiagGroup<"shift-op-parentheses">;
273 def OverloadedShiftOpParentheses: DiagGroup<"overloaded-shift-op-parentheses">;
274 def DanglingElse: DiagGroup<"dangling-else">;
275 def DanglingField : DiagGroup<"dangling-field">;
276 def DanglingInitializerList : DiagGroup<"dangling-initializer-list">;
277 def ReturnStackAddress : DiagGroup<"return-stack-address">;
278 def Dangling : DiagGroup<"dangling", [DanglingField,
279 DanglingInitializerList,
280 ReturnStackAddress]>;
281 def DistributedObjectModifiers : DiagGroup<"distributed-object-modifiers">;
282 def ExpansionToDefined : DiagGroup<"expansion-to-defined">;
283 def FlagEnum : DiagGroup<"flag-enum">;
284 def IncrementBool : DiagGroup<"increment-bool", [DeprecatedIncrementBool]>;
285 def InfiniteRecursion : DiagGroup<"infinite-recursion">;
286 def GNUImaginaryConstant : DiagGroup<"gnu-imaginary-constant">;
287 def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">;
288 def : DiagGroup<"import">;
289 def GNUIncludeNext : DiagGroup<"gnu-include-next">;
290 def IncompatibleMSStruct : DiagGroup<"incompatible-ms-struct">;
291 def IncompatiblePointerTypesDiscardsQualifiers
292 : DiagGroup<"incompatible-pointer-types-discards-qualifiers">;
293 def IncompatibleFunctionPointerTypes
294 : DiagGroup<"incompatible-function-pointer-types">;
295 def IncompatiblePointerTypes
296 : DiagGroup<"incompatible-pointer-types",
297 [IncompatiblePointerTypesDiscardsQualifiers,
298 IncompatibleFunctionPointerTypes]>;
299 def IncompleteUmbrella : DiagGroup<"incomplete-umbrella">;
300 def IncompleteFrameworkModuleDeclaration
301 : DiagGroup<"incomplete-framework-module-declaration">;
302 def NonModularIncludeInFrameworkModule
303 : DiagGroup<"non-modular-include-in-framework-module">;
304 def NonModularIncludeInModule : DiagGroup<"non-modular-include-in-module",
305 [NonModularIncludeInFrameworkModule]>;
306 def IncompleteModule : DiagGroup<"incomplete-module",
307 [IncompleteUmbrella, NonModularIncludeInModule]>;
308 def PrivateModule : DiagGroup<"private-module">;
310 def CXX11InlineNamespace : DiagGroup<"c++11-inline-namespace">;
311 def InvalidNoreturn : DiagGroup<"invalid-noreturn">;
312 def InvalidSourceEncoding : DiagGroup<"invalid-source-encoding">;
313 def KNRPromotedParameter : DiagGroup<"knr-promoted-parameter">;
314 def : DiagGroup<"init-self">;
315 def : DiagGroup<"inline">;
316 def : DiagGroup<"invalid-pch">;
317 def GNULabelsAsValue : DiagGroup<"gnu-label-as-value">;
318 def LiteralRange : DiagGroup<"literal-range">;
319 def LocalTypeTemplateArgs : DiagGroup<"local-type-template-args",
320 [CXX98CompatLocalTypeTemplateArgs]>;
321 def RangeLoopAnalysis : DiagGroup<"range-loop-analysis">;
322 def ForLoopAnalysis : DiagGroup<"for-loop-analysis">;
323 def LoopAnalysis : DiagGroup<"loop-analysis", [ForLoopAnalysis,
325 def MalformedWarningCheck : DiagGroup<"malformed-warning-check">;
326 def Main : DiagGroup<"main">;
327 def MainReturnType : DiagGroup<"main-return-type">;
328 def MaxUnsignedZero : DiagGroup<"max-unsigned-zero">;
329 def MissingBraces : DiagGroup<"missing-braces">;
330 def MissingDeclarations: DiagGroup<"missing-declarations">;
331 def : DiagGroup<"missing-format-attribute">;
332 def : DiagGroup<"missing-include-dirs">;
333 def MissingNoreturn : DiagGroup<"missing-noreturn">;
334 def MultiChar : DiagGroup<"multichar">;
335 def : DiagGroup<"nested-externs">;
336 def CXX11LongLong : DiagGroup<"c++11-long-long">;
337 def LongLong : DiagGroup<"long-long", [CXX11LongLong]>;
338 def ImplicitlyUnsignedLiteral : DiagGroup<"implicitly-unsigned-literal">;
339 def MethodSignatures : DiagGroup<"method-signatures">;
340 def MismatchedParameterTypes : DiagGroup<"mismatched-parameter-types">;
341 def MismatchedReturnTypes : DiagGroup<"mismatched-return-types">;
342 def MismatchedTags : DiagGroup<"mismatched-tags">;
343 def MissingFieldInitializers : DiagGroup<"missing-field-initializers">;
344 def ModuleBuild : DiagGroup<"module-build">;
345 def ModuleConflict : DiagGroup<"module-conflict">;
346 def ModuleFileExtension : DiagGroup<"module-file-extension">;
347 def NewlineEOF : DiagGroup<"newline-eof">;
348 def Nullability : DiagGroup<"nullability">;
349 def NullabilityDeclSpec : DiagGroup<"nullability-declspec">;
350 def NullabilityInferredOnNestedType : DiagGroup<"nullability-inferred-on-nested-type">;
351 def NullableToNonNullConversion : DiagGroup<"nullable-to-nonnull-conversion">;
352 def NullabilityCompletenessOnArrays : DiagGroup<"nullability-completeness-on-arrays">;
353 def NullabilityCompleteness : DiagGroup<"nullability-completeness",
354 [NullabilityCompletenessOnArrays]>;
355 def NullArithmetic : DiagGroup<"null-arithmetic">;
356 def NullCharacter : DiagGroup<"null-character">;
357 def NullDereference : DiagGroup<"null-dereference">;
358 def InitializerOverrides : DiagGroup<"initializer-overrides">;
359 def NonNull : DiagGroup<"nonnull">;
360 def NonPODVarargs : DiagGroup<"non-pod-varargs">;
361 def ClassVarargs : DiagGroup<"class-varargs", [NonPODVarargs]>;
362 def : DiagGroup<"nonportable-cfstrings">;
363 def NonVirtualDtor : DiagGroup<"non-virtual-dtor">;
364 def NullPointerArithmetic : DiagGroup<"null-pointer-arithmetic">;
365 def : DiagGroup<"effc++", [NonVirtualDtor]>;
366 def OveralignedType : DiagGroup<"over-aligned">;
367 def AlignedAllocationUnavailable : DiagGroup<"aligned-allocation-unavailable">;
368 def OldStyleCast : DiagGroup<"old-style-cast">;
369 def : DiagGroup<"old-style-definition">;
370 def OutOfLineDeclaration : DiagGroup<"out-of-line-declaration">;
371 def : DiagGroup<"overflow">;
372 def ForwardClassReceiver : DiagGroup<"receiver-forward-class">;
373 def MethodAccess : DiagGroup<"objc-method-access">;
374 def ObjCReceiver : DiagGroup<"receiver-expr">;
375 def OperatorNewReturnsNull : DiagGroup<"new-returns-null">;
376 def OverlengthStrings : DiagGroup<"overlength-strings">;
377 def OverloadedVirtual : DiagGroup<"overloaded-virtual">;
378 def PrivateExtern : DiagGroup<"private-extern">;
379 def SelTypeCast : DiagGroup<"cast-of-sel-type">;
380 def FunctionDefInObjCContainer : DiagGroup<"function-def-in-objc-container">;
381 def BadFunctionCast : DiagGroup<"bad-function-cast">;
382 def ObjCPropertyImpl : DiagGroup<"objc-property-implementation">;
383 def ObjCPropertyNoAttribute : DiagGroup<"objc-property-no-attribute">;
384 def ObjCProtocolQualifiers : DiagGroup<"objc-protocol-qualifiers">;
385 def ObjCMissingSuperCalls : DiagGroup<"objc-missing-super-calls">;
386 def ObjCDesignatedInit : DiagGroup<"objc-designated-initializers">;
387 def ObjCRetainBlockProperty : DiagGroup<"objc-noncopy-retain-block-property">;
388 def ObjCReadonlyPropertyHasSetter : DiagGroup<"objc-readonly-with-setter-property">;
389 def ObjCInvalidIBOutletProperty : DiagGroup<"invalid-iboutlet">;
390 def ObjCRootClass : DiagGroup<"objc-root-class">;
391 def ObjCPointerIntrospectPerformSelector : DiagGroup<"deprecated-objc-pointer-introspection-performSelector">;
392 def ObjCPointerIntrospect : DiagGroup<"deprecated-objc-pointer-introspection", [ObjCPointerIntrospectPerformSelector]>;
393 def ObjCMultipleMethodNames : DiagGroup<"objc-multiple-method-names">;
394 def ObjCFlexibleArray : DiagGroup<"objc-flexible-array">;
395 def OpenCLUnsupportedRGBA: DiagGroup<"opencl-unsupported-rgba">;
396 def DeprecatedObjCIsaUsage : DiagGroup<"deprecated-objc-isa-usage">;
397 def ExplicitInitializeCall : DiagGroup<"explicit-initialize-call">;
398 def Packed : DiagGroup<"packed">;
399 def Padded : DiagGroup<"padded">;
401 def PessimizingMove : DiagGroup<"pessimizing-move">;
402 def ReturnStdMoveInCXX11 : DiagGroup<"return-std-move-in-c++11">;
403 def ReturnStdMove : DiagGroup<"return-std-move">;
405 def PointerArith : DiagGroup<"pointer-arith">;
406 def PoundWarning : DiagGroup<"#warnings">;
407 def PoundPragmaMessage : DiagGroup<"#pragma-messages">,
408 DiagCategory<"#pragma message Directive">;
409 def : DiagGroup<"pointer-to-int-cast">;
410 def : DiagGroup<"redundant-decls">;
411 def RedeclaredClassMember : DiagGroup<"redeclared-class-member">;
412 def GNURedeclaredEnum : DiagGroup<"gnu-redeclared-enum">;
413 def RedundantMove : DiagGroup<"redundant-move">;
414 def Register : DiagGroup<"register", [DeprecatedRegister]>;
415 def ReturnTypeCLinkage : DiagGroup<"return-type-c-linkage">;
416 def ReturnType : DiagGroup<"return-type", [ReturnTypeCLinkage]>;
417 def BindToTemporaryCopy : DiagGroup<"bind-to-temporary-copy",
418 [CXX98CompatBindToTemporaryCopy]>;
419 def SelfAssignmentField : DiagGroup<"self-assign-field">;
420 def SelfAssignmentOverloaded : DiagGroup<"self-assign-overloaded">;
421 def SelfAssignment : DiagGroup<"self-assign", [SelfAssignmentOverloaded, SelfAssignmentField]>;
422 def SelfMove : DiagGroup<"self-move">;
423 def SemiBeforeMethodBody : DiagGroup<"semicolon-before-method-body">;
424 def Sentinel : DiagGroup<"sentinel">;
425 def MissingMethodReturnType : DiagGroup<"missing-method-return-type">;
427 def ShadowField : DiagGroup<"shadow-field">;
428 def ShadowFieldInConstructorModified : DiagGroup<"shadow-field-in-constructor-modified">;
429 def ShadowFieldInConstructor : DiagGroup<"shadow-field-in-constructor",
430 [ShadowFieldInConstructorModified]>;
431 def ShadowIvar : DiagGroup<"shadow-ivar">;
432 def ShadowUncapturedLocal : DiagGroup<"shadow-uncaptured-local">;
434 // -Wshadow-all is a catch-all for all shadowing. -Wshadow is just the
435 // shadowing that we think is unsafe.
436 def Shadow : DiagGroup<"shadow", [ShadowFieldInConstructorModified,
438 def ShadowAll : DiagGroup<"shadow-all", [Shadow, ShadowFieldInConstructor,
439 ShadowUncapturedLocal, ShadowField]>;
441 def Shorten64To32 : DiagGroup<"shorten-64-to-32">;
442 def : DiagGroup<"sign-promo">;
443 def SignCompare : DiagGroup<"sign-compare">;
444 def : DiagGroup<"stack-protector">;
445 def : DiagGroup<"switch-default">;
446 def : DiagGroup<"synth">;
447 def SizeofArrayArgument : DiagGroup<"sizeof-array-argument">;
448 def SizeofArrayDecay : DiagGroup<"sizeof-array-decay">;
449 def SizeofPointerMemaccess : DiagGroup<"sizeof-pointer-memaccess">;
450 def MemsetTransposedArgs : DiagGroup<"memset-transposed-args">;
451 def DynamicClassMemaccess : DiagGroup<"dynamic-class-memaccess">;
452 def NonTrivialMemaccess : DiagGroup<"nontrivial-memaccess">;
453 def SuspiciousBzero : DiagGroup<"suspicious-bzero">;
454 def SuspiciousMemaccess : DiagGroup<"suspicious-memaccess",
455 [SizeofPointerMemaccess, DynamicClassMemaccess,
456 NonTrivialMemaccess, MemsetTransposedArgs, SuspiciousBzero]>;
457 def StaticInInline : DiagGroup<"static-in-inline">;
458 def StaticLocalInInline : DiagGroup<"static-local-in-inline">;
459 def GNUStaticFloatInit : DiagGroup<"gnu-static-float-init">;
460 def StaticFloatInit : DiagGroup<"static-float-init", [GNUStaticFloatInit]>;
461 def GNUStatementExpression : DiagGroup<"gnu-statement-expression">;
462 def StringCompare : DiagGroup<"string-compare">;
463 def StringPlusInt : DiagGroup<"string-plus-int">;
464 def StringPlusChar : DiagGroup<"string-plus-char">;
465 def StrncatSize : DiagGroup<"strncat-size">;
466 def TautologicalTypeLimitCompare : DiagGroup<"tautological-type-limit-compare">;
467 def TautologicalUnsignedZeroCompare : DiagGroup<"tautological-unsigned-zero-compare">;
468 def TautologicalUnsignedEnumZeroCompare : DiagGroup<"tautological-unsigned-enum-zero-compare">;
469 def TautologicalInRangeCompare : DiagGroup<"tautological-constant-in-range-compare",
470 [TautologicalTypeLimitCompare,
471 TautologicalUnsignedZeroCompare,
472 TautologicalUnsignedEnumZeroCompare]>;
473 def TautologicalOutOfRangeCompare : DiagGroup<"tautological-constant-out-of-range-compare">;
474 def TautologicalConstantCompare : DiagGroup<"tautological-constant-compare",
475 [TautologicalOutOfRangeCompare]>;
476 def TautologicalPointerCompare : DiagGroup<"tautological-pointer-compare">;
477 def TautologicalOverlapCompare : DiagGroup<"tautological-overlap-compare">;
478 def TautologicalUndefinedCompare : DiagGroup<"tautological-undefined-compare">;
479 def TautologicalCompare : DiagGroup<"tautological-compare",
480 [TautologicalConstantCompare,
481 TautologicalPointerCompare,
482 TautologicalOverlapCompare,
483 TautologicalUndefinedCompare]>;
484 def HeaderHygiene : DiagGroup<"header-hygiene">;
485 def DuplicateDeclSpecifier : DiagGroup<"duplicate-decl-specifier">;
486 def CompareDistinctPointerType : DiagGroup<"compare-distinct-pointer-types">;
487 def GNUUnionCast : DiagGroup<"gnu-union-cast">;
488 def GNUVariableSizedTypeNotAtEnd : DiagGroup<"gnu-variable-sized-type-not-at-end">;
489 def Varargs : DiagGroup<"varargs">;
491 def Unsequenced : DiagGroup<"unsequenced">;
492 // GCC name for -Wunsequenced
493 def : DiagGroup<"sequence-point", [Unsequenced]>;
495 // Preprocessor warnings.
496 def AmbiguousMacro : DiagGroup<"ambiguous-macro">;
497 def KeywordAsMacro : DiagGroup<"keyword-macro">;
498 def ReservedIdAsMacro : DiagGroup<"reserved-id-macro">;
500 // Just silence warnings about -Wstrict-aliasing for now.
501 def : DiagGroup<"strict-aliasing=0">;
502 def : DiagGroup<"strict-aliasing=1">;
503 def : DiagGroup<"strict-aliasing=2">;
504 def : DiagGroup<"strict-aliasing">;
506 // Just silence warnings about -Wstrict-overflow for now.
507 def : DiagGroup<"strict-overflow=0">;
508 def : DiagGroup<"strict-overflow=1">;
509 def : DiagGroup<"strict-overflow=2">;
510 def : DiagGroup<"strict-overflow=3">;
511 def : DiagGroup<"strict-overflow=4">;
512 def : DiagGroup<"strict-overflow=5">;
513 def : DiagGroup<"strict-overflow">;
515 def InvalidOffsetof : DiagGroup<"invalid-offsetof">;
516 def : DiagGroup<"strict-prototypes">;
517 def StrictSelector : DiagGroup<"strict-selector-match">;
518 def MethodDuplicate : DiagGroup<"duplicate-method-match">;
519 def ObjCCStringFormat : DiagGroup<"cstring-format-directive">;
520 def CoveredSwitchDefault : DiagGroup<"covered-switch-default">;
521 def SwitchBool : DiagGroup<"switch-bool">;
522 def SwitchEnum : DiagGroup<"switch-enum">;
523 def Switch : DiagGroup<"switch">;
524 def EnumCompareSwitch : DiagGroup<"enum-compare-switch">;
525 def EnumCompare : DiagGroup<"enum-compare", [EnumCompareSwitch]>;
526 def ImplicitFallthroughPerFunction :
527 DiagGroup<"implicit-fallthrough-per-function">;
528 def ImplicitFallthrough : DiagGroup<"implicit-fallthrough",
529 [ImplicitFallthroughPerFunction]>;
530 def InvalidPPToken : DiagGroup<"invalid-pp-token">;
531 def Trigraphs : DiagGroup<"trigraphs">;
533 def : DiagGroup<"type-limits">;
534 def UndefinedReinterpretCast : DiagGroup<"undefined-reinterpret-cast">;
535 def ReinterpretBaseClass : DiagGroup<"reinterpret-base-class">;
536 def Unicode : DiagGroup<"unicode">;
537 def UninitializedMaybe : DiagGroup<"conditional-uninitialized">;
538 def UninitializedSometimes : DiagGroup<"sometimes-uninitialized">;
539 def UninitializedStaticSelfInit : DiagGroup<"static-self-init">;
540 def Uninitialized : DiagGroup<"uninitialized", [UninitializedSometimes,
541 UninitializedStaticSelfInit]>;
542 def IgnoredPragmaIntrinsic : DiagGroup<"ignored-pragma-intrinsic">;
543 // #pragma optimize is often used to avoid to work around MSVC codegen bugs or
544 // to disable inlining. It's not completely clear what alternative to suggest
545 // (#pragma clang optimize, noinline) so suggest nothing for now.
546 def IgnoredPragmaOptimize : DiagGroup<"ignored-pragma-optimize">;
547 def UnknownPragmas : DiagGroup<"unknown-pragmas">;
548 def IgnoredPragmas : DiagGroup<"ignored-pragmas",
549 [IgnoredPragmaIntrinsic, IgnoredPragmaOptimize]>;
550 def PragmaClangAttribute : DiagGroup<"pragma-clang-attribute">;
551 def PragmaPackSuspiciousInclude : DiagGroup<"pragma-pack-suspicious-include">;
552 def PragmaPack : DiagGroup<"pragma-pack", [PragmaPackSuspiciousInclude]>;
553 def Pragmas : DiagGroup<"pragmas", [UnknownPragmas, IgnoredPragmas,
554 PragmaClangAttribute, PragmaPack]>;
555 def UnknownWarningOption : DiagGroup<"unknown-warning-option">;
556 def NSobjectAttribute : DiagGroup<"NSObject-attribute">;
557 def NSConsumedMismatch : DiagGroup<"nsconsumed-mismatch">;
558 def NSReturnsMismatch : DiagGroup<"nsreturns-mismatch">;
560 def IndependentClassAttribute : DiagGroup<"IndependentClass-attribute">;
561 def UnknownAttributes : DiagGroup<"unknown-attributes">;
562 def IgnoredAttributes : DiagGroup<"ignored-attributes">;
563 def Attributes : DiagGroup<"attributes", [UnknownAttributes,
565 def UnknownSanitizers : DiagGroup<"unknown-sanitizers">;
566 def UnnamedTypeTemplateArgs : DiagGroup<"unnamed-type-template-args",
567 [CXX98CompatUnnamedTypeTemplateArgs]>;
568 def UnsupportedFriend : DiagGroup<"unsupported-friend">;
569 def UnusedArgument : DiagGroup<"unused-argument">;
570 def UnusedCommandLineArgument : DiagGroup<"unused-command-line-argument">;
571 def IgnoredOptimizationArgument : DiagGroup<"ignored-optimization-argument">;
572 def InvalidCommandLineArgument : DiagGroup<"invalid-command-line-argument",
573 [IgnoredOptimizationArgument]>;
574 def UnusedComparison : DiagGroup<"unused-comparison">;
575 def UnusedExceptionParameter : DiagGroup<"unused-exception-parameter">;
576 def UnneededInternalDecl : DiagGroup<"unneeded-internal-declaration">;
577 def UnneededMemberFunction : DiagGroup<"unneeded-member-function">;
578 def UnusedPrivateField : DiagGroup<"unused-private-field">;
579 def UnusedFunction : DiagGroup<"unused-function", [UnneededInternalDecl]>;
580 def UnusedTemplate : DiagGroup<"unused-template", [UnneededInternalDecl]>;
581 def UnusedMemberFunction : DiagGroup<"unused-member-function",
582 [UnneededMemberFunction]>;
583 def UnusedLabel : DiagGroup<"unused-label">;
584 def UnusedLambdaCapture : DiagGroup<"unused-lambda-capture">;
585 def UnusedParameter : DiagGroup<"unused-parameter">;
586 def UnusedResult : DiagGroup<"unused-result">;
587 def PotentiallyEvaluatedExpression : DiagGroup<"potentially-evaluated-expression">;
588 def UnevaluatedExpression : DiagGroup<"unevaluated-expression",
589 [PotentiallyEvaluatedExpression]>;
590 def UnusedValue : DiagGroup<"unused-value", [UnusedComparison, UnusedResult,
591 UnevaluatedExpression]>;
592 def UnusedConstVariable : DiagGroup<"unused-const-variable">;
593 def UnusedVariable : DiagGroup<"unused-variable",
594 [UnusedConstVariable]>;
595 def UnusedLocalTypedef : DiagGroup<"unused-local-typedef">;
596 def UnusedPropertyIvar : DiagGroup<"unused-property-ivar">;
597 def UnusedGetterReturnValue : DiagGroup<"unused-getter-return-value">;
598 def UsedButMarkedUnused : DiagGroup<"used-but-marked-unused">;
599 def UserDefinedLiterals : DiagGroup<"user-defined-literals">;
600 def UserDefinedWarnings : DiagGroup<"user-defined-warnings">;
601 def Reorder : DiagGroup<"reorder">;
602 def UndeclaredSelector : DiagGroup<"undeclared-selector">;
603 def ImplicitAtomic : DiagGroup<"implicit-atomic-properties">;
604 def CustomAtomic : DiagGroup<"custom-atomic-properties">;
605 def AtomicProperties : DiagGroup<"atomic-properties",
606 [ImplicitAtomic, CustomAtomic]>;
607 def ARCUnsafeRetainedAssign : DiagGroup<"arc-unsafe-retained-assign">;
608 def ARCRetainCycles : DiagGroup<"arc-retain-cycles">;
609 def ARCNonPodMemAccess : DiagGroup<"arc-non-pod-memaccess">;
610 def AutomaticReferenceCounting : DiagGroup<"arc",
611 [ARCUnsafeRetainedAssign,
613 ARCNonPodMemAccess]>;
614 def ARCRepeatedUseOfWeakMaybe : DiagGroup<"arc-maybe-repeated-use-of-weak">;
615 def ARCRepeatedUseOfWeak : DiagGroup<"arc-repeated-use-of-weak",
616 [ARCRepeatedUseOfWeakMaybe]>;
617 def BlockCaptureAutoReleasing : DiagGroup<"block-capture-autoreleasing">;
618 def ObjCBridge : DiagGroup<"bridge-cast">;
620 def DeallocInCategory:DiagGroup<"dealloc-in-category">;
621 def SelectorTypeMismatch : DiagGroup<"selector-type-mismatch">;
622 def Selector : DiagGroup<"selector", [SelectorTypeMismatch]>;
623 def Protocol : DiagGroup<"protocol">;
624 def AtProtocol : DiagGroup<"at-protocol">;
625 def PropertyAccessDotSyntax: DiagGroup<"property-access-dot-syntax">;
626 def PropertyAttr : DiagGroup<"property-attribute-mismatch">;
627 def SuperSubClassMismatch : DiagGroup<"super-class-method-mismatch">;
628 def OverridingMethodMismatch : DiagGroup<"overriding-method-mismatch">;
629 def VariadicMacros : DiagGroup<"variadic-macros">;
630 def VectorConversion : DiagGroup<"vector-conversion">; // clang specific
631 def VexingParse : DiagGroup<"vexing-parse">;
632 def VLA : DiagGroup<"vla">;
633 def VLAExtension : DiagGroup<"vla-extension">;
634 def VolatileRegisterVar : DiagGroup<"volatile-register-var">;
635 def Visibility : DiagGroup<"visibility">;
636 def ZeroLengthArray : DiagGroup<"zero-length-array">;
637 def GNUZeroLineDirective : DiagGroup<"gnu-zero-line-directive">;
638 def GNUZeroVariadicMacroArguments : DiagGroup<"gnu-zero-variadic-macro-arguments">;
639 def Fallback : DiagGroup<"fallback">;
641 // This covers both the deprecated case (in C++98)
642 // and the extension case (in C++11 onwards).
643 def WritableStrings : DiagGroup<"writable-strings", [DeprecatedWritableStr]>;
645 // GCC calls -Wdeprecated-writable-strings -Wwrite-strings.
647 // Bizarrely, this warning flag enables -fconst-strings in C. This is
648 // GCC-compatible, but really weird.
650 // FIXME: Should this affect C++11 (where this is an error,
651 // not just deprecated) or not?
652 def GCCWriteStrings : DiagGroup<"write-strings" , [WritableStrings]>;
654 def CharSubscript : DiagGroup<"char-subscripts">;
655 def LargeByValueCopy : DiagGroup<"large-by-value-copy">;
656 def DuplicateArgDecl : DiagGroup<"duplicate-method-arg">;
657 def SignedEnumBitfield : DiagGroup<"signed-enum-bitfield">;
659 // Unreachable code warning groups.
661 // The goal is make -Wunreachable-code on by default, in -Wall, or at
662 // least actively used, with more noisy versions of the warning covered
663 // under separate flags.
665 def UnreachableCodeLoopIncrement : DiagGroup<"unreachable-code-loop-increment">;
666 def UnreachableCode : DiagGroup<"unreachable-code",
667 [UnreachableCodeLoopIncrement]>;
668 def UnreachableCodeBreak : DiagGroup<"unreachable-code-break">;
669 def UnreachableCodeReturn : DiagGroup<"unreachable-code-return">;
670 def UnreachableCodeAggressive : DiagGroup<"unreachable-code-aggressive",
672 UnreachableCodeBreak,
673 UnreachableCodeReturn]>;
675 // Aggregation warning settings.
677 // Populate -Waddress with warnings from other groups.
678 def : DiagGroup<"address", [PointerBoolConversion,
680 TautologicalPointerCompare]>;
682 // -Widiomatic-parentheses contains warnings about 'idiomatic'
683 // missing parentheses; it is off by default. We do not include it
684 // in -Wparentheses because most users who use -Wparentheses explicitly
685 // do not want these warnings.
686 def ParenthesesOnEquality : DiagGroup<"parentheses-equality">;
687 def Parentheses : DiagGroup<"parentheses",
688 [LogicalOpParentheses,
689 LogicalNotParentheses,
690 BitwiseOpParentheses,
692 OverloadedShiftOpParentheses,
693 ParenthesesOnEquality,
696 // -Wconversion has its own warnings, but we split a few out for
698 // - some people want just 64-to-32 warnings
699 // - conversion warnings with constant sources are on by default
700 // - conversion warnings for literals are on by default
701 // - bool-to-pointer conversion warnings are on by default
702 // - __null-to-integer conversion warnings are on by default
703 def Conversion : DiagGroup<"conversion",
707 BitFieldEnumConversion,
712 NonLiteralNullConversion, // (1-1)->pointer (etc)
713 NullConversion, // NULL->non-pointer
714 ObjCLiteralConversion,
717 DiagCategory<"Value Conversion Issue">;
719 def Unused : DiagGroup<"unused",
720 [UnusedArgument, UnusedFunction, UnusedLabel,
721 // UnusedParameter, (matches GCC's behavior)
722 // UnusedTemplate, (clean-up libc++ before enabling)
723 // UnusedMemberFunction, (clean-up llvm before enabling)
724 UnusedPrivateField, UnusedLambdaCapture,
725 UnusedLocalTypedef, UnusedValue, UnusedVariable,
726 UnusedPropertyIvar]>,
727 DiagCategory<"Unused Entity Issue">;
730 def FormatInvalidSpecifier : DiagGroup<"format-invalid-specifier">;
731 def FormatSecurity : DiagGroup<"format-security">;
732 def FormatNonStandard : DiagGroup<"format-non-iso">;
733 def FormatY2K : DiagGroup<"format-y2k">;
734 def FormatPedantic : DiagGroup<"format-pedantic">;
735 def Format : DiagGroup<"format",
736 [FormatExtraArgs, FormatZeroLength, NonNull,
737 FormatSecurity, FormatY2K, FormatInvalidSpecifier]>,
738 DiagCategory<"Format String Issue">;
739 def FormatNonLiteral : DiagGroup<"format-nonliteral">;
740 def Format2 : DiagGroup<"format=2",
741 [FormatNonLiteral, FormatSecurity, FormatY2K]>;
743 def TypeSafety : DiagGroup<"type-safety">;
745 def IncompatibleExceptionSpec : DiagGroup<"incompatible-exception-spec">;
747 def IntToVoidPointerCast : DiagGroup<"int-to-void-pointer-cast">;
748 def IntToPointerCast : DiagGroup<"int-to-pointer-cast",
749 [IntToVoidPointerCast]>;
751 def Move : DiagGroup<"move", [
758 def Extra : DiagGroup<"extra", [
759 MissingFieldInitializers,
761 InitializerOverrides,
762 SemiBeforeMethodBody,
763 MissingMethodReturnType,
766 NullPointerArithmetic
769 def Most : DiagGroup<"most", [
772 DeleteNonVirtualDtor,
793 ObjCMissingSuperCalls,
803 // Thread Safety warnings
804 def ThreadSafetyAttributes : DiagGroup<"thread-safety-attributes">;
805 def ThreadSafetyAnalysis : DiagGroup<"thread-safety-analysis">;
806 def ThreadSafetyPrecise : DiagGroup<"thread-safety-precise">;
807 def ThreadSafetyReference : DiagGroup<"thread-safety-reference">;
808 def ThreadSafetyNegative : DiagGroup<"thread-safety-negative">;
809 def ThreadSafety : DiagGroup<"thread-safety",
810 [ThreadSafetyAttributes,
811 ThreadSafetyAnalysis,
813 ThreadSafetyReference]>;
814 def ThreadSafetyVerbose : DiagGroup<"thread-safety-verbose">;
815 def ThreadSafetyBeta : DiagGroup<"thread-safety-beta">;
817 // Uniqueness Analysis warnings
818 def Consumed : DiagGroup<"consumed">;
820 // Note that putting warnings in -Wall will not disable them by default. If a
821 // warning should be active _only_ when -Wall is passed in, mark it as
822 // DefaultIgnore in addition to putting it here.
823 def All : DiagGroup<"all", [Most, Parentheses, Switch, SwitchBool]>;
825 // Warnings that should be in clang-cl /w4.
826 def : DiagGroup<"CL4", [All, Extra]>;
828 // Warnings enabled by -pedantic. This is magically filled in by TableGen.
829 def Pedantic : DiagGroup<"pedantic">;
832 def : DiagGroup<"", [Extra]>; // -W = -Wextra
833 def : DiagGroup<"endif-labels", [ExtraTokens]>; // -Wendif-labels=-Wextra-tokens
834 def : DiagGroup<"cpp", [PoundWarning]>; // -Wcpp = -W#warnings
835 def : DiagGroup<"comments", [Comment]>; // -Wcomments = -Wcomment
836 def : DiagGroup<"conversion-null",
837 [NullConversion]>; // -Wconversion-null = -Wnull-conversion
838 def : DiagGroup<"bool-conversions",
839 [BoolConversion]>; // -Wbool-conversions = -Wbool-conversion
840 def : DiagGroup<"int-conversions",
841 [IntConversion]>; // -Wint-conversions = -Wint-conversion
842 def : DiagGroup<"vector-conversions",
843 [VectorConversion]>; // -Wvector-conversions = -Wvector-conversion
844 def : DiagGroup<"unused-local-typedefs", [UnusedLocalTypedef]>;
845 // -Wunused-local-typedefs = -Wunused-local-typedef
847 // A warning group for warnings that we want to have on by default in clang,
848 // but which aren't on by default in GCC.
849 def NonGCC : DiagGroup<"non-gcc",
850 [SignCompare, Conversion, LiteralRange]>;
852 // A warning group for warnings about using C++11 features as extensions in
853 // earlier C++ versions.
854 def CXX11 : DiagGroup<"c++11-extensions", [CXX11ExtraSemi, CXX11InlineNamespace,
857 // A warning group for warnings about using C++14 features as extensions in
858 // earlier C++ versions.
859 def CXX14 : DiagGroup<"c++14-extensions", [CXX14BinaryLiteral]>;
861 // A warning group for warnings about using C++17 features as extensions in
862 // earlier C++ versions.
863 def CXX17 : DiagGroup<"c++17-extensions">;
865 // A warning group for warnings about using C++2a features as extensions in
866 // earlier C++ versions.
867 def CXX2a : DiagGroup<"c++2a-extensions">;
869 def : DiagGroup<"c++0x-extensions", [CXX11]>;
870 def : DiagGroup<"c++1y-extensions", [CXX14]>;
871 def : DiagGroup<"c++1z-extensions", [CXX17]>;
873 def DelegatingCtorCycles :
874 DiagGroup<"delegating-ctor-cycles">;
876 // A warning group for warnings about using C11 features as extensions.
877 def C11 : DiagGroup<"c11-extensions">;
879 // A warning group for warnings about using C99 features as extensions.
880 def C99 : DiagGroup<"c99-extensions">;
882 // A warning group for warnings about GCC extensions.
883 def GNU : DiagGroup<"gnu", [GNUAlignofExpression, GNUAnonymousStruct,
885 GNUBinaryLiteral, GNUCaseRange,
886 GNUComplexInteger, GNUCompoundLiteralInitializer,
887 GNUConditionalOmittedOperand, GNUDesignator,
888 GNUEmptyInitializer, GNUEmptyStruct,
889 VLAExtension, GNUFlexibleArrayInitializer,
890 GNUFlexibleArrayUnionMember, GNUFoldingConstant,
891 GNUImaginaryConstant, GNUIncludeNext,
893 RedeclaredClassMember, GNURedeclaredEnum,
894 GNUStatementExpression, GNUStaticFloatInit,
895 GNUStringLiteralOperatorTemplate,
896 GNUUnionCast, GNUVariableSizedTypeNotAtEnd,
897 ZeroLengthArray, GNUZeroLineDirective,
898 GNUZeroVariadicMacroArguments]>;
899 // A warning group for warnings about code that clang accepts but gcc doesn't.
900 def GccCompat : DiagGroup<"gcc-compat">;
902 // Warnings for Microsoft extensions.
903 def MicrosoftCharize : DiagGroup<"microsoft-charize">;
904 def MicrosoftInclude : DiagGroup<"microsoft-include">;
905 def MicrosoftCppMacro : DiagGroup<"microsoft-cpp-macro">;
906 def MicrosoftFixedEnum : DiagGroup<"microsoft-fixed-enum">;
907 def MicrosoftSealed : DiagGroup<"microsoft-sealed">;
908 def MicrosoftUnqualifiedFriend : DiagGroup<"microsoft-unqualified-friend">;
909 def MicrosoftExceptionSpec : DiagGroup<"microsoft-exception-spec">;
910 def MicrosoftUsingDecl : DiagGroup<"microsoft-using-decl">;
911 def MicrosoftMutableReference : DiagGroup<"microsoft-mutable-reference">;
912 def MicrosoftPureDefinition : DiagGroup<"microsoft-pure-definition">;
913 def MicrosoftUnionMemberReference : DiagGroup<
914 "microsoft-union-member-reference">;
915 def MicrosoftExplicitConstructorCall : DiagGroup<
916 "microsoft-explicit-constructor-call">;
917 def MicrosoftEnumValue : DiagGroup<"microsoft-enum-value">;
918 def MicrosoftDefaultArgRedefinition :
919 DiagGroup<"microsoft-default-arg-redefinition">;
920 def MicrosoftTemplate : DiagGroup<"microsoft-template">;
921 def MicrosoftInconsistentDllImport : DiagGroup<"inconsistent-dllimport">;
922 def MicrosoftRedeclareStatic : DiagGroup<"microsoft-redeclare-static">;
923 def MicrosoftEnumForwardReference :
924 DiagGroup<"microsoft-enum-forward-reference">;
925 def MicrosoftGoto : DiagGroup<"microsoft-goto">;
926 def MicrosoftFlexibleArray : DiagGroup<"microsoft-flexible-array">;
927 def MicrosoftExtraQualification : DiagGroup<"microsoft-extra-qualification">;
928 def MicrosoftCast : DiagGroup<"microsoft-cast">;
929 def MicrosoftConstInit : DiagGroup<"microsoft-const-init">;
930 def MicrosoftVoidPseudoDtor : DiagGroup<"microsoft-void-pseudo-dtor">;
931 def MicrosoftAnonTag : DiagGroup<"microsoft-anon-tag">;
932 def MicrosoftCommentPaste : DiagGroup<"microsoft-comment-paste">;
933 def MicrosoftEndOfFile : DiagGroup<"microsoft-end-of-file">;
934 def MicrosoftInaccessibleBase : DiagGroup<"microsoft-inaccessible-base">;
936 def : DiagGroup<"msvc-include", [MicrosoftInclude]>;
937 // -Wmsvc-include = -Wmicrosoft-include
939 // Warnings group for warnings about Microsoft extensions.
940 def Microsoft : DiagGroup<"microsoft",
941 [MicrosoftCharize, MicrosoftInclude, MicrosoftCppMacro, MicrosoftFixedEnum,
942 MicrosoftSealed, MicrosoftUnqualifiedFriend, MicrosoftExceptionSpec,
943 MicrosoftUsingDecl, MicrosoftMutableReference, MicrosoftPureDefinition,
944 MicrosoftUnionMemberReference, MicrosoftExplicitConstructorCall,
945 MicrosoftEnumValue, MicrosoftDefaultArgRedefinition, MicrosoftTemplate,
946 MicrosoftRedeclareStatic, MicrosoftEnumForwardReference, MicrosoftGoto,
947 MicrosoftFlexibleArray, MicrosoftExtraQualification, MicrosoftCast,
948 MicrosoftConstInit, MicrosoftVoidPseudoDtor, MicrosoftAnonTag,
949 MicrosoftCommentPaste, MicrosoftEndOfFile,
950 MicrosoftInconsistentDllImport]>;
952 def ClangClPch : DiagGroup<"clang-cl-pch">;
954 def ObjCNonUnifiedException : DiagGroup<"objc-nonunified-exceptions">;
956 def ObjCProtocolMethodImpl : DiagGroup<"objc-protocol-method-implementation">;
958 def ObjCNoPropertyAutoSynthesis : DiagGroup<"objc-property-synthesis">;
960 // ObjC API warning groups.
961 def ObjCRedundantLiteralUse : DiagGroup<"objc-redundant-literal-use">;
962 def ObjCRedundantAPIUse : DiagGroup<"objc-redundant-api-use", [
963 ObjCRedundantLiteralUse
966 def ObjCCocoaAPI : DiagGroup<"objc-cocoa-api", [
970 def ObjCStringComparison : DiagGroup<"objc-string-compare">;
971 def ObjCStringConcatenation : DiagGroup<"objc-string-concatenation">;
972 def ObjCLiteralComparison : DiagGroup<"objc-literal-compare", [
976 // Inline ASM warnings.
977 def ASMOperandWidths : DiagGroup<"asm-operand-widths">;
978 def ASMIgnoredQualifier : DiagGroup<"asm-ignored-qualifier">;
979 def ASM : DiagGroup<"asm", [
980 ASMOperandWidths, ASMIgnoredQualifier
984 def SourceUsesOpenMP : DiagGroup<"source-uses-openmp">;
985 def OpenMPClauses : DiagGroup<"openmp-clauses">;
986 def OpenMPLoopForm : DiagGroup<"openmp-loop-form">;
987 def OpenMPTarget : DiagGroup<"openmp-target">;
990 def BackendInlineAsm : DiagGroup<"inline-asm">;
991 def BackendFrameLargerThanEQ : DiagGroup<"frame-larger-than=">;
992 def BackendPlugin : DiagGroup<"backend-plugin">;
993 def RemarkBackendPlugin : DiagGroup<"remark-backend-plugin">;
994 def BackendOptimizationRemark : DiagGroup<"pass">;
995 def BackendOptimizationRemarkMissed : DiagGroup<"pass-missed">;
996 def BackendOptimizationRemarkAnalysis : DiagGroup<"pass-analysis">;
997 def BackendOptimizationFailure : DiagGroup<"pass-failed">;
999 // Instrumentation based profiling warnings.
1000 def ProfileInstrMissing : DiagGroup<"profile-instr-missing">;
1001 def ProfileInstrOutOfDate : DiagGroup<"profile-instr-out-of-date">;
1002 def ProfileInstrUnprofiled : DiagGroup<"profile-instr-unprofiled">;
1004 // AddressSanitizer frontend instrumentation remarks.
1005 def SanitizeAddressRemarks : DiagGroup<"sanitize-address">;
1007 // Issues with serialized diagnostics.
1008 def SerializedDiagnostics : DiagGroup<"serialized-diagnostics">;
1010 // A warning group for warnings about code that clang accepts when
1011 // compiling CUDA C/C++ but which is not compatible with the CUDA spec.
1012 def CudaCompat : DiagGroup<"cuda-compat">;
1014 // A warning group for things that will change semantics in the future.
1015 def FutureCompat : DiagGroup<"future-compat">;
1017 def InvalidOrNonExistentDirectory : DiagGroup<"invalid-or-nonexistent-directory">;
1019 def OptionIgnored : DiagGroup<"option-ignored">;
1021 def UnknownArgument : DiagGroup<"unknown-argument">;
1023 // A warning group for warnings about code that clang accepts when
1024 // compiling OpenCL C/C++ but which is not compatible with the SPIR spec.
1025 def SpirCompat : DiagGroup<"spir-compat">;
1027 // Warning for the experimental-isel options.
1028 def ExperimentalISel : DiagGroup<"experimental-isel">;
1030 // A warning group specifically for warnings related to function
1032 def FunctionMultiVersioning : DiagGroup<"function-multiversion">;