[cfe-dev] Tests for __is_standard_layout
Matthieu Monrocq
matthieu.monrocq at gmail.com
Fri Mar 30 11:28:41 PDT 2012
Le 29 mars 2012 23:49, Dmitri Gribenko <gribozavr at gmail.com> a écrit :
> Hi,
>
> >From test/SemaCXX/type-traits.cpp:
>
> struct CppStructNonStandardBySameBase : CEmptyStruct {
> CEmptyStruct member;
> };
> struct CppStructNonStandardBy2ndVirtBase : CEmptyStruct {
> CEmptyStruct member;
> };
>
> ...
>
> int t16[F(__is_standard_layout(CppStructNonStandardBySameBase))];
> int t17[F(__is_standard_layout(CppStructNonStandardBy2ndVirtBase))];
>
> Both tests are identical, so either original author wanted to test
> something else in the second test or that test can be safely removed.
>
> After looking at the definition of a standard-layout class, I don't
> see anything not covered by other tests.
>
Given the name of the second, it looks to me like it was supposed to have a
virtual base class.
-- Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120330/e0de4e1d/attachment.html>
More information about the cfe-dev
mailing list