summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commit8523d20af3815a15574d0cbe26344d9f84438613 (patch)
treec8c4959c9d77e588d4c8ea67be767331d3b33dba /clang/lib
parent39a029d8a3c7c0d79aa4ad5c68acd6599688f8f4 (diff)
downloadbcm5719-llvm-8523d20af3815a15574d0cbe26344d9f84438613.tar.gz
bcm5719-llvm-8523d20af3815a15574d0cbe26344d9f84438613.zip
Pass the right SourceLocation to Actions.ActOnOverloadedOperatorReferenceExpr and Actions.ActOnConversionOperatorReferenceExpr. Update incomplete-call.cpp test.
llvm-svn: 84026
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Parse/ParseExpr.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index d10e38cf68d..72e30e3b607 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud