[cfe-commits] r155952 - /cfe/trunk/lib/AST/ExprCXX.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Tue May 1 15:19:11 PDT 2012
Author: akirtzidis
Date: Tue May 1 17:19:11 2012
New Revision: 155952
URL: http://llvm.org/viewvc/llvm-project?rev=155952&view=rev
Log:
Utilize getLocStart()/getLocEnd() on my recent change.
Modified:
cfe/trunk/lib/AST/ExprCXX.cpp
Modified: cfe/trunk/lib/AST/ExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprCXX.cpp?rev=155952&r1=155951&r2=155952&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprCXX.cpp (original)
+++ cfe/trunk/lib/AST/ExprCXX.cpp Tue May 1 17:19:11 2012
@@ -420,23 +420,20 @@
if (Kind == OO_PlusPlus || Kind == OO_MinusMinus) {
if (getNumArgs() == 1)
// Prefix operator
- return SourceRange(getOperatorLoc(),
- getArg(0)->getSourceRange().getEnd());
+ return SourceRange(getOperatorLoc(), getArg(0)->getLocEnd());
else
// Postfix operator
- return SourceRange(getArg(0)->getSourceRange().getBegin(),
- getOperatorLoc());
+ return SourceRange(getArg(0)->getLocStart(), getOperatorLoc());
} else if (Kind == OO_Arrow) {
return getArg(0)->getSourceRange();
} else if (Kind == OO_Call) {
- return SourceRange(getArg(0)->getSourceRange().getBegin(), getRParenLoc());
+ return SourceRange(getArg(0)->getLocStart(), getRParenLoc());
} else if (Kind == OO_Subscript) {
- return SourceRange(getArg(0)->getSourceRange().getBegin(), getRParenLoc());
+ return SourceRange(getArg(0)->getLocStart(), getRParenLoc());
} else if (getNumArgs() == 1) {
- return SourceRange(getOperatorLoc(), getArg(0)->getSourceRange().getEnd());
+ return SourceRange(getOperatorLoc(), getArg(0)->getLocEnd());
} else if (getNumArgs() == 2) {
- return SourceRange(getArg(0)->getSourceRange().getBegin(),
- getArg(1)->getSourceRange().getEnd());
+ return SourceRange(getArg(0)->getLocStart(), getArg(1)->getLocEnd());
} else {
return getOperatorLoc();
}
More information about the cfe-commits
mailing list