diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-08-31 21:16:32 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-08-31 21:16:32 +0000 |
| commit | fbc1823451449005dd486e978460feb5de87b333 (patch) | |
| tree | 45aa2cc5bff61cda3a7d95d1e9225b1d6d33c929 /clang/lib/Sema | |
| parent | cc2f1eb7fe9bc10a835002196ee268bdd5226b5e (diff) | |
| download | bcm5719-llvm-fbc1823451449005dd486e978460feb5de87b333.tar.gz bcm5719-llvm-fbc1823451449005dd486e978460feb5de87b333.zip | |
Add parsing for references to member function templates with explicit
template argument lists, e.g., x.f<int>().
Semantic analysis will be a separate commit.
llvm-svn: 80624
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/Sema.h | 14 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaExprCXX.cpp | 15 |
3 files changed, 30 insertions, 1 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index 2a2515ff114..ce56eb46379 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -1598,6 +1598,7 @@ public: DeclarationName MemberName, DeclPtrTy ImplDecl, const CXXScopeSpec *SS = 0); + virtual OwningExprResult ActOnMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc, tok::TokenKind OpKind, @@ -1972,6 +1973,19 @@ public: TypeTy *Ty, const CXXScopeSpec *SS = 0); + virtual OwningExprResult + ActOnMemberTemplateIdReferenceExpr(Scope *S, ExprArg Base, + SourceLocation OpLoc, + tok::TokenKind OpKind, + const CXXScopeSpec &SS, + // FIXME: "template" keyword? + TemplateTy Template, + SourceLocation TemplateNameLoc, + SourceLocation LAngleLoc, + ASTTemplateArgsPtr TemplateArgs, + SourceLocation *TemplateArgLocs, + SourceLocation RAngleLoc); + /// MaybeCreateCXXExprWithTemporaries - If the list of temporaries is /// non-empty, will create a new CXXExprWithTemporaries expression. /// Otherwise, just returs the passed in expression. diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index f304ac30945..026ff43d2d2 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -2005,7 +2005,7 @@ Sema::BuildMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc, ImpCastExprToType(BaseExpr, BaseType); } } else if (BaseType->isObjCClassType() && - BaseType != Context.ObjCClassRedefinitionType) { + BaseType != Context.ObjCClassRedefinitionType) { BaseType = Context.ObjCClassRedefinitionType; ImpCastExprToType(BaseExpr, BaseType); } diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 35938260c65..dc58ecc16c7 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -1831,6 +1831,21 @@ Sema::ActOnConversionOperatorReferenceExpr(Scope *S, ExprArg Base, ConvName, DeclPtrTy(), SS); } +Sema::OwningExprResult +Sema::ActOnMemberTemplateIdReferenceExpr(Scope *S, ExprArg Base, + SourceLocation OpLoc, + tok::TokenKind OpKind, + const CXXScopeSpec &SS, + TemplateTy Template, + SourceLocation TemplateNameLoc, + SourceLocation LAngleLoc, + ASTTemplateArgsPtr TemplateArgs, + SourceLocation *TemplateArgLocs, + SourceLocation RAngleLoc) { + // FIXME: Implement! + return ExprError(); +} + Sema::OwningExprResult Sema::ActOnFinishFullExpr(ExprArg Arg) { Expr *FullExpr = Arg.takeAs<Expr>(); if (FullExpr) |

