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