[llvm-commits] Is AlignOfTest.cpp intentionally testing ambiguous inheritance?

Chandler Carruth chandlerc at google.com
Fri Nov 16 02:21:47 PST 2012


On Thu, Nov 15, 2012 at 10:02 PM, Joe Abbey <jabbey at arxan.com> wrote:
> Basically it goes like this:
>
> struct S1;
>
> struct D1 : S1;
>
> struct D9 : S1, D1;
>
> Are there unique considerations for that which require unit testing? or can
> we simply pull the multiple inheritance to remove this warning:
>
> AlignOfTest.cpp:59:8: warning: direct base ‘{anonymous}::S1’ inaccessible in
> ‘{anonymous}::D9’ due to ambiguity [enabled by default]

This was definitely intentional on my part. I wanted to test the edge
cases of the compiler to make sure that alignment was round tripping
correctly.

I'm happy to add pragmas to suppress the warnings in this file, we
have them for some compilers already. I'd rather nat remove the test
just because I don't know how else to get coverage here besides
somewhat exhaustive testing of various patterns.




More information about the llvm-commits mailing list