aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-11-19 17:17:41 +0000
committerDouglas Gregor <dgregor@apple.com>2008-11-19 17:17:41 +0000
commit337c6b9f5d502dc1c5acea628bf7bf9e828efc0e (patch)
tree74b96efaf3032268cc7547d824cced4c93574bb4 /lib/Parse/ParseExpr.cpp
parent5cb93b8bf009c4b0ae09b71ba85f54b2a7ea8022 (diff)
Support overloading of the subscript operator[], including support for
built-in operator candidates. Test overloading of '&' and ','. In C++, a comma expression is an lvalue if its right-hand subexpression is an lvalue. Update Expr::isLvalue accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59643 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r--lib/Parse/ParseExpr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index 5f36f0bb27..74b0715de2 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -672,7 +672,8 @@ Parser::ExprResult Parser::ParsePostfixExpressionSuffix(ExprResult LHS) {
SourceLocation RLoc = Tok.getLocation();
if (!LHS.isInvalid && !Idx.isInvalid && Tok.is(tok::r_square))
- LHS = Actions.ActOnArraySubscriptExpr(LHS.Val, Loc, Idx.Val, RLoc);
+ LHS = Actions.ActOnArraySubscriptExpr(CurScope, LHS.Val, Loc,
+ Idx.Val, RLoc);
else
LHS = ExprResult(true);