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