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

pierre gousseau via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 21 08:14:59 PST 2019


pgousseau added a comment.

In D57914#1405781 <https://reviews.llvm.org/D57914#1405781>, @riccibruno wrote:

> In D57914#1405665 <https://reviews.llvm.org/D57914#1405665>, @pgousseau wrote:
>
> > In D57914#1405615 <https://reviews.llvm.org/D57914#1405615>, @riccibruno wrote:
> >
> > > I think what you would really want to do is mark the masks as `inline constexpr`, but sadly inline variables are C++17 only. I have seen some ways to emulate inline variables but I am not sure whether it is worth doing so in this case.
> >
> >
> > Yes thanks for the advice.
> >  I have tried moving the definitions to the cpp file but ran into initialization order fiasco issue because of SanitizerArgs.cpp global definitions.
> >  If using a constexpr SanitizerMask ctor then that would work around the initialization fiasco issue hopefully?
> >  Although I am not having much luck using constexpr ctor in VS2015 because of the array member, so might have to revert back to lo/hi mask members?
>
>
> I would prefer to avoid doing this. What is the problem with `constexpr` ?


I thought of using `constexpr SanitizerMask Foo = {lo, hi};` as this seems supported in VS2015 but I cant seem to find a way to get this to work with array members...
Now I also realised I would need something like `constexpr SanitizerMask FooGroup = Foo + Bar;`
And I havent found a way yet, arrays or no arrays, any ideas?


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

https://reviews.llvm.org/D57914





More information about the cfe-commits mailing list