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 | 2147e7d88b2638e5a2dc1b118f72c7577dbf1b55 (patch) | |
| tree | 5c827a157172e3a0e560c5de6fcf42e018133ef8 /clang/lib/AST/Expr.cpp | |
| parent | 9a96bf22ecfd3e6842ac6992a45dc08bad608888 (diff) | |
| download | bcm5719-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/AST/Expr.cpp')
| -rw-r--r-- | clang/lib/AST/Expr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 5c0e38cf9e7..6e62d09474c 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/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))); |

