[cfe-commits] r59462 - in /cfe/trunk: docs/InternalsManual.html include/clang/AST/DeclBase.h include/clang/AST/DeclarationName.h include/clang/Basic/DiagnosticKinds.def include/clang/Parse/Action.h lib/AST/DeclarationName.cpp lib/Parse/MinimalAction.cpp lib/Parse/ParseExprCXX.cpp lib/Sema/IdentifierResolver.cpp lib/Sema/IdentifierResolver.h lib/Sema/Sema.h lib/Sema/SemaCXXScopeSpec.cpp lib/Sema/SemaChecking.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaExprCXX.cpp test/SemaCXX/conversion-function.cpp

argiris kirtzidis akyrtzi at gmail.com
Wed Nov 19 10:34:26 PST 2008


Douglas Gregor wrote:
>    
> +  /// ActOnConversionFunctionExpr - Parse a C++ conversion function
> +  /// name (e.g., operator void const *) as an expression. This is
> +  /// very similar to ActOnIdentifierExpr, except that instead of
> +  /// providing an identifier the parser provides the type of the
> +  /// conversion function.
> +  virtual ExprResult ActOnConversionFunctionExpr(Scope *S, 
> +                                                 SourceLocation OperatorLoc,
> +                                                 TypeTy *Type,
> +                                                 bool HasTrailingLParen,
> +                                                 const CXXScopeSpec *SS = 0) {
> +    return 0;
> +  }
> +
>   

I think it's better to change

const CXXScopeSpec *SS = 0

to

const CXXScopeSpec &SS


The former is useful when the action method is called from parts of the parser that the C++ front-end doesn't reach (C-only/ObjC), but this method is C++ specific so the latter is preferable.

BTW, should we follow the convention that all C++ specific actions have the 'CXX' prefix ? (in this case should that be
ActOnCXXConversionFunctionExpr ?)

-Argiris





More information about the cfe-commits mailing list