r227034 - 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
David Blaikie
dblaikie at gmail.com
Sat Jan 24 23:44:06 PST 2015
Author: dblaikie
Date: Sun Jan 25 01:44:05 2015
New Revision: 227034
URL: http://llvm.org/viewvc/llvm-project?rev=227034&view=rev
Log:
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.
Modified:
cfe/trunk/include/clang/AST/ExprCXX.h
Modified: cfe/trunk/include/clang/AST/ExprCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprCXX.h?rev=227034&r1=227033&r2=227034&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ExprCXX.h (original)
+++ cfe/trunk/include/clang/AST/ExprCXX.h Sun Jan 25 01:44:05 2015
@@ -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(); }
More information about the cfe-commits
mailing list