[PATCH] D57914: [Driver] Allow enum SanitizerOrdinal to represent more than 64 different sanitizer checks, NFC.

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 21 08:46:44 PST 2019


riccibruno added a comment.

To define the masks as `constexpr` variables you will have to make at least `bitPosToMask`, `operator|`, `operator&` and `operator~`. Unfortunately `constexpr` functions in c++11 are rather restricted. It seems to me however that you could do the following:

1. Wait until we can use C++14 in llvm (soon hopefully) to mark the masks `contexpr` (and leave a FIXME for now).
2. Solve the odr-violation issue by using one of the work-around in n4424. In particular I like the second work-around consisting of putting the static members in a class template.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57914/new/

https://reviews.llvm.org/D57914





More information about the cfe-commits mailing list