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

Andrew Sutton andrew.n.sutton at gmail.com
Mon May 10 09:11:17 PDT 2010


All,

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. It
looks like it acquired some functionality for C99 designated initializers,
which I had to look up :) That feature makes the class decidedly not CXX
specific. Also, I think that there may be some redundancy in the storing of
source locations between the BaseInitializer component and the
MemberInitializer component. Basically, the class is starting to seem a
little "unclean". One solution might be to refactor the class as a union of
3 others: CXXBaseInitializer, CXXMemberInitializer, and
DesignatedInitializer.

As it stands, I haven't implemented PCH support for the
DesignatedInitializer component of the class.

Also, this patch does /not/ (yet) add full support for methods, ctors,
dtors, or conversion operators. I'll try to send that upstream next after
this is reviewed and eventually committed. Let me know if I need to add or
remove anything prior to committing.

Thanks,

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


More information about the cfe-dev mailing list