[cfe-dev] [PATCH]: Preparing AST for C++ declarations

Argiris Kirtzidis akyrtzi at gmail.com
Wed Jun 4 07:22:10 PDT 2008

Hi Eli,
thanks for reviewing.

Eli Friedman wrote:
> >From my reading, there's nothing obviously wrong with this patch,
> except that it's too big, which makes reviewing it a lot more
> difficult.  Please put the DeclBase code movement into a separate
> patch (moving the DeclBase code is fine without review), put the
> DeclChain changes into a separate patch, put the Decl::Struct ->
> TagDecl::TK_struct changes into a separate patch, and split out
> anything else that's obviously independent.

I've added DeclBase.cpp here (Chris was fine with this change at the 
previous related patch):

In the currently attached patch there are only the AST-related changes 
(introducing the C++ decl subclasses); these are the important ones.

> Minor issue I spotted: in CXXMethodDecl::getThisType, there's no point
> to making "this" const; it isn't an lvalue, so the const modifier
> doesn't do anything.

Making 'this' const is so that the error diagnostics can report its type 
as "[class name]* const". This convention is followed by both gcc and msvc.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ast-cxx.patch
Type: text/x-diff
Size: 24237 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080604/548d3bbd/attachment.patch>

More information about the cfe-dev mailing list