summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-01-25 07:44:05 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-01-25 07:44:05 +0000
commit4e340b75b2a20198c7891c5c7adb96da0bb96408 (patch)
treeef0409ac714d5a11f95d9c43fb564e43939aec7f /clang
parentb26513950ddc009ce2b7d17be9dfb9599fdb93d7 (diff)
downloadbcm5719-llvm-4e340b75b2a20198c7891c5c7adb96da0bb96408.tar.gz
bcm5719-llvm-4e340b75b2a20198c7891c5c7adb96da0bb96408.zip
Fix the buildbots (fallout from r227028) by returning the exprloc of non-binary operator overload calls (and ->) to the start of the expression, not the location of the operator
I'll give this some further thought/discussion later, but this is enough to unbreak the buildbots at least. llvm-svn: 227034
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/AST/ExprCXX.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/include/clang/AST/ExprCXX.h b/clang/include/clang/AST/ExprCXX.h
index db00445f689..fca5e32472d 100644
--- a/clang/include/clang/AST/ExprCXX.h
+++ b/clang/include/clang/AST/ExprCXX.h
@@ -86,7 +86,12 @@ public:
/// of the right bracket.
SourceLocation getOperatorLoc() const { return getRParenLoc(); }
- SourceLocation getExprLoc() const LLVM_READONLY { return getOperatorLoc(); }
+ SourceLocation getExprLoc() const LLVM_READONLY {
+ return (Operator < OO_Plus || Operator >= OO_Arrow ||
+ Operator == OO_PlusPlus || Operator == OO_MinusMinus)
+ ? getLocStart()
+ : getOperatorLoc();
+ }
SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); }
SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
OpenPOWER on IntegriCloud