================
@@ -158,9 +158,9 @@ class CXXOperatorCallExpr final : public CallExpr {
                : getOperatorLoc();
   }
 
-  SourceLocation getBeginLoc() const { return Range.getBegin(); }
-  SourceLocation getEndLoc() const { return Range.getEnd(); }
-  SourceRange getSourceRange() const { return Range; }
+  SourceLocation getBeginLoc() const { return BeginLoc; }
+  SourceLocation getEndLoc() const { return getSourceRangeImpl().getEnd(); }
----------------
cor3ntin wrote:

I think we could simplify getEndLoc() to be a trimmed-down version of 
getSourceRangeImpl

* for OO_Call/ OO_Subscript => `getRParenLoc()`
* for  1 argument = > `getArg(0)->getEndLoc()`
* for OO_PlusPlus/OO_MinusMinus => `getOperatorLoc()`
* for  2 argument: `getArg(1)->getEndLoc()`


I am not sure about the current handling of `OO_Arrow` in `getSourceRangeImpl`



https://github.com/llvm/llvm-project/pull/147028
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to