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