[cfe-dev] Implementation of MSRecordLayoutBuilder.
Eli Friedman
eli.friedman at gmail.com
Wed Sep 21 18:36:46 PDT 2011
On Tue, Sep 20, 2011 at 1:17 AM, r4start <r4start at gmail.com> wrote:
>> In general, do not leave around code commented out with /**/ in
>> patches. Also, please include any tests which should be committed in
>> the diff itself (using svn add).
>
> I`ve added test into test/AST, is that ok?
We generally prefer test/Sema for this sort of change.
@@ -2034,15 +2228,22 @@
if (I->isVirtual())
continue;
- const CXXRecordDecl *Base =
+ BaseOffset = CharUnits::Zero();
+
+ Base =
cast<CXXRecordDecl>(I->getType()->getAs<RecordType>()->getDecl());
- CharUnits BaseOffset = Offset + Layout.getBaseClassOffset(Base);
+ BaseOffset = Offset + Layout.getBaseClassOffset(Base);
Redundant setting of BaseOffset?
Otherwise, looks fine; I'll commit for you once you send an updated patch.
-Eli
More information about the cfe-dev
mailing list