diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-22 21:00:29 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-22 21:00:29 +0000 |
commit | 90b7bc67518a408d397f2400ff6c40e5465b45e4 (patch) | |
tree | 5e056c9ff50c223979ef90d5a75d48b8ff18c167 /lib/AST/Expr.cpp | |
parent | 64e859a36634dfc848634d22aa428a48f82487d3 (diff) |
Now that DeclRefExpr accepts a NamedDecl, use a DeclRefExpr for when a CXXFieldDecl is referenced inside a method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58000 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 5c0e38cf9e..6e62d09474 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -325,7 +325,7 @@ bool Expr::hasLocalSideEffect() const { /// DeclCanBeLvalue - Determine whether the given declaration can be /// an lvalue. This is a helper routine for isLvalue. static bool DeclCanBeLvalue(const NamedDecl *Decl, ASTContext &Ctx) { - return isa<VarDecl>(Decl) || + return isa<VarDecl>(Decl) || isa<CXXFieldDecl>(Decl) || // C++ 3.10p2: An lvalue refers to an object or function. (Ctx.getLangOptions().CPlusPlus && (isa<FunctionDecl>(Decl) || isa<OverloadedFunctionDecl>(Decl))); |