[cfe-dev] A patch for adding getTypeSpecStartLoc() to TagDecl.
dgregor at apple.com
Tue Jul 21 07:47:00 PDT 2009
On Jul 20, 2009, at 2:24 PM, Abramo Bagnara wrote:
> Douglas Gregor ha scritto:
>> On Jul 16, 2009, at 6:58 AM, Enea Zaffanella wrote:
>>> Enea Zaffanella wrote:
>>>> Please find attached a patch that adds method
>>>> SourceLocation getTypeSpecStartLoc() const;
>>>> to class clang::FieldDecl.
>>> Here is another patch, along the same lines as the one above and
>>> serving similar purposes, that adds this info to clang::TagDecl
>>> (i.e., the base class for enum/struct/union/class declarations). In
>>> this case the method will return the location for the corresponding
>>> tag keyword.
>> It's useful to have the location of the tag keyword (class-key in C+
>> in TagDecl and its derived classes, but getTypeSpecStartLoc() is the
>> wrong name for this functionality because there is no type specifier
>> in one of these declarations. I think this patch is fine if the name
>> is changed to, e.g., getTagKeywordLoc().
> Here attached you can find the fixed patch.
More information about the cfe-dev