• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
10def ImplicitFunctionDeclare : DiagGroup<"implicit-function-declaration">;
11def ImplicitInt : DiagGroup<"implicit-int">;
12
13// Aggregation warning settings.
14def Implicit : DiagGroup<"implicit", [
15    ImplicitFunctionDeclare,
16    ImplicitInt
17]>;
18
19// Empty DiagGroups are recognized by clang but ignored.
20def : DiagGroup<"abi">;
21def : DiagGroup<"address">;
22def AddressOfTemporary : DiagGroup<"address-of-temporary">;
23def : DiagGroup<"aggregate-return">;
24def AmbigMemberTemplate : DiagGroup<"ambiguous-member-template">;
25def ArrayBounds : DiagGroup<"array-bounds">;
26def ArrayBoundsPointerArithmetic : DiagGroup<"array-bounds-pointer-arithmetic">;
27def Availability : DiagGroup<"availability">;
28def Section : DiagGroup<"section">;
29def AutoImport : DiagGroup<"auto-import">;
30def BitFieldConstantConversion : DiagGroup<"bitfield-constant-conversion">;
31def ConstantConversion :
32  DiagGroup<"constant-conversion", [ BitFieldConstantConversion ] >;
33def LiteralConversion : DiagGroup<"literal-conversion">;
34def StringConversion : DiagGroup<"string-conversion">;
35def SignConversion : DiagGroup<"sign-conversion">;
36def BoolConversion : DiagGroup<"bool-conversion">;
37def IntConversion : DiagGroup<"int-conversion">;
38def EnumConversion : DiagGroup<"enum-conversion">;
39def NonLiteralNullConversion : DiagGroup<"non-literal-null-conversion">;
40def NullConversion : DiagGroup<"null-conversion">;
41def ImplicitConversionFloatingPointToBool :
42  DiagGroup<"implicit-conversion-floating-point-to-bool">;
43def BadArrayNewLength : DiagGroup<"bad-array-new-length">;
44def BuiltinMacroRedefined : DiagGroup<"builtin-macro-redefined">;
45def BuiltinRequiresHeader : DiagGroup<"builtin-requires-header">;
46def C99Compat : DiagGroup<"c99-compat">;
47def CXXCompat: DiagGroup<"c++-compat">;
48def CastAlign : DiagGroup<"cast-align">;
49def : DiagGroup<"cast-qual">;
50def : DiagGroup<"char-align">;
51def Comment : DiagGroup<"comment">;
52def ConfigMacros : DiagGroup<"config-macros">;
53def : DiagGroup<"ctor-dtor-privacy">;
54def GNUDesignator : DiagGroup<"gnu-designator">;
55
56def DeleteNonVirtualDtor : DiagGroup<"delete-non-virtual-dtor">;
57def AbstractFinalClass : DiagGroup<"abstract-final-class">;
58
59def DeprecatedDeclarations : DiagGroup<"deprecated-declarations">;
60def DeprecatedImplementations :DiagGroup<"deprecated-implementations">;
61def DeprecatedRegister : DiagGroup<"deprecated-register">;
62def DeprecatedWritableStr : DiagGroup<"deprecated-writable-strings">;
63// FIXME: Why are DeprecatedImplementations and DeprecatedWritableStr
64// not in this group?
65def Deprecated : DiagGroup<"deprecated", [DeprecatedDeclarations,
66                                          DeprecatedRegister]>,
67                 DiagCategory<"Deprecations">;
68
69def : DiagGroup<"disabled-optimization">;
70def : DiagGroup<"discard-qual">;
71def : DiagGroup<"div-by-zero">;
72
73def DocumentationHTML : DiagGroup<"documentation-html">;
74def DocumentationUnknownCommand : DiagGroup<"documentation-unknown-command">;
75def DocumentationPedantic : DiagGroup<"documentation-pedantic",
76                                      [DocumentationUnknownCommand]>;
77def DocumentationDeprecatedSync : DiagGroup<"documentation-deprecated-sync">;
78def Documentation : DiagGroup<"documentation",
79                              [DocumentationHTML,
80                               DocumentationDeprecatedSync]>;
81
82def EmptyBody : DiagGroup<"empty-body">;
83def ExtraTokens : DiagGroup<"extra-tokens">;
84def CXX11ExtraSemi : DiagGroup<"c++11-extra-semi">;
85def ExtraSemi : DiagGroup<"extra-semi", [CXX11ExtraSemi]>;
86
87def FormatExtraArgs : DiagGroup<"format-extra-args">;
88def FormatZeroLength : DiagGroup<"format-zero-length">;
89
90// Warnings for C++1y code which is not compatible with prior C++ standards.
91def CXXPre1yCompat : DiagGroup<"c++98-c++11-compat">;
92def CXXPre1yCompatPedantic : DiagGroup<"c++98-c++11-compat-pedantic",
93                                       [CXXPre1yCompat]>;
94
95def CXX98CompatBindToTemporaryCopy :
96  DiagGroup<"c++98-compat-bind-to-temporary-copy">;
97def CXX98CompatLocalTypeTemplateArgs :
98  DiagGroup<"c++98-compat-local-type-template-args">;
99def CXX98CompatUnnamedTypeTemplateArgs :
100  DiagGroup<"c++98-compat-unnamed-type-template-args">;
101
102def CXX98Compat : DiagGroup<"c++98-compat",
103                            [CXX98CompatBindToTemporaryCopy,
104                             CXX98CompatLocalTypeTemplateArgs,
105                             CXX98CompatUnnamedTypeTemplateArgs,
106                             CXXPre1yCompat]>;
107// Warnings for C++11 features which are Extensions in C++98 mode.
108def CXX98CompatPedantic : DiagGroup<"c++98-compat-pedantic",
109                                    [CXX98Compat,
110                                     CXXPre1yCompatPedantic]>;
111
112def CXX11Narrowing : DiagGroup<"c++11-narrowing">;
113
114// Original name of this warning in Clang
115def : DiagGroup<"c++0x-narrowing", [CXX11Narrowing]>;
116
117// Name of this warning in GCC
118def : DiagGroup<"narrowing", [CXX11Narrowing]>;
119
120def CXX11CompatReservedUserDefinedLiteral :
121  DiagGroup<"c++11-compat-reserved-user-defined-literal">;
122def ReservedUserDefinedLiteral :
123  DiagGroup<"reserved-user-defined-literal",
124            [CXX11CompatReservedUserDefinedLiteral]>;
125
126def CXX11Compat : DiagGroup<"c++11-compat",
127                            [CXX11Narrowing,
128                             CXX11CompatReservedUserDefinedLiteral,
129                             CXXPre1yCompat]>;
130def : DiagGroup<"c++0x-compat", [CXX11Compat]>;
131def CXX11CompatPedantic : DiagGroup<"c++11-compat-pedantic",
132                                    [CXXPre1yCompatPedantic]>;
133
134def : DiagGroup<"effc++">;
135def DivZero : DiagGroup<"division-by-zero">;
136def ExitTimeDestructors : DiagGroup<"exit-time-destructors">;
137def FlexibleArrayExtensions : DiagGroup<"flexible-array-extensions">;
138def FourByteMultiChar : DiagGroup<"four-char-constants">;
139def GlobalConstructors : DiagGroup<"global-constructors">;
140def BitwiseOpParentheses: DiagGroup<"bitwise-op-parentheses">;
141def LogicalOpParentheses: DiagGroup<"logical-op-parentheses">;
142def LogicalNotParentheses: DiagGroup<"logical-not-parentheses">;
143def ShiftOpParentheses: DiagGroup<"shift-op-parentheses">;
144def OverloadedShiftOpParentheses: DiagGroup<"overloaded-shift-op-parentheses">;
145def DanglingElse: DiagGroup<"dangling-else">;
146def DanglingField : DiagGroup<"dangling-field">;
147def DistributedObjectModifiers : DiagGroup<"distributed-object-modifiers">;
148def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">;
149def : DiagGroup<"import">;
150def IncompatiblePointerTypesDiscardsQualifiers
151  : DiagGroup<"incompatible-pointer-types-discards-qualifiers">;
152def IncompatiblePointerTypes
153  : DiagGroup<"incompatible-pointer-types",
154    [IncompatiblePointerTypesDiscardsQualifiers]>;
155def IncompleteUmbrella : DiagGroup<"incomplete-umbrella">;
156def IncompleteModule : DiagGroup<"incomplete-module", [IncompleteUmbrella]>;
157def InvalidNoreturn : DiagGroup<"invalid-noreturn">;
158def InvalidSourceEncoding : DiagGroup<"invalid-source-encoding">;
159def KNRPromotedParameter : DiagGroup<"knr-promoted-parameter">;
160def : DiagGroup<"init-self">;
161def : DiagGroup<"inline">;
162def : DiagGroup<"invalid-pch">;
163def LiteralRange : DiagGroup<"literal-range">;
164def LocalTypeTemplateArgs : DiagGroup<"local-type-template-args",
165                                      [CXX98CompatLocalTypeTemplateArgs]>;
166def LoopAnalysis : DiagGroup<"loop-analysis">;
167def MalformedWarningCheck : DiagGroup<"malformed-warning-check">;
168def Main : DiagGroup<"main">;
169def MainReturnType : DiagGroup<"main-return-type">;
170def MissingBraces : DiagGroup<"missing-braces">;
171def MissingDeclarations: DiagGroup<"missing-declarations">;
172def : DiagGroup<"missing-format-attribute">;
173def : DiagGroup<"missing-include-dirs">;
174def MissingNoreturn : DiagGroup<"missing-noreturn">;
175def MultiChar : DiagGroup<"multichar">;
176def : DiagGroup<"nested-externs">;
177def CXX11LongLong : DiagGroup<"c++11-long-long">;
178def LongLong : DiagGroup<"long-long", [CXX11LongLong]>;
179def MethodSignatures : DiagGroup<"method-signatures">;
180def MismatchedParameterTypes : DiagGroup<"mismatched-parameter-types">;
181def MismatchedReturnTypes : DiagGroup<"mismatched-return-types">;
182def MismatchedTags : DiagGroup<"mismatched-tags">;
183def MissingFieldInitializers : DiagGroup<"missing-field-initializers">;
184def ModuleConflict : DiagGroup<"module-conflict">;
185def NullArithmetic : DiagGroup<"null-arithmetic">;
186def NullCharacter : DiagGroup<"null-character">;
187def NullDereference : DiagGroup<"null-dereference">;
188def InitializerOverrides : DiagGroup<"initializer-overrides">;
189def NonNull : DiagGroup<"nonnull">;
190def NonPODVarargs : DiagGroup<"non-pod-varargs">;
191def : DiagGroup<"nonportable-cfstrings">;
192def NonVirtualDtor : DiagGroup<"non-virtual-dtor">;
193def OveralignedType : DiagGroup<"over-aligned">;
194def : DiagGroup<"old-style-cast">;
195def : DiagGroup<"old-style-definition">;
196def OutOfLineDeclaration : DiagGroup<"out-of-line-declaration">;
197def : DiagGroup<"overflow">;
198def ForwardClassReceiver : DiagGroup<"receiver-forward-class">;
199def MethodAccess : DiagGroup<"objc-method-access">;
200def ObjCReceiver : DiagGroup<"receiver-expr">;
201def OverlengthStrings : DiagGroup<"overlength-strings">;
202def OverloadedVirtual : DiagGroup<"overloaded-virtual">;
203def PrivateExtern : DiagGroup<"private-extern">;
204def SelTypeCast : DiagGroup<"cast-of-sel-type">;
205def BadFunctionCast : DiagGroup<"bad-function-cast">;
206def ObjCPropertyImpl : DiagGroup<"objc-property-implementation">;
207def ObjCPropertyNoAttribute : DiagGroup<"objc-property-no-attribute">;
208def ObjCMissingSuperCalls : DiagGroup<"objc-missing-super-calls">;
209def ObjCRetainBlockProperty : DiagGroup<"objc-noncopy-retain-block-property">;
210def ObjCReadonlyPropertyHasSetter : DiagGroup<"objc-readonly-with-setter-property">;
211def ObjCInvalidIBOutletProperty : DiagGroup<"invalid-iboutlet">;
212def ObjCRootClass : DiagGroup<"objc-root-class">;
213def ObjCPointerIntrospectPerformSelector : DiagGroup<"deprecated-objc-pointer-introspection-performSelector">;
214def ObjCPointerIntrospect : DiagGroup<"deprecated-objc-pointer-introspection", [ObjCPointerIntrospectPerformSelector]>;
215def DeprecatedObjCIsaUsage : DiagGroup<"deprecated-objc-isa-usage">;
216def Packed : DiagGroup<"packed">;
217def Padded : DiagGroup<"padded">;
218def PointerArith : DiagGroup<"pointer-arith">;
219def PoundWarning : DiagGroup<"#warnings">,
220                   DiagCategory<"#warning Directive">;
221def PoundPragmaMessage : DiagGroup<"#pragma-messages">,
222                         DiagCategory<"#pragma message Directive">;
223def : DiagGroup<"pointer-to-int-cast">;
224def : DiagGroup<"redundant-decls">;
225def ReturnStackAddress : DiagGroup<"return-stack-address">;
226def ReturnTypeCLinkage : DiagGroup<"return-type-c-linkage">;
227def ReturnType : DiagGroup<"return-type", [ReturnTypeCLinkage]>;
228def BindToTemporaryCopy : DiagGroup<"bind-to-temporary-copy",
229                                    [CXX98CompatBindToTemporaryCopy]>;
230def SelfAssignmentField : DiagGroup<"self-assign-field">;
231def SelfAssignment : DiagGroup<"self-assign", [SelfAssignmentField]>;
232def SemiBeforeMethodBody : DiagGroup<"semicolon-before-method-body">;
233def Sentinel : DiagGroup<"sentinel">;
234def MissingMethodReturnType : DiagGroup<"missing-method-return-type">;
235def Shadow : DiagGroup<"shadow">;
236def Shorten64To32 : DiagGroup<"shorten-64-to-32">;
237def : DiagGroup<"sign-promo">;
238def SignCompare : DiagGroup<"sign-compare">;
239def : DiagGroup<"stack-protector">;
240def : DiagGroup<"switch-default">;
241def : DiagGroup<"synth">;
242def SizeofArrayArgument : DiagGroup<"sizeof-array-argument">;
243def SizeofArrayDecay : DiagGroup<"sizeof-array-decay">;
244def SizeofPointerMemaccess : DiagGroup<"sizeof-pointer-memaccess">;
245def StaticInInline : DiagGroup<"static-in-inline">;
246def StaticLocalInInline : DiagGroup<"static-local-in-inline">;
247def GNUStaticFloatInit : DiagGroup<"gnu-static-float-init">;
248def StaticFloatInit : DiagGroup<"static-float-init", [GNUStaticFloatInit]>;
249def StringPlusInt : DiagGroup<"string-plus-int">;
250def StrncatSize : DiagGroup<"strncat-size">;
251def TautologicalOutOfRangeCompare : DiagGroup<"tautological-constant-out-of-range-compare">;
252def TautologicalCompare : DiagGroup<"tautological-compare",
253                                    [TautologicalOutOfRangeCompare]>;
254def HeaderHygiene : DiagGroup<"header-hygiene">;
255def DuplicateDeclSpecifier : DiagGroup<"duplicate-decl-specifier">;
256def CompareDistinctPointerType : DiagGroup<"compare-distinct-pointer-types">;
257def Varargs : DiagGroup<"varargs">;
258
259def Unsequenced : DiagGroup<"unsequenced">;
260// GCC name for -Wunsequenced
261def : DiagGroup<"sequence-point", [Unsequenced]>;
262
263// Preprocessor warnings.
264def AmbiguousMacro : DiagGroup<"ambiguous-macro">;
265
266// Just silence warnings about -Wstrict-aliasing for now.
267def : DiagGroup<"strict-aliasing=0">;
268def : DiagGroup<"strict-aliasing=1">;
269def : DiagGroup<"strict-aliasing=2">;
270def : DiagGroup<"strict-aliasing">;
271
272// Just silence warnings about -Wstrict-overflow for now.
273def : DiagGroup<"strict-overflow=0">;
274def : DiagGroup<"strict-overflow=1">;
275def : DiagGroup<"strict-overflow=2">;
276def : DiagGroup<"strict-overflow=3">;
277def : DiagGroup<"strict-overflow=4">;
278def : DiagGroup<"strict-overflow=5">;
279def : DiagGroup<"strict-overflow">;
280
281def InvalidOffsetof : DiagGroup<"invalid-offsetof">;
282def : DiagGroup<"strict-prototypes">;
283def StrictSelector : DiagGroup<"strict-selector-match">;
284def MethodDuplicate : DiagGroup<"duplicate-method-match">;
285def CoveredSwitchDefault : DiagGroup<"covered-switch-default">;
286def SwitchEnum     : DiagGroup<"switch-enum">;
287def Switch         : DiagGroup<"switch">;
288def ImplicitFallthroughPerFunction :
289  DiagGroup<"implicit-fallthrough-per-function">;
290def ImplicitFallthrough  : DiagGroup<"implicit-fallthrough",
291                                     [ImplicitFallthroughPerFunction]>;
292def InvalidPPToken : DiagGroup<"invalid-pp-token">;
293def Trigraphs      : DiagGroup<"trigraphs">;
294
295def : DiagGroup<"type-limits">;
296def UndefinedReinterpretCast : DiagGroup<"undefined-reinterpret-cast">;
297def ReinterpretBaseClass : DiagGroup<"reinterpret-base-class">;
298def Unicode  : DiagGroup<"unicode">;
299def UninitializedMaybe : DiagGroup<"conditional-uninitialized">;
300def UninitializedSometimes : DiagGroup<"sometimes-uninitialized">;
301def UninitializedStaticSelfInit : DiagGroup<"static-self-init">;
302def Uninitialized  : DiagGroup<"uninitialized", [UninitializedSometimes,
303                                                 UninitializedStaticSelfInit]>;
304def UnknownPragmas : DiagGroup<"unknown-pragmas">;
305def UnknownWarningOption : DiagGroup<"unknown-warning-option">;
306def NSobjectAttribute : DiagGroup<"NSObject-attribute">;
307def UnknownAttributes : DiagGroup<"attributes">;
308def IgnoredAttributes : DiagGroup<"ignored-attributes">;
309def UnnamedTypeTemplateArgs : DiagGroup<"unnamed-type-template-args",
310                                        [CXX98CompatUnnamedTypeTemplateArgs]>;
311def UnusedArgument : DiagGroup<"unused-argument">;
312def UnusedSanitizeArgument : DiagGroup<"unused-sanitize-argument">;
313def UnusedCommandLineArgument : DiagGroup<"unused-command-line-argument",
314                                          [UnusedSanitizeArgument]>;
315def UnusedComparison : DiagGroup<"unused-comparison">;
316def UnusedExceptionParameter : DiagGroup<"unused-exception-parameter">;
317def UnneededInternalDecl : DiagGroup<"unneeded-internal-declaration">;
318def UnneededMemberFunction : DiagGroup<"unneeded-member-function">;
319def UnusedPrivateField : DiagGroup<"unused-private-field">;
320def UnusedFunction : DiagGroup<"unused-function", [UnneededInternalDecl]>;
321def UnusedMemberFunction : DiagGroup<"unused-member-function",
322                                     [UnneededMemberFunction]>;
323def UnusedLabel : DiagGroup<"unused-label">;
324def UnusedParameter : DiagGroup<"unused-parameter">;
325def UnusedResult : DiagGroup<"unused-result">;
326def UnusedValue : DiagGroup<"unused-value", [UnusedComparison, UnusedResult]>;
327def UnusedVariable : DiagGroup<"unused-variable">;
328def UsedButMarkedUnused : DiagGroup<"used-but-marked-unused">;
329def UserDefinedLiterals : DiagGroup<"user-defined-literals">;
330def ReadOnlySetterAttrs : DiagGroup<"readonly-setter-attrs">;
331def Reorder : DiagGroup<"reorder">;
332def UndeclaredSelector : DiagGroup<"undeclared-selector">;
333def ImplicitAtomic : DiagGroup<"implicit-atomic-properties">;
334def CustomAtomic : DiagGroup<"custom-atomic-properties">;
335def AtomicProperties : DiagGroup<"atomic-properties",
336                                 [ImplicitAtomic, CustomAtomic]>;
337// FIXME: Remove arc-abi once an Xcode is released that doesn't pass this flag.
338def : DiagGroup<"arc-abi">;
339def ARCUnsafeRetainedAssign : DiagGroup<"arc-unsafe-retained-assign">;
340def ARCRetainCycles : DiagGroup<"arc-retain-cycles">;
341def ARCNonPodMemAccess : DiagGroup<"arc-non-pod-memaccess">;
342def AutomaticReferenceCounting : DiagGroup<"arc",
343                                           [ARCUnsafeRetainedAssign,
344                                            ARCRetainCycles,
345                                            ARCNonPodMemAccess]>;
346def ARCRepeatedUseOfWeakMaybe : DiagGroup<"arc-maybe-repeated-use-of-weak">;
347def ARCRepeatedUseOfWeak : DiagGroup<"arc-repeated-use-of-weak",
348                                     [ARCRepeatedUseOfWeakMaybe]>;
349def SelectorTypeMismatch : DiagGroup<"selector-type-mismatch">;
350def Selector : DiagGroup<"selector", [SelectorTypeMismatch]>;
351def Protocol : DiagGroup<"protocol">;
352def SuperSubClassMismatch : DiagGroup<"super-class-method-mismatch">;
353def OverridingMethodMismatch : DiagGroup<"overriding-method-mismatch">;
354def VariadicMacros : DiagGroup<"variadic-macros">;
355def VectorConversion : DiagGroup<"vector-conversion">;      // clang specific
356def VexingParse : DiagGroup<"vexing-parse">;
357def VLA : DiagGroup<"vla">;
358def VLAExtension : DiagGroup<"vla-extension">;
359def VolatileRegisterVar : DiagGroup<"volatile-register-var">;
360def Visibility : DiagGroup<"visibility">;
361def ZeroLengthArray : DiagGroup<"zero-length-array">;
362
363// GCC calls -Wdeprecated-writable-strings -Wwrite-strings.
364def GCCWriteStrings : DiagGroup<"write-strings" , [DeprecatedWritableStr]>;
365
366def CharSubscript : DiagGroup<"char-subscripts">;
367def LargeByValueCopy : DiagGroup<"large-by-value-copy">;
368def DuplicateArgDecl : DiagGroup<"duplicate-method-arg">;
369
370// Aggregation warning settings.
371
372// -Widiomatic-parentheses contains warnings about 'idiomatic'
373// missing parentheses;  it is off by default.  We do not include it
374// in -Wparentheses because most users who use -Wparentheses explicitly
375// do not want these warnings.
376def ParenthesesOnEquality : DiagGroup<"parentheses-equality">;
377def Parentheses : DiagGroup<"parentheses",
378                            [LogicalOpParentheses,
379                             LogicalNotParentheses,
380                             BitwiseOpParentheses,
381                             ShiftOpParentheses,
382                             OverloadedShiftOpParentheses,
383                             ParenthesesOnEquality,
384                             DanglingElse]>;
385
386// -Wconversion has its own warnings, but we split a few out for
387// legacy reasons:
388//   - some people want just 64-to-32 warnings
389//   - conversion warnings with constant sources are on by default
390//   - conversion warnings for literals are on by default
391//   - bool-to-pointer conversion warnings are on by default
392//   - __null-to-integer conversion warnings are on by default
393def Conversion : DiagGroup<"conversion",
394                           [BoolConversion,
395                            ConstantConversion,
396                            EnumConversion,
397                            Shorten64To32,
398                            IntConversion,
399                            LiteralConversion,
400                            NonLiteralNullConversion, // (1-1)->pointer (etc)
401                            NullConversion, // NULL->non-pointer
402                            SignConversion,
403                            StringConversion]>,
404                 DiagCategory<"Value Conversion Issue">;
405
406def Unused : DiagGroup<"unused",
407                       [UnusedArgument, UnusedFunction, UnusedLabel,
408                        // UnusedParameter, (matches GCC's behavior)
409                        // UnusedMemberFunction, (clean-up llvm before enabling)
410                        UnusedPrivateField,
411                        UnusedValue, UnusedVariable]>,
412                        DiagCategory<"Unused Entity Issue">;
413
414// Format settings.
415def FormatInvalidSpecifier : DiagGroup<"format-invalid-specifier">;
416def FormatSecurity : DiagGroup<"format-security">;
417def FormatNonStandard : DiagGroup<"format-non-iso">;
418def FormatY2K : DiagGroup<"format-y2k">;
419def Format : DiagGroup<"format",
420                       [FormatExtraArgs, FormatZeroLength, NonNull,
421                        FormatSecurity, FormatY2K, FormatInvalidSpecifier]>,
422             DiagCategory<"Format String Issue">;
423def FormatNonLiteral : DiagGroup<"format-nonliteral", [FormatSecurity]>;
424def Format2 : DiagGroup<"format=2",
425                        [FormatNonLiteral, FormatSecurity, FormatY2K]>;
426
427def TypeSafety : DiagGroup<"type-safety">;
428
429def IntToVoidPointerCast : DiagGroup<"int-to-void-pointer-cast">;
430def IntToPointerCast : DiagGroup<"int-to-pointer-cast",
431                                 [IntToVoidPointerCast]>;
432
433def Extra : DiagGroup<"extra", [
434    MissingFieldInitializers,
435    IgnoredQualifiers,
436    InitializerOverrides,
437    SemiBeforeMethodBody,
438    MissingMethodReturnType,
439    SignCompare,
440    UnusedParameter
441  ]>;
442
443def Most : DiagGroup<"most", [
444    CharSubscript,
445    Comment,
446    DeleteNonVirtualDtor,
447    Format,
448    Implicit,
449    MismatchedTags,
450    MissingBraces,
451    MultiChar,
452    Reorder,
453    ReturnType,
454    SelfAssignment,
455    SizeofArrayArgument,
456    SizeofArrayDecay,
457    StringPlusInt,
458    Trigraphs,
459    Uninitialized,
460    UnknownPragmas,
461    Unused,
462    VolatileRegisterVar,
463    ObjCMissingSuperCalls,
464    OverloadedVirtual,
465    PrivateExtern,
466    SelTypeCast
467 ]>;
468
469// Thread Safety warnings
470def ThreadSafetyAttributes : DiagGroup<"thread-safety-attributes">;
471def ThreadSafetyAnalysis   : DiagGroup<"thread-safety-analysis">;
472def ThreadSafetyPrecise    : DiagGroup<"thread-safety-precise">;
473def ThreadSafety : DiagGroup<"thread-safety",
474                             [ThreadSafetyAttributes,
475                              ThreadSafetyAnalysis,
476                              ThreadSafetyPrecise]>;
477def ThreadSafetyBeta : DiagGroup<"thread-safety-beta">;
478
479// Note that putting warnings in -Wall will not disable them by default. If a
480// warning should be active _only_ when -Wall is passed in, mark it as
481// DefaultIgnore in addition to putting it here.
482def : DiagGroup<"all", [Most, Parentheses, Switch]>;
483
484// Warnings enabled by -pedantic.  This is magically filled in by TableGen.
485def Pedantic : DiagGroup<"pedantic">;
486
487// Aliases.
488def : DiagGroup<"", [Extra]>;                   // -W = -Wextra
489def : DiagGroup<"endif-labels", [ExtraTokens]>; // -Wendif-labels=-Wextra-tokens
490def : DiagGroup<"comments", [Comment]>;         // -Wcomments = -Wcomment
491def : DiagGroup<"conversion-null",
492                [NullConversion]>; // -Wconversion-null = -Wnull-conversion
493def : DiagGroup<"bool-conversions",
494                [BoolConversion]>; // -Wbool-conversions  = -Wbool-conversion
495def : DiagGroup<"int-conversions",
496                [IntConversion]>; // -Wint-conversions = -Wint-conversion
497def : DiagGroup<"vector-conversions",
498                [VectorConversion]>; // -Wvector-conversions = -Wvector-conversion
499
500// A warning group for warnings that we want to have on by default in clang,
501// but which aren't on by default in GCC.
502def NonGCC : DiagGroup<"non-gcc",
503    [SignCompare, Conversion, LiteralRange]>;
504
505// A warning group for warnings about using C++11 features as extensions in
506// earlier C++ versions.
507def CXX11 : DiagGroup<"c++11-extensions", [CXX11ExtraSemi, CXX11LongLong]>;
508
509// A warning group for warnings about using C++1y features as extensions in
510// earlier C++ versions.
511def CXX1y : DiagGroup<"c++1y-extensions">;
512
513def : DiagGroup<"c++0x-extensions", [CXX11]>;
514def DelegatingCtorCycles :
515  DiagGroup<"delegating-ctor-cycles">;
516
517// A warning group for warnings about using C11 features as extensions.
518def C11 : DiagGroup<"c11-extensions">;
519
520// A warning group for warnings about using C99 features as extensions.
521def C99 : DiagGroup<"c99-extensions">;
522
523// A warning group for warnings about GCC extensions.
524def GNU : DiagGroup<"gnu", [GNUDesignator, VLAExtension,
525                            ZeroLengthArray, GNUStaticFloatInit]>;
526// A warning group for warnings about code that clang accepts but gcc doesn't.
527def GccCompat : DiagGroup<"gcc-compat">;
528
529// A warning group for warnings about Microsoft extensions.
530def Microsoft : DiagGroup<"microsoft">;
531
532def ObjCNonUnifiedException : DiagGroup<"objc-nonunified-exceptions">;
533
534def ObjCProtocolMethodImpl : DiagGroup<"objc-protocol-method-implementation">;
535
536def ObjCNoPropertyAutoSynthesis : DiagGroup<"objc-property-synthesis">;
537
538// ObjC API warning groups.
539def ObjCRedundantLiteralUse : DiagGroup<"objc-redundant-literal-use">;
540def ObjCRedundantAPIUse : DiagGroup<"objc-redundant-api-use", [
541    ObjCRedundantLiteralUse
542  ]>;
543
544def ObjCCocoaAPI : DiagGroup<"objc-cocoa-api", [
545    ObjCRedundantAPIUse
546  ]>;
547
548def ObjCStringComparison : DiagGroup<"objc-string-compare">;
549def ObjCLiteralComparison : DiagGroup<"objc-literal-compare", [
550    ObjCStringComparison
551  ]>;
552
553def ObjCLiteralMissingAtSign : DiagGroup<"objc-literal-missing-atsign">;
554
555// Inline ASM warnings.
556def ASMOperandWidths : DiagGroup<"asm-operand-widths">;
557def ASM : DiagGroup<"asm", [
558    ASMOperandWidths
559  ]>;
560
561// OpenMP warnings.
562def SourceUsesOpenMP : DiagGroup<"source-uses-openmp">;
563