pgousseau marked 2 inline comments as done.
pgousseau 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 {
----------------
riccibruno wrote:
> 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`.
Makes sense thanks!


================
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"
----------------
riccibruno wrote:
> You are back to the same issue with the references.
A yes I should have read the odr definition more carefully! I am trying to find 
a way to not have to add `SanitizerMasks<>::` all over the place, any ideas?


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

https://reviews.llvm.org/D57914



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to