freebsd-nq/include/clang/Basic/DiagnosticGroups.td

302 lines
12 KiB
TableGen
Raw Normal View History

2009-06-02 17:58:47 +00:00
//==--- DiagnosticGroups.td - Diagnostic Group Definitions ----------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
def ImplicitFunctionDeclare : DiagGroup<"implicit-function-declaration">;
def ImplicitInt : DiagGroup<"implicit-int">;
// Aggregation warning settings.
def Implicit : DiagGroup<"implicit", [
ImplicitFunctionDeclare,
ImplicitInt
]>;
2010-03-03 17:28:16 +00:00
// Empty DiagGroups are recognized by clang but ignored.
2010-07-13 17:21:42 +00:00
def : DiagGroup<"abi">;
2009-10-14 18:03:49 +00:00
def : DiagGroup<"address">;
2010-03-03 17:28:16 +00:00
def AddressOfTemporary : DiagGroup<"address-of-temporary">;
2009-06-02 17:58:47 +00:00
def : DiagGroup<"aggregate-return">;
2010-07-13 17:21:42 +00:00
def AmbigMemberTemplate : DiagGroup<"ambiguous-member-template">;
2009-10-14 18:03:49 +00:00
def : DiagGroup<"attributes">;
2009-06-02 17:58:47 +00:00
def : DiagGroup<"bad-function-cast">;
def Availability : DiagGroup<"availability">;
2010-07-13 17:21:42 +00:00
def BoolConversions : DiagGroup<"bool-conversions">;
def CXXCompat: DiagGroup<"c++-compat">;
def CastAlign : DiagGroup<"cast-align">;
2009-06-02 17:58:47 +00:00
def : DiagGroup<"cast-qual">;
def : DiagGroup<"char-align">;
def Comment : DiagGroup<"comment">;
2009-11-18 14:59:57 +00:00
def : DiagGroup<"ctor-dtor-privacy">;
2009-06-02 17:58:47 +00:00
def : DiagGroup<"declaration-after-statement">;
def DefaultArgSpecialMember : DiagGroup<"default-arg-special-member">;
2010-04-02 08:55:10 +00:00
def GNUDesignator : DiagGroup<"gnu-designator">;
def DeleteNonVirtualDtor : DiagGroup<"delete-non-virtual-dtor">;
def DeprecatedDeclarations : DiagGroup<"deprecated-declarations">;
def DeprecatedWritableStr : DiagGroup<"deprecated-writable-strings">;
def Deprecated : DiagGroup<"deprecated", [ DeprecatedDeclarations] >,
DiagCategory<"Deprecations">;
def DeprecatedImplementations :DiagGroup<"deprecated-implementations">;
2009-06-02 17:58:47 +00:00
def : DiagGroup<"disabled-optimization">;
def : DiagGroup<"discard-qual">;
2009-06-22 08:08:35 +00:00
def : DiagGroup<"div-by-zero">;
2009-06-03 13:29:08 +00:00
def EmptyBody : DiagGroup<"empty-body">;
2009-06-02 17:58:47 +00:00
def ExtraTokens : DiagGroup<"extra-tokens">;
def FormatExtraArgs : DiagGroup<"format-extra-args">;
def FormatZeroLength : DiagGroup<"format-zero-length">;
2010-05-27 15:17:06 +00:00
def CXXHexFloats : DiagGroup<"c++-hex-floats">;
def : DiagGroup<"c++0x-compat", [CXXHexFloats]>;
def : DiagGroup<"effc++">;
def ExitTimeDestructors : DiagGroup<"exit-time-destructors">;
2009-06-02 17:58:47 +00:00
def FourByteMultiChar : DiagGroup<"four-char-constants">;
def GlobalConstructors : DiagGroup<"global-constructors">;
2009-11-18 14:59:57 +00:00
def : DiagGroup<"idiomatic-parentheses">;
def BitwiseOpParentheses: DiagGroup<"bitwise-op-parentheses">;
def LogicalOpParentheses: DiagGroup<"logical-op-parentheses">;
2010-07-15 17:07:12 +00:00
def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">;
2009-10-14 18:03:49 +00:00
def : DiagGroup<"import">;
2009-06-02 17:58:47 +00:00
def : DiagGroup<"init-self">;
def : DiagGroup<"inline">;
def : DiagGroup<"int-to-pointer-cast">;
2009-06-22 08:08:35 +00:00
def : DiagGroup<"invalid-pch">;
2010-03-10 17:45:58 +00:00
def LiteralRange : DiagGroup<"literal-range">;
def LocalTypeTemplateArgs : DiagGroup<"local-type-template-args">;
2010-07-13 17:21:42 +00:00
def : DiagGroup<"main">;
2010-03-10 17:45:58 +00:00
def MissingBraces : DiagGroup<"missing-braces">;
def MissingDeclarations: DiagGroup<"missing-declarations">;
2009-06-02 17:58:47 +00:00
def : DiagGroup<"missing-format-attribute">;
2009-11-05 17:18:09 +00:00
def : DiagGroup<"missing-include-dirs">;
2009-06-02 17:58:47 +00:00
def : DiagGroup<"missing-noreturn">;
def MultiChar : DiagGroup<"multichar">;
def : DiagGroup<"nested-externs">;
def : DiagGroup<"newline-eof">;
2009-10-14 18:03:49 +00:00
def LongLong : DiagGroup<"long-long">;
2009-06-02 17:58:47 +00:00
def MismatchedTags : DiagGroup<"mismatched-tags">;
2010-03-16 16:52:15 +00:00
def MissingFieldInitializers : DiagGroup<"missing-field-initializers">;
def NullDereference : DiagGroup<"null-dereference">;
2010-07-13 17:21:42 +00:00
def InitializerOverrides : DiagGroup<"initializer-overrides">;
2009-06-02 17:58:47 +00:00
def NonNull : DiagGroup<"nonnull">;
def : DiagGroup<"nonportable-cfstrings">;
def NonVirtualDtor : DiagGroup<"non-virtual-dtor">;
def : DiagGroup<"old-style-cast">;
2009-06-02 17:58:47 +00:00
def : DiagGroup<"old-style-definition">;
def OutOfLineDeclaration : DiagGroup<"out-of-line-declaration">;
2009-10-14 18:03:49 +00:00
def : DiagGroup<"overflow">;
def OverlengthStrings : DiagGroup<"overlength-strings">;
def OverloadedVirtual : DiagGroup<"overloaded-virtual">;
def Packed : DiagGroup<"packed">;
def Padded : DiagGroup<"padded">;
2009-10-14 18:03:49 +00:00
def PointerArith : DiagGroup<"pointer-arith">;
2010-07-13 17:21:42 +00:00
def PoundWarning : DiagGroup<"#warnings">,
DiagCategory<"#warning Directive">;
def PoundPragmaMessage : DiagGroup<"#pragma messages">,
DiagCategory<"#pragma message Directive">;
2009-06-02 17:58:47 +00:00
def : DiagGroup<"pointer-to-int-cast">;
def : DiagGroup<"redundant-decls">;
def ReturnType : DiagGroup<"return-type">;
2010-07-13 17:21:42 +00:00
def BindToTemporaryCopy : DiagGroup<"bind-to-temporary-copy">;
def SelfAssignment : DiagGroup<"self-assign">;
2009-11-18 14:59:57 +00:00
def SemiBeforeMethodBody : DiagGroup<"semicolon-before-method-body">;
2009-06-02 17:58:47 +00:00
def : DiagGroup<"sequence-point">;
2010-03-21 10:50:08 +00:00
def Shadow : DiagGroup<"shadow">;
2009-06-02 17:58:47 +00:00
def : DiagGroup<"shorten-64-to-32">;
2010-07-13 17:21:42 +00:00
def : DiagGroup<"sign-promo">;
2009-11-18 14:59:57 +00:00
def SignCompare : DiagGroup<"sign-compare">;
def : DiagGroup<"stack-protector">;
def : DiagGroup<"switch-default">;
2009-11-18 14:59:57 +00:00
def : DiagGroup<"synth">;
def SizeofArrayArgument : DiagGroup<"sizeof-array-argument">;
def TautologicalCompare : DiagGroup<"tautological-compare">;
def HeaderHygiene : DiagGroup<"header-hygiene">;
2009-06-02 17:58:47 +00:00
2009-10-14 18:03:49 +00:00
// Preprocessor warnings.
def : DiagGroup<"builtin-macro-redefined">;
2009-12-01 11:08:04 +00:00
// Just silence warnings about -Wstrict-aliasing for now.
2009-06-02 17:58:47 +00:00
def : DiagGroup<"strict-aliasing=0">;
def : DiagGroup<"strict-aliasing=1">;
def : DiagGroup<"strict-aliasing=2">;
def : DiagGroup<"strict-aliasing">;
2009-12-01 11:08:04 +00:00
// Just silence warnings about -Wstrict-overflow for now.
2009-06-02 17:58:47 +00:00
def : DiagGroup<"strict-overflow=0">;
def : DiagGroup<"strict-overflow=1">;
def : DiagGroup<"strict-overflow=2">;
2009-12-01 11:08:04 +00:00
def : DiagGroup<"strict-overflow=3">;
def : DiagGroup<"strict-overflow=4">;
def : DiagGroup<"strict-overflow=5">;
2009-06-02 17:58:47 +00:00
def : DiagGroup<"strict-overflow">;
def InvalidOffsetof : DiagGroup<"invalid-offsetof">;
def : DiagGroup<"strict-prototypes">;
def StrictSelector : DiagGroup<"strict-selector-match">;
2010-02-16 09:31:36 +00:00
def SwitchEnum : DiagGroup<"switch-enum">;
def Switch : DiagGroup<"switch", [SwitchEnum]>;
2010-05-04 20:51:19 +00:00
def Trigraphs : DiagGroup<"trigraphs">;
2009-06-02 17:58:47 +00:00
def : DiagGroup<"type-limits">;
def Uninitialized : DiagGroup<"uninitialized">;
def UninitializedMaybe : DiagGroup<"conditional-uninitialized">;
2009-06-02 17:58:47 +00:00
def UnknownPragmas : DiagGroup<"unknown-pragmas">;
def UnknownAttributes : DiagGroup<"attributes">;
def UnnamedTypeTemplateArgs : DiagGroup<"unnamed-type-template-args">;
2009-06-08 15:36:55 +00:00
def UnusedArgument : DiagGroup<"unused-argument">;
2010-05-04 16:12:48 +00:00
def UnusedExceptionParameter : DiagGroup<"unused-exception-parameter">;
def UnneededInternalDecl : DiagGroup<"unneeded-internal-declaration">;
def UnneededMemberFunction : DiagGroup<"unneeded-member-function">;
def UnusedFunction : DiagGroup<"unused-function", [UnneededInternalDecl]>;
def UnusedMemberFunction : DiagGroup<"unused-member-function",
[UnneededMemberFunction]>;
2009-06-08 15:36:55 +00:00
def UnusedLabel : DiagGroup<"unused-label">;
def UnusedParameter : DiagGroup<"unused-parameter">;
2009-06-02 17:58:47 +00:00
def UnusedValue : DiagGroup<"unused-value">;
def UnusedVariable : DiagGroup<"unused-variable">;
def UsedButMarkedUnused : DiagGroup<"used-but-marked-unused">;
2009-06-22 08:08:35 +00:00
def ReadOnlySetterAttrs : DiagGroup<"readonly-setter-attrs">;
2009-10-14 18:03:49 +00:00
def Reorder : DiagGroup<"reorder">;
2009-06-22 08:08:35 +00:00
def UndeclaredSelector : DiagGroup<"undeclared-selector">;
def ImplicitAtomic : DiagGroup<"implicit-atomic-properties">;
def CustomAtomic : DiagGroup<"custom-atomic-properties">;
def AtomicProperties : DiagGroup<"atomic-properties",
[ImplicitAtomic, CustomAtomic]>;
def AutomaticReferenceCountingABI : DiagGroup<"arc-abi">;
def ARCUnsafeRetainedAssign : DiagGroup<"arc-unsafe-retained-assign">;
def ARCRetainCycles : DiagGroup<"arc-retain-cycles">;
def ARCNonPodMemAccess : DiagGroup<"arc-non-pod-memaccess">;
def AutomaticReferenceCounting : DiagGroup<"arc",
[AutomaticReferenceCountingABI,
ARCUnsafeRetainedAssign,
ARCRetainCycles,
ARCNonPodMemAccess]>;
def Selector : DiagGroup<"selector">;
def NonfragileAbi2 : DiagGroup<"nonfragile-abi2">;
2010-04-02 08:55:10 +00:00
def Protocol : DiagGroup<"protocol">;
2009-10-14 18:03:49 +00:00
def SuperSubClassMismatch : DiagGroup<"super-class-method-mismatch">;
2009-06-02 17:58:47 +00:00
def : DiagGroup<"variadic-macros">;
2009-12-15 18:49:47 +00:00
def VariadicMacros : DiagGroup<"variadic-macros">;
2009-06-02 17:58:47 +00:00
def VectorConversions : DiagGroup<"vector-conversions">; // clang specific
2010-05-27 15:17:06 +00:00
def VLA : DiagGroup<"vla">;
2009-06-02 17:58:47 +00:00
def VolatileRegisterVar : DiagGroup<"volatile-register-var">;
// GCC calls -Wdeprecated-writable-strings -Wwrite-strings.
def GCCWriteStrings : DiagGroup<"write-strings" , [DeprecatedWritableStr]>;
2009-10-14 18:03:49 +00:00
def CharSubscript : DiagGroup<"char-subscripts">;
def LargeByValueCopy : DiagGroup<"large-by-value-copy">;
def DuplicateArgDecl : DiagGroup<"duplicate-method-arg">;
2009-06-02 17:58:47 +00:00
// Aggregation warning settings.
2009-11-18 14:59:57 +00:00
// -Widiomatic-parentheses contains warnings about 'idiomatic'
// missing parentheses; it is off by default. We do not include it
// in -Wparentheses because most users who use -Wparentheses explicitly
// do not want these warnings.
def Parentheses : DiagGroup<"parentheses",
[LogicalOpParentheses,
BitwiseOpParentheses]>;
2009-11-18 14:59:57 +00:00
// -Wconversion has its own warnings, but we split a few out for
// legacy reasons:
// - some people want just 64-to-32 warnings
// - conversion warnings with constant sources are on by default
// - conversion warnings for literals are on by default
// - bool-to-pointer conversion warnings are on by default
2009-11-18 14:59:57 +00:00
def Conversion : DiagGroup<"conversion",
[DiagGroup<"shorten-64-to-32">,
DiagGroup<"constant-conversion">,
DiagGroup<"literal-conversion">,
DiagGroup<"sign-conversion">,
BoolConversions]>,
2010-05-27 15:17:06 +00:00
DiagCategory<"Value Conversion Issue">;
2009-06-02 17:58:47 +00:00
2009-06-08 15:36:55 +00:00
def Unused : DiagGroup<"unused",
[UnusedArgument, UnusedFunction, UnusedLabel,
2010-05-04 16:12:48 +00:00
// UnusedParameter, (matches GCC's behavior)
// UnusedMemberFunction, (clean-up llvm before enabling)
2010-05-27 15:17:06 +00:00
UnusedValue, UnusedVariable]>,
DiagCategory<"Unused Entity Issue">;
2009-06-08 15:36:55 +00:00
2009-06-02 17:58:47 +00:00
// Format settings.
def FormatSecurity : DiagGroup<"format-security">;
def FormatY2K : DiagGroup<"format-y2k">;
def Format : DiagGroup<"format",
[FormatExtraArgs, FormatZeroLength, NonNull,
FormatSecurity, FormatY2K]>,
2010-05-27 15:17:06 +00:00
DiagCategory<"Format String Issue">;
2009-06-02 17:58:47 +00:00
def FormatNonLiteral : DiagGroup<"format-nonliteral", [FormatSecurity]>;
def Format2 : DiagGroup<"format=2",
[FormatNonLiteral, FormatSecurity, FormatY2K]>;
2009-06-22 08:08:35 +00:00
def Extra : DiagGroup<"extra", [
2010-03-16 16:52:15 +00:00
MissingFieldInitializers,
2010-07-15 17:07:12 +00:00
IgnoredQualifiers,
2010-07-13 17:21:42 +00:00
InitializerOverrides,
2009-11-18 14:59:57 +00:00
SemiBeforeMethodBody,
SignCompare,
2009-06-22 08:08:35 +00:00
UnusedParameter
]>;
2009-06-02 17:58:47 +00:00
def Most : DiagGroup<"most", [
2010-05-04 16:12:48 +00:00
CharSubscript,
2009-06-02 17:58:47 +00:00
Comment,
DeleteNonVirtualDtor,
2009-06-02 17:58:47 +00:00
Format,
Implicit,
MismatchedTags,
2010-03-10 17:45:58 +00:00
MissingBraces,
2009-06-02 17:58:47 +00:00
MultiChar,
2010-05-04 16:12:48 +00:00
Reorder,
2009-10-14 18:03:49 +00:00
ReturnType,
SelfAssignment,
2009-06-02 17:58:47 +00:00
Switch,
SizeofArrayArgument,
2009-06-02 17:58:47 +00:00
Trigraphs,
Uninitialized,
UnknownPragmas,
2010-05-04 16:12:48 +00:00
Unused,
2009-06-02 17:58:47 +00:00
VectorConversions,
VolatileRegisterVar,
OverloadedVirtual
2009-06-02 17:58:47 +00:00
]>;
// -Wall is -Wmost -Wparentheses
def : DiagGroup<"all", [Most, Parentheses]>;
// Aliases.
2010-01-01 10:34:51 +00:00
def : DiagGroup<"", [Extra]>; // -W = -Wextra
def : DiagGroup<"endif-labels", [ExtraTokens]>; // -Wendif-labels=-Wendif-tokens
def : DiagGroup<"comments", [Comment]>; // -Wcomments = -Wcomment
2009-06-02 17:58:47 +00:00
2009-11-18 14:59:57 +00:00
// A warning group for warnings that we want to have on by default in clang,
// but which aren't on by default in GCC.
def NonGCC : DiagGroup<"non-gcc",
2010-03-10 17:45:58 +00:00
[SignCompare, Conversion, LiteralRange]>;
2010-04-02 08:55:10 +00:00
// A warning group for warnings about using C++0x features as extensions in
// earlier C++ versions.
def CXX0xStaticNonIntegralInitializer :
DiagGroup<"c++0x-static-nonintegral-init">;
def CXX0x : DiagGroup<"c++0x-extensions", [CXX0xStaticNonIntegralInitializer]>;
def DelegatingCtorCycles :
DiagGroup<"delegating-ctor-cycles">;
2010-04-02 08:55:10 +00:00
// A warning group for warnings about GCC extensions.
2010-05-27 15:17:06 +00:00
def GNU : DiagGroup<"gnu", [GNUDesignator, VLA]>;
// A warning group for warnings about Microsoft extensions.
def Microsoft : DiagGroup<"microsoft">;
def ObjCNonUnifiedException : DiagGroup<"objc-nonunified-exceptions">;