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
|
|
|
|
]>;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Empty DiagGroups: these are recognized by clang but ignored.
|
2009-10-14 18:03:49 +00:00
|
|
|
def : DiagGroup<"address">;
|
2009-06-02 17:58:47 +00:00
|
|
|
def : DiagGroup<"aggregate-return">;
|
2009-10-14 18:03:49 +00:00
|
|
|
def : DiagGroup<"attributes">;
|
2009-06-02 17:58:47 +00:00
|
|
|
def : DiagGroup<"bad-function-cast">;
|
2009-11-05 17:18:09 +00:00
|
|
|
def : DiagGroup<"c++-compat">;
|
2009-06-02 17:58:47 +00:00
|
|
|
def : DiagGroup<"cast-align">;
|
|
|
|
def : DiagGroup<"cast-qual">;
|
|
|
|
def : DiagGroup<"char-align">;
|
|
|
|
def Comment : DiagGroup<"comment">;
|
|
|
|
def : DiagGroup<"conversion">;
|
|
|
|
def : DiagGroup<"declaration-after-statement">;
|
|
|
|
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">;
|
|
|
|
|
|
|
|
def FourByteMultiChar : DiagGroup<"four-char-constants">;
|
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">;
|
2009-06-02 17:58:47 +00:00
|
|
|
def : DiagGroup<"missing-braces">;
|
|
|
|
def : DiagGroup<"missing-declarations">;
|
|
|
|
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">;
|
|
|
|
def : DiagGroup<"missing-field-initializers">;
|
|
|
|
def NonNull : DiagGroup<"nonnull">;
|
|
|
|
def : DiagGroup<"nonportable-cfstrings">;
|
|
|
|
def : DiagGroup<"old-style-definition">;
|
2009-10-14 18:03:49 +00:00
|
|
|
def : DiagGroup<"overflow">;
|
|
|
|
def : DiagGroup<"overloaded-virtual">;
|
2009-06-02 17:58:47 +00:00
|
|
|
def : DiagGroup<"packed">;
|
|
|
|
def Parentheses : DiagGroup<"parentheses">;
|
2009-10-14 18:03:49 +00:00
|
|
|
def PointerArith : DiagGroup<"pointer-arith">;
|
2009-06-02 17:58:47 +00:00
|
|
|
def : DiagGroup<"pointer-to-int-cast">;
|
|
|
|
def : DiagGroup<"redundant-decls">;
|
|
|
|
def ReturnType : DiagGroup<"return-type">;
|
|
|
|
def : DiagGroup<"sequence-point">;
|
|
|
|
def : DiagGroup<"shadow">;
|
|
|
|
def : DiagGroup<"shorten-64-to-32">;
|
|
|
|
def : DiagGroup<"sign-compare">;
|
|
|
|
|
2009-10-14 18:03:49 +00:00
|
|
|
// Preprocessor warnings.
|
|
|
|
def : DiagGroup<"builtin-macro-redefined">;
|
|
|
|
|
2009-06-02 17:58:47 +00:00
|
|
|
// Just silence warnings about common forms of -Wstrict-aliasing for now.
|
|
|
|
def : DiagGroup<"strict-aliasing=0">;
|
|
|
|
def : DiagGroup<"strict-aliasing=1">;
|
|
|
|
def : DiagGroup<"strict-aliasing=2">;
|
|
|
|
def : DiagGroup<"strict-aliasing">;
|
|
|
|
|
|
|
|
// Just silence warnings about common forms of -Wstrict-aliasing for now.
|
|
|
|
def : DiagGroup<"strict-overflow=0">;
|
|
|
|
def : DiagGroup<"strict-overflow=1">;
|
|
|
|
def : DiagGroup<"strict-overflow=2">;
|
|
|
|
def : DiagGroup<"strict-overflow">;
|
|
|
|
|
|
|
|
def InvalidOffsetof : DiagGroup<"invalid-offsetof">;
|
|
|
|
def : DiagGroup<"strict-prototypes">;
|
|
|
|
def : DiagGroup<"strict-selector-match">;
|
|
|
|
def Switch : DiagGroup<"switch">;
|
|
|
|
def Trigraphs : DiagGroup<"trigraphs">;
|
|
|
|
|
|
|
|
def : DiagGroup<"type-limits">;
|
|
|
|
def Uninitialized : DiagGroup<"uninitialized">;
|
|
|
|
def UnknownPragmas : DiagGroup<"unknown-pragmas">;
|
2009-06-08 15:36:55 +00:00
|
|
|
def UnusedArgument : DiagGroup<"unused-argument">;
|
|
|
|
def UnusedFunction : DiagGroup<"unused-function">;
|
|
|
|
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">;
|
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">;
|
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">;
|
|
|
|
def VectorConversions : DiagGroup<"vector-conversions">; // clang specific
|
|
|
|
def VolatileRegisterVar : DiagGroup<"volatile-register-var">;
|
|
|
|
def : DiagGroup<"write-strings">;
|
2009-10-14 18:03:49 +00:00
|
|
|
def CharSubscript : DiagGroup<"char-subscripts">;
|
2009-06-02 17:58:47 +00:00
|
|
|
|
|
|
|
// Aggregation warning settings.
|
|
|
|
|
|
|
|
|
2009-06-08 15:36:55 +00:00
|
|
|
def Unused : DiagGroup<"unused",
|
|
|
|
[UnusedArgument, UnusedFunction, UnusedLabel,
|
|
|
|
UnusedParameter, UnusedValue, UnusedVariable]>;
|
|
|
|
|
2009-06-02 17:58:47 +00:00
|
|
|
// Format settings.
|
|
|
|
def Format : DiagGroup<"format", [FormatExtraArgs, FormatZeroLength, NonNull]>;
|
|
|
|
def FormatSecurity : DiagGroup<"format-security", [Format]>;
|
|
|
|
def FormatNonLiteral : DiagGroup<"format-nonliteral", [FormatSecurity]>;
|
|
|
|
def FormatY2K : DiagGroup<"format-y2k", [Format]>;
|
|
|
|
def Format2 : DiagGroup<"format=2",
|
|
|
|
[FormatNonLiteral, FormatSecurity, FormatY2K]>;
|
|
|
|
|
|
|
|
|
2009-06-22 08:08:35 +00:00
|
|
|
def Extra : DiagGroup<"extra", [
|
|
|
|
UnusedParameter
|
|
|
|
]>;
|
2009-06-02 17:58:47 +00:00
|
|
|
|
|
|
|
def Most : DiagGroup<"most", [
|
|
|
|
Comment,
|
|
|
|
Format,
|
|
|
|
Implicit,
|
|
|
|
MismatchedTags,
|
|
|
|
MultiChar,
|
2009-10-14 18:03:49 +00:00
|
|
|
ReturnType,
|
2009-06-02 17:58:47 +00:00
|
|
|
Switch,
|
|
|
|
Trigraphs,
|
|
|
|
Uninitialized,
|
|
|
|
UnknownPragmas,
|
|
|
|
UnusedValue,
|
|
|
|
UnusedVariable,
|
|
|
|
VectorConversions,
|
2009-06-22 08:08:35 +00:00
|
|
|
VolatileRegisterVar,
|
2009-10-14 18:03:49 +00:00
|
|
|
Reorder,
|
|
|
|
CharSubscript
|
2009-06-02 17:58:47 +00:00
|
|
|
]>;
|
|
|
|
|
|
|
|
// -Wall is -Wmost -Wparentheses
|
|
|
|
def : DiagGroup<"all", [Most, Parentheses]>;
|
|
|
|
|
|
|
|
// Aliases.
|
|
|
|
def : DiagGroup<"", [Extra]>; // -W = -Wextra
|
|
|
|
def : DiagGroup<"endif-labels", [ExtraTokens]>; // endif-labels = endif-tokens
|
|
|
|
|