]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td
Merge ^/head r320398 through r320572.
[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 AlignedAllocationUnavailable : DiagGroup<"aligned-allocation-unavailable">;
315 def OldStyleCast : DiagGroup<"old-style-cast">;
316 def : DiagGroup<"old-style-definition">;
317 def OutOfLineDeclaration : DiagGroup<"out-of-line-declaration">;
318 def : DiagGroup<"overflow">;
319 def ForwardClassReceiver : DiagGroup<"receiver-forward-class">;
320 def MethodAccess : DiagGroup<"objc-method-access">;
321 def ObjCReceiver : DiagGroup<"receiver-expr">;
322 def OperatorNewReturnsNull : DiagGroup<"new-returns-null">;
323 def OverlengthStrings : DiagGroup<"overlength-strings">;
324 def OverloadedVirtual : DiagGroup<"overloaded-virtual">;
325 def PrivateExtern : DiagGroup<"private-extern">;
326 def SelTypeCast : DiagGroup<"cast-of-sel-type">;
327 def FunctionDefInObjCContainer : DiagGroup<"function-def-in-objc-container">;
328 def BadFunctionCast : DiagGroup<"bad-function-cast">;
329 def ObjCPropertyImpl : DiagGroup<"objc-property-implementation">;
330 def ObjCPropertyNoAttribute : DiagGroup<"objc-property-no-attribute">;
331 def ObjCProtocolQualifiers : DiagGroup<"objc-protocol-qualifiers">;
332 def ObjCMissingSuperCalls : DiagGroup<"objc-missing-super-calls">;
333 def ObjCDesignatedInit : DiagGroup<"objc-designated-initializers">;
334 def ObjCRetainBlockProperty : DiagGroup<"objc-noncopy-retain-block-property">;
335 def ObjCReadonlyPropertyHasSetter : DiagGroup<"objc-readonly-with-setter-property">;
336 def ObjCInvalidIBOutletProperty : DiagGroup<"invalid-iboutlet">;
337 def ObjCRootClass : DiagGroup<"objc-root-class">;
338 def ObjCPointerIntrospectPerformSelector : DiagGroup<"deprecated-objc-pointer-introspection-performSelector">;
339 def ObjCPointerIntrospect : DiagGroup<"deprecated-objc-pointer-introspection", [ObjCPointerIntrospectPerformSelector]>;
340 def ObjCMultipleMethodNames : DiagGroup<"objc-multiple-method-names">;
341 def OpenCLUnsupportedRGBA: DiagGroup<"opencl-unsupported-rgba">;
342 def DeprecatedObjCIsaUsage : DiagGroup<"deprecated-objc-isa-usage">;
343 def ExplicitInitializeCall : DiagGroup<"explicit-initialize-call">;
344 def Packed : DiagGroup<"packed">;
345 def Padded : DiagGroup<"padded">;
346 def PessimizingMove : DiagGroup<"pessimizing-move">;
347 def PointerArith : DiagGroup<"pointer-arith">;
348 def PoundWarning : DiagGroup<"#warnings">;
349 def PoundPragmaMessage : DiagGroup<"#pragma-messages">,
350                          DiagCategory<"#pragma message Directive">;
351 def : DiagGroup<"pointer-to-int-cast">;
352 def : DiagGroup<"redundant-decls">;
353 def RedeclaredClassMember : DiagGroup<"redeclared-class-member">;
354 def GNURedeclaredEnum : DiagGroup<"gnu-redeclared-enum">;
355 def RedundantMove : DiagGroup<"redundant-move">;
356 def Register : DiagGroup<"register", [DeprecatedRegister]>;
357 def ReturnStackAddress : DiagGroup<"return-stack-address">;
358 def ReturnTypeCLinkage : DiagGroup<"return-type-c-linkage">;
359 def ReturnType : DiagGroup<"return-type", [ReturnTypeCLinkage]>;
360 def BindToTemporaryCopy : DiagGroup<"bind-to-temporary-copy",
361                                     [CXX98CompatBindToTemporaryCopy]>;
362 def SelfAssignmentField : DiagGroup<"self-assign-field">;
363 def SelfAssignment : DiagGroup<"self-assign", [SelfAssignmentField]>;
364 def SelfMove : DiagGroup<"self-move">;
365 def SemiBeforeMethodBody : DiagGroup<"semicolon-before-method-body">;
366 def Sentinel : DiagGroup<"sentinel">;
367 def MissingMethodReturnType : DiagGroup<"missing-method-return-type">;
368
369 def ShadowField : DiagGroup<"shadow-field">;
370 def ShadowFieldInConstructorModified : DiagGroup<"shadow-field-in-constructor-modified">;
371 def ShadowFieldInConstructor : DiagGroup<"shadow-field-in-constructor",
372                                          [ShadowFieldInConstructorModified]>;
373 def ShadowIvar : DiagGroup<"shadow-ivar">;
374 def ShadowUncapturedLocal : DiagGroup<"shadow-uncaptured-local">;
375
376 // -Wshadow-all is a catch-all for all shadowing. -Wshadow is just the
377 // shadowing that we think is unsafe.
378 def Shadow : DiagGroup<"shadow", [ShadowFieldInConstructorModified,
379                                   ShadowIvar]>;
380 def ShadowAll : DiagGroup<"shadow-all", [Shadow, ShadowFieldInConstructor,
381                                          ShadowUncapturedLocal, ShadowField]>;
382
383 def Shorten64To32 : DiagGroup<"shorten-64-to-32">;
384 def : DiagGroup<"sign-promo">;
385 def SignCompare : DiagGroup<"sign-compare">;
386 def : DiagGroup<"stack-protector">;
387 def : DiagGroup<"switch-default">;
388 def : DiagGroup<"synth">;
389 def SizeofArrayArgument : DiagGroup<"sizeof-array-argument">;
390 def SizeofArrayDecay : DiagGroup<"sizeof-array-decay">;
391 def SizeofPointerMemaccess : DiagGroup<"sizeof-pointer-memaccess">;
392 def StaticInInline : DiagGroup<"static-in-inline">;
393 def StaticLocalInInline : DiagGroup<"static-local-in-inline">;
394 def GNUStaticFloatInit : DiagGroup<"gnu-static-float-init">;
395 def StaticFloatInit : DiagGroup<"static-float-init", [GNUStaticFloatInit]>;
396 def GNUStatementExpression : DiagGroup<"gnu-statement-expression">;
397 def StringCompare : DiagGroup<"string-compare">;
398 def StringPlusInt : DiagGroup<"string-plus-int">;
399 def StringPlusChar : DiagGroup<"string-plus-char">;
400 def StrncatSize : DiagGroup<"strncat-size">;
401 def TautologicalOutOfRangeCompare : DiagGroup<"tautological-constant-out-of-range-compare">;
402 def TautologicalPointerCompare : DiagGroup<"tautological-pointer-compare">;
403 def TautologicalOverlapCompare : DiagGroup<"tautological-overlap-compare">;
404 def TautologicalUndefinedCompare : DiagGroup<"tautological-undefined-compare">;
405 def TautologicalCompare : DiagGroup<"tautological-compare",
406                                     [TautologicalOutOfRangeCompare,
407                                      TautologicalPointerCompare,
408                                      TautologicalOverlapCompare,
409                                      TautologicalUndefinedCompare]>;
410 def HeaderHygiene : DiagGroup<"header-hygiene">;
411 def DuplicateDeclSpecifier : DiagGroup<"duplicate-decl-specifier">;
412 def CompareDistinctPointerType : DiagGroup<"compare-distinct-pointer-types">;
413 def GNUUnionCast : DiagGroup<"gnu-union-cast">;
414 def GNUVariableSizedTypeNotAtEnd : DiagGroup<"gnu-variable-sized-type-not-at-end">;
415 def Varargs : DiagGroup<"varargs">;
416
417 def Unsequenced : DiagGroup<"unsequenced">;
418 // GCC name for -Wunsequenced
419 def : DiagGroup<"sequence-point", [Unsequenced]>;
420
421 // Preprocessor warnings.
422 def AmbiguousMacro : DiagGroup<"ambiguous-macro">;
423 def KeywordAsMacro : DiagGroup<"keyword-macro">;
424 def ReservedIdAsMacro : DiagGroup<"reserved-id-macro">;
425
426 // Just silence warnings about -Wstrict-aliasing for now.
427 def : DiagGroup<"strict-aliasing=0">;
428 def : DiagGroup<"strict-aliasing=1">;
429 def : DiagGroup<"strict-aliasing=2">;
430 def : DiagGroup<"strict-aliasing">;
431
432 // Just silence warnings about -Wstrict-overflow for now.
433 def : DiagGroup<"strict-overflow=0">;
434 def : DiagGroup<"strict-overflow=1">;
435 def : DiagGroup<"strict-overflow=2">;
436 def : DiagGroup<"strict-overflow=3">;
437 def : DiagGroup<"strict-overflow=4">;
438 def : DiagGroup<"strict-overflow=5">;
439 def : DiagGroup<"strict-overflow">;
440
441 def InvalidOffsetof : DiagGroup<"invalid-offsetof">;
442 def : DiagGroup<"strict-prototypes">;
443 def StrictSelector : DiagGroup<"strict-selector-match">;
444 def MethodDuplicate : DiagGroup<"duplicate-method-match">;
445 def ObjCCStringFormat : DiagGroup<"cstring-format-directive">;
446 def CoveredSwitchDefault : DiagGroup<"covered-switch-default">;
447 def SwitchBool     : DiagGroup<"switch-bool">;
448 def SwitchEnum     : DiagGroup<"switch-enum">;
449 def Switch         : DiagGroup<"switch">;
450 def ImplicitFallthroughPerFunction :
451   DiagGroup<"implicit-fallthrough-per-function">;
452 def ImplicitFallthrough  : DiagGroup<"implicit-fallthrough",
453                                      [ImplicitFallthroughPerFunction]>;
454 def InvalidPPToken : DiagGroup<"invalid-pp-token">;
455 def Trigraphs      : DiagGroup<"trigraphs">;
456
457 def : DiagGroup<"type-limits">;
458 def UndefinedReinterpretCast : DiagGroup<"undefined-reinterpret-cast">;
459 def ReinterpretBaseClass : DiagGroup<"reinterpret-base-class">;
460 def Unicode  : DiagGroup<"unicode">;
461 def UninitializedMaybe : DiagGroup<"conditional-uninitialized">;
462 def UninitializedSometimes : DiagGroup<"sometimes-uninitialized">;
463 def UninitializedStaticSelfInit : DiagGroup<"static-self-init">;
464 def Uninitialized  : DiagGroup<"uninitialized", [UninitializedSometimes,
465                                                  UninitializedStaticSelfInit]>;
466 def IgnoredPragmaIntrinsic : DiagGroup<"ignored-pragma-intrinsic">;
467 def UnknownPragmas : DiagGroup<"unknown-pragmas">;
468 def IgnoredPragmas : DiagGroup<"ignored-pragmas", [IgnoredPragmaIntrinsic]>;
469 def PragmaClangAttribute : DiagGroup<"pragma-clang-attribute">;
470 def Pragmas : DiagGroup<"pragmas", [UnknownPragmas, IgnoredPragmas,
471                                     PragmaClangAttribute]>;
472 def UnknownWarningOption : DiagGroup<"unknown-warning-option">;
473 def NSobjectAttribute : DiagGroup<"NSObject-attribute">;
474 def IndependentClassAttribute : DiagGroup<"IndependentClass-attribute">;
475 def UnknownAttributes : DiagGroup<"unknown-attributes">;
476 def IgnoredAttributes : DiagGroup<"ignored-attributes">;
477 def Attributes : DiagGroup<"attributes", [UnknownAttributes,
478                                           IgnoredAttributes]>;
479 def UnknownSanitizers : DiagGroup<"unknown-sanitizers">;
480 def UnnamedTypeTemplateArgs : DiagGroup<"unnamed-type-template-args",
481                                         [CXX98CompatUnnamedTypeTemplateArgs]>;
482 def UnsupportedFriend : DiagGroup<"unsupported-friend">;
483 def UnusedArgument : DiagGroup<"unused-argument">;
484 def UnusedCommandLineArgument : DiagGroup<"unused-command-line-argument">;
485 def IgnoredOptimizationArgument : DiagGroup<"ignored-optimization-argument">;
486 def InvalidCommandLineArgument : DiagGroup<"invalid-command-line-argument",
487                                            [IgnoredOptimizationArgument]>;
488 def UnusedComparison : DiagGroup<"unused-comparison">;
489 def UnusedExceptionParameter : DiagGroup<"unused-exception-parameter">;
490 def UnneededInternalDecl : DiagGroup<"unneeded-internal-declaration">;
491 def UnneededMemberFunction : DiagGroup<"unneeded-member-function">;
492 def UnusedPrivateField : DiagGroup<"unused-private-field">;
493 def UnusedFunction : DiagGroup<"unused-function", [UnneededInternalDecl]>;
494 def UnusedTemplate : DiagGroup<"unused-template", [UnneededInternalDecl]>;
495 def UnusedMemberFunction : DiagGroup<"unused-member-function",
496                                      [UnneededMemberFunction]>;
497 def UnusedLabel : DiagGroup<"unused-label">;
498 def UnusedLambdaCapture : DiagGroup<"unused-lambda-capture">;
499 def UnusedParameter : DiagGroup<"unused-parameter">;
500 def UnusedResult : DiagGroup<"unused-result">;
501 def PotentiallyEvaluatedExpression : DiagGroup<"potentially-evaluated-expression">;
502 def UnevaluatedExpression : DiagGroup<"unevaluated-expression",
503                                       [PotentiallyEvaluatedExpression]>;
504 def UnusedValue : DiagGroup<"unused-value", [UnusedComparison, UnusedResult,
505                                              UnevaluatedExpression]>;
506 def UnusedConstVariable : DiagGroup<"unused-const-variable">;
507 def UnusedVariable : DiagGroup<"unused-variable",
508                                [UnusedConstVariable]>;
509 def UnusedLocalTypedef : DiagGroup<"unused-local-typedef">;
510 def UnusedPropertyIvar :  DiagGroup<"unused-property-ivar">;
511 def UnusedGetterReturnValue : DiagGroup<"unused-getter-return-value">;
512 def UsedButMarkedUnused : DiagGroup<"used-but-marked-unused">;
513 def UserDefinedLiterals : DiagGroup<"user-defined-literals">;
514 def UserDefinedWarnings : DiagGroup<"user-defined-warnings">;
515 def Reorder : DiagGroup<"reorder">;
516 def UndeclaredSelector : DiagGroup<"undeclared-selector">;
517 def ImplicitAtomic : DiagGroup<"implicit-atomic-properties">;
518 def CustomAtomic : DiagGroup<"custom-atomic-properties">;
519 def AtomicProperties : DiagGroup<"atomic-properties",
520                                  [ImplicitAtomic, CustomAtomic]>;
521 def ARCUnsafeRetainedAssign : DiagGroup<"arc-unsafe-retained-assign">;
522 def ARCRetainCycles : DiagGroup<"arc-retain-cycles">;
523 def ARCNonPodMemAccess : DiagGroup<"arc-non-pod-memaccess">;
524 def AutomaticReferenceCounting : DiagGroup<"arc",
525                                            [ARCUnsafeRetainedAssign,
526                                             ARCRetainCycles,
527                                             ARCNonPodMemAccess]>;
528 def ARCRepeatedUseOfWeakMaybe : DiagGroup<"arc-maybe-repeated-use-of-weak">;
529 def ARCRepeatedUseOfWeak : DiagGroup<"arc-repeated-use-of-weak",
530                                      [ARCRepeatedUseOfWeakMaybe]>;
531 def BlockCaptureAutoReleasing : DiagGroup<"block-capture-autoreleasing">;
532 def ObjCBridge : DiagGroup<"bridge-cast">;
533
534 def DeallocInCategory:DiagGroup<"dealloc-in-category">;
535 def SelectorTypeMismatch : DiagGroup<"selector-type-mismatch">;
536 def Selector : DiagGroup<"selector", [SelectorTypeMismatch]>;
537 def Protocol : DiagGroup<"protocol">;
538 def AtProtocol : DiagGroup<"at-protocol">;
539 def PropertyAccessDotSyntax: DiagGroup<"property-access-dot-syntax">;
540 def PropertyAttr : DiagGroup<"property-attribute-mismatch">;
541 def SuperSubClassMismatch : DiagGroup<"super-class-method-mismatch">;
542 def OverridingMethodMismatch : DiagGroup<"overriding-method-mismatch">;
543 def VariadicMacros : DiagGroup<"variadic-macros">;
544 def VectorConversion : DiagGroup<"vector-conversion">;      // clang specific
545 def VexingParse : DiagGroup<"vexing-parse">;
546 def VLA : DiagGroup<"vla">;
547 def VLAExtension : DiagGroup<"vla-extension">;
548 def VolatileRegisterVar : DiagGroup<"volatile-register-var">;
549 def Visibility : DiagGroup<"visibility">;
550 def ZeroLengthArray : DiagGroup<"zero-length-array">;
551 def GNUZeroLineDirective : DiagGroup<"gnu-zero-line-directive">;
552 def GNUZeroVariadicMacroArguments : DiagGroup<"gnu-zero-variadic-macro-arguments">;
553 def Fallback : DiagGroup<"fallback">;
554
555 // This covers both the deprecated case (in C++98)
556 // and the extension case (in C++11 onwards).
557 def WritableStrings : DiagGroup<"writable-strings", [DeprecatedWritableStr]>;
558
559 // GCC calls -Wdeprecated-writable-strings -Wwrite-strings.
560 //
561 // Bizarrely, this warning flag enables -fconst-strings in C. This is
562 // GCC-compatible, but really weird.
563 //
564 // FIXME: Should this affect C++11 (where this is an error,
565 //        not just deprecated) or not?
566 def GCCWriteStrings : DiagGroup<"write-strings" , [WritableStrings]>;
567
568 def CharSubscript : DiagGroup<"char-subscripts">;
569 def LargeByValueCopy : DiagGroup<"large-by-value-copy">;
570 def DuplicateArgDecl : DiagGroup<"duplicate-method-arg">;
571 def SignedEnumBitfield : DiagGroup<"signed-enum-bitfield">;
572
573 // Unreachable code warning groups.
574 //
575 //  The goal is make -Wunreachable-code on by default, in -Wall, or at
576 //  least actively used, with more noisy versions of the warning covered
577 //  under separate flags.
578 //
579 def UnreachableCodeLoopIncrement : DiagGroup<"unreachable-code-loop-increment">;
580 def UnreachableCode : DiagGroup<"unreachable-code",
581                                 [UnreachableCodeLoopIncrement]>;
582 def UnreachableCodeBreak : DiagGroup<"unreachable-code-break">;
583 def UnreachableCodeReturn : DiagGroup<"unreachable-code-return">;
584 def UnreachableCodeAggressive : DiagGroup<"unreachable-code-aggressive",
585                                     [UnreachableCode,
586                                      UnreachableCodeBreak,
587                                      UnreachableCodeReturn]>;
588
589 // Aggregation warning settings.
590
591 // Populate -Waddress with warnings from other groups.
592 def : DiagGroup<"address", [PointerBoolConversion,
593                             StringCompare,
594                             TautologicalPointerCompare]>;
595
596 // -Widiomatic-parentheses contains warnings about 'idiomatic'
597 // missing parentheses;  it is off by default.  We do not include it
598 // in -Wparentheses because most users who use -Wparentheses explicitly
599 // do not want these warnings.
600 def ParenthesesOnEquality : DiagGroup<"parentheses-equality">;
601 def Parentheses : DiagGroup<"parentheses",
602                             [LogicalOpParentheses,
603                              LogicalNotParentheses,
604                              BitwiseOpParentheses,
605                              ShiftOpParentheses,
606                              OverloadedShiftOpParentheses,
607                              ParenthesesOnEquality,
608                              DanglingElse]>;
609
610 // -Wconversion has its own warnings, but we split a few out for
611 // legacy reasons:
612 //   - some people want just 64-to-32 warnings
613 //   - conversion warnings with constant sources are on by default
614 //   - conversion warnings for literals are on by default
615 //   - bool-to-pointer conversion warnings are on by default
616 //   - __null-to-integer conversion warnings are on by default
617 def Conversion : DiagGroup<"conversion",
618                            [BoolConversion,
619                             ConstantConversion,
620                             EnumConversion,
621                             BitFieldEnumConversion,
622                             FloatConversion,
623                             Shorten64To32,
624                             IntConversion,
625                             LiteralConversion,
626                             NonLiteralNullConversion, // (1-1)->pointer (etc)
627                             NullConversion, // NULL->non-pointer
628                             ObjCLiteralConversion,
629                             SignConversion,
630                             StringConversion]>,
631                  DiagCategory<"Value Conversion Issue">;
632
633 def Unused : DiagGroup<"unused",
634                        [UnusedArgument, UnusedFunction, UnusedLabel,
635                         // UnusedParameter, (matches GCC's behavior)
636                         // UnusedTemplate, (clean-up libc++ before enabling)
637                         // UnusedMemberFunction, (clean-up llvm before enabling)
638                         UnusedPrivateField, UnusedLambdaCapture,
639                         UnusedLocalTypedef, UnusedValue, UnusedVariable,
640                         UnusedPropertyIvar]>,
641                         DiagCategory<"Unused Entity Issue">;
642
643 // Format settings.
644 def FormatInvalidSpecifier : DiagGroup<"format-invalid-specifier">;
645 def FormatSecurity : DiagGroup<"format-security">;
646 def FormatNonStandard : DiagGroup<"format-non-iso">;
647 def FormatY2K : DiagGroup<"format-y2k">;
648 def FormatPedantic : DiagGroup<"format-pedantic">;
649 def Format : DiagGroup<"format",
650                        [FormatExtraArgs, FormatZeroLength, NonNull,
651                         FormatSecurity, FormatY2K, FormatInvalidSpecifier]>,
652              DiagCategory<"Format String Issue">;
653 def FormatNonLiteral : DiagGroup<"format-nonliteral">;
654 def Format2 : DiagGroup<"format=2",
655                         [FormatNonLiteral, FormatSecurity, FormatY2K]>;
656
657 def TypeSafety : DiagGroup<"type-safety">;
658
659 def IncompatibleExceptionSpec : DiagGroup<"incompatible-exception-spec">;
660
661 def IntToVoidPointerCast : DiagGroup<"int-to-void-pointer-cast">;
662 def IntToPointerCast : DiagGroup<"int-to-pointer-cast",
663                                  [IntToVoidPointerCast]>;
664
665 def Move : DiagGroup<"move", [PessimizingMove, RedundantMove, SelfMove]>;
666
667 def Extra : DiagGroup<"extra", [
668     MissingFieldInitializers,
669     IgnoredQualifiers,
670     InitializerOverrides,
671     SemiBeforeMethodBody,
672     MissingMethodReturnType,
673     SignCompare,
674     UnusedParameter
675   ]>;
676
677 def Most : DiagGroup<"most", [
678     CharSubscript,
679     Comment,
680     DeleteNonVirtualDtor,
681     ForLoopAnalysis,
682     Format,
683     Implicit,
684     InfiniteRecursion,
685     MismatchedTags,
686     MissingBraces,
687     Move,
688     MultiChar,
689     Reorder,
690     ReturnType,
691     SelfAssignment,
692     SelfMove,
693     SizeofArrayArgument,
694     SizeofArrayDecay,
695     StringPlusInt,
696     Trigraphs,
697     Uninitialized,
698     UnknownPragmas,
699     Unused,
700     VolatileRegisterVar,
701     ObjCMissingSuperCalls,
702     ObjCDesignatedInit,
703     OverloadedVirtual,
704     PrivateExtern,
705     SelTypeCast,
706     ExternCCompat,
707     UserDefinedWarnings
708  ]>;
709
710 // Thread Safety warnings 
711 def ThreadSafetyAttributes : DiagGroup<"thread-safety-attributes">;
712 def ThreadSafetyAnalysis   : DiagGroup<"thread-safety-analysis">;
713 def ThreadSafetyPrecise    : DiagGroup<"thread-safety-precise">;
714 def ThreadSafetyReference  : DiagGroup<"thread-safety-reference">;
715 def ThreadSafetyNegative   : DiagGroup<"thread-safety-negative">;
716 def ThreadSafety : DiagGroup<"thread-safety",
717                              [ThreadSafetyAttributes, 
718                               ThreadSafetyAnalysis,
719                               ThreadSafetyPrecise,
720                               ThreadSafetyReference]>;
721 def ThreadSafetyVerbose : DiagGroup<"thread-safety-verbose">;
722 def ThreadSafetyBeta : DiagGroup<"thread-safety-beta">;
723
724 // Uniqueness Analysis warnings
725 def Consumed       : DiagGroup<"consumed">;
726
727 // Note that putting warnings in -Wall will not disable them by default. If a
728 // warning should be active _only_ when -Wall is passed in, mark it as
729 // DefaultIgnore in addition to putting it here.
730 def All : DiagGroup<"all", [Most, Parentheses, Switch, SwitchBool]>;
731
732 // Warnings that should be in clang-cl /w4.
733 def : DiagGroup<"CL4", [All, Extra]>;
734
735 // Warnings enabled by -pedantic.  This is magically filled in by TableGen.
736 def Pedantic : DiagGroup<"pedantic">;
737
738 // Aliases.
739 def : DiagGroup<"", [Extra]>;                   // -W = -Wextra
740 def : DiagGroup<"endif-labels", [ExtraTokens]>; // -Wendif-labels=-Wextra-tokens
741 def : DiagGroup<"cpp", [PoundWarning]>;         // -Wcpp = -W#warnings
742 def : DiagGroup<"comments", [Comment]>;         // -Wcomments = -Wcomment
743 def : DiagGroup<"conversion-null",
744                 [NullConversion]>; // -Wconversion-null = -Wnull-conversion
745 def : DiagGroup<"bool-conversions",
746                 [BoolConversion]>; // -Wbool-conversions  = -Wbool-conversion
747 def : DiagGroup<"int-conversions",
748                 [IntConversion]>; // -Wint-conversions = -Wint-conversion
749 def : DiagGroup<"vector-conversions",
750                 [VectorConversion]>; // -Wvector-conversions = -Wvector-conversion
751 def : DiagGroup<"unused-local-typedefs", [UnusedLocalTypedef]>;
752                 // -Wunused-local-typedefs = -Wunused-local-typedef
753
754 // A warning group for warnings that we want to have on by default in clang,
755 // but which aren't on by default in GCC.
756 def NonGCC : DiagGroup<"non-gcc",
757     [SignCompare, Conversion, LiteralRange]>;
758
759 // A warning group for warnings about using C++11 features as extensions in
760 // earlier C++ versions.
761 def CXX11 : DiagGroup<"c++11-extensions", [CXX11ExtraSemi, CXX11InlineNamespace,
762                                            CXX11LongLong]>;
763
764 // A warning group for warnings about using C++14 features as extensions in
765 // earlier C++ versions.
766 def CXX14 : DiagGroup<"c++14-extensions", [CXX14BinaryLiteral]>;
767
768 // A warning group for warnings about using C++1z features as extensions in
769 // earlier C++ versions.
770 def CXX1z : DiagGroup<"c++1z-extensions">;
771
772 def : DiagGroup<"c++0x-extensions", [CXX11]>;
773 def : DiagGroup<"c++1y-extensions", [CXX14]>;
774
775 def DelegatingCtorCycles :
776   DiagGroup<"delegating-ctor-cycles">;
777
778 // A warning group for warnings about using C11 features as extensions.
779 def C11 : DiagGroup<"c11-extensions">;
780
781 // A warning group for warnings about using C99 features as extensions.
782 def C99 : DiagGroup<"c99-extensions">;
783
784 // A warning group for warnings about GCC extensions.
785 def GNU : DiagGroup<"gnu", [GNUAlignofExpression, GNUAnonymousStruct,
786                             GNUAutoType,
787                             GNUBinaryLiteral, GNUCaseRange,
788                             GNUComplexInteger, GNUCompoundLiteralInitializer,
789                             GNUConditionalOmittedOperand, GNUDesignator,
790                             GNUEmptyInitializer, GNUEmptyStruct,
791                             VLAExtension, GNUFlexibleArrayInitializer,
792                             GNUFlexibleArrayUnionMember, GNUFoldingConstant,
793                             GNUImaginaryConstant, GNUIncludeNext,
794                             GNULabelsAsValue,
795                             RedeclaredClassMember, GNURedeclaredEnum,
796                             GNUStatementExpression, GNUStaticFloatInit,
797                             GNUStringLiteralOperatorTemplate,
798                             GNUUnionCast, GNUVariableSizedTypeNotAtEnd,
799                             ZeroLengthArray, GNUZeroLineDirective,
800                             GNUZeroVariadicMacroArguments]>;
801 // A warning group for warnings about code that clang accepts but gcc doesn't.
802 def GccCompat : DiagGroup<"gcc-compat">;
803
804 // Warnings for Microsoft extensions.
805 def MicrosoftCharize : DiagGroup<"microsoft-charize">;
806 def MicrosoftInclude : DiagGroup<"microsoft-include">;
807 def MicrosoftCppMacro : DiagGroup<"microsoft-cpp-macro">;
808 def MicrosoftFixedEnum : DiagGroup<"microsoft-fixed-enum">;
809 def MicrosoftSealed : DiagGroup<"microsoft-sealed">;
810 def MicrosoftUnqualifiedFriend : DiagGroup<"microsoft-unqualified-friend">;
811 def MicrosoftExceptionSpec : DiagGroup<"microsoft-exception-spec">;
812 def MicrosoftUsingDecl : DiagGroup<"microsoft-using-decl">;
813 def MicrosoftMutableReference : DiagGroup<"microsoft-mutable-reference">;
814 def MicrosoftPureDefinition : DiagGroup<"microsoft-pure-definition">;
815 def MicrosoftUnionMemberReference : DiagGroup<
816     "microsoft-union-member-reference">;
817 def MicrosoftExplicitConstructorCall : DiagGroup<
818     "microsoft-explicit-constructor-call">;
819 def MicrosoftEnumValue : DiagGroup<"microsoft-enum-value">;
820 def MicrosoftDefaultArgRedefinition :
821     DiagGroup<"microsoft-default-arg-redefinition">;
822 def MicrosoftTemplate : DiagGroup<"microsoft-template">;
823 def MicrosoftInconsistentDllImport : DiagGroup<"inconsistent-dllimport">;
824 def MicrosoftRedeclareStatic : DiagGroup<"microsoft-redeclare-static">;
825 def MicrosoftEnumForwardReference :
826     DiagGroup<"microsoft-enum-forward-reference">;
827 def MicrosoftGoto : DiagGroup<"microsoft-goto">;
828 def MicrosoftFlexibleArray : DiagGroup<"microsoft-flexible-array">;
829 def MicrosoftExtraQualification : DiagGroup<"microsoft-extra-qualification">;
830 def MicrosoftCast : DiagGroup<"microsoft-cast">;
831 def MicrosoftConstInit : DiagGroup<"microsoft-const-init">;
832 def MicrosoftVoidPseudoDtor : DiagGroup<"microsoft-void-pseudo-dtor">;
833 def MicrosoftAnonTag : DiagGroup<"microsoft-anon-tag">;
834 def MicrosoftCommentPaste : DiagGroup<"microsoft-comment-paste">;
835 def MicrosoftEndOfFile : DiagGroup<"microsoft-end-of-file">;
836 // Aliases.
837 def : DiagGroup<"msvc-include", [MicrosoftInclude]>;
838                 // -Wmsvc-include = -Wmicrosoft-include
839
840 // Warnings group for warnings about Microsoft extensions.
841 def Microsoft : DiagGroup<"microsoft",
842     [MicrosoftCharize, MicrosoftInclude, MicrosoftCppMacro, MicrosoftFixedEnum,
843      MicrosoftSealed, MicrosoftUnqualifiedFriend, MicrosoftExceptionSpec,
844      MicrosoftUsingDecl, MicrosoftMutableReference, MicrosoftPureDefinition,
845      MicrosoftUnionMemberReference, MicrosoftExplicitConstructorCall,
846      MicrosoftEnumValue, MicrosoftDefaultArgRedefinition, MicrosoftTemplate,
847      MicrosoftRedeclareStatic, MicrosoftEnumForwardReference, MicrosoftGoto,
848      MicrosoftFlexibleArray, MicrosoftExtraQualification, MicrosoftCast,
849      MicrosoftConstInit, MicrosoftVoidPseudoDtor, MicrosoftAnonTag,
850      MicrosoftCommentPaste, MicrosoftEndOfFile,
851      MicrosoftInconsistentDllImport]>;
852
853 def ClangClPch : DiagGroup<"clang-cl-pch">;
854
855 def ObjCNonUnifiedException : DiagGroup<"objc-nonunified-exceptions">;
856
857 def ObjCProtocolMethodImpl : DiagGroup<"objc-protocol-method-implementation">;
858
859 def ObjCNoPropertyAutoSynthesis : DiagGroup<"objc-property-synthesis">;
860
861 // ObjC API warning groups.
862 def ObjCRedundantLiteralUse : DiagGroup<"objc-redundant-literal-use">;
863 def ObjCRedundantAPIUse : DiagGroup<"objc-redundant-api-use", [
864     ObjCRedundantLiteralUse
865   ]>;
866
867 def ObjCCocoaAPI : DiagGroup<"objc-cocoa-api", [
868     ObjCRedundantAPIUse
869   ]>;
870
871 def ObjCStringComparison : DiagGroup<"objc-string-compare">;
872 def ObjCStringConcatenation : DiagGroup<"objc-string-concatenation">;
873 def ObjCLiteralComparison : DiagGroup<"objc-literal-compare", [
874     ObjCStringComparison
875   ]>;
876
877 // Inline ASM warnings.
878 def ASMOperandWidths : DiagGroup<"asm-operand-widths">;
879 def ASMIgnoredQualifier : DiagGroup<"asm-ignored-qualifier">;
880 def ASM : DiagGroup<"asm", [
881     ASMOperandWidths, ASMIgnoredQualifier
882   ]>;
883
884 // OpenMP warnings.
885 def SourceUsesOpenMP : DiagGroup<"source-uses-openmp">;
886 def OpenMPClauses : DiagGroup<"openmp-clauses">;
887 def OpenMPLoopForm : DiagGroup<"openmp-loop-form">;
888 def OpenMPTarget : DiagGroup<"openmp-target">;
889
890 // Backend warnings.
891 def BackendInlineAsm : DiagGroup<"inline-asm">;
892 def BackendFrameLargerThanEQ : DiagGroup<"frame-larger-than=">;
893 def BackendPlugin : DiagGroup<"backend-plugin">;
894 def RemarkBackendPlugin : DiagGroup<"remark-backend-plugin">;
895 def BackendOptimizationRemark : DiagGroup<"pass">;
896 def BackendOptimizationRemarkMissed : DiagGroup<"pass-missed">;
897 def BackendOptimizationRemarkAnalysis : DiagGroup<"pass-analysis">;
898 def BackendOptimizationFailure : DiagGroup<"pass-failed">;
899
900 // Instrumentation based profiling warnings.
901 def ProfileInstrMissing : DiagGroup<"profile-instr-missing">;
902 def ProfileInstrOutOfDate : DiagGroup<"profile-instr-out-of-date">;
903 def ProfileInstrUnprofiled : DiagGroup<"profile-instr-unprofiled">;
904
905 // AddressSanitizer frontend instrumentation remarks.
906 def SanitizeAddressRemarks : DiagGroup<"sanitize-address">;
907
908 // Issues with serialized diagnostics.
909 def SerializedDiagnostics : DiagGroup<"serialized-diagnostics">;
910
911 // A warning group for warnings about code that clang accepts when
912 // compiling CUDA C/C++ but which is not compatible with the CUDA spec.
913 def CudaCompat : DiagGroup<"cuda-compat">;
914
915 // A warning group for things that will change semantics in the future.
916 def FutureCompat : DiagGroup<"future-compat">;
917
918 def InvalidOrNonExistentDirectory : DiagGroup<"invalid-or-nonexistent-directory">;
919
920 def OptionIgnored : DiagGroup<"option-ignored">;
921
922 def UnknownArgument : DiagGroup<"unknown-argument">;
923
924 // A warning group for warnings about code that clang accepts when
925 // compiling OpenCL C/C++ but which is not compatible with the SPIR spec.
926 def SpirCompat : DiagGroup<"spir-compat">;