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