aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.h
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2009-01-18 18:53:16 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2009-01-18 18:53:16 +0000
commitcd965b97cfac7b7a53a835810ec2bc2ac7a9dd1a (patch)
treeb0877cb15978c0240797b11024005e522b665bd3 /lib/Sema/Sema.h
parentf512e82f56671b695a32d019103e62a302838b7e (diff)
Convert a few expression actions to smart pointers.
These actions are extremely widely used (identifier expressions and literals); still no performance regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62468 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.h')
-rw-r--r--lib/Sema/Sema.h43
1 files changed, 21 insertions, 22 deletions
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index eff8550bd1..b2c8aca966 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -943,16 +943,16 @@ public:
// Expression Parsing Callbacks: SemaExpr.cpp.
// Primary Expressions.
- virtual ExprResult ActOnIdentifierExpr(Scope *S, SourceLocation Loc,
- IdentifierInfo &II,
- bool HasTrailingLParen,
- const CXXScopeSpec *SS = 0);
- virtual ExprResult ActOnCXXOperatorFunctionIdExpr(Scope *S,
+ virtual OwningExprResult ActOnIdentifierExpr(Scope *S, SourceLocation Loc,
+ IdentifierInfo &II,
+ bool HasTrailingLParen,
+ const CXXScopeSpec *SS = 0);
+ virtual OwningExprResult ActOnCXXOperatorFunctionIdExpr(Scope *S,
SourceLocation OperatorLoc,
OverloadedOperatorKind Op,
bool HasTrailingLParen,
const CXXScopeSpec &SS);
- virtual ExprResult ActOnCXXConversionFunctionExpr(Scope *S,
+ virtual OwningExprResult ActOnCXXConversionFunctionExpr(Scope *S,
SourceLocation OperatorLoc,
TypeTy *Ty,
bool HasTrailingLParen,
@@ -960,29 +960,28 @@ public:
DeclRefExpr *BuildDeclRefExpr(NamedDecl *D, QualType Ty, SourceLocation Loc,
bool TypeDependent, bool ValueDependent,
const CXXScopeSpec *SS = 0);
- ExprResult
+ OwningExprResult
BuildAnonymousStructUnionMemberReference(SourceLocation Loc,
FieldDecl *Field,
Expr *BaseObjectExpr = 0,
SourceLocation OpLoc = SourceLocation());
- ExprResult ActOnDeclarationNameExpr(Scope *S, SourceLocation Loc,
- DeclarationName Name,
- bool HasTrailingLParen,
- const CXXScopeSpec *SS,
- bool ForceResolution = false);
-
-
- virtual ExprResult ActOnPredefinedExpr(SourceLocation Loc,
- tok::TokenKind Kind);
- virtual ExprResult ActOnNumericConstant(const Token &);
- virtual ExprResult ActOnCharacterConstant(const Token &);
- virtual ExprResult ActOnParenExpr(SourceLocation L, SourceLocation R,
- ExprTy *Val);
+ OwningExprResult ActOnDeclarationNameExpr(Scope *S, SourceLocation Loc,
+ DeclarationName Name,
+ bool HasTrailingLParen,
+ const CXXScopeSpec *SS,
+ bool ForceResolution = false);
+
+ virtual OwningExprResult ActOnPredefinedExpr(SourceLocation Loc,
+ tok::TokenKind Kind);
+ virtual OwningExprResult ActOnNumericConstant(const Token &);
+ virtual OwningExprResult ActOnCharacterConstant(const Token &);
+ virtual OwningExprResult ActOnParenExpr(SourceLocation L, SourceLocation R,
+ ExprArg Val);
/// ActOnStringLiteral - The specified tokens were lexed as pasted string
/// fragments (e.g. "foo" "bar" L"baz").
- virtual ExprResult ActOnStringLiteral(const Token *Toks, unsigned NumToks);
-
+ virtual OwningExprResult ActOnStringLiteral(const Token *Toks, unsigned NumToks);
+
// Binary/Unary Operators. 'Tok' is the token for the operator.
virtual ExprResult ActOnUnaryOp(Scope *S, SourceLocation OpLoc,
tok::TokenKind Op, ExprTy *Input);