[cfe-dev] Written name of conversion operator
Abramo Bagnara
abramo.bagnara at gmail.com
Fri Jun 4 23:45:05 PDT 2010
Il 05/06/2010 08:33, Sean Hunt ha scritto:
> On 06/05/2010 12:26 AM, Abramo Bagnara wrote:
>> struct {
>> SourceLocation LQuoteLoc;
>> SourceLocation RQuoteLoc;
>> // Already in NamedDecl, *MemberExpr or *DeclRefExpr
>> // SourceLocation NameLoc;
>> } CXXLiteralOperatorName;
>
> I'm not sure keeping the string's source location is important. It's
> required to be an empty string literal, so the only errors that can
> occur there are parse errors, which are caught before the
> DeclarationName is made. After that, the contents of the string are
> irrelevant, and the range is subsumed in the range of the operator
> keyword to the end of the identifier.
Thanks.
I've also done another mistake here, it should be:
struct {
// Already in NamedDecl, *MemberExpr or *DeclRefExpr
// SourceLocation OperatorLoc;
// Probably useless (see comment from Sean)
// SourceLocation LQuoteLoc;
// SourceLocation RQuoteLoc;
SourceLocation NameLoc;
} CXXLiteralOperatorName;
Your comment also suggest me that this also have to be changed so to
have proper source range:
struct {
// Already in NamedDecl, *MemberExpr or *DeclRefExpr
// SourceLocation OperatorLoc;
SourceLocation OpLoc;
// Not so useful
// SourceLocation LSquareLoc;
SourceLocation RSquareLoc;
} CXXOperatorName;
More information about the cfe-dev
mailing list