Don't use operator overload '<' for SourceLocation, it has not semantic meaning.

llvm-svn: 73932
This commit is contained in:
Argyrios Kyrtzidis 2009-06-23 00:42:15 +00:00
parent 0152c6cbca
commit dfc5dca1e5
2 changed files with 1 additions and 2 deletions

View File

@ -694,7 +694,6 @@ public:
return SourceRange(getLocation(), EndRangeLoc);
}
void setLocEnd(SourceLocation E) {
assert(getLocation() <= E && "Invalid end location");
EndRangeLoc = E;
}

View File

@ -496,7 +496,7 @@ void FunctionDecl::setParams(ASTContext& C, ParmVarDecl **NewParamInfo,
// Update source range. The check below allows us to set EndRangeLoc before
// setting the parameters.
if (EndRangeLoc < NewParamInfo[NumParams-1]->getLocEnd())
if (EndRangeLoc.isInvalid() || EndRangeLoc == getLocation())
EndRangeLoc = NewParamInfo[NumParams-1]->getLocEnd();
}
}