DiagnosticGroups.td revision 203955
1193326Sed//==--- DiagnosticGroups.td - Diagnostic Group Definitions ----------------===// 2193326Sed// 3193326Sed// The LLVM Compiler Infrastructure 4193326Sed// 5193326Sed// This file is distributed under the University of Illinois Open Source 6193326Sed// License. See LICENSE.TXT for details. 7193326Sed// 8193326Sed//===----------------------------------------------------------------------===// 9193326Sed 10193326Seddef ImplicitFunctionDeclare : DiagGroup<"implicit-function-declaration">; 11193326Seddef ImplicitInt : DiagGroup<"implicit-int">; 12193326Sed 13193326Sed// Aggregation warning settings. 14193326Seddef Implicit : DiagGroup<"implicit", [ 15193326Sed ImplicitFunctionDeclare, 16193326Sed ImplicitInt 17193326Sed]>; 18193326Sed 19193326Sed 20193326Sed 21193326Sed// Empty DiagGroups: these are recognized by clang but ignored. 22198092Srdivackydef : DiagGroup<"address">; 23193326Seddef : DiagGroup<"aggregate-return">; 24198092Srdivackydef : DiagGroup<"attributes">; 25193326Seddef : DiagGroup<"bad-function-cast">; 26198954Srdivackydef : DiagGroup<"c++-compat">; 27193326Seddef : DiagGroup<"cast-align">; 28193326Seddef : DiagGroup<"cast-qual">; 29193326Seddef : DiagGroup<"char-align">; 30193326Seddef Comment : DiagGroup<"comment">; 31199482Srdivackydef : DiagGroup<"ctor-dtor-privacy">; 32193326Seddef : DiagGroup<"declaration-after-statement">; 33193326Seddef : DiagGroup<"disabled-optimization">; 34193326Seddef : DiagGroup<"discard-qual">; 35194613Seddef : DiagGroup<"div-by-zero">; 36193380Seddef EmptyBody : DiagGroup<"empty-body">; 37193326Seddef ExtraTokens : DiagGroup<"extra-tokens">; 38193326Sed 39193326Seddef FormatExtraArgs : DiagGroup<"format-extra-args">; 40193326Seddef FormatZeroLength : DiagGroup<"format-zero-length">; 41193326Sed 42193326Seddef FourByteMultiChar : DiagGroup<"four-char-constants">; 43199482Srdivackydef : DiagGroup<"idiomatic-parentheses">; 44198092Srdivackydef : DiagGroup<"import">; 45193326Seddef : DiagGroup<"init-self">; 46193326Seddef : DiagGroup<"inline">; 47193326Seddef : DiagGroup<"int-to-pointer-cast">; 48194613Seddef : DiagGroup<"invalid-pch">; 49193326Seddef : DiagGroup<"missing-braces">; 50193326Seddef : DiagGroup<"missing-declarations">; 51193326Seddef : DiagGroup<"missing-format-attribute">; 52198954Srdivackydef : DiagGroup<"missing-include-dirs">; 53193326Seddef : DiagGroup<"missing-noreturn">; 54193326Seddef MultiChar : DiagGroup<"multichar">; 55193326Seddef : DiagGroup<"nested-externs">; 56193326Seddef : DiagGroup<"newline-eof">; 57198092Srdivackydef LongLong : DiagGroup<"long-long">; 58193326Seddef MismatchedTags : DiagGroup<"mismatched-tags">; 59193326Seddef : DiagGroup<"missing-field-initializers">; 60193326Seddef NonNull : DiagGroup<"nonnull">; 61193326Seddef : DiagGroup<"nonportable-cfstrings">; 62199482Srdivackydef : DiagGroup<"non-virtual-dtor">; 63193326Seddef : DiagGroup<"old-style-definition">; 64198092Srdivackydef : DiagGroup<"overflow">; 65198092Srdivackydef : DiagGroup<"overloaded-virtual">; 66193326Seddef : DiagGroup<"packed">; 67198092Srdivackydef PointerArith : DiagGroup<"pointer-arith">; 68193326Seddef : DiagGroup<"pointer-to-int-cast">; 69193326Seddef : DiagGroup<"redundant-decls">; 70193326Seddef ReturnType : DiagGroup<"return-type">; 71199482Srdivackydef SemiBeforeMethodBody : DiagGroup<"semicolon-before-method-body">; 72193326Seddef : DiagGroup<"sequence-point">; 73193326Seddef : DiagGroup<"shadow">; 74193326Seddef : DiagGroup<"shorten-64-to-32">; 75199482Srdivackydef SignCompare : DiagGroup<"sign-compare">; 76199482Srdivackydef : DiagGroup<"synth">; 77193326Sed 78198092Srdivacky// Preprocessor warnings. 79198092Srdivackydef : DiagGroup<"builtin-macro-redefined">; 80198092Srdivacky 81199990Srdivacky// Just silence warnings about -Wstrict-aliasing for now. 82193326Seddef : DiagGroup<"strict-aliasing=0">; 83193326Seddef : DiagGroup<"strict-aliasing=1">; 84193326Seddef : DiagGroup<"strict-aliasing=2">; 85193326Seddef : DiagGroup<"strict-aliasing">; 86193326Sed 87199990Srdivacky// Just silence warnings about -Wstrict-overflow for now. 88193326Seddef : DiagGroup<"strict-overflow=0">; 89193326Seddef : DiagGroup<"strict-overflow=1">; 90193326Seddef : DiagGroup<"strict-overflow=2">; 91199990Srdivackydef : DiagGroup<"strict-overflow=3">; 92199990Srdivackydef : DiagGroup<"strict-overflow=4">; 93199990Srdivackydef : DiagGroup<"strict-overflow=5">; 94193326Seddef : DiagGroup<"strict-overflow">; 95193326Sed 96193326Seddef InvalidOffsetof : DiagGroup<"invalid-offsetof">; 97193326Seddef : DiagGroup<"strict-prototypes">; 98193326Seddef : DiagGroup<"strict-selector-match">; 99203955Srdivackydef SwitchEnum : DiagGroup<"switch-enum">; 100203955Srdivackydef Switch : DiagGroup<"switch", [SwitchEnum]>; 101193326Seddef Trigraphs : DiagGroup<"trigraphs">; 102193326Sed 103193326Seddef : DiagGroup<"type-limits">; 104193326Seddef Uninitialized : DiagGroup<"uninitialized">; 105193326Seddef UnknownPragmas : DiagGroup<"unknown-pragmas">; 106193725Seddef UnusedArgument : DiagGroup<"unused-argument">; 107193725Seddef UnusedFunction : DiagGroup<"unused-function">; 108193725Seddef UnusedLabel : DiagGroup<"unused-label">; 109193725Seddef UnusedParameter : DiagGroup<"unused-parameter">; 110193326Seddef UnusedValue : DiagGroup<"unused-value">; 111193326Seddef UnusedVariable : DiagGroup<"unused-variable">; 112194613Seddef ReadOnlySetterAttrs : DiagGroup<"readonly-setter-attrs">; 113198092Srdivackydef Reorder : DiagGroup<"reorder">; 114194613Seddef UndeclaredSelector : DiagGroup<"undeclared-selector">; 115198092Srdivackydef SuperSubClassMismatch : DiagGroup<"super-class-method-mismatch">; 116193326Seddef : DiagGroup<"variadic-macros">; 117200583Srdivackydef VariadicMacros : DiagGroup<"variadic-macros">; 118193326Seddef VectorConversions : DiagGroup<"vector-conversions">; // clang specific 119193326Seddef VolatileRegisterVar : DiagGroup<"volatile-register-var">; 120193326Seddef : DiagGroup<"write-strings">; 121198092Srdivackydef CharSubscript : DiagGroup<"char-subscripts">; 122203955Srdivackydef ForceAlignArgPointer : DiagGroup<"force-align-arg-pointer">; 123193326Sed 124193326Sed// Aggregation warning settings. 125193326Sed 126199482Srdivacky// -Widiomatic-parentheses contains warnings about 'idiomatic' 127199482Srdivacky// missing parentheses; it is off by default. 128199482Srdivackydef Parentheses : DiagGroup<"parentheses", [DiagGroup<"idiomatic-parentheses">]>; 129193326Sed 130199482Srdivacky// -Wconversion has its own warnings, but we split this one out for 131199482Srdivacky// legacy reasons. 132199482Srdivackydef Conversion : DiagGroup<"conversion", 133199482Srdivacky [DiagGroup<"shorten-64-to-32">]>; 134199482Srdivacky 135193725Seddef Unused : DiagGroup<"unused", 136193725Sed [UnusedArgument, UnusedFunction, UnusedLabel, 137193725Sed UnusedParameter, UnusedValue, UnusedVariable]>; 138193725Sed 139193326Sed// Format settings. 140193326Seddef Format : DiagGroup<"format", [FormatExtraArgs, FormatZeroLength, NonNull]>; 141193326Seddef FormatSecurity : DiagGroup<"format-security", [Format]>; 142193326Seddef FormatNonLiteral : DiagGroup<"format-nonliteral", [FormatSecurity]>; 143193326Seddef FormatY2K : DiagGroup<"format-y2k", [Format]>; 144193326Seddef Format2 : DiagGroup<"format=2", 145193326Sed [FormatNonLiteral, FormatSecurity, FormatY2K]>; 146193326Sed 147194613Seddef Extra : DiagGroup<"extra", [ 148199482Srdivacky SemiBeforeMethodBody, 149199482Srdivacky SignCompare, 150194613Sed UnusedParameter 151194613Sed ]>; 152193326Sed 153193326Seddef Most : DiagGroup<"most", [ 154193326Sed Comment, 155193326Sed Format, 156193326Sed Implicit, 157193326Sed MismatchedTags, 158193326Sed MultiChar, 159198092Srdivacky ReturnType, 160193326Sed Switch, 161193326Sed Trigraphs, 162193326Sed Uninitialized, 163193326Sed UnknownPragmas, 164193326Sed UnusedValue, 165193326Sed UnusedVariable, 166193326Sed VectorConversions, 167194613Sed VolatileRegisterVar, 168198092Srdivacky Reorder, 169198092Srdivacky CharSubscript 170193326Sed ]>; 171193326Sed 172193326Sed// -Wall is -Wmost -Wparentheses 173193326Seddef : DiagGroup<"all", [Most, Parentheses]>; 174193326Sed 175193326Sed// Aliases. 176201361Srdivackydef : DiagGroup<"", [Extra]>; // -W = -Wextra 177201361Srdivackydef : DiagGroup<"endif-labels", [ExtraTokens]>; // -Wendif-labels=-Wendif-tokens 178201361Srdivackydef : DiagGroup<"comments", [Comment]>; // -Wcomments = -Wcomment 179193326Sed 180199482Srdivacky// A warning group for warnings that we want to have on by default in clang, 181199482Srdivacky// but which aren't on by default in GCC. 182199482Srdivackydef NonGCC : DiagGroup<"non-gcc", 183203955Srdivacky [SignCompare, Conversion, ForceAlignArgPointer]>; 184