hans added a comment.
This also fires in non-array cases:
$ cat /tmp/a.cc
struct T0 { char c; };
struct T2 : virtual T0 { };
T2* f() { return new T2(); }
$ /work/llvm-project/build/bin/clang++ -c -target i686-pc-win32 /tmp/a.cc
/tmp/a.cc:4:22: error: size of array element of type 'T2' (5 bytes) isn't a
multiple of its alignment (4 bytes)
T2* f() { return new T2(); }
^
1 error generated.
I don't think we want to error here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133711/new/
https://reviews.llvm.org/D133711
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits