tbaeder added inline comments.

================
Comment at: clang/test/AST/Interp/records.cpp:165
+
+class A : public Base {
+public:
----------------
tbaeder wrote:
> erichkeane wrote:
> > tbaeder wrote:
> > > erichkeane wrote:
> > > > shafik wrote:
> > > > > How about also testing `private` and `virtual` as well as multiple 
> > > > > bases.
> > > > I like the idea of testing virtual bases as well.
> > > How would that work in a constexpr context? I get:
> > > 
> > > ```
> > > array.cpp:48:15: error: constexpr constructor not allowed in class with 
> > > virtual base class
> > >     constexpr D() : A(17) {}
> > >               ^
> > > array.cpp:45:13: note: virtual base class declared here
> > >   class B : public virtual A {};
> > >             ^~~~~~~~~~~~~~~~
> > > 1 error generated.
> > > ```
> > > 
> > Ah! TIL, thanks!
> Ah, this works: https://godbolt.org/z/ern3Yje9q
Checking this example, I should've tested a lot more non-constexpr stuff I 
guess.


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

https://reviews.llvm.org/D135025

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

Reply via email to