summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-10-22 21:00:29 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-10-22 21:00:29 +0000
commit2147e7d88b2638e5a2dc1b118f72c7577dbf1b55 (patch)
tree5c827a157172e3a0e560c5de6fcf42e018133ef8 /clang/lib/Sema/SemaExpr.cpp
parent9a96bf22ecfd3e6842ac6992a45dc08bad608888 (diff)
downloadbcm5719-llvm-2147e7d88b2638e5a2dc1b118f72c7577dbf1b55.tar.gz
bcm5719-llvm-2147e7d88b2638e5a2dc1b118f72c7577dbf1b55.zip
Now that DeclRefExpr accepts a NamedDecl, use a DeclRefExpr for when a CXXFieldDecl is referenced inside a method.
llvm-svn: 58000
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 5619eca4f00..070db2b5b9f 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -402,10 +402,7 @@ Sema::ExprResult Sema::ActOnIdentifierExpr(Scope *S, SourceLocation Loc,
if (FD->isInvalidDecl())
return true;
- // FIXME: Use DeclRefExpr or a new Expr for a direct CXXField reference.
- ExprResult ThisExpr = ActOnCXXThis(SourceLocation());
- return new MemberExpr(static_cast<Expr*>(ThisExpr.Val),
- true, FD, Loc, FD->getType());
+ return new DeclRefExpr(FD, FD->getType(), Loc);
}
return Diag(Loc, diag::err_invalid_non_static_member_use, FD->getName());
OpenPOWER on IntegriCloud