[cfe-dev] [PATCH] PCH support for CXXRecordDecl

Andrew Sutton andrew.n.sutton at gmail.com
Sat May 15 07:09:36 PDT 2010


> Here's the 2nd part of the previous PCH patch for (some) C++ declarations.
> This patch only really adds support for CXXRecordDecl,
> CXXBaseClassSpecifier, and (partial support) CXXBaseOrMemberInitializer.
> Just a couple of notes:
>
> 1. This re-enables a previously disabled check in the namespace tests
> (which passes nicely)
> 2. I renamed an existing method CXXRecordDecl::setUserDeclaredDestructor to
> setHasUserDeclaredDestructor to be consistent with other setHasTrivial...
> methods. The only place this was called is SemaDecl.cpp.
> 3. I modified all of the member function documentation of most of the
> accessor/mutators I looked at to use \brief instead of "FunctionName - ...".
> Current comment formatting is inconsistent, so I chose this style. It seems
> less redundant.
>
> 4. CXXBaseOrMemberSpecializer seems like it might need some attention.
>
> As it stands, I haven't implemented PCH support for the
> DesignatedInitializer component of the class.
>

Attached is the part 3 of the PCH patch for CXXDecls. This subsumes the
previous patch since there wasn't any response on it. This now includes
support for CXXMethodDecl, CXXConstructorDecl, CXXDestructorDecl, and
CXXConversionDecl.

Conversions are added to their declaring class when loaded rather than being
part of the class serialization being loaded, which should address Doug's
previous comment about being lazily loaded. The test case actually checks
C++0x explicit conversions as well.

The patch also fixes a (seemingly) unreported PCH bug in the serialization
of CXXConstructExpr. The number of arguments in the constructor call was
being written but not read. This fixes a problem encountered with the
original (large) patch.

Andrew Sutton
andrew.n.sutton at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100515/542fc3e4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pch-classes2.patch
Type: text/x-patch
Size: 31979 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100515/542fc3e4/attachment.bin>


More information about the cfe-dev mailing list