aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-10-13 21:02:07 +0000
committerAnders Carlsson <andersca@mac.com>2009-10-13 21:02:07 +0000
commitcee1b54e11cb4d460634e6ecedbe75c7c2382389 (patch)
tree3b04d883bf6876c9e586412add8d62d12b66eda3 /lib/Parse/ParseExpr.cpp
parentdcde1909f6e0b760f69d2290efe702ac5e4e6ae9 (diff)
Pass the right SourceLocation to Actions.ActOnOverloadedOperatorReferenceExpr and Actions.ActOnConversionOperatorReferenceExpr. Update incomplete-call.cpp test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84026 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r--lib/Parse/ParseExpr.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index d10e38cf68..72e30e3b60 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -983,12 +983,14 @@ Parser::ParsePostfixExpressionSuffix(OwningExprResult LHS) {
} else if (getLang().CPlusPlus && Tok.is(tok::kw_operator)) {
// We have a reference to a member operator, e.g., t.operator int or
// t.operator+.
+ SourceLocation OperatorLoc = Tok.getLocation();
+
if (OverloadedOperatorKind Op = TryParseOperatorFunctionId()) {
if (!LHS.isInvalid())
LHS = Actions.ActOnOverloadedOperatorReferenceExpr(CurScope,
move(LHS), OpLoc,
OpKind,
- Tok.getLocation(),
+ OperatorLoc,
Op, &SS);
// TryParseOperatorFunctionId already consumed our token, so
// don't bother
@@ -997,7 +999,7 @@ Parser::ParsePostfixExpressionSuffix(OwningExprResult LHS) {
LHS = Actions.ActOnConversionOperatorReferenceExpr(CurScope,
move(LHS), OpLoc,
OpKind,
- Tok.getLocation(),
+ OperatorLoc,
ConvType, &SS);
} else {
// Don't emit a diagnostic; ParseConversionFunctionId does it for us