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