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 NullPointerSubtraction : DiagGroup<"null-pointer-subtraction">;
491def : DiagGroup<"effc++", [NonVirtualDtor]>;
492def OveralignedType : DiagGroup<"over-aligned">;
493def OldStyleCast : DiagGroup<"old-style-cast">;
494def : DiagGroup<"old-style-definition">;
495def OutOfLineDeclaration : DiagGroup<"out-of-line-declaration">;
496def : DiagGroup<"overflow">;
497def ForwardClassReceiver : DiagGroup<"receiver-forward-class">;
498def MethodAccess : DiagGroup<"objc-method-access">;
499def ObjCReceiver : DiagGroup<"receiver-expr">;
500def OperatorNewReturnsNull : DiagGroup<"new-returns-null">;
501def OverlengthStrings : DiagGroup<"overlength-strings">;
502def OverloadedVirtual : DiagGroup<"overloaded-virtual">;
503def PrivateExtern : DiagGroup<"private-extern">;
504def SelTypeCast : DiagGroup<"cast-of-sel-type">;
505def FunctionDefInObjCContainer : DiagGroup<"function-def-in-objc-container">;
506def BadFunctionCast : DiagGroup<"bad-function-cast">;
507def CastFunctionType : DiagGroup<"cast-function-type">;
508def ObjCPropertyImpl : DiagGroup<"objc-property-implementation">;
509def ObjCPropertyNoAttribute : DiagGroup<"objc-property-no-attribute">;
510def ObjCPropertyAssignOnObjectType : DiagGroup<"objc-property-assign-on-object-type">;
511def ObjCProtocolQualifiers : DiagGroup<"objc-protocol-qualifiers">;
512def ObjCMissingSuperCalls : DiagGroup<"objc-missing-super-calls">;
513def ObjCDesignatedInit : DiagGroup<"objc-designated-initializers">;
514def ObjCRetainBlockProperty : DiagGroup<"objc-noncopy-retain-block-property">;
515def ObjCReadonlyPropertyHasSetter : DiagGroup<"objc-readonly-with-setter-property">;
516def ObjCInvalidIBOutletProperty : DiagGroup<"invalid-iboutlet">;
517def ObjCRootClass : DiagGroup<"objc-root-class">;
518def ObjCPointerIntrospectPerformSelector : DiagGroup<"deprecated-objc-pointer-introspection-performSelector">;
519def ObjCPointerIntrospect : DiagGroup<"deprecated-objc-pointer-introspection", [ObjCPointerIntrospectPerformSelector]>;
520def ObjCMultipleMethodNames : DiagGroup<"objc-multiple-method-names">;
521def ObjCFlexibleArray : DiagGroup<"objc-flexible-array">;
522def ObjCBoxing : DiagGroup<"objc-boxing">;
523def CompletionHandler : DiagGroup<"completion-handler">;
524def CalledOnceParameter : DiagGroup<"called-once-parameter", [CompletionHandler]>;
525def OpenCLUnsupportedRGBA: DiagGroup<"opencl-unsupported-rgba">;
526def UnderalignedExceptionObject : DiagGroup<"underaligned-exception-object">;
527def DeprecatedObjCIsaUsage : DiagGroup<"deprecated-objc-isa-usage">;
528def ExplicitInitializeCall : DiagGroup<"explicit-initialize-call">;
529def OrderedCompareFunctionPointers : DiagGroup<"ordered-compare-function-pointers">;
530def Packed : DiagGroup<"packed">;
531def Padded : DiagGroup<"padded">;
532
533def PessimizingMove : DiagGroup<"pessimizing-move">;
534def ReturnStdMove : DiagGroup<"return-std-move">;
535
536def PointerArith : DiagGroup<"pointer-arith">;
537def PoundWarning : DiagGroup<"#warnings">;
538def PoundPragmaMessage : DiagGroup<"#pragma-messages">,
539                         DiagCategory<"#pragma message Directive">;
540def : DiagGroup<"redundant-decls">;
541def RedeclaredClassMember : DiagGroup<"redeclared-class-member">;
542def GNURedeclaredEnum : DiagGroup<"gnu-redeclared-enum">;
543def RedundantMove : DiagGroup<"redundant-move">;
544def Register : DiagGroup<"register", [DeprecatedRegister]>;
545def ReturnTypeCLinkage : DiagGroup<"return-type-c-linkage">;
546def ReturnType : DiagGroup<"return-type", [ReturnTypeCLinkage]>;
547def BindToTemporaryCopy : DiagGroup<"bind-to-temporary-copy",
548                                    [CXX98CompatBindToTemporaryCopy]>;
549def SelfAssignmentField : DiagGroup<"self-assign-field">;
550def SelfAssignmentOverloaded : DiagGroup<"self-assign-overloaded">;
551def SelfAssignment : DiagGroup<"self-assign", [SelfAssignmentOverloaded, SelfAssignmentField]>;
552def SelfMove : DiagGroup<"self-move">;
553def SemiBeforeMethodBody : DiagGroup<"semicolon-before-method-body">;
554def Sentinel : DiagGroup<"sentinel">;
555def MissingMethodReturnType : DiagGroup<"missing-method-return-type">;
556
557def ShadowField : DiagGroup<"shadow-field">;
558def ShadowFieldInConstructorModified : DiagGroup<"shadow-field-in-constructor-modified">;
559def ShadowFieldInConstructor : DiagGroup<"shadow-field-in-constructor",
560                                         [ShadowFieldInConstructorModified]>;
561def ShadowIvar : DiagGroup<"shadow-ivar">;
562def ShadowUncapturedLocal : DiagGroup<"shadow-uncaptured-local">;
563
564// -Wshadow-all is a catch-all for all shadowing. -Wshadow is just the
565// shadowing that we think is unsafe.
566def Shadow : DiagGroup<"shadow", [ShadowFieldInConstructorModified,
567                                  ShadowIvar]>;
568def ShadowAll : DiagGroup<"shadow-all", [Shadow, ShadowFieldInConstructor,
569                                         ShadowUncapturedLocal, ShadowField]>;
570
571def Shorten64To32 : DiagGroup<"shorten-64-to-32">;
572def : DiagGroup<"sign-promo">;
573def SignCompare : DiagGroup<"sign-compare">;
574def : DiagGroup<"switch-default">;
575def : DiagGroup<"synth">;
576def SizeofArrayArgument : DiagGroup<"sizeof-array-argument">;
577def SizeofArrayDecay : DiagGroup<"sizeof-array-decay">;
578def SizeofPointerMemaccess : DiagGroup<"sizeof-pointer-memaccess">;
579def MemsetTransposedArgs : DiagGroup<"memset-transposed-args">;
580def DynamicClassMemaccess : DiagGroup<"dynamic-class-memaccess">;
581def NonTrivialMemaccess : DiagGroup<"nontrivial-memaccess">;
582def SuspiciousBzero : DiagGroup<"suspicious-bzero">;
583def SuspiciousMemaccess : DiagGroup<"suspicious-memaccess",
584  [SizeofPointerMemaccess, DynamicClassMemaccess,
585   NonTrivialMemaccess, MemsetTransposedArgs, SuspiciousBzero]>;
586def StaticInInline : DiagGroup<"static-in-inline">;
587def StaticLocalInInline : DiagGroup<"static-local-in-inline">;
588def GNUStaticFloatInit : DiagGroup<"gnu-static-float-init">;
589def StaticFloatInit : DiagGroup<"static-float-init", [GNUStaticFloatInit]>;
590def GNUStatementExpression : DiagGroup<"gnu-statement-expression">;
591def StringConcatation : DiagGroup<"string-concatenation">;
592def StringCompare : DiagGroup<"string-compare">;
593def StringPlusInt : DiagGroup<"string-plus-int">;
594def StringPlusChar : DiagGroup<"string-plus-char">;
595def StrncatSize : DiagGroup<"strncat-size">;
596def SwiftNameAttribute : DiagGroup<"swift-name-attribute">;
597def IntInBoolContext : DiagGroup<"int-in-bool-context">;
598def TautologicalTypeLimitCompare : DiagGroup<"tautological-type-limit-compare">;
599def TautologicalUnsignedZeroCompare : DiagGroup<"tautological-unsigned-zero-compare">;
600def TautologicalUnsignedCharZeroCompare : DiagGroup<"tautological-unsigned-char-zero-compare">;
601def TautologicalUnsignedEnumZeroCompare : DiagGroup<"tautological-unsigned-enum-zero-compare">;
602// For compatibility with GCC. Tautological comparison warnings for constants
603// that are an extremal value of the type.
604def TypeLimits : DiagGroup<"type-limits", [TautologicalTypeLimitCompare,
605                                           TautologicalUnsignedZeroCompare,
606                                           TautologicalUnsignedCharZeroCompare,
607                                           TautologicalUnsignedEnumZeroCompare]>;
608// Additional tautological comparison warnings based on the expression, not
609// only on its type.
610def TautologicalValueRangeCompare : DiagGroup<"tautological-value-range-compare">;
611def TautologicalInRangeCompare : DiagGroup<"tautological-constant-in-range-compare",
612                                           [TypeLimits, TautologicalValueRangeCompare]>;
613def TautologicalOutOfRangeCompare : DiagGroup<"tautological-constant-out-of-range-compare">;
614def TautologicalConstantCompare : DiagGroup<"tautological-constant-compare",
615                                            [TautologicalOutOfRangeCompare]>;
616def TautologicalPointerCompare : DiagGroup<"tautological-pointer-compare">;
617def TautologicalOverlapCompare : DiagGroup<"tautological-overlap-compare">;
618def TautologicalBitwiseCompare : DiagGroup<"tautological-bitwise-compare">;
619def TautologicalUndefinedCompare : DiagGroup<"tautological-undefined-compare">;
620def TautologicalObjCBoolCompare : DiagGroup<"tautological-objc-bool-compare">;
621def TautologicalCompare : DiagGroup<"tautological-compare",
622                                    [TautologicalConstantCompare,
623                                     TautologicalPointerCompare,
624                                     TautologicalOverlapCompare,
625                                     TautologicalBitwiseCompare,
626                                     TautologicalUndefinedCompare,
627                                     TautologicalObjCBoolCompare]>;
628def HeaderHygiene : DiagGroup<"header-hygiene">;
629def DuplicateDeclSpecifier : DiagGroup<"duplicate-decl-specifier">;
630def CompareDistinctPointerType : DiagGroup<"compare-distinct-pointer-types">;
631def GNUUnionCast : DiagGroup<"gnu-union-cast">;
632def GNUVariableSizedTypeNotAtEnd : DiagGroup<"gnu-variable-sized-type-not-at-end">;
633def Varargs : DiagGroup<"varargs">;
634def XorUsedAsPow : DiagGroup<"xor-used-as-pow">;
635
636def Unsequenced : DiagGroup<"unsequenced">;
637// GCC name for -Wunsequenced
638def : DiagGroup<"sequence-point", [Unsequenced]>;
639
640// Preprocessor warnings.
641def AmbiguousMacro : DiagGroup<"ambiguous-macro">;
642def KeywordAsMacro : DiagGroup<"keyword-macro">;
643def ReservedIdAsMacro : DiagGroup<"reserved-macro-identifier">;
644def ReservedIdAsMacroAlias : DiagGroup<"reserved-id-macro", [ReservedIdAsMacro]>;
645
646// Just silence warnings about -Wstrict-aliasing for now.
647def : DiagGroup<"strict-aliasing=0">;
648def : DiagGroup<"strict-aliasing=1">;
649def : DiagGroup<"strict-aliasing=2">;
650def : DiagGroup<"strict-aliasing">;
651
652// Just silence warnings about -Wstrict-overflow for now.
653def : DiagGroup<"strict-overflow=0">;
654def : DiagGroup<"strict-overflow=1">;
655def : DiagGroup<"strict-overflow=2">;
656def : DiagGroup<"strict-overflow=3">;
657def : DiagGroup<"strict-overflow=4">;
658def : DiagGroup<"strict-overflow=5">;
659def : DiagGroup<"strict-overflow">;
660
661def InvalidOffsetof : DiagGroup<"invalid-offsetof">;
662def StrictSelector : DiagGroup<"strict-selector-match">;
663def MethodDuplicate : DiagGroup<"duplicate-method-match">;
664def ObjCCStringFormat : DiagGroup<"cstring-format-directive">;
665def CoveredSwitchDefault : DiagGroup<"covered-switch-default">;
666def SwitchBool     : DiagGroup<"switch-bool">;
667def SwitchEnum     : DiagGroup<"switch-enum">;
668def Switch         : DiagGroup<"switch">;
669def ImplicitFallthroughPerFunction :
670  DiagGroup<"implicit-fallthrough-per-function">;
671def ImplicitFallthrough  : DiagGroup<"implicit-fallthrough",
672                                     [ImplicitFallthroughPerFunction]>;
673def InvalidPPToken : DiagGroup<"invalid-pp-token">;
674def Trigraphs      : DiagGroup<"trigraphs">;
675
676def UndefinedReinterpretCast : DiagGroup<"undefined-reinterpret-cast">;
677def ReinterpretBaseClass : DiagGroup<"reinterpret-base-class">;
678def Unicode  : DiagGroup<"unicode">;
679def UninitializedMaybe : DiagGroup<"conditional-uninitialized">;
680def UninitializedSometimes : DiagGroup<"sometimes-uninitialized">;
681def UninitializedStaticSelfInit : DiagGroup<"static-self-init">;
682def UninitializedConstReference : DiagGroup<"uninitialized-const-reference">;
683def Uninitialized  : DiagGroup<"uninitialized", [UninitializedSometimes,
684                                                 UninitializedStaticSelfInit,
685                                                 UninitializedConstReference]>;
686def IgnoredPragmaIntrinsic : DiagGroup<"ignored-pragma-intrinsic">;
687// #pragma optimize is often used to avoid to work around MSVC codegen bugs or
688// to disable inlining. It's not completely clear what alternative to suggest
689// (#pragma clang optimize, noinline) so suggest nothing for now.
690def IgnoredPragmaOptimize : DiagGroup<"ignored-pragma-optimize">;
691def UnknownPragmas : DiagGroup<"unknown-pragmas">;
692def IgnoredPragmas : DiagGroup<"ignored-pragmas",
693    [IgnoredPragmaIntrinsic, IgnoredPragmaOptimize]>;
694def PragmaClangAttribute : DiagGroup<"pragma-clang-attribute">;
695def PragmaPackSuspiciousInclude : DiagGroup<"pragma-pack-suspicious-include">;
696def PragmaPack : DiagGroup<"pragma-pack", [PragmaPackSuspiciousInclude]>;
697def Pragmas : DiagGroup<"pragmas", [UnknownPragmas, IgnoredPragmas,
698                                    PragmaClangAttribute, PragmaPack]>;
699def UnknownWarningOption : DiagGroup<"unknown-warning-option">;
700def NSobjectAttribute : DiagGroup<"NSObject-attribute">;
701def NSConsumedMismatch : DiagGroup<"nsconsumed-mismatch">;
702def NSReturnsMismatch : DiagGroup<"nsreturns-mismatch">;
703
704def IndependentClassAttribute : DiagGroup<"IndependentClass-attribute">;
705def UnknownAttributes : DiagGroup<"unknown-attributes">;
706def IgnoredAttributes : DiagGroup<"ignored-attributes">;
707def Attributes : DiagGroup<"attributes", [UnknownAttributes,
708                                          IgnoredAttributes]>;
709def UnknownSanitizers : DiagGroup<"unknown-sanitizers">;
710def UnnamedTypeTemplateArgs : DiagGroup<"unnamed-type-template-args",
711                                        [CXX98CompatUnnamedTypeTemplateArgs]>;
712def UnsupportedFriend : DiagGroup<"unsupported-friend">;
713def UnusedArgument : DiagGroup<"unused-argument">;
714def UnusedCommandLineArgument : DiagGroup<"unused-command-line-argument">;
715def IgnoredOptimizationArgument : DiagGroup<"ignored-optimization-argument">;
716def InvalidCommandLineArgument : DiagGroup<"invalid-command-line-argument",
717                                           [IgnoredOptimizationArgument]>;
718def UnusedComparison : DiagGroup<"unused-comparison">;
719def UnusedExceptionParameter : DiagGroup<"unused-exception-parameter">;
720def UnneededInternalDecl : DiagGroup<"unneeded-internal-declaration">;
721def UnneededMemberFunction : DiagGroup<"unneeded-member-function">;
722def UnusedPrivateField : DiagGroup<"unused-private-field">;
723def UnusedFunction : DiagGroup<"unused-function", [UnneededInternalDecl]>;
724def UnusedTemplate : DiagGroup<"unused-template", [UnneededInternalDecl]>;
725def UnusedMemberFunction : DiagGroup<"unused-member-function",
726                                     [UnneededMemberFunction]>;
727def UnusedLabel : DiagGroup<"unused-label">;
728def UnusedLambdaCapture : DiagGroup<"unused-lambda-capture">;
729def UnusedParameter : DiagGroup<"unused-parameter">;
730def UnusedButSetParameter : DiagGroup<"unused-but-set-parameter">;
731def UnusedResult : DiagGroup<"unused-result">;
732def PotentiallyEvaluatedExpression : DiagGroup<"potentially-evaluated-expression">;
733def UnevaluatedExpression : DiagGroup<"unevaluated-expression",
734                                      [PotentiallyEvaluatedExpression]>;
735def UnusedValue : DiagGroup<"unused-value", [UnusedComparison, UnusedResult,
736                                             UnevaluatedExpression]>;
737def UnusedConstVariable : DiagGroup<"unused-const-variable">;
738def UnusedVariable : DiagGroup<"unused-variable",
739                               [UnusedConstVariable]>;
740def UnusedButSetVariable : DiagGroup<"unused-but-set-variable">;
741def UnusedLocalTypedef : DiagGroup<"unused-local-typedef">;
742def UnusedPropertyIvar :  DiagGroup<"unused-property-ivar">;
743def UnusedGetterReturnValue : DiagGroup<"unused-getter-return-value">;
744def UsedButMarkedUnused : DiagGroup<"used-but-marked-unused">;
745def UserDefinedLiterals : DiagGroup<"user-defined-literals">;
746def UserDefinedWarnings : DiagGroup<"user-defined-warnings">;
747def ReorderCtor : DiagGroup<"reorder-ctor">;
748def ReorderInitList : DiagGroup<"reorder-init-list">;
749def Reorder : DiagGroup<"reorder", [ReorderCtor, ReorderInitList]>;
750def UndeclaredSelector : DiagGroup<"undeclared-selector">;
751def ImplicitAtomic : DiagGroup<"implicit-atomic-properties">;
752def AtomicAlignment : DiagGroup<"atomic-alignment">;
753def CustomAtomic : DiagGroup<"custom-atomic-properties">;
754def AtomicProperties : DiagGroup<"atomic-properties",
755                                 [ImplicitAtomic, CustomAtomic]>;
756def ARCUnsafeRetainedAssign : DiagGroup<"arc-unsafe-retained-assign">;
757def ARCRetainCycles : DiagGroup<"arc-retain-cycles">;
758def ARCNonPodMemAccess : DiagGroup<"arc-non-pod-memaccess">;
759def AutomaticReferenceCounting : DiagGroup<"arc",
760                                           [ARCUnsafeRetainedAssign,
761                                            ARCRetainCycles,
762                                            ARCNonPodMemAccess]>;
763def ARCRepeatedUseOfWeakMaybe : DiagGroup<"arc-maybe-repeated-use-of-weak">;
764def ARCRepeatedUseOfWeak : DiagGroup<"arc-repeated-use-of-weak",
765                                     [ARCRepeatedUseOfWeakMaybe]>;
766def BlockCaptureAutoReleasing : DiagGroup<"block-capture-autoreleasing">;
767def ObjCBridge : DiagGroup<"bridge-cast">;
768
769def DeallocInCategory:DiagGroup<"dealloc-in-category">;
770def SelectorTypeMismatch : DiagGroup<"selector-type-mismatch">;
771def Selector : DiagGroup<"selector", [SelectorTypeMismatch]>;
772def Protocol : DiagGroup<"protocol">;
773// No longer in use, preserve for backwards compatibility.
774def : DiagGroup<"at-protocol">;
775def PropertyAccessDotSyntax: DiagGroup<"property-access-dot-syntax">;
776def PropertyAttr : DiagGroup<"property-attribute-mismatch">;
777def SuperSubClassMismatch : DiagGroup<"super-class-method-mismatch">;
778def OverridingMethodMismatch : DiagGroup<"overriding-method-mismatch">;
779def VariadicMacros : DiagGroup<"variadic-macros">;
780def VectorConversion : DiagGroup<"vector-conversion">;      // clang specific
781def VexingParse : DiagGroup<"vexing-parse">;
782def VLAExtension : DiagGroup<"vla-extension">;
783def VLA : DiagGroup<"vla", [VLAExtension]>;
784def VolatileRegisterVar : DiagGroup<"volatile-register-var">;
785def Visibility : DiagGroup<"visibility">;
786def ZeroLengthArray : DiagGroup<"zero-length-array">;
787def GNUZeroLineDirective : DiagGroup<"gnu-zero-line-directive">;
788def GNUZeroVariadicMacroArguments : DiagGroup<"gnu-zero-variadic-macro-arguments">;
789def MisleadingIndentation : DiagGroup<"misleading-indentation">;
790
791// This covers both the deprecated case (in C++98)
792// and the extension case (in C++11 onwards).
793def WritableStrings : DiagGroup<"writable-strings", [DeprecatedWritableStr]>;
794
795// GCC calls -Wdeprecated-writable-strings -Wwrite-strings.
796//
797// Bizarrely, this warning flag enables -fconst-strings in C. This is
798// GCC-compatible, but really weird.
799//
800// FIXME: Should this affect C++11 (where this is an error,
801//        not just deprecated) or not?
802def GCCWriteStrings : DiagGroup<"write-strings" , [WritableStrings]>;
803
804def CharSubscript : DiagGroup<"char-subscripts">;
805def LargeByValueCopy : DiagGroup<"large-by-value-copy">;
806def DuplicateArgDecl : DiagGroup<"duplicate-method-arg">;
807def SignedEnumBitfield : DiagGroup<"signed-enum-bitfield">;
808
809def ReservedIdentifier : DiagGroup<"reserved-identifier",
810    [ReservedIdAsMacro]>;
811
812// Unreachable code warning groups.
813//
814//  The goal is make -Wunreachable-code on by default, in -Wall, or at
815//  least actively used, with more noisy versions of the warning covered
816//  under separate flags.
817//
818def UnreachableCodeLoopIncrement : DiagGroup<"unreachable-code-loop-increment">;
819def UnreachableCode : DiagGroup<"unreachable-code",
820                                [UnreachableCodeLoopIncrement]>;
821def UnreachableCodeBreak : DiagGroup<"unreachable-code-break">;
822def UnreachableCodeReturn : DiagGroup<"unreachable-code-return">;
823def UnreachableCodeAggressive : DiagGroup<"unreachable-code-aggressive",
824                                    [UnreachableCode,
825                                     UnreachableCodeBreak,
826                                     UnreachableCodeReturn]>;
827
828// Aggregation warning settings.
829
830// Populate -Waddress with warnings from other groups.
831def : DiagGroup<"address", [PointerBoolConversion,
832                            StringCompare,
833                            TautologicalPointerCompare]>;
834
835// -Widiomatic-parentheses contains warnings about 'idiomatic'
836// missing parentheses;  it is off by default.  We do not include it
837// in -Wparentheses because most users who use -Wparentheses explicitly
838// do not want these warnings.
839def ParenthesesOnEquality : DiagGroup<"parentheses-equality">;
840def Parentheses : DiagGroup<"parentheses",
841                            [LogicalOpParentheses,
842                             LogicalNotParentheses,
843                             BitwiseConditionalParentheses,
844                             BitwiseOpParentheses,
845                             ShiftOpParentheses,
846                             OverloadedShiftOpParentheses,
847                             ParenthesesOnEquality,
848                             DanglingElse]>;
849
850// -Wconversion has its own warnings, but we split a few out for
851// legacy reasons:
852//   - some people want just 64-to-32 warnings
853//   - conversion warnings with constant sources are on by default
854//   - conversion warnings for literals are on by default
855//   - bool-to-pointer conversion warnings are on by default
856//   - __null-to-integer conversion warnings are on by default
857def Conversion : DiagGroup<"conversion",
858                           [BoolConversion,
859                            ConstantConversion,
860                            EnumConversion,
861                            BitFieldEnumConversion,
862                            FloatConversion,
863                            Shorten64To32,
864                            IntConversion,
865                            ImplicitIntConversion,
866                            ImplicitFloatConversion,
867                            LiteralConversion,
868                            NonLiteralNullConversion, // (1-1)->pointer (etc)
869                            NullConversion, // NULL->non-pointer
870                            ObjCLiteralConversion,
871                            SignConversion,
872                            StringConversion]>,
873                 DiagCategory<"Value Conversion Issue">;
874
875def Unused : DiagGroup<"unused",
876                       [UnusedArgument, UnusedFunction, UnusedLabel,
877                        // UnusedParameter, (matches GCC's behavior)
878                        // UnusedTemplate, (clean-up libc++ before enabling)
879                        // UnusedMemberFunction, (clean-up llvm before enabling)
880                        UnusedPrivateField, UnusedLambdaCapture,
881                        UnusedLocalTypedef, UnusedValue, UnusedVariable,
882                        UnusedButSetVariable, UnusedPropertyIvar]>,
883                        DiagCategory<"Unused Entity Issue">;
884
885// Format settings.
886def FormatInvalidSpecifier : DiagGroup<"format-invalid-specifier">;
887def FormatSecurity : DiagGroup<"format-security">;
888def FormatNonStandard : DiagGroup<"format-non-iso">;
889def FormatY2K : DiagGroup<"format-y2k">;
890def FormatPedantic : DiagGroup<"format-pedantic">;
891def FormatTypeConfusion : DiagGroup<"format-type-confusion">;
892def Format : DiagGroup<"format",
893                       [FormatExtraArgs, FormatZeroLength, NonNull,
894                        FormatSecurity, FormatY2K, FormatInvalidSpecifier,
895                        FormatInsufficientArgs]>,
896             DiagCategory<"Format String Issue">;
897def FormatNonLiteral : DiagGroup<"format-nonliteral">;
898def Format2 : DiagGroup<"format=2",
899                        [FormatNonLiteral, FormatSecurity, FormatY2K]>;
900
901def TypeSafety : DiagGroup<"type-safety">;
902
903def IncompatibleExceptionSpec : DiagGroup<"incompatible-exception-spec">;
904
905def IntToVoidPointerCast : DiagGroup<"int-to-void-pointer-cast">;
906def IntToPointerCast : DiagGroup<"int-to-pointer-cast",
907                                 [IntToVoidPointerCast]>;
908def VoidPointerToEnumCast : DiagGroup<"void-pointer-to-enum-cast">;
909def VoidPointerToIntCast : DiagGroup<"void-pointer-to-int-cast",
910                                     [VoidPointerToEnumCast]>;
911def PointerToEnumCast : DiagGroup<"pointer-to-enum-cast",
912                                  [VoidPointerToEnumCast]>;
913def PointerToIntCast : DiagGroup<"pointer-to-int-cast",
914                                 [PointerToEnumCast, VoidPointerToIntCast]>;
915
916def FUseLdPath : DiagGroup<"fuse-ld-path">;
917
918def Move : DiagGroup<"move", [
919    PessimizingMove,
920    RedundantMove,
921    ReturnStdMove,
922    SelfMove
923  ]>;
924
925def Extra : DiagGroup<"extra", [
926    DeprecatedCopy,
927    MissingFieldInitializers,
928    IgnoredQualifiers,
929    InitializerOverrides,
930    SemiBeforeMethodBody,
931    MissingMethodReturnType,
932    SignCompare,
933    UnusedParameter,
934    UnusedButSetParameter,
935    NullPointerArithmetic,
936    NullPointerSubtraction,
937    EmptyInitStatement,
938    StringConcatation,
939    FUseLdPath,
940  ]>;
941
942def Most : DiagGroup<"most", [
943    CharSubscript,
944    Comment,
945    DeleteNonVirtualDtor,
946    Format,
947    ForLoopAnalysis,
948    FrameAddress,
949    Implicit,
950    InfiniteRecursion,
951    IntInBoolContext,
952    MismatchedTags,
953    MissingBraces,
954    Move,
955    MultiChar,
956    RangeLoopConstruct,
957    Reorder,
958    ReturnType,
959    SelfAssignment,
960    SelfMove,
961    SizeofArrayArgument,
962    SizeofArrayDecay,
963    StringPlusInt,
964    TautologicalCompare,
965    Trigraphs,
966    Uninitialized,
967    UnknownPragmas,
968    Unused,
969    VolatileRegisterVar,
970    ObjCMissingSuperCalls,
971    ObjCDesignatedInit,
972    ObjCFlexibleArray,
973    OverloadedVirtual,
974    PrivateExtern,
975    SelTypeCast,
976    ExternCCompat,
977    UserDefinedWarnings
978 ]>;
979
980// Thread Safety warnings
981def ThreadSafetyAttributes : DiagGroup<"thread-safety-attributes">;
982def ThreadSafetyAnalysis   : DiagGroup<"thread-safety-analysis">;
983def ThreadSafetyPrecise    : DiagGroup<"thread-safety-precise">;
984def ThreadSafetyReference  : DiagGroup<"thread-safety-reference">;
985def ThreadSafetyNegative   : DiagGroup<"thread-safety-negative">;
986def ThreadSafety : DiagGroup<"thread-safety",
987                             [ThreadSafetyAttributes,
988                              ThreadSafetyAnalysis,
989                              ThreadSafetyPrecise,
990                              ThreadSafetyReference]>;
991def ThreadSafetyVerbose : DiagGroup<"thread-safety-verbose">;
992def ThreadSafetyBeta : DiagGroup<"thread-safety-beta">;
993
994// Uniqueness Analysis warnings
995def Consumed       : DiagGroup<"consumed">;
996
997// Note that putting warnings in -Wall will not disable them by default. If a
998// warning should be active _only_ when -Wall is passed in, mark it as
999// DefaultIgnore in addition to putting it here.
1000def All : DiagGroup<"all", [Most, Parentheses, Switch, SwitchBool,
1001                            MisleadingIndentation]>;
1002
1003// Warnings that should be in clang-cl /w4.
1004def : DiagGroup<"CL4", [All, Extra]>;
1005
1006// Warnings enabled by -pedantic.  This is magically filled in by TableGen.
1007def Pedantic : DiagGroup<"pedantic">;
1008
1009// Aliases.
1010def : DiagGroup<"", [Extra]>;                   // -W = -Wextra
1011def : DiagGroup<"endif-labels", [ExtraTokens]>; // -Wendif-labels=-Wextra-tokens
1012def : DiagGroup<"cpp", [PoundWarning]>;         // -Wcpp = -W#warnings
1013def : DiagGroup<"comments", [Comment]>;         // -Wcomments = -Wcomment
1014def : DiagGroup<"conversion-null",
1015                [NullConversion]>; // -Wconversion-null = -Wnull-conversion
1016def : DiagGroup<"bool-conversions",
1017                [BoolConversion]>; // -Wbool-conversions  = -Wbool-conversion
1018def : DiagGroup<"int-conversions",
1019                [IntConversion]>; // -Wint-conversions = -Wint-conversion
1020def : DiagGroup<"vector-conversions",
1021                [VectorConversion]>; // -Wvector-conversions = -Wvector-conversion
1022def : DiagGroup<"unused-local-typedefs", [UnusedLocalTypedef]>;
1023                // -Wunused-local-typedefs = -Wunused-local-typedef
1024
1025// A warning group for warnings that we want to have on by default in clang,
1026// but which aren't on by default in GCC.
1027def NonGCC : DiagGroup<"non-gcc",
1028    [SignCompare, Conversion, LiteralRange]>;
1029
1030// A warning group for warnings about using C++11 features as extensions in
1031// earlier C++ versions.
1032def CXX11 : DiagGroup<"c++11-extensions", [CXX11ExtraSemi, CXX11InlineNamespace,
1033                                           CXX11LongLong]>;
1034
1035// A warning group for warnings about using C++14 features as extensions in
1036// earlier C++ versions.
1037def CXX14 : DiagGroup<"c++14-extensions", [CXX14BinaryLiteral]>;
1038
1039// A warning group for warnings about using C++17 features as extensions in
1040// earlier C++ versions.
1041def CXX17 : DiagGroup<"c++17-extensions">;
1042
1043// A warning group for warnings about using C++20 features as extensions in
1044// earlier C++ versions.
1045def CXX20 : DiagGroup<"c++20-extensions", [CXX20Designator]>;
1046
1047// A warning group for warnings about using C++2b features as extensions in
1048// earlier C++ versions.
1049def CXX2b : DiagGroup<"c++2b-extensions">;
1050
1051def : DiagGroup<"c++0x-extensions", [CXX11]>;
1052def : DiagGroup<"c++1y-extensions", [CXX14]>;
1053def : DiagGroup<"c++1z-extensions", [CXX17]>;
1054def : DiagGroup<"c++2a-extensions", [CXX20]>;
1055
1056def DelegatingCtorCycles :
1057  DiagGroup<"delegating-ctor-cycles">;
1058
1059// A warning group for warnings about using C11 features as extensions.
1060def C11 : DiagGroup<"c11-extensions">;
1061
1062// A warning group for warnings about using C99 features as extensions.
1063def C99 : DiagGroup<"c99-extensions", [C99Designator]>;
1064
1065// A warning group for warnings about using C2x features as extensions.
1066def C2x : DiagGroup<"c2x-extensions">;
1067
1068// A warning group for warnings about GCC extensions.
1069def GNU : DiagGroup<"gnu", [GNUAlignofExpression, GNUAnonymousStruct,
1070                            GNUAutoType,
1071                            GNUBinaryLiteral, GNUCaseRange,
1072                            GNUComplexInteger, GNUCompoundLiteralInitializer,
1073                            GNUConditionalOmittedOperand, GNUDesignator,
1074                            GNUEmptyInitializer, GNUEmptyStruct,
1075                            VLAExtension, GNUFlexibleArrayInitializer,
1076                            GNUFlexibleArrayUnionMember, GNUFoldingConstant,
1077                            GNUImaginaryConstant, GNUIncludeNext,
1078                            GNULabelsAsValue,
1079                            RedeclaredClassMember, GNURedeclaredEnum,
1080                            GNUStatementExpression, GNUStaticFloatInit,
1081                            GNUStringLiteralOperatorTemplate,
1082                            GNUUnionCast, GNUVariableSizedTypeNotAtEnd,
1083                            ZeroLengthArray, GNUZeroLineDirective,
1084                            GNUZeroVariadicMacroArguments]>;
1085// A warning group for warnings about code that clang accepts but gcc doesn't.
1086def GccCompat : DiagGroup<"gcc-compat">;
1087
1088// A warning group for warnings about code that may be incompatible on AIX.
1089def AIXCompat : DiagGroup<"aix-compat">;
1090
1091// Warnings for Microsoft extensions.
1092def MicrosoftCharize : DiagGroup<"microsoft-charize">;
1093def MicrosoftDrectveSection : DiagGroup<"microsoft-drectve-section">;
1094def MicrosoftInclude : DiagGroup<"microsoft-include">;
1095def MicrosoftCppMacro : DiagGroup<"microsoft-cpp-macro">;
1096def MicrosoftFixedEnum : DiagGroup<"microsoft-fixed-enum">;
1097def MicrosoftSealed : DiagGroup<"microsoft-sealed">;
1098def MicrosoftAbstract : DiagGroup<"microsoft-abstract">;
1099def MicrosoftUnqualifiedFriend : DiagGroup<"microsoft-unqualified-friend">;
1100def MicrosoftExceptionSpec : DiagGroup<"microsoft-exception-spec">;
1101def MicrosoftUsingDecl : DiagGroup<"microsoft-using-decl">;
1102def MicrosoftMutableReference : DiagGroup<"microsoft-mutable-reference">;
1103def MicrosoftPureDefinition : DiagGroup<"microsoft-pure-definition">;
1104def MicrosoftUnionMemberReference : DiagGroup<
1105    "microsoft-union-member-reference">;
1106def MicrosoftExplicitConstructorCall : DiagGroup<
1107    "microsoft-explicit-constructor-call">;
1108def MicrosoftEnumValue : DiagGroup<"microsoft-enum-value">;
1109def MicrosoftDefaultArgRedefinition :
1110    DiagGroup<"microsoft-default-arg-redefinition">;
1111def MicrosoftTemplateShadow : DiagGroup<"microsoft-template-shadow">;
1112def MicrosoftTemplate : DiagGroup<"microsoft-template", [MicrosoftTemplateShadow]>;
1113def MicrosoftInconsistentDllImport : DiagGroup<"inconsistent-dllimport">;
1114def MicrosoftRedeclareStatic : DiagGroup<"microsoft-redeclare-static">;
1115def MicrosoftEnumForwardReference :
1116    DiagGroup<"microsoft-enum-forward-reference">;
1117def MicrosoftGoto : DiagGroup<"microsoft-goto">;
1118def MicrosoftFlexibleArray : DiagGroup<"microsoft-flexible-array">;
1119def MicrosoftExtraQualification : DiagGroup<"microsoft-extra-qualification">;
1120def MicrosoftCast : DiagGroup<"microsoft-cast">;
1121def MicrosoftConstInit : DiagGroup<"microsoft-const-init">;
1122def MicrosoftVoidPseudoDtor : DiagGroup<"microsoft-void-pseudo-dtor">;
1123def MicrosoftAnonTag : DiagGroup<"microsoft-anon-tag">;
1124def MicrosoftCommentPaste : DiagGroup<"microsoft-comment-paste">;
1125def MicrosoftEndOfFile : DiagGroup<"microsoft-end-of-file">;
1126def MicrosoftInaccessibleBase : DiagGroup<"microsoft-inaccessible-base">;
1127def MicrosoftStaticAssert : DiagGroup<"microsoft-static-assert">;
1128
1129// Aliases.
1130def : DiagGroup<"msvc-include", [MicrosoftInclude]>;
1131                // -Wmsvc-include = -Wmicrosoft-include
1132
1133// Warnings group for warnings about Microsoft extensions.
1134def Microsoft : DiagGroup<"microsoft",
1135    [MicrosoftCharize, MicrosoftDrectveSection, MicrosoftInclude,
1136     MicrosoftCppMacro, MicrosoftFixedEnum, MicrosoftSealed, MicrosoftAbstract,
1137     MicrosoftUnqualifiedFriend, MicrosoftExceptionSpec, MicrosoftUsingDecl,
1138     MicrosoftMutableReference, MicrosoftPureDefinition,
1139     MicrosoftUnionMemberReference, MicrosoftExplicitConstructorCall,
1140     MicrosoftEnumValue, MicrosoftDefaultArgRedefinition, MicrosoftTemplate,
1141     MicrosoftRedeclareStatic, MicrosoftEnumForwardReference, MicrosoftGoto,
1142     MicrosoftFlexibleArray, MicrosoftExtraQualification, MicrosoftCast,
1143     MicrosoftConstInit, MicrosoftVoidPseudoDtor, MicrosoftAnonTag,
1144     MicrosoftCommentPaste, MicrosoftEndOfFile, MicrosoftStaticAssert,
1145     MicrosoftInconsistentDllImport]>;
1146
1147def ClangClPch : DiagGroup<"clang-cl-pch">;
1148
1149def ObjCNonUnifiedException : DiagGroup<"objc-nonunified-exceptions">;
1150
1151def ObjCProtocolMethodImpl : DiagGroup<"objc-protocol-method-implementation">;
1152
1153def ObjCNoPropertyAutoSynthesis : DiagGroup<"objc-property-synthesis">;
1154
1155// ObjC API warning groups.
1156def ObjCRedundantLiteralUse : DiagGroup<"objc-redundant-literal-use">;
1157def ObjCRedundantAPIUse : DiagGroup<"objc-redundant-api-use", [
1158    ObjCRedundantLiteralUse
1159  ]>;
1160
1161def ObjCCocoaAPI : DiagGroup<"objc-cocoa-api", [
1162    ObjCRedundantAPIUse
1163  ]>;
1164
1165def ObjCStringComparison : DiagGroup<"objc-string-compare">;
1166def ObjCStringConcatenation : DiagGroup<"objc-string-concatenation">;
1167def ObjCLiteralComparison : DiagGroup<"objc-literal-compare", [
1168    ObjCStringComparison
1169  ]>;
1170
1171def ObjCSignedCharBool : DiagGroup<"objc-signed-char-bool",
1172  [ObjCSignedCharBoolImplicitIntConversion,
1173   ObjCSignedCharBoolImplicitFloatConversion,
1174   ObjCBoolConstantConversion,
1175   TautologicalObjCBoolCompare]>;
1176
1177def ObjCPotentiallyDirectSelector : DiagGroup<"potentially-direct-selector">;
1178def ObjCStrictPotentiallyDirectSelector :
1179  DiagGroup<"strict-potentially-direct-selector",
1180            [ObjCPotentiallyDirectSelector]>;
1181
1182// Inline ASM warnings.
1183def ASMOperandWidths : DiagGroup<"asm-operand-widths">;
1184def ASM : DiagGroup<"asm", [
1185    ASMOperandWidths
1186  ]>;
1187
1188// OpenMP warnings.
1189def SourceUsesOpenMP : DiagGroup<"source-uses-openmp">;
1190def OpenMPClauses : DiagGroup<"openmp-clauses">;
1191def OpenMPLoopForm : DiagGroup<"openmp-loop-form">;
1192def OpenMPMapping : DiagGroup<"openmp-mapping">;
1193def OpenMPTarget : DiagGroup<"openmp-target", [OpenMPMapping]>;
1194def OpenMPPre51Compat : DiagGroup<"pre-openmp-51-compat">;
1195def OpenMP51Ext : DiagGroup<"openmp-51-extensions">;
1196def OpenMP : DiagGroup<"openmp", [
1197    SourceUsesOpenMP, OpenMPClauses, OpenMPLoopForm, OpenMPTarget,
1198    OpenMPMapping, OpenMP51Ext
1199  ]>;
1200
1201// Backend warnings.
1202def BackendInlineAsm : DiagGroup<"inline-asm">;
1203def BackendSourceMgr : DiagGroup<"source-mgr">;
1204def BackendFrameLargerThan : DiagGroup<"frame-larger-than">;
1205// Compatibility flag name from old versions of Clang.
1206def : DiagGroup<"frame-larger-than=", [BackendFrameLargerThan]>;
1207def BackendPlugin : DiagGroup<"backend-plugin">;
1208def RemarkBackendPlugin : DiagGroup<"remark-backend-plugin">;
1209def BackendOptimizationRemark : DiagGroup<"pass">;
1210def BackendOptimizationRemarkMissed : DiagGroup<"pass-missed">;
1211def BackendOptimizationRemarkAnalysis : DiagGroup<"pass-analysis">;
1212def BackendOptimizationFailure : DiagGroup<"pass-failed">;
1213
1214// Instrumentation based profiling warnings.
1215def ProfileInstrMissing : DiagGroup<"profile-instr-missing">;
1216def ProfileInstrOutOfDate : DiagGroup<"profile-instr-out-of-date">;
1217def ProfileInstrUnprofiled : DiagGroup<"profile-instr-unprofiled">;
1218
1219// AddressSanitizer frontend instrumentation remarks.
1220def SanitizeAddressRemarks : DiagGroup<"sanitize-address">;
1221
1222// Issues with serialized diagnostics.
1223def SerializedDiagnostics : DiagGroup<"serialized-diagnostics">;
1224
1225// A warning group for warnings about code that clang accepts when
1226// compiling CUDA C/C++ but which is not compatible with the CUDA spec.
1227def CudaCompat : DiagGroup<"cuda-compat">;
1228
1229// Warning about unknown CUDA SDK version.
1230def CudaUnknownVersion: DiagGroup<"unknown-cuda-version">;
1231
1232// A warning group for warnings about features supported by HIP but
1233// ignored by CUDA.
1234def HIPOnly : DiagGroup<"hip-only">;
1235
1236// Warnings which cause linking of the runtime libraries like
1237// libc and the CRT to be skipped.
1238def AVRRtlibLinkingQuirks : DiagGroup<"avr-rtlib-linking-quirks">;
1239
1240// A warning group for things that will change semantics in the future.
1241def FutureCompat : DiagGroup<"future-compat">;
1242
1243def InvalidOrNonExistentDirectory : DiagGroup<"invalid-or-nonexistent-directory">;
1244
1245def OptionIgnored : DiagGroup<"option-ignored">;
1246
1247def UnknownArgument : DiagGroup<"unknown-argument">;
1248
1249// A warning group for warnings about code that clang accepts when
1250// compiling OpenCL C/C++ but which is not compatible with the SPIR spec.
1251def SpirCompat : DiagGroup<"spir-compat">;
1252
1253// Warning for the GlobalISel options.
1254def GlobalISel : DiagGroup<"global-isel">;
1255
1256// A warning group specifically for warnings related to function
1257// multiversioning.
1258def FunctionMultiVersioning : DiagGroup<"function-multiversion">;
1259
1260def NoDeref : DiagGroup<"noderef">;
1261
1262// A group for cross translation unit static analysis related warnings.
1263def CrossTU : DiagGroup<"ctu">;
1264
1265def CTADMaybeUnsupported : DiagGroup<"ctad-maybe-unsupported">;
1266
1267def FortifySource : DiagGroup<"fortify-source">;
1268
1269def MaxTokens : DiagGroup<"max-tokens"> {
1270  code Documentation = [{
1271The warning is issued if the number of pre-processor tokens exceeds
1272the token limit, which can be set in three ways:
1273
12741. As a limit at a specific point in a file, using the ``clang max_tokens_here``
1275   pragma:
1276
1277   .. code-block: c++
1278      #pragma clang max_tokens_here 1234
1279
12802. As a per-translation unit limit, using the ``-fmax-tokens=`` command-line
1281   flag:
1282
1283   .. code-block: console
1284      clang -c a.cpp -fmax-tokens=1234
1285
12863. As a per-translation unit limit using the ``clang max_tokens_total`` pragma,
1287   which works like and overrides the ``-fmax-tokens=`` flag:
1288
1289   .. code-block: c++
1290      #pragma clang max_tokens_total 1234
1291
1292These limits can be helpful in limiting code growth through included files.
1293
1294Setting a token limit of zero means no limit.
1295
1296Note that the warning is disabled by default, so -Wmax-tokens must be used
1297in addition with the pragmas or -fmax-tokens flag to get any warnings.
1298}];
1299}
1300
1301def WebAssemblyExceptionSpec : DiagGroup<"wasm-exception-spec">;
1302
1303def RTTI : DiagGroup<"rtti">;
1304
1305def OpenCLCoreFeaturesDiagGroup : DiagGroup<"pedantic-core-features">;
1306