diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-06 15:09:27 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-06 15:09:27 +0000 |
commit | 64538cfd343c200d4285d0e5991ec94d9ff8876c (patch) | |
tree | 1517cc5c627ffe7defd0dc7f583f6fc1399ef747 /lib/Parse/ParseExpr.cpp | |
parent | 7969f936a1128c9d1dff2f76daf590a968244a35 (diff) |
Perform code-completion within ParseCastExpression, which handles,
e.g., the right-hand side of binary expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100526 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index af91021d33..965f764dcf 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -897,11 +897,16 @@ Parser::OwningExprResult Parser::ParseCastExpression(bool isUnaryExpression, } case tok::caret: return ParsePostfixExpressionSuffix(ParseBlockLiteralExpression()); + case tok::code_completion: + Actions.CodeCompleteOrdinaryName(CurScope, Action::CCC_Expression); + ConsumeToken(); + return ParseCastExpression(isUnaryExpression, isAddressOfOperand, + NotCastExpr, TypeOfCast); case tok::l_square: // These can be followed by postfix-expr pieces. if (getLang().ObjC1) return ParsePostfixExpressionSuffix(ParseObjCMessageExpression()); - // FALL THROUGH. + // FALL THROUGH. default: NotCastExpr = true; return ExprError(); |