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