r231040 - [Sanitizers] Remove duplication in sanitizer group definition. NFC.

Alexey Samsonov vonosmas at gmail.com
Mon Mar 2 16:14:33 PST 2015


Author: samsonov
Date: Mon Mar  2 18:14:32 2015
New Revision: 231040

URL: http://llvm.org/viewvc/llvm-project?rev=231040&view=rev
Log:
[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".

Modified:
    cfe/trunk/include/clang/Basic/Sanitizers.def

Modified: cfe/trunk/include/clang/Basic/Sanitizers.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Sanitizers.def?rev=231040&r1=231039&r2=231040&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Sanitizers.def (original)
+++ cfe/trunk/include/clang/Basic/Sanitizers.def Mon Mar  2 18:14:32 2015
@@ -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", Undefi
                     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)





More information about the cfe-commits mailing list