Don't use operator overload '<' for SourceLocation, it has not semantic meaning.
llvm-svn: 73932
This commit is contained in:
parent
0152c6cbca
commit
dfc5dca1e5
|
@ -694,7 +694,6 @@ public:
|
||||||
return SourceRange(getLocation(), EndRangeLoc);
|
return SourceRange(getLocation(), EndRangeLoc);
|
||||||
}
|
}
|
||||||
void setLocEnd(SourceLocation E) {
|
void setLocEnd(SourceLocation E) {
|
||||||
assert(getLocation() <= E && "Invalid end location");
|
|
||||||
EndRangeLoc = E;
|
EndRangeLoc = E;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -496,7 +496,7 @@ void FunctionDecl::setParams(ASTContext& C, ParmVarDecl **NewParamInfo,
|
||||||
|
|
||||||
// Update source range. The check below allows us to set EndRangeLoc before
|
// Update source range. The check below allows us to set EndRangeLoc before
|
||||||
// setting the parameters.
|
// setting the parameters.
|
||||||
if (EndRangeLoc < NewParamInfo[NumParams-1]->getLocEnd())
|
if (EndRangeLoc.isInvalid() || EndRangeLoc == getLocation())
|
||||||
EndRangeLoc = NewParamInfo[NumParams-1]->getLocEnd();
|
EndRangeLoc = NewParamInfo[NumParams-1]->getLocEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue