[cfe-dev] Written name of conversion operator

John McCall rjmccall at apple.com
Fri Jun 4 00:56:04 PDT 2010


On Jun 3, 2010, at 11:54 PM, Abramo Bagnara wrote:
> We have attempted to extract from AST the name of operator written in
> the source but we have failed:
> 
> - using the DeclarationName we get the "wrong" name each time the name
> is not the one of the canonical type
> 
> - using the TypeSourceInfo of CXXConversionDecl should be always correct
> for operator declaration, but it fails on operator call if the name
> specified in the call is different from the one in the declaration
> 
> Is there a know way to obtain the written name?

Unfortunately, no, and I'm not sure there's a straightforward way to make this possible, either.  Possibly some extra storage on a DeclRefExpr / UnresolvedExpr?

John.





More information about the cfe-dev mailing list