[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
Fri Feb 22 03:58:49 PST 2019


riccibruno added inline comments.


================
Comment at: include/clang/Basic/Sanitizers.h:148
+// workaround from n4424 to avoid odr issues.
+// FIXME: Can be replaced by constexpr once c++14 can be used in llvm.
+template <typename T = void> struct SanitizerMasks {
----------------
Not replaced. `constexpr` is nearly orthogonal to the odr issue. It can be replaced by `inline` variables in C++17. I think that you should leave two FIXME here: the first one about marking the masks`constexpr` in C++14, and the second one about replacing the workaround by marking the masks `inline`.


================
Comment at: include/clang/Basic/Sanitizers.h:173
+      SanitizerMask::bitPosToMask(SO_##ID##Group);                             \
+  static const SanitizerMask &ID##Group = SanitizerMasks<>::ID##Group;
 #include "clang/Basic/Sanitizers.def"
----------------
You are back to the same issue with the references.


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

https://reviews.llvm.org/D57914





More information about the cfe-commits mailing list