From 042e51823b95f82902684c841b97583afd5d027a Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Tue, 3 Mar 2015 00:14:32 +0000 Subject: [PATCH] [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". llvm-svn: 231040 --- clang/include/clang/Basic/Sanitizers.def | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/clang/include/clang/Basic/Sanitizers.def b/clang/include/clang/Basic/Sanitizers.def index a0acce9..54058ed 100644 --- a/clang/include/clang/Basic/Sanitizers.def +++ b/clang/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) -- 2.7.4