xref: /netbsd-src/external/apache2/llvm/dist/clang/include/clang/Basic/DiagnosticGroups.td (revision e038c9c4676b0f19b1b7dd08a940c6ed64a6d5ae)
1//==--- DiagnosticGroups.td - Diagnostic Group Definitions ----------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9def ImplicitFunctionDeclare : DiagGroup<"implicit-function-declaration">;
10def ImplicitInt : DiagGroup<"implicit-int">;
11
12// Aggregation warning settings.
13def Implicit : DiagGroup<"implicit", [
14    ImplicitFunctionDeclare,
15    ImplicitInt
16]>;
17
18// Empty DiagGroups are recognized by clang but ignored.
19def ODR : DiagGroup<"odr">;
20def : DiagGroup<"abi">;
21def AbsoluteValue : DiagGroup<"absolute-value">;
22def MisspelledAssumption : DiagGroup<"misspelled-assumption">;
23def UnknownAssumption : DiagGroup<"unknown-assumption">;
24def AddressOfTemporary : DiagGroup<"address-of-temporary">;
25def : DiagGroup<"aggregate-return">;
26def GNUAlignofExpression : DiagGroup<"gnu-alignof-expression">;
27def AmbigMemberTemplate : DiagGroup<"ambiguous-member-template">;
28def GNUAnonymousStruct : DiagGroup<"gnu-anonymous-struct">;
29def GNUAutoType : DiagGroup<"gnu-auto-type">;
30def ArrayBounds : DiagGroup<"array-bounds">;
31def ArrayBoundsPointerArithmetic : DiagGroup<"array-bounds-pointer-arithmetic">;
32def AutoDisableVptrSanitizer : DiagGroup<"auto-disable-vptr-sanitizer">;
33def Availability : DiagGroup<"availability">;
34def Section : DiagGroup<"section">;
35def AutoImport : DiagGroup<"auto-import">;
36def FrameworkHdrQuotedInclude : DiagGroup<"quoted-include-in-framework-header">;
37def FrameworkIncludePrivateFromPublic :
38  DiagGroup<"framework-include-private-from-public">;
39def FrameworkHdrAtImport : DiagGroup<"atimport-in-framework-header">;
40def CXX14BinaryLiteral : DiagGroup<"c++14-binary-literal">;
41def CXXPre14CompatBinaryLiteral : DiagGroup<"c++98-c++11-compat-binary-literal">;
42def GNUBinaryLiteral : DiagGroup<"gnu-binary-literal">;
43def BinaryLiteral : DiagGroup<"binary-literal", [CXX14BinaryLiteral,
44                                                 CXXPre14CompatBinaryLiteral,
45                                                 GNUBinaryLiteral]>;
46def GNUCompoundLiteralInitializer : DiagGroup<"gnu-compound-literal-initializer">;
47def BitFieldConstantConversion : DiagGroup<"bitfield-constant-conversion">;
48def BitFieldEnumConversion : DiagGroup<"bitfield-enum-conversion">;
49def BitFieldWidth : DiagGroup<"bitfield-width">;
50def CompoundTokenSplitByMacro : DiagGroup<"compound-token-split-by-macro">;
51def CompoundTokenSplitBySpace : DiagGroup<"compound-token-split-by-space">;
52def CompoundTokenSplit : DiagGroup<"compound-token-split",
53                                   [CompoundTokenSplitByMacro,
54                                    CompoundTokenSplitBySpace]>;
55def CoroutineMissingUnhandledException :
56  DiagGroup<"coroutine-missing-unhandled-exception">;
57def Coroutine : DiagGroup<"coroutine", [CoroutineMissingUnhandledException]>;
58def ObjCBoolConstantConversion : DiagGroup<"objc-bool-constant-conversion">;
59def ConstantConversion : DiagGroup<"constant-conversion",
60                                   [BitFieldConstantConversion,
61                                    ObjCBoolConstantConversion]>;
62def LiteralConversion : DiagGroup<"literal-conversion">;
63def StringConversion : DiagGroup<"string-conversion">;
64def SignConversion : DiagGroup<"sign-conversion">;
65def PointerBoolConversion : DiagGroup<"pointer-bool-conversion">;
66def UndefinedBoolConversion : DiagGroup<"undefined-bool-conversion">;
67def BoolConversion : DiagGroup<"bool-conversion", [PointerBoolConversion,
68                                                   UndefinedBoolConversion]>;
69def IntConversion : DiagGroup<"int-conversion">;
70def ClassConversion: DiagGroup<"class-conversion">;
71def DeprecatedEnumCompareConditional :
72  DiagGroup<"deprecated-enum-compare-conditional">;
73def EnumCompareConditional : DiagGroup<"enum-compare-conditional",
74                                       [DeprecatedEnumCompareConditional]>;
75def EnumCompareSwitch : DiagGroup<"enum-compare-switch">;
76def DeprecatedEnumCompare : DiagGroup<"deprecated-enum-compare">;
77def EnumCompare : DiagGroup<"enum-compare", [EnumCompareSwitch,
78                                             DeprecatedEnumCompare]>;
79def DeprecatedAnonEnumEnumConversion : DiagGroup<"deprecated-anon-enum-enum-conversion">;
80def DeprecatedEnumEnumConversion : DiagGroup<"deprecated-enum-enum-conversion">;
81def DeprecatedEnumFloatConversion : DiagGroup<"deprecated-enum-float-conversion">;
82def AnonEnumEnumConversion : DiagGroup<"anon-enum-enum-conversion",
83                                   [DeprecatedAnonEnumEnumConversion]>;
84def EnumEnumConversion : DiagGroup<"enum-enum-conversion",
85                                   [DeprecatedEnumEnumConversion]>;
86def EnumFloatConversion : DiagGroup<"enum-float-conversion",
87                                    [DeprecatedEnumFloatConversion]>;
88def EnumConversion : DiagGroup<"enum-conversion",
89                               [EnumEnumConversion,
90                                EnumFloatConversion,
91                                EnumCompareConditional]>;
92def ObjCSignedCharBoolImplicitIntConversion :
93  DiagGroup<"objc-signed-char-bool-implicit-int-conversion">;
94def ImplicitIntConversion : DiagGroup<"implicit-int-conversion",
95                                     [ObjCSignedCharBoolImplicitIntConversion]>;
96def ImplicitConstIntFloatConversion : DiagGroup<"implicit-const-int-float-conversion">;
97def ImplicitIntFloatConversion : DiagGroup<"implicit-int-float-conversion",
98 [ImplicitConstIntFloatConversion]>;
99def ObjCSignedCharBoolImplicitFloatConversion :
100  DiagGroup<"objc-signed-char-bool-implicit-float-conversion">;
101def ImplicitFloatConversion : DiagGroup<"implicit-float-conversion",
102  [ImplicitIntFloatConversion,
103   ObjCSignedCharBoolImplicitFloatConversion]>;
104def ImplicitFixedPointConversion : DiagGroup<"implicit-fixed-point-conversion">;
105
106def FloatOverflowConversion : DiagGroup<"float-overflow-conversion">;
107def FloatZeroConversion : DiagGroup<"float-zero-conversion">;
108def FloatConversion :
109  DiagGroup<"float-conversion", [FloatOverflowConversion,
110                                 FloatZeroConversion]>;
111
112def FrameAddress : DiagGroup<"frame-address">;
113def FreeNonHeapObject : DiagGroup<"free-nonheap-object">;
114def DoublePromotion : DiagGroup<"double-promotion">;
115def EnumTooLarge : DiagGroup<"enum-too-large">;
116def UnsupportedNan : DiagGroup<"unsupported-nan">;
117def UnsupportedAbs : DiagGroup<"unsupported-abs">;
118def UnsupportedFPOpt : DiagGroup<"unsupported-floating-point-opt">;
119def UnsupportedCB : DiagGroup<"unsupported-cb">;
120def UnsupportedGPOpt : DiagGroup<"unsupported-gpopt">;
121def UnsupportedTargetOpt : DiagGroup<"unsupported-target-opt">;
122def NonLiteralNullConversion : DiagGroup<"non-literal-null-conversion">;
123def NullConversion : DiagGroup<"null-conversion">;
124def ImplicitConversionFloatingPointToBool :
125  DiagGroup<"implicit-conversion-floating-point-to-bool">;
126def ObjCLiteralConversion : DiagGroup<"objc-literal-conversion">;
127def MacroRedefined : DiagGroup<"macro-redefined">;
128def BuiltinMacroRedefined : DiagGroup<"builtin-macro-redefined">;
129def BuiltinRequiresHeader : DiagGroup<"builtin-requires-header">;
130def C99Compat : DiagGroup<"c99-compat">;
131def CXXCompat: DiagGroup<"c++-compat">;
132def ExternCCompat : DiagGroup<"extern-c-compat">;
133def KeywordCompat : DiagGroup<"keyword-compat">;
134def GNUCaseRange : DiagGroup<"gnu-case-range">;
135def CastAlign : DiagGroup<"cast-align">;
136def CastQual : DiagGroup<"cast-qual">;
137def : DiagGroup<"char-align">;
138def Comment : DiagGroup<"comment">;
139def GNUComplexInteger : DiagGroup<"gnu-complex-integer">;
140def GNUConditionalOmittedOperand : DiagGroup<"gnu-conditional-omitted-operand">;
141def ConfigMacros : DiagGroup<"config-macros">;
142def : DiagGroup<"ctor-dtor-privacy">;
143def GNUStringLiteralOperatorTemplate :
144  DiagGroup<"gnu-string-literal-operator-template">;
145def UndefinedVarTemplate : DiagGroup<"undefined-var-template">;
146def UndefinedFuncTemplate : DiagGroup<"undefined-func-template">;
147def MissingNoEscape : DiagGroup<"missing-noescape">;
148
149def DefaultedFunctionDeleted : DiagGroup<"defaulted-function-deleted">;
150def DeleteIncomplete : DiagGroup<"delete-incomplete">;
151def DeleteNonAbstractNonVirtualDtor : DiagGroup<"delete-non-abstract-non-virtual-dtor">;
152def DeleteAbstractNonVirtualDtor : DiagGroup<"delete-abstract-non-virtual-dtor">;
153def DeleteNonVirtualDtor : DiagGroup<"delete-non-virtual-dtor",
154                                     [DeleteNonAbstractNonVirtualDtor,
155                                      DeleteAbstractNonVirtualDtor]>;
156def AbstractFinalClass : DiagGroup<"abstract-final-class">;
157def FinalDtorNonFinalClass : DiagGroup<"final-dtor-non-final-class">;
158
159def CXX11CompatDeprecatedWritableStr :
160  DiagGroup<"c++11-compat-deprecated-writable-strings">;
161
162def DeprecatedArrayCompare : DiagGroup<"deprecated-array-compare">;
163def DeprecatedAttributes : DiagGroup<"deprecated-attributes">;
164def DeprecatedCommaSubscript : DiagGroup<"deprecated-comma-subscript">;
165def DeprecatedCopyWithUserProvidedCopy : DiagGroup<"deprecated-copy-with-user-provided-copy">;
166def DeprecatedCopyWithUserProvidedDtor : DiagGroup<"deprecated-copy-with-user-provided-dtor">;
167def DeprecatedCopy : DiagGroup<"deprecated-copy", [DeprecatedCopyWithUserProvidedCopy]>;
168def DeprecatedCopyWithDtor : DiagGroup<"deprecated-copy-with-dtor", [DeprecatedCopyWithUserProvidedDtor]>;
169// For compatibility with GCC.
170def : DiagGroup<"deprecated-copy-dtor", [DeprecatedCopyWithDtor]>;
171def DeprecatedDeclarations : DiagGroup<"deprecated-declarations">;
172def UnavailableDeclarations : DiagGroup<"unavailable-declarations">;
173def UnguardedAvailabilityNew : DiagGroup<"unguarded-availability-new">;
174def UnguardedAvailability : DiagGroup<"unguarded-availability",
175                                      [UnguardedAvailabilityNew]>;
176// partial-availability is an alias of unguarded-availability.
177def : DiagGroup<"partial-availability", [UnguardedAvailability]>;
178def DeprecatedDynamicExceptionSpec
179    : DiagGroup<"deprecated-dynamic-exception-spec">;
180def DeprecatedImplementations :DiagGroup<"deprecated-implementations">;
181def DeprecatedIncrementBool : DiagGroup<"deprecated-increment-bool">;
182def DeprecatedRegister : DiagGroup<"deprecated-register">;
183def DeprecatedThisCapture : DiagGroup<"deprecated-this-capture">;
184def DeprecatedVolatile : DiagGroup<"deprecated-volatile">;
185def DeprecatedWritableStr : DiagGroup<"deprecated-writable-strings",
186                                      [CXX11CompatDeprecatedWritableStr]>;
187// FIXME: Why is DeprecatedImplementations not in this group?
188def Deprecated : DiagGroup<"deprecated", [DeprecatedAnonEnumEnumConversion,
189                                          DeprecatedArrayCompare,
190                                          DeprecatedAttributes,
191                                          DeprecatedCommaSubscript,
192                                          DeprecatedCopy,
193                                          DeprecatedCopyWithDtor,
194                                          DeprecatedDeclarations,
195                                          DeprecatedDynamicExceptionSpec,
196                                          DeprecatedEnumCompare,
197                                          DeprecatedEnumCompareConditional,
198                                          DeprecatedEnumEnumConversion,
199                                          DeprecatedEnumFloatConversion,
200                                          DeprecatedIncrementBool,
201                                          DeprecatedRegister,
202                                          DeprecatedThisCapture,
203                                          DeprecatedVolatile,
204                                          DeprecatedWritableStr]>,
205                 DiagCategory<"Deprecations">;
206
207def CXX20Designator : DiagGroup<"c++20-designator">;
208// Allow -Wno-c99-designator to be used to turn off all warnings on valid C99
209// designators (including the warning controlled by -Wc++20-designator).
210def C99Designator : DiagGroup<"c99-designator", [CXX20Designator]>;
211def GNUDesignator : DiagGroup<"gnu-designator">;
212def DtorName : DiagGroup<"dtor-name">;
213
214def DynamicExceptionSpec
215    : DiagGroup<"dynamic-exception-spec", [DeprecatedDynamicExceptionSpec]>;
216
217def LibLTO : DiagGroup<"liblto">;
218def : DiagGroup<"disabled-optimization">;
219def : DiagGroup<"discard-qual">;
220def DivZero : DiagGroup<"division-by-zero">;
221def : DiagGroup<"div-by-zero", [DivZero]>;
222
223def DocumentationHTML : DiagGroup<"documentation-html">;
224def DocumentationUnknownCommand : DiagGroup<"documentation-unknown-command">;
225def DocumentationPedantic : DiagGroup<"documentation-pedantic",
226                                      [DocumentationUnknownCommand]>;
227def DocumentationDeprecatedSync : DiagGroup<"documentation-deprecated-sync">;
228def Documentation : DiagGroup<"documentation",
229                              [DocumentationHTML,
230                               DocumentationDeprecatedSync]>;
231
232def EmptyBody : DiagGroup<"empty-body">;
233def Exceptions : DiagGroup<"exceptions">;
234
235def GNUEmptyInitializer : DiagGroup<"gnu-empty-initializer">;
236def GNUEmptyStruct : DiagGroup<"gnu-empty-struct">;
237def ExtraTokens : DiagGroup<"extra-tokens">;
238def CXX98CompatExtraSemi : DiagGroup<"c++98-compat-extra-semi">;
239def CXX11ExtraSemi : DiagGroup<"c++11-extra-semi">;
240def EmptyInitStatement : DiagGroup<"empty-init-stmt">;
241def ExportUnnamed : DiagGroup<"export-unnamed">;
242def ExtraSemiStmt : DiagGroup<"extra-semi-stmt", [EmptyInitStatement]>;
243def ExtraSemi : DiagGroup<"extra-semi", [CXX98CompatExtraSemi,
244                                         CXX11ExtraSemi]>;
245
246def GNUFlexibleArrayInitializer : DiagGroup<"gnu-flexible-array-initializer">;
247def GNUFlexibleArrayUnionMember : DiagGroup<"gnu-flexible-array-union-member">;
248def GNUFoldingConstant : DiagGroup<"gnu-folding-constant">;
249def FormatInsufficientArgs : DiagGroup<"format-insufficient-args">;
250def FormatExtraArgs : DiagGroup<"format-extra-args">;
251def FormatZeroLength : DiagGroup<"format-zero-length">;
252
253def InvalidIOSDeploymentTarget : DiagGroup<"invalid-ios-deployment-target">;
254
255def CXX17CompatMangling : DiagGroup<"c++17-compat-mangling">;
256def : DiagGroup<"c++1z-compat-mangling", [CXX17CompatMangling]>;
257// Name of this warning in GCC.
258def NoexceptType : DiagGroup<"noexcept-type", [CXX17CompatMangling]>;
259
260// Warnings for C code which is not compatible with previous C standards.
261def CPre2xCompat : DiagGroup<"pre-c2x-compat">;
262def CPre2xCompatPedantic : DiagGroup<"pre-c2x-compat-pedantic",
263                                     [CPre2xCompat]>;
264
265// Warnings for C++ code which is not compatible with previous C++ standards.
266def CXXPre14Compat : DiagGroup<"pre-c++14-compat">;
267def : DiagGroup<"c++98-c++11-compat", [CXXPre14Compat]>;
268def CXXPre14CompatPedantic : DiagGroup<"pre-c++14-compat-pedantic",
269                                       [CXXPre14Compat,
270                                        CXXPre14CompatBinaryLiteral]>;
271def : DiagGroup<"c++98-c++11-compat-pedantic", [CXXPre14CompatPedantic]>;
272def CXXPre17Compat : DiagGroup<"pre-c++17-compat">;
273def : DiagGroup<"c++98-c++11-c++14-compat", [CXXPre17Compat]>;
274def CXXPre17CompatPedantic : DiagGroup<"pre-c++17-compat-pedantic",
275                                       [CXXPre17Compat]>;
276def : DiagGroup<"c++98-c++11-c++14-compat-pedantic",
277                [CXXPre17CompatPedantic]>;
278def CXXPre20Compat : DiagGroup<"pre-c++20-compat">;
279def : DiagGroup<"c++98-c++11-c++14-c++17-compat", [CXXPre20Compat]>;
280def CXXPre20CompatPedantic : DiagGroup<"pre-c++20-compat-pedantic",
281                                       [CXXPre20Compat]>;
282def : DiagGroup<"c++98-c++11-c++14-c++17-compat-pedantic",
283                [CXXPre20CompatPedantic]>;
284def CXXPre2bCompat : DiagGroup<"pre-c++2b-compat">;
285def CXXPre2bCompatPedantic :
286  DiagGroup<"pre-c++2b-compat-pedantic", [CXXPre2bCompat]>;
287
288def CXX98CompatBindToTemporaryCopy :
289  DiagGroup<"c++98-compat-bind-to-temporary-copy">;
290def CXX98CompatLocalTypeTemplateArgs :
291  DiagGroup<"c++98-compat-local-type-template-args">;
292def CXX98CompatUnnamedTypeTemplateArgs :
293  DiagGroup<"c++98-compat-unnamed-type-template-args">;
294
295def CXX98Compat : DiagGroup<"c++98-compat",
296                            [CXX98CompatLocalTypeTemplateArgs,
297                             CXX98CompatUnnamedTypeTemplateArgs,
298                             CXXPre14Compat,
299                             CXXPre17Compat,
300                             CXXPre20Compat,
301                             CXXPre2bCompat]>;
302// Warnings for C++11 features which are Extensions in C++98 mode.
303def CXX98CompatPedantic : DiagGroup<"c++98-compat-pedantic",
304                                    [CXX98Compat,
305                                     CXX98CompatBindToTemporaryCopy,
306                                     CXX98CompatExtraSemi,
307                                     CXXPre14CompatPedantic,
308                                     CXXPre17CompatPedantic,
309                                     CXXPre20CompatPedantic,
310                                     CXXPre2bCompatPedantic]>;
311
312def CXX11Narrowing : DiagGroup<"c++11-narrowing">;
313
314def CXX11WarnInconsistentOverrideDestructor :
315  DiagGroup<"inconsistent-missing-destructor-override">;
316def CXX11WarnInconsistentOverrideMethod :
317  DiagGroup<"inconsistent-missing-override">;
318def CXX11WarnSuggestOverrideDestructor : DiagGroup<"suggest-destructor-override">;
319def CXX11WarnSuggestOverride : DiagGroup<"suggest-override">;
320
321// Original name of this warning in Clang
322def : DiagGroup<"c++0x-narrowing", [CXX11Narrowing]>;
323
324// Name of this warning in GCC
325def : DiagGroup<"narrowing", [CXX11Narrowing]>;
326
327def CXX11CompatReservedUserDefinedLiteral :
328  DiagGroup<"c++11-compat-reserved-user-defined-literal">;
329def ReservedUserDefinedLiteral :
330  DiagGroup<"reserved-user-defined-literal",
331            [CXX11CompatReservedUserDefinedLiteral]>;
332
333def CXX11Compat : DiagGroup<"c++11-compat",
334                            [CXX11Narrowing,
335                             CXX11CompatReservedUserDefinedLiteral,
336                             CXX11CompatDeprecatedWritableStr,
337                             CXXPre14Compat,
338                             CXXPre17Compat,
339                             CXXPre20Compat,
340                             CXXPre2bCompat]>;
341def : DiagGroup<"c++0x-compat", [CXX11Compat]>;
342def CXX11CompatPedantic : DiagGroup<"c++11-compat-pedantic",
343                                    [CXX11Compat,
344                                     CXXPre14CompatPedantic,
345                                     CXXPre17CompatPedantic,
346                                     CXXPre20CompatPedantic,
347                                     CXXPre2bCompatPedantic]>;
348
349def CXX14Compat : DiagGroup<"c++14-compat", [CXXPre17Compat,
350                                             CXXPre20Compat,
351                                             CXXPre2bCompat]>;
352def CXX14CompatPedantic : DiagGroup<"c++14-compat-pedantic",
353                                    [CXX14Compat,
354                                     CXXPre17CompatPedantic,
355                                     CXXPre20CompatPedantic,
356                                     CXXPre2bCompatPedantic]>;
357
358def CXX17Compat : DiagGroup<"c++17-compat", [DeprecatedRegister,
359                                             DeprecatedIncrementBool,
360                                             CXX17CompatMangling,
361                                             CXXPre20Compat,
362                                             CXXPre2bCompat]>;
363def CXX17CompatPedantic : DiagGroup<"c++17-compat-pedantic",
364                                    [CXX17Compat,
365                                     CXXPre20CompatPedantic,
366                                     CXXPre2bCompatPedantic]>;
367def : DiagGroup<"c++1z-compat", [CXX17Compat]>;
368
369def CXX20Compat : DiagGroup<"c++20-compat", [CXXPre2bCompat]>;
370def CXX20CompatPedantic : DiagGroup<"c++20-compat-pedantic",
371                                    [CXX20Compat,
372                                     CXXPre2bCompatPedantic]>;
373def : DiagGroup<"c++2a-compat", [CXX20Compat]>;
374def : DiagGroup<"c++2a-compat-pedantic", [CXX20CompatPedantic]>;
375
376def ExitTimeDestructors : DiagGroup<"exit-time-destructors">;
377def FlexibleArrayExtensions : DiagGroup<"flexible-array-extensions">;
378def FourByteMultiChar : DiagGroup<"four-char-constants">;
379def GlobalConstructors : DiagGroup<"global-constructors">;
380def BitwiseConditionalParentheses: DiagGroup<"bitwise-conditional-parentheses">;
381def BitwiseOpParentheses: DiagGroup<"bitwise-op-parentheses">;
382def LogicalOpParentheses: DiagGroup<"logical-op-parentheses">;
383def LogicalNotParentheses: DiagGroup<"logical-not-parentheses">;
384def ShiftOpParentheses: DiagGroup<"shift-op-parentheses">;
385def OverloadedShiftOpParentheses: DiagGroup<"overloaded-shift-op-parentheses">;
386def DanglingElse: DiagGroup<"dangling-else">;
387def DanglingField : DiagGroup<"dangling-field">;
388def DanglingInitializerList : DiagGroup<"dangling-initializer-list">;
389def DanglingGsl : DiagGroup<"dangling-gsl">;
390def ReturnStackAddress : DiagGroup<"return-stack-address">;
391def Dangling : DiagGroup<"dangling", [DanglingField,
392                                      DanglingInitializerList,
393                                      DanglingGsl,
394                                      ReturnStackAddress]>;
395def DistributedObjectModifiers : DiagGroup<"distributed-object-modifiers">;
396def ExcessInitializers : DiagGroup<"excess-initializers">;
397def ExpansionToDefined : DiagGroup<"expansion-to-defined">;
398def FlagEnum : DiagGroup<"flag-enum">;
399def IncrementBool : DiagGroup<"increment-bool", [DeprecatedIncrementBool]>;
400def InfiniteRecursion : DiagGroup<"infinite-recursion">;
401def PureVirtualCallFromCtorDtor: DiagGroup<"call-to-pure-virtual-from-ctor-dtor">;
402def GNUImaginaryConstant : DiagGroup<"gnu-imaginary-constant">;
403def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">;
404def : DiagGroup<"import">;
405def GNUIncludeNext : DiagGroup<"gnu-include-next">;
406def IncompatibleMSStruct : DiagGroup<"incompatible-ms-struct">;
407def IncompatiblePointerTypesDiscardsQualifiers
408  : DiagGroup<"incompatible-pointer-types-discards-qualifiers">;
409def IncompatibleFunctionPointerTypes
410  : DiagGroup<"incompatible-function-pointer-types">;
411def IncompatiblePointerTypes
412  : DiagGroup<"incompatible-pointer-types",
413    [IncompatiblePointerTypesDiscardsQualifiers,
414     IncompatibleFunctionPointerTypes]>;
415def IncompleteUmbrella : DiagGroup<"incomplete-umbrella">;
416def IncompleteFrameworkModuleDeclaration
417  : DiagGroup<"incomplete-framework-module-declaration">;
418def NonModularIncludeInFrameworkModule
419  : DiagGroup<"non-modular-include-in-framework-module">;
420def NonModularIncludeInModule : DiagGroup<"non-modular-include-in-module",
421                                          [NonModularIncludeInFrameworkModule]>;
422def IncompleteModule : DiagGroup<"incomplete-module",
423    [IncompleteUmbrella, NonModularIncludeInModule]>;
424def PrivateModule : DiagGroup<"private-module">;
425
426def CXX11InlineNamespace : DiagGroup<"c++11-inline-namespace">;
427def InlineNamespaceReopenedNoninline
428    : DiagGroup<"inline-namespace-reopened-noninline">;
429def InvalidNoreturn : DiagGroup<"invalid-noreturn">;
430def InvalidSourceEncoding : DiagGroup<"invalid-source-encoding">;
431def KNRPromotedParameter : DiagGroup<"knr-promoted-parameter">;
432def : DiagGroup<"init-self">;
433def : DiagGroup<"inline">;
434def : DiagGroup<"invalid-pch">;
435def GNULabelsAsValue : DiagGroup<"gnu-label-as-value">;
436def LiteralRange : DiagGroup<"literal-range">;
437def LocalTypeTemplateArgs : DiagGroup<"local-type-template-args",
438                                      [CXX98CompatLocalTypeTemplateArgs]>;
439def RangeLoopConstruct : DiagGroup<"range-loop-construct">;
440def RangeLoopBindReference : DiagGroup<"range-loop-bind-reference">;
441def RangeLoopAnalysis : DiagGroup<"range-loop-analysis",
442                                  [RangeLoopConstruct, RangeLoopBindReference]>;
443def ForLoopAnalysis : DiagGroup<"for-loop-analysis">;
444def LoopAnalysis : DiagGroup<"loop-analysis", [ForLoopAnalysis,
445                                               RangeLoopAnalysis]>;
446def MalformedWarningCheck : DiagGroup<"malformed-warning-check">;
447def Main : DiagGroup<"main">;
448def MainReturnType : DiagGroup<"main-return-type">;
449def MaxUnsignedZero : DiagGroup<"max-unsigned-zero">;
450def MissingBraces : DiagGroup<"missing-braces">;
451def MissingDeclarations: DiagGroup<"missing-declarations">;
452def : DiagGroup<"missing-format-attribute">;
453def : DiagGroup<"missing-include-dirs">;
454def MissingNoreturn : DiagGroup<"missing-noreturn">;
455def MultiChar : DiagGroup<"multichar">;
456def : DiagGroup<"nested-externs">;
457def CXX11LongLong : DiagGroup<"c++11-long-long">;
458def LongLong : DiagGroup<"long-long", [CXX11LongLong]>;
459def ImplicitlyUnsignedLiteral : DiagGroup<"implicitly-unsigned-literal">;
460def MethodSignatures : DiagGroup<"method-signatures">;
461def MismatchedParameterTypes : DiagGroup<"mismatched-parameter-types">;
462def MismatchedReturnTypes : DiagGroup<"mismatched-return-types">;
463def MismatchedTags : DiagGroup<"mismatched-tags">;
464def MissingFieldInitializers : DiagGroup<"missing-field-initializers">;
465def ModuleBuild : DiagGroup<"module-build">;
466def ModuleImport : DiagGroup<"module-import">;
467def ModuleConflict : DiagGroup<"module-conflict">;
468def ModuleFileExtension : DiagGroup<"module-file-extension">;
469def RoundTripCC1Args : DiagGroup<"round-trip-cc1-args">;
470def NewlineEOF : DiagGroup<"newline-eof">;
471def Nullability : DiagGroup<"nullability">;
472def NullabilityDeclSpec : DiagGroup<"nullability-declspec">;
473def NullabilityInferredOnNestedType : DiagGroup<"nullability-inferred-on-nested-type">;
474def NullableToNonNullConversion : DiagGroup<"nullable-to-nonnull-conversion">;
475def NullabilityCompletenessOnArrays : DiagGroup<"nullability-completeness-on-arrays">;
476def NullabilityCompleteness : DiagGroup<"nullability-completeness",
477                                        [NullabilityCompletenessOnArrays]>;
478def NullArithmetic : DiagGroup<"null-arithmetic">;
479def NullCharacter : DiagGroup<"null-character">;
480def NullDereference : DiagGroup<"null-dereference">;
481def InitializerOverrides : DiagGroup<"initializer-overrides">;
482// For compatibility with GCC; -Woverride-init = -Winitializer-overrides
483def : DiagGroup<"override-init", [InitializerOverrides]>;
484def NonNull : DiagGroup<"nonnull">;
485def NonPODVarargs : DiagGroup<"non-pod-varargs">;
486def ClassVarargs : DiagGroup<"class-varargs", [NonPODVarargs]>;
487def : DiagGroup<"nonportable-cfstrings">;
488def NonVirtualDtor : DiagGroup<"non-virtual-dtor">;
489def NullPointerArithmetic : DiagGroup<"null-pointer-arithmetic">;
490def : DiagGroup<"effc++", [NonVirtualDtor]>;
491def OveralignedType : DiagGroup<"over-aligned">;
492def OldStyleCast : DiagGroup<"old-style-cast">;
493def : DiagGroup<"old-style-definition">;
494def OutOfLineDeclaration : DiagGroup<"out-of-line-declaration">;
495def : DiagGroup<"overflow">;
496def ForwardClassReceiver : DiagGroup<"receiver-forward-class">;
497def MethodAccess : DiagGroup<"objc-method-access">;
498def ObjCReceiver : DiagGroup<"receiver-expr">;
499def OperatorNewReturnsNull : DiagGroup<"new-returns-null">;
500def OverlengthStrings : DiagGroup<"overlength-strings">;
501def OverloadedVirtual : DiagGroup<"overloaded-virtual">;
502def PrivateExtern : DiagGroup<"private-extern">;
503def SelTypeCast : DiagGroup<"cast-of-sel-type">;
504def FunctionDefInObjCContainer : DiagGroup<"function-def-in-objc-container">;
505def BadFunctionCast : DiagGroup<"bad-function-cast">;
506def CastFunctionType : DiagGroup<"cast-function-type">;
507def ObjCPropertyImpl : DiagGroup<"objc-property-implementation">;
508def ObjCPropertyNoAttribute : DiagGroup<"objc-property-no-attribute">;
509def ObjCPropertyAssignOnObjectType : DiagGroup<"objc-property-assign-on-object-type">;
510def ObjCProtocolQualifiers : DiagGroup<"objc-protocol-qualifiers">;
511def ObjCMissingSuperCalls : DiagGroup<"objc-missing-super-calls">;
512def ObjCDesignatedInit : DiagGroup<"objc-designated-initializers">;
513def ObjCRetainBlockProperty : DiagGroup<"objc-noncopy-retain-block-property">;
514def ObjCReadonlyPropertyHasSetter : DiagGroup<"objc-readonly-with-setter-property">;
515def ObjCInvalidIBOutletProperty : DiagGroup<"invalid-iboutlet">;
516def ObjCRootClass : DiagGroup<"objc-root-class">;
517def ObjCPointerIntrospectPerformSelector : DiagGroup<"deprecated-objc-pointer-introspection-performSelector">;
518def ObjCPointerIntrospect : DiagGroup<"deprecated-objc-pointer-introspection", [ObjCPointerIntrospectPerformSelector]>;
519def ObjCMultipleMethodNames : DiagGroup<"objc-multiple-method-names">;
520def ObjCFlexibleArray : DiagGroup<"objc-flexible-array">;
521def ObjCBoxing : DiagGroup<"objc-boxing">;
522def CompletionHandler : DiagGroup<"completion-handler">;
523def CalledOnceParameter : DiagGroup<"called-once-parameter", [CompletionHandler]>;
524def OpenCLUnsupportedRGBA: DiagGroup<"opencl-unsupported-rgba">;
525def UnderalignedExceptionObject : DiagGroup<"underaligned-exception-object">;
526def DeprecatedObjCIsaUsage : DiagGroup<"deprecated-objc-isa-usage">;
527def ExplicitInitializeCall : DiagGroup<"explicit-initialize-call">;
528def Packed : DiagGroup<"packed">;
529def Padded : DiagGroup<"padded">;
530
531def PessimizingMove : DiagGroup<"pessimizing-move">;
532def ReturnStdMove : DiagGroup<"return-std-move">;
533
534def PointerArith : DiagGroup<"pointer-arith">;
535def PoundWarning : DiagGroup<"#warnings">;
536def PoundPragmaMessage : DiagGroup<"#pragma-messages">,
537                         DiagCategory<"#pragma message Directive">;
538def : DiagGroup<"redundant-decls">;
539def RedeclaredClassMember : DiagGroup<"redeclared-class-member">;
540def GNURedeclaredEnum : DiagGroup<"gnu-redeclared-enum">;
541def RedundantMove : DiagGroup<"redundant-move">;
542def Register : DiagGroup<"register", [DeprecatedRegister]>;
543def ReturnTypeCLinkage : DiagGroup<"return-type-c-linkage">;
544def ReturnType : DiagGroup<"return-type", [ReturnTypeCLinkage]>;
545def BindToTemporaryCopy : DiagGroup<"bind-to-temporary-copy",
546                                    [CXX98CompatBindToTemporaryCopy]>;
547def SelfAssignmentField : DiagGroup<"self-assign-field">;
548def SelfAssignmentOverloaded : DiagGroup<"self-assign-overloaded">;
549def SelfAssignment : DiagGroup<"self-assign", [SelfAssignmentOverloaded, SelfAssignmentField]>;
550def SelfMove : DiagGroup<"self-move">;
551def SemiBeforeMethodBody : DiagGroup<"semicolon-before-method-body">;
552def Sentinel : DiagGroup<"sentinel">;
553def MissingMethodReturnType : DiagGroup<"missing-method-return-type">;
554
555def ShadowField : DiagGroup<"shadow-field">;
556def ShadowFieldInConstructorModified : DiagGroup<"shadow-field-in-constructor-modified">;
557def ShadowFieldInConstructor : DiagGroup<"shadow-field-in-constructor",
558                                         [ShadowFieldInConstructorModified]>;
559def ShadowIvar : DiagGroup<"shadow-ivar">;
560def ShadowUncapturedLocal : DiagGroup<"shadow-uncaptured-local">;
561
562// -Wshadow-all is a catch-all for all shadowing. -Wshadow is just the
563// shadowing that we think is unsafe.
564def Shadow : DiagGroup<"shadow", [ShadowFieldInConstructorModified,
565                                  ShadowIvar]>;
566def ShadowAll : DiagGroup<"shadow-all", [Shadow, ShadowFieldInConstructor,
567                                         ShadowUncapturedLocal, ShadowField]>;
568
569def Shorten64To32 : DiagGroup<"shorten-64-to-32">;
570def : DiagGroup<"sign-promo">;
571def SignCompare : DiagGroup<"sign-compare">;
572def : DiagGroup<"switch-default">;
573def : DiagGroup<"synth">;
574def SizeofArrayArgument : DiagGroup<"sizeof-array-argument">;
575def SizeofArrayDecay : DiagGroup<"sizeof-array-decay">;
576def SizeofPointerMemaccess : DiagGroup<"sizeof-pointer-memaccess">;
577def MemsetTransposedArgs : DiagGroup<"memset-transposed-args">;
578def DynamicClassMemaccess : DiagGroup<"dynamic-class-memaccess">;
579def NonTrivialMemaccess : DiagGroup<"nontrivial-memaccess">;
580def SuspiciousBzero : DiagGroup<"suspicious-bzero">;
581def SuspiciousMemaccess : DiagGroup<"suspicious-memaccess",
582  [SizeofPointerMemaccess, DynamicClassMemaccess,
583   NonTrivialMemaccess, MemsetTransposedArgs, SuspiciousBzero]>;
584def StaticInInline : DiagGroup<"static-in-inline">;
585def StaticLocalInInline : DiagGroup<"static-local-in-inline">;
586def GNUStaticFloatInit : DiagGroup<"gnu-static-float-init">;
587def StaticFloatInit : DiagGroup<"static-float-init", [GNUStaticFloatInit]>;
588def GNUStatementExpression : DiagGroup<"gnu-statement-expression">;
589def StringConcatation : DiagGroup<"string-concatenation">;
590def StringCompare : DiagGroup<"string-compare">;
591def StringPlusInt : DiagGroup<"string-plus-int">;
592def StringPlusChar : DiagGroup<"string-plus-char">;
593def StrncatSize : DiagGroup<"strncat-size">;
594def SwiftNameAttribute : DiagGroup<"swift-name-attribute">;
595def IntInBoolContext : DiagGroup<"int-in-bool-context">;
596def TautologicalTypeLimitCompare : DiagGroup<"tautological-type-limit-compare">;
597def TautologicalUnsignedZeroCompare : DiagGroup<"tautological-unsigned-zero-compare">;
598def TautologicalUnsignedCharZeroCompare : DiagGroup<"tautological-unsigned-char-zero-compare">;
599def TautologicalUnsignedEnumZeroCompare : DiagGroup<"tautological-unsigned-enum-zero-compare">;
600// For compatibility with GCC. Tautological comparison warnings for constants
601// that are an extremal value of the type.
602def TypeLimits : DiagGroup<"type-limits", [TautologicalTypeLimitCompare,
603                                           TautologicalUnsignedZeroCompare,
604                                           TautologicalUnsignedCharZeroCompare,
605                                           TautologicalUnsignedEnumZeroCompare]>;
606// Additional tautological comparison warnings based on the expression, not
607// only on its type.
608def TautologicalValueRangeCompare : DiagGroup<"tautological-value-range-compare">;
609def TautologicalInRangeCompare : DiagGroup<"tautological-constant-in-range-compare",
610                                           [TypeLimits, TautologicalValueRangeCompare]>;
611def TautologicalOutOfRangeCompare : DiagGroup<"tautological-constant-out-of-range-compare">;
612def TautologicalConstantCompare : DiagGroup<"tautological-constant-compare",
613                                            [TautologicalOutOfRangeCompare]>;
614def TautologicalPointerCompare : DiagGroup<"tautological-pointer-compare">;
615def TautologicalOverlapCompare : DiagGroup<"tautological-overlap-compare">;
616def TautologicalBitwiseCompare : DiagGroup<"tautological-bitwise-compare">;
617def TautologicalUndefinedCompare : DiagGroup<"tautological-undefined-compare">;
618def TautologicalObjCBoolCompare : DiagGroup<"tautological-objc-bool-compare">;
619def TautologicalCompare : DiagGroup<"tautological-compare",
620                                    [TautologicalConstantCompare,
621                                     TautologicalPointerCompare,
622                                     TautologicalOverlapCompare,
623                                     TautologicalBitwiseCompare,
624                                     TautologicalUndefinedCompare,
625                                     TautologicalObjCBoolCompare]>;
626def HeaderHygiene : DiagGroup<"header-hygiene">;
627def DuplicateDeclSpecifier : DiagGroup<"duplicate-decl-specifier">;
628def CompareDistinctPointerType : DiagGroup<"compare-distinct-pointer-types">;
629def GNUUnionCast : DiagGroup<"gnu-union-cast">;
630def GNUVariableSizedTypeNotAtEnd : DiagGroup<"gnu-variable-sized-type-not-at-end">;
631def Varargs : DiagGroup<"varargs">;
632def XorUsedAsPow : DiagGroup<"xor-used-as-pow">;
633
634def Unsequenced : DiagGroup<"unsequenced">;
635// GCC name for -Wunsequenced
636def : DiagGroup<"sequence-point", [Unsequenced]>;
637
638// Preprocessor warnings.
639def AmbiguousMacro : DiagGroup<"ambiguous-macro">;
640def KeywordAsMacro : DiagGroup<"keyword-macro">;
641def ReservedIdAsMacro : DiagGroup<"reserved-macro-identifier">;
642def ReservedIdAsMacroAlias : DiagGroup<"reserved-id-macro", [ReservedIdAsMacro]>;
643
644// Just silence warnings about -Wstrict-aliasing for now.
645def : DiagGroup<"strict-aliasing=0">;
646def : DiagGroup<"strict-aliasing=1">;
647def : DiagGroup<"strict-aliasing=2">;
648def : DiagGroup<"strict-aliasing">;
649
650// Just silence warnings about -Wstrict-overflow for now.
651def : DiagGroup<"strict-overflow=0">;
652def : DiagGroup<"strict-overflow=1">;
653def : DiagGroup<"strict-overflow=2">;
654def : DiagGroup<"strict-overflow=3">;
655def : DiagGroup<"strict-overflow=4">;
656def : DiagGroup<"strict-overflow=5">;
657def : DiagGroup<"strict-overflow">;
658
659def InvalidOffsetof : DiagGroup<"invalid-offsetof">;
660def StrictSelector : DiagGroup<"strict-selector-match">;
661def MethodDuplicate : DiagGroup<"duplicate-method-match">;
662def ObjCCStringFormat : DiagGroup<"cstring-format-directive">;
663def CoveredSwitchDefault : DiagGroup<"covered-switch-default">;
664def SwitchBool     : DiagGroup<"switch-bool">;
665def SwitchEnum     : DiagGroup<"switch-enum">;
666def Switch         : DiagGroup<"switch">;
667def ImplicitFallthroughPerFunction :
668  DiagGroup<"implicit-fallthrough-per-function">;
669def ImplicitFallthrough  : DiagGroup<"implicit-fallthrough",
670                                     [ImplicitFallthroughPerFunction]>;
671def InvalidPPToken : DiagGroup<"invalid-pp-token">;
672def Trigraphs      : DiagGroup<"trigraphs">;
673
674def UndefinedReinterpretCast : DiagGroup<"undefined-reinterpret-cast">;
675def ReinterpretBaseClass : DiagGroup<"reinterpret-base-class">;
676def Unicode  : DiagGroup<"unicode">;
677def UninitializedMaybe : DiagGroup<"conditional-uninitialized">;
678def UninitializedSometimes : DiagGroup<"sometimes-uninitialized">;
679def UninitializedStaticSelfInit : DiagGroup<"static-self-init">;
680def UninitializedConstReference : DiagGroup<"uninitialized-const-reference">;
681def Uninitialized  : DiagGroup<"uninitialized", [UninitializedSometimes,
682                                                 UninitializedStaticSelfInit,
683                                                 UninitializedConstReference]>;
684def IgnoredPragmaIntrinsic : DiagGroup<"ignored-pragma-intrinsic">;
685// #pragma optimize is often used to avoid to work around MSVC codegen bugs or
686// to disable inlining. It's not completely clear what alternative to suggest
687// (#pragma clang optimize, noinline) so suggest nothing for now.
688def IgnoredPragmaOptimize : DiagGroup<"ignored-pragma-optimize">;
689def UnknownPragmas : DiagGroup<"unknown-pragmas">;
690def IgnoredPragmas : DiagGroup<"ignored-pragmas",
691    [IgnoredPragmaIntrinsic, IgnoredPragmaOptimize]>;
692def PragmaClangAttribute : DiagGroup<"pragma-clang-attribute">;
693def PragmaPackSuspiciousInclude : DiagGroup<"pragma-pack-suspicious-include">;
694def PragmaPack : DiagGroup<"pragma-pack", [PragmaPackSuspiciousInclude]>;
695def Pragmas : DiagGroup<"pragmas", [UnknownPragmas, IgnoredPragmas,
696                                    PragmaClangAttribute, PragmaPack]>;
697def UnknownWarningOption : DiagGroup<"unknown-warning-option">;
698def NSobjectAttribute : DiagGroup<"NSObject-attribute">;
699def NSConsumedMismatch : DiagGroup<"nsconsumed-mismatch">;
700def NSReturnsMismatch : DiagGroup<"nsreturns-mismatch">;
701
702def IndependentClassAttribute : DiagGroup<"IndependentClass-attribute">;
703def UnknownAttributes : DiagGroup<"unknown-attributes">;
704def IgnoredAttributes : DiagGroup<"ignored-attributes">;
705def Attributes : DiagGroup<"attributes", [UnknownAttributes,
706                                          IgnoredAttributes]>;
707def UnknownSanitizers : DiagGroup<"unknown-sanitizers">;
708def UnnamedTypeTemplateArgs : DiagGroup<"unnamed-type-template-args",
709                                        [CXX98CompatUnnamedTypeTemplateArgs]>;
710def UnsupportedFriend : DiagGroup<"unsupported-friend">;
711def UnusedArgument : DiagGroup<"unused-argument">;
712def UnusedCommandLineArgument : DiagGroup<"unused-command-line-argument">;
713def IgnoredOptimizationArgument : DiagGroup<"ignored-optimization-argument">;
714def InvalidCommandLineArgument : DiagGroup<"invalid-command-line-argument",
715                                           [IgnoredOptimizationArgument]>;
716def UnusedComparison : DiagGroup<"unused-comparison">;
717def UnusedExceptionParameter : DiagGroup<"unused-exception-parameter">;
718def UnneededInternalDecl : DiagGroup<"unneeded-internal-declaration">;
719def UnneededMemberFunction : DiagGroup<"unneeded-member-function">;
720def UnusedPrivateField : DiagGroup<"unused-private-field">;
721def UnusedFunction : DiagGroup<"unused-function", [UnneededInternalDecl]>;
722def UnusedTemplate : DiagGroup<"unused-template", [UnneededInternalDecl]>;
723def UnusedMemberFunction : DiagGroup<"unused-member-function",
724                                     [UnneededMemberFunction]>;
725def UnusedLabel : DiagGroup<"unused-label">;
726def UnusedLambdaCapture : DiagGroup<"unused-lambda-capture">;
727def UnusedParameter : DiagGroup<"unused-parameter">;
728def UnusedResult : DiagGroup<"unused-result">;
729def PotentiallyEvaluatedExpression : DiagGroup<"potentially-evaluated-expression">;
730def UnevaluatedExpression : DiagGroup<"unevaluated-expression",
731                                      [PotentiallyEvaluatedExpression]>;
732def UnusedValue : DiagGroup<"unused-value", [UnusedComparison, UnusedResult,
733                                             UnevaluatedExpression]>;
734def UnusedConstVariable : DiagGroup<"unused-const-variable">;
735def UnusedVariable : DiagGroup<"unused-variable",
736                               [UnusedConstVariable]>;
737def UnusedLocalTypedef : DiagGroup<"unused-local-typedef">;
738def UnusedPropertyIvar :  DiagGroup<"unused-property-ivar">;
739def UnusedGetterReturnValue : DiagGroup<"unused-getter-return-value">;
740def UsedButMarkedUnused : DiagGroup<"used-but-marked-unused">;
741def UserDefinedLiterals : DiagGroup<"user-defined-literals">;
742def UserDefinedWarnings : DiagGroup<"user-defined-warnings">;
743def ReorderCtor : DiagGroup<"reorder-ctor">;
744def ReorderInitList : DiagGroup<"reorder-init-list">;
745def Reorder : DiagGroup<"reorder", [ReorderCtor, ReorderInitList]>;
746def UndeclaredSelector : DiagGroup<"undeclared-selector">;
747def ImplicitAtomic : DiagGroup<"implicit-atomic-properties">;
748def AtomicAlignment : DiagGroup<"atomic-alignment">;
749def CustomAtomic : DiagGroup<"custom-atomic-properties">;
750def AtomicProperties : DiagGroup<"atomic-properties",
751                                 [ImplicitAtomic, CustomAtomic]>;
752def ARCUnsafeRetainedAssign : DiagGroup<"arc-unsafe-retained-assign">;
753def ARCRetainCycles : DiagGroup<"arc-retain-cycles">;
754def ARCNonPodMemAccess : DiagGroup<"arc-non-pod-memaccess">;
755def AutomaticReferenceCounting : DiagGroup<"arc",
756                                           [ARCUnsafeRetainedAssign,
757                                            ARCRetainCycles,
758                                            ARCNonPodMemAccess]>;
759def ARCRepeatedUseOfWeakMaybe : DiagGroup<"arc-maybe-repeated-use-of-weak">;
760def ARCRepeatedUseOfWeak : DiagGroup<"arc-repeated-use-of-weak",
761                                     [ARCRepeatedUseOfWeakMaybe]>;
762def BlockCaptureAutoReleasing : DiagGroup<"block-capture-autoreleasing">;
763def ObjCBridge : DiagGroup<"bridge-cast">;
764
765def DeallocInCategory:DiagGroup<"dealloc-in-category">;
766def SelectorTypeMismatch : DiagGroup<"selector-type-mismatch">;
767def Selector : DiagGroup<"selector", [SelectorTypeMismatch]>;
768def Protocol : DiagGroup<"protocol">;
769// No longer in use, preserve for backwards compatibility.
770def : DiagGroup<"at-protocol">;
771def PropertyAccessDotSyntax: DiagGroup<"property-access-dot-syntax">;
772def PropertyAttr : DiagGroup<"property-attribute-mismatch">;
773def SuperSubClassMismatch : DiagGroup<"super-class-method-mismatch">;
774def OverridingMethodMismatch : DiagGroup<"overriding-method-mismatch">;
775def VariadicMacros : DiagGroup<"variadic-macros">;
776def VectorConversion : DiagGroup<"vector-conversion">;      // clang specific
777def VexingParse : DiagGroup<"vexing-parse">;
778def VLAExtension : DiagGroup<"vla-extension">;
779def VLA : DiagGroup<"vla", [VLAExtension]>;
780def VolatileRegisterVar : DiagGroup<"volatile-register-var">;
781def Visibility : DiagGroup<"visibility">;
782def ZeroLengthArray : DiagGroup<"zero-length-array">;
783def GNUZeroLineDirective : DiagGroup<"gnu-zero-line-directive">;
784def GNUZeroVariadicMacroArguments : DiagGroup<"gnu-zero-variadic-macro-arguments">;
785def MisleadingIndentation : DiagGroup<"misleading-indentation">;
786
787// This covers both the deprecated case (in C++98)
788// and the extension case (in C++11 onwards).
789def WritableStrings : DiagGroup<"writable-strings", [DeprecatedWritableStr]>;
790
791// GCC calls -Wdeprecated-writable-strings -Wwrite-strings.
792//
793// Bizarrely, this warning flag enables -fconst-strings in C. This is
794// GCC-compatible, but really weird.
795//
796// FIXME: Should this affect C++11 (where this is an error,
797//        not just deprecated) or not?
798def GCCWriteStrings : DiagGroup<"write-strings" , [WritableStrings]>;
799
800def CharSubscript : DiagGroup<"char-subscripts">;
801def LargeByValueCopy : DiagGroup<"large-by-value-copy">;
802def DuplicateArgDecl : DiagGroup<"duplicate-method-arg">;
803def SignedEnumBitfield : DiagGroup<"signed-enum-bitfield">;
804
805def ReservedIdentifier : DiagGroup<"reserved-identifier",
806    [ReservedIdAsMacro]>;
807
808// Unreachable code warning groups.
809//
810//  The goal is make -Wunreachable-code on by default, in -Wall, or at
811//  least actively used, with more noisy versions of the warning covered
812//  under separate flags.
813//
814def UnreachableCodeLoopIncrement : DiagGroup<"unreachable-code-loop-increment">;
815def UnreachableCode : DiagGroup<"unreachable-code",
816                                [UnreachableCodeLoopIncrement]>;
817def UnreachableCodeBreak : DiagGroup<"unreachable-code-break">;
818def UnreachableCodeReturn : DiagGroup<"unreachable-code-return">;
819def UnreachableCodeAggressive : DiagGroup<"unreachable-code-aggressive",
820                                    [UnreachableCode,
821                                     UnreachableCodeBreak,
822                                     UnreachableCodeReturn]>;
823
824// Aggregation warning settings.
825
826// Populate -Waddress with warnings from other groups.
827def : DiagGroup<"address", [PointerBoolConversion,
828                            StringCompare,
829                            TautologicalPointerCompare]>;
830
831// -Widiomatic-parentheses contains warnings about 'idiomatic'
832// missing parentheses;  it is off by default.  We do not include it
833// in -Wparentheses because most users who use -Wparentheses explicitly
834// do not want these warnings.
835def ParenthesesOnEquality : DiagGroup<"parentheses-equality">;
836def Parentheses : DiagGroup<"parentheses",
837                            [LogicalOpParentheses,
838                             LogicalNotParentheses,
839                             BitwiseConditionalParentheses,
840                             BitwiseOpParentheses,
841                             ShiftOpParentheses,
842                             OverloadedShiftOpParentheses,
843                             ParenthesesOnEquality,
844                             DanglingElse]>;
845
846// -Wconversion has its own warnings, but we split a few out for
847// legacy reasons:
848//   - some people want just 64-to-32 warnings
849//   - conversion warnings with constant sources are on by default
850//   - conversion warnings for literals are on by default
851//   - bool-to-pointer conversion warnings are on by default
852//   - __null-to-integer conversion warnings are on by default
853def Conversion : DiagGroup<"conversion",
854                           [BoolConversion,
855                            ConstantConversion,
856                            EnumConversion,
857                            BitFieldEnumConversion,
858                            FloatConversion,
859                            Shorten64To32,
860                            IntConversion,
861                            ImplicitIntConversion,
862                            ImplicitFloatConversion,
863                            LiteralConversion,
864                            NonLiteralNullConversion, // (1-1)->pointer (etc)
865                            NullConversion, // NULL->non-pointer
866                            ObjCLiteralConversion,
867                            SignConversion,
868                            StringConversion]>,
869                 DiagCategory<"Value Conversion Issue">;
870
871def Unused : DiagGroup<"unused",
872                       [UnusedArgument, UnusedFunction, UnusedLabel,
873                        // UnusedParameter, (matches GCC's behavior)
874                        // UnusedTemplate, (clean-up libc++ before enabling)
875                        // UnusedMemberFunction, (clean-up llvm before enabling)
876                        UnusedPrivateField, UnusedLambdaCapture,
877                        UnusedLocalTypedef, UnusedValue, UnusedVariable,
878                        UnusedPropertyIvar]>,
879                        DiagCategory<"Unused Entity Issue">;
880
881// Format settings.
882def FormatInvalidSpecifier : DiagGroup<"format-invalid-specifier">;
883def FormatSecurity : DiagGroup<"format-security">;
884def FormatNonStandard : DiagGroup<"format-non-iso">;
885def FormatY2K : DiagGroup<"format-y2k">;
886def FormatPedantic : DiagGroup<"format-pedantic">;
887def FormatTypeConfusion : DiagGroup<"format-type-confusion">;
888def Format : DiagGroup<"format",
889                       [FormatExtraArgs, FormatZeroLength, NonNull,
890                        FormatSecurity, FormatY2K, FormatInvalidSpecifier,
891                        FormatInsufficientArgs]>,
892             DiagCategory<"Format String Issue">;
893def FormatNonLiteral : DiagGroup<"format-nonliteral">;
894def Format2 : DiagGroup<"format=2",
895                        [FormatNonLiteral, FormatSecurity, FormatY2K]>;
896
897def TypeSafety : DiagGroup<"type-safety">;
898
899def IncompatibleExceptionSpec : DiagGroup<"incompatible-exception-spec">;
900
901def IntToVoidPointerCast : DiagGroup<"int-to-void-pointer-cast">;
902def IntToPointerCast : DiagGroup<"int-to-pointer-cast",
903                                 [IntToVoidPointerCast]>;
904def VoidPointerToEnumCast : DiagGroup<"void-pointer-to-enum-cast">;
905def VoidPointerToIntCast : DiagGroup<"void-pointer-to-int-cast",
906                                     [VoidPointerToEnumCast]>;
907def PointerToEnumCast : DiagGroup<"pointer-to-enum-cast",
908                                  [VoidPointerToEnumCast]>;
909def PointerToIntCast : DiagGroup<"pointer-to-int-cast",
910                                 [PointerToEnumCast, VoidPointerToIntCast]>;
911
912def FUseLdPath : DiagGroup<"fuse-ld-path">;
913
914def Move : DiagGroup<"move", [
915    PessimizingMove,
916    RedundantMove,
917    ReturnStdMove,
918    SelfMove
919  ]>;
920
921def Extra : DiagGroup<"extra", [
922    DeprecatedCopy,
923    MissingFieldInitializers,
924    IgnoredQualifiers,
925    InitializerOverrides,
926    SemiBeforeMethodBody,
927    MissingMethodReturnType,
928    SignCompare,
929    UnusedParameter,
930    NullPointerArithmetic,
931    EmptyInitStatement,
932    StringConcatation,
933    FUseLdPath,
934  ]>;
935
936def Most : DiagGroup<"most", [
937    CharSubscript,
938    Comment,
939    DeleteNonVirtualDtor,
940    Format,
941    ForLoopAnalysis,
942    FrameAddress,
943    Implicit,
944    InfiniteRecursion,
945    IntInBoolContext,
946    MismatchedTags,
947    MissingBraces,
948    Move,
949    MultiChar,
950    RangeLoopConstruct,
951    Reorder,
952    ReturnType,
953    SelfAssignment,
954    SelfMove,
955    SizeofArrayArgument,
956    SizeofArrayDecay,
957    StringPlusInt,
958    TautologicalCompare,
959    Trigraphs,
960    Uninitialized,
961    UnknownPragmas,
962    Unused,
963    VolatileRegisterVar,
964    ObjCMissingSuperCalls,
965    ObjCDesignatedInit,
966    ObjCFlexibleArray,
967    OverloadedVirtual,
968    PrivateExtern,
969    SelTypeCast,
970    ExternCCompat,
971    UserDefinedWarnings
972 ]>;
973
974// Thread Safety warnings
975def ThreadSafetyAttributes : DiagGroup<"thread-safety-attributes">;
976def ThreadSafetyAnalysis   : DiagGroup<"thread-safety-analysis">;
977def ThreadSafetyPrecise    : DiagGroup<"thread-safety-precise">;
978def ThreadSafetyReference  : DiagGroup<"thread-safety-reference">;
979def ThreadSafetyNegative   : DiagGroup<"thread-safety-negative">;
980def ThreadSafety : DiagGroup<"thread-safety",
981                             [ThreadSafetyAttributes,
982                              ThreadSafetyAnalysis,
983                              ThreadSafetyPrecise,
984                              ThreadSafetyReference]>;
985def ThreadSafetyVerbose : DiagGroup<"thread-safety-verbose">;
986def ThreadSafetyBeta : DiagGroup<"thread-safety-beta">;
987
988// Uniqueness Analysis warnings
989def Consumed       : DiagGroup<"consumed">;
990
991// Note that putting warnings in -Wall will not disable them by default. If a
992// warning should be active _only_ when -Wall is passed in, mark it as
993// DefaultIgnore in addition to putting it here.
994def All : DiagGroup<"all", [Most, Parentheses, Switch, SwitchBool,
995                            MisleadingIndentation]>;
996
997// Warnings that should be in clang-cl /w4.
998def : DiagGroup<"CL4", [All, Extra]>;
999
1000// Warnings enabled by -pedantic.  This is magically filled in by TableGen.
1001def Pedantic : DiagGroup<"pedantic">;
1002
1003// Aliases.
1004def : DiagGroup<"", [Extra]>;                   // -W = -Wextra
1005def : DiagGroup<"endif-labels", [ExtraTokens]>; // -Wendif-labels=-Wextra-tokens
1006def : DiagGroup<"cpp", [PoundWarning]>;         // -Wcpp = -W#warnings
1007def : DiagGroup<"comments", [Comment]>;         // -Wcomments = -Wcomment
1008def : DiagGroup<"conversion-null",
1009                [NullConversion]>; // -Wconversion-null = -Wnull-conversion
1010def : DiagGroup<"bool-conversions",
1011                [BoolConversion]>; // -Wbool-conversions  = -Wbool-conversion
1012def : DiagGroup<"int-conversions",
1013                [IntConversion]>; // -Wint-conversions = -Wint-conversion
1014def : DiagGroup<"vector-conversions",
1015                [VectorConversion]>; // -Wvector-conversions = -Wvector-conversion
1016def : DiagGroup<"unused-local-typedefs", [UnusedLocalTypedef]>;
1017                // -Wunused-local-typedefs = -Wunused-local-typedef
1018
1019// A warning group for warnings that we want to have on by default in clang,
1020// but which aren't on by default in GCC.
1021def NonGCC : DiagGroup<"non-gcc",
1022    [SignCompare, Conversion, LiteralRange]>;
1023
1024// A warning group for warnings about using C++11 features as extensions in
1025// earlier C++ versions.
1026def CXX11 : DiagGroup<"c++11-extensions", [CXX11ExtraSemi, CXX11InlineNamespace,
1027                                           CXX11LongLong]>;
1028
1029// A warning group for warnings about using C++14 features as extensions in
1030// earlier C++ versions.
1031def CXX14 : DiagGroup<"c++14-extensions", [CXX14BinaryLiteral]>;
1032
1033// A warning group for warnings about using C++17 features as extensions in
1034// earlier C++ versions.
1035def CXX17 : DiagGroup<"c++17-extensions">;
1036
1037// A warning group for warnings about using C++20 features as extensions in
1038// earlier C++ versions.
1039def CXX20 : DiagGroup<"c++20-extensions", [CXX20Designator]>;
1040
1041// A warning group for warnings about using C++2b features as extensions in
1042// earlier C++ versions.
1043def CXX2b : DiagGroup<"c++2b-extensions">;
1044
1045def : DiagGroup<"c++0x-extensions", [CXX11]>;
1046def : DiagGroup<"c++1y-extensions", [CXX14]>;
1047def : DiagGroup<"c++1z-extensions", [CXX17]>;
1048def : DiagGroup<"c++2a-extensions", [CXX20]>;
1049
1050def DelegatingCtorCycles :
1051  DiagGroup<"delegating-ctor-cycles">;
1052
1053// A warning group for warnings about using C11 features as extensions.
1054def C11 : DiagGroup<"c11-extensions">;
1055
1056// A warning group for warnings about using C99 features as extensions.
1057def C99 : DiagGroup<"c99-extensions", [C99Designator]>;
1058
1059// A warning group for warnings about using C2x features as extensions.
1060def C2x : DiagGroup<"c2x-extensions">;
1061
1062// A warning group for warnings about GCC extensions.
1063def GNU : DiagGroup<"gnu", [GNUAlignofExpression, GNUAnonymousStruct,
1064                            GNUAutoType,
1065                            GNUBinaryLiteral, GNUCaseRange,
1066                            GNUComplexInteger, GNUCompoundLiteralInitializer,
1067                            GNUConditionalOmittedOperand, GNUDesignator,
1068                            GNUEmptyInitializer, GNUEmptyStruct,
1069                            VLAExtension, GNUFlexibleArrayInitializer,
1070                            GNUFlexibleArrayUnionMember, GNUFoldingConstant,
1071                            GNUImaginaryConstant, GNUIncludeNext,
1072                            GNULabelsAsValue,
1073                            RedeclaredClassMember, GNURedeclaredEnum,
1074                            GNUStatementExpression, GNUStaticFloatInit,
1075                            GNUStringLiteralOperatorTemplate,
1076                            GNUUnionCast, GNUVariableSizedTypeNotAtEnd,
1077                            ZeroLengthArray, GNUZeroLineDirective,
1078                            GNUZeroVariadicMacroArguments]>;
1079// A warning group for warnings about code that clang accepts but gcc doesn't.
1080def GccCompat : DiagGroup<"gcc-compat">;
1081
1082// Warnings for Microsoft extensions.
1083def MicrosoftCharize : DiagGroup<"microsoft-charize">;
1084def MicrosoftDrectveSection : DiagGroup<"microsoft-drectve-section">;
1085def MicrosoftInclude : DiagGroup<"microsoft-include">;
1086def MicrosoftCppMacro : DiagGroup<"microsoft-cpp-macro">;
1087def MicrosoftFixedEnum : DiagGroup<"microsoft-fixed-enum">;
1088def MicrosoftSealed : DiagGroup<"microsoft-sealed">;
1089def MicrosoftUnqualifiedFriend : DiagGroup<"microsoft-unqualified-friend">;
1090def MicrosoftExceptionSpec : DiagGroup<"microsoft-exception-spec">;
1091def MicrosoftUsingDecl : DiagGroup<"microsoft-using-decl">;
1092def MicrosoftMutableReference : DiagGroup<"microsoft-mutable-reference">;
1093def MicrosoftPureDefinition : DiagGroup<"microsoft-pure-definition">;
1094def MicrosoftUnionMemberReference : DiagGroup<
1095    "microsoft-union-member-reference">;
1096def MicrosoftExplicitConstructorCall : DiagGroup<
1097    "microsoft-explicit-constructor-call">;
1098def MicrosoftEnumValue : DiagGroup<"microsoft-enum-value">;
1099def MicrosoftDefaultArgRedefinition :
1100    DiagGroup<"microsoft-default-arg-redefinition">;
1101def MicrosoftTemplateShadow : DiagGroup<"microsoft-template-shadow">;
1102def MicrosoftTemplate : DiagGroup<"microsoft-template", [MicrosoftTemplateShadow]>;
1103def MicrosoftInconsistentDllImport : DiagGroup<"inconsistent-dllimport">;
1104def MicrosoftRedeclareStatic : DiagGroup<"microsoft-redeclare-static">;
1105def MicrosoftEnumForwardReference :
1106    DiagGroup<"microsoft-enum-forward-reference">;
1107def MicrosoftGoto : DiagGroup<"microsoft-goto">;
1108def MicrosoftFlexibleArray : DiagGroup<"microsoft-flexible-array">;
1109def MicrosoftExtraQualification : DiagGroup<"microsoft-extra-qualification">;
1110def MicrosoftCast : DiagGroup<"microsoft-cast">;
1111def MicrosoftConstInit : DiagGroup<"microsoft-const-init">;
1112def MicrosoftVoidPseudoDtor : DiagGroup<"microsoft-void-pseudo-dtor">;
1113def MicrosoftAnonTag : DiagGroup<"microsoft-anon-tag">;
1114def MicrosoftCommentPaste : DiagGroup<"microsoft-comment-paste">;
1115def MicrosoftEndOfFile : DiagGroup<"microsoft-end-of-file">;
1116def MicrosoftInaccessibleBase : DiagGroup<"microsoft-inaccessible-base">;
1117def MicrosoftStaticAssert : DiagGroup<"microsoft-static-assert">;
1118
1119// Aliases.
1120def : DiagGroup<"msvc-include", [MicrosoftInclude]>;
1121                // -Wmsvc-include = -Wmicrosoft-include
1122
1123// Warnings group for warnings about Microsoft extensions.
1124def Microsoft : DiagGroup<"microsoft",
1125    [MicrosoftCharize, MicrosoftDrectveSection, MicrosoftInclude,
1126     MicrosoftCppMacro, MicrosoftFixedEnum, MicrosoftSealed,
1127     MicrosoftUnqualifiedFriend, MicrosoftExceptionSpec, MicrosoftUsingDecl,
1128     MicrosoftMutableReference, MicrosoftPureDefinition,
1129     MicrosoftUnionMemberReference, MicrosoftExplicitConstructorCall,
1130     MicrosoftEnumValue, MicrosoftDefaultArgRedefinition, MicrosoftTemplate,
1131     MicrosoftRedeclareStatic, MicrosoftEnumForwardReference, MicrosoftGoto,
1132     MicrosoftFlexibleArray, MicrosoftExtraQualification, MicrosoftCast,
1133     MicrosoftConstInit, MicrosoftVoidPseudoDtor, MicrosoftAnonTag,
1134     MicrosoftCommentPaste, MicrosoftEndOfFile, MicrosoftStaticAssert,
1135     MicrosoftInconsistentDllImport]>;
1136
1137def ClangClPch : DiagGroup<"clang-cl-pch">;
1138
1139def ObjCNonUnifiedException : DiagGroup<"objc-nonunified-exceptions">;
1140
1141def ObjCProtocolMethodImpl : DiagGroup<"objc-protocol-method-implementation">;
1142
1143def ObjCNoPropertyAutoSynthesis : DiagGroup<"objc-property-synthesis">;
1144
1145// ObjC API warning groups.
1146def ObjCRedundantLiteralUse : DiagGroup<"objc-redundant-literal-use">;
1147def ObjCRedundantAPIUse : DiagGroup<"objc-redundant-api-use", [
1148    ObjCRedundantLiteralUse
1149  ]>;
1150
1151def ObjCCocoaAPI : DiagGroup<"objc-cocoa-api", [
1152    ObjCRedundantAPIUse
1153  ]>;
1154
1155def ObjCStringComparison : DiagGroup<"objc-string-compare">;
1156def ObjCStringConcatenation : DiagGroup<"objc-string-concatenation">;
1157def ObjCLiteralComparison : DiagGroup<"objc-literal-compare", [
1158    ObjCStringComparison
1159  ]>;
1160
1161def ObjCSignedCharBool : DiagGroup<"objc-signed-char-bool",
1162  [ObjCSignedCharBoolImplicitIntConversion,
1163   ObjCSignedCharBoolImplicitFloatConversion,
1164   ObjCBoolConstantConversion,
1165   TautologicalObjCBoolCompare]>;
1166
1167def ObjCPotentiallyDirectSelector : DiagGroup<"potentially-direct-selector">;
1168def ObjCStrictPotentiallyDirectSelector :
1169  DiagGroup<"strict-potentially-direct-selector",
1170            [ObjCPotentiallyDirectSelector]>;
1171
1172// Inline ASM warnings.
1173def ASMOperandWidths : DiagGroup<"asm-operand-widths">;
1174def ASM : DiagGroup<"asm", [
1175    ASMOperandWidths
1176  ]>;
1177
1178// OpenMP warnings.
1179def SourceUsesOpenMP : DiagGroup<"source-uses-openmp">;
1180def OpenMPClauses : DiagGroup<"openmp-clauses">;
1181def OpenMPLoopForm : DiagGroup<"openmp-loop-form">;
1182def OpenMPMapping : DiagGroup<"openmp-mapping">;
1183def OpenMPTarget : DiagGroup<"openmp-target", [OpenMPMapping]>;
1184def OpenMP : DiagGroup<"openmp", [
1185    SourceUsesOpenMP, OpenMPClauses, OpenMPLoopForm, OpenMPTarget, OpenMPMapping
1186  ]>;
1187
1188// Backend warnings.
1189def BackendInlineAsm : DiagGroup<"inline-asm">;
1190def BackendSourceMgr : DiagGroup<"source-mgr">;
1191def BackendFrameLargerThanEQ : DiagGroup<"frame-larger-than=">;
1192def BackendPlugin : DiagGroup<"backend-plugin">;
1193def RemarkBackendPlugin : DiagGroup<"remark-backend-plugin">;
1194def BackendOptimizationRemark : DiagGroup<"pass">;
1195def BackendOptimizationRemarkMissed : DiagGroup<"pass-missed">;
1196def BackendOptimizationRemarkAnalysis : DiagGroup<"pass-analysis">;
1197def BackendOptimizationFailure : DiagGroup<"pass-failed">;
1198
1199// Instrumentation based profiling warnings.
1200def ProfileInstrMissing : DiagGroup<"profile-instr-missing">;
1201def ProfileInstrOutOfDate : DiagGroup<"profile-instr-out-of-date">;
1202def ProfileInstrUnprofiled : DiagGroup<"profile-instr-unprofiled">;
1203
1204// AddressSanitizer frontend instrumentation remarks.
1205def SanitizeAddressRemarks : DiagGroup<"sanitize-address">;
1206
1207// Issues with serialized diagnostics.
1208def SerializedDiagnostics : DiagGroup<"serialized-diagnostics">;
1209
1210// A warning group for warnings about code that clang accepts when
1211// compiling CUDA C/C++ but which is not compatible with the CUDA spec.
1212def CudaCompat : DiagGroup<"cuda-compat">;
1213
1214// Warning about unknown CUDA SDK version.
1215def CudaUnknownVersion: DiagGroup<"unknown-cuda-version">;
1216
1217// A warning group for warnings about features supported by HIP but
1218// ignored by CUDA.
1219def HIPOnly : DiagGroup<"hip-only">;
1220
1221// Warnings which cause linking of the runtime libraries like
1222// libc and the CRT to be skipped.
1223def AVRRtlibLinkingQuirks : DiagGroup<"avr-rtlib-linking-quirks">;
1224
1225// A warning group for things that will change semantics in the future.
1226def FutureCompat : DiagGroup<"future-compat">;
1227
1228def InvalidOrNonExistentDirectory : DiagGroup<"invalid-or-nonexistent-directory">;
1229
1230def OptionIgnored : DiagGroup<"option-ignored">;
1231
1232def UnknownArgument : DiagGroup<"unknown-argument">;
1233
1234// A warning group for warnings about code that clang accepts when
1235// compiling OpenCL C/C++ but which is not compatible with the SPIR spec.
1236def SpirCompat : DiagGroup<"spir-compat">;
1237
1238// Warning for the GlobalISel options.
1239def GlobalISel : DiagGroup<"global-isel">;
1240
1241// A warning group specifically for warnings related to function
1242// multiversioning.
1243def FunctionMultiVersioning : DiagGroup<"function-multiversion">;
1244
1245def NoDeref : DiagGroup<"noderef">;
1246
1247// A group for cross translation unit static analysis related warnings.
1248def CrossTU : DiagGroup<"ctu">;
1249
1250def CTADMaybeUnsupported : DiagGroup<"ctad-maybe-unsupported">;
1251
1252def FortifySource : DiagGroup<"fortify-source">;
1253
1254def MaxTokens : DiagGroup<"max-tokens"> {
1255  code Documentation = [{
1256The warning is issued if the number of pre-processor tokens exceeds
1257the token limit, which can be set in three ways:
1258
12591. As a limit at a specific point in a file, using the ``clang max_tokens_here``
1260   pragma:
1261
1262   .. code-block: c++
1263      #pragma clang max_tokens_here 1234
1264
12652. As a per-translation unit limit, using the ``-fmax-tokens=`` command-line
1266   flag:
1267
1268   .. code-block: console
1269      clang -c a.cpp -fmax-tokens=1234
1270
12713. As a per-translation unit limit using the ``clang max_tokens_total`` pragma,
1272   which works like and overrides the ``-fmax-tokens=`` flag:
1273
1274   .. code-block: c++
1275      #pragma clang max_tokens_total 1234
1276
1277These limits can be helpful in limiting code growth through included files.
1278
1279Setting a token limit of zero means no limit.
1280
1281Note that the warning is disabled by default, so -Wmax-tokens must be used
1282in addition with the pragmas or -fmax-tokens flag to get any warnings.
1283}];
1284}
1285
1286def WebAssemblyExceptionSpec : DiagGroup<"wasm-exception-spec">;
1287
1288def RTTI : DiagGroup<"rtti">;
1289
1290def OpenCLCoreFeaturesDiagGroup : DiagGroup<"pedantic-core-features">;
1291