From: Alexey Samsonov Date: Tue, 3 Mar 2015 00:14:32 +0000 (+0000) Subject: [Sanitizers] Remove duplication in sanitizer group definition. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f12d91a4baf9a4f6907ff69682132a87ecfb07e2;p=clang [Sanitizers] Remove duplication in sanitizer group definition. NFC. There is no need to list sanitizers in both "UndefinedTrap" and "Undefined" groups - it turns out using one group in a defintion of another group "just works". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231040 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/Sanitizers.def b/include/clang/Basic/Sanitizers.def index a0acce967f..54058edfdc 100644 --- a/include/clang/Basic/Sanitizers.def +++ b/include/clang/Basic/Sanitizers.def @@ -80,18 +80,8 @@ SANITIZER("dataflow", DataFlow) SANITIZER("cfi-vptr", CFIVptr) SANITIZER_GROUP("cfi", CFI, CFIVptr) -// -fsanitize=undefined includes all the sanitizers which have low overhead, no -// ABI or address space layout implications, and only catch undefined behavior. -SANITIZER_GROUP("undefined", Undefined, - Alignment | Bool | ArrayBounds | Enum | FloatCastOverflow | - FloatDivideByZero | Function | IntegerDivideByZero | - NonnullAttribute | Null | ObjectSize | Return | - ReturnsNonnullAttribute | Shift | SignedIntegerOverflow | - Unreachable | VLABound | Vptr) - -// -fsanitize=undefined-trap includes -// all sanitizers included by -fsanitize=undefined, except those that require -// runtime support. This group is generally used in conjunction with the +// -fsanitize=undefined-trap includes sanitizers from -fsanitize=undefined +// that can be used without runtime support, generally by providing extra // -fsanitize-undefined-trap-on-error flag. SANITIZER_GROUP("undefined-trap", UndefinedTrap, Alignment | Bool | ArrayBounds | Enum | FloatCastOverflow | @@ -99,6 +89,10 @@ SANITIZER_GROUP("undefined-trap", UndefinedTrap, Null | ObjectSize | Return | ReturnsNonnullAttribute | Shift | SignedIntegerOverflow | Unreachable | VLABound) +// -fsanitize=undefined includes all the sanitizers which have low overhead, no +// ABI or address space layout implications, and only catch undefined behavior. +SANITIZER_GROUP("undefined", Undefined, UndefinedTrap | Function | Vptr) + SANITIZER_GROUP("integer", Integer, SignedIntegerOverflow | UnsignedIntegerOverflow | Shift | IntegerDivideByZero)