rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm
================
Comment at: lib/AST/RecordLayoutBuilder.cpp:2750-2753
+ // It is possible that there were no fields or bases located after vbptr,
+ // so the size was not adjusted before.
+ if (Size < FieldStart)
+ Size = FieldStart;
----------------
I think this may be an interesting test case:
struct __declspec(align(16)) NVBase {
int x, y;
virtual ~NVBase();
};
struct VBase { int z; };
struct Foo : NVBase, virtual VBase {
};
On reading the code more, I don't think this test uncovers any bugs, but it
seems worth including to make sure we do the right thing w.r.t. alignment.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58544/new/
https://reviews.llvm.org/D58544
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits