The ordered comparison operators are defined for the SourceLocation
class, so SourceLocation objects can be compared directly. There is no
need to extract the internal representation for comparison.
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D94231
Res != ResEnd; ++Res) {
if (isa<TypeDecl>(*Res) || isa<ObjCInterfaceDecl>(*Res) ||
(AllowDeducedTemplate && getAsTypeTemplateDecl(*Res))) {
- if (!IIDecl ||
- (*Res)->getLocation().getRawEncoding() <
- IIDecl->getLocation().getRawEncoding())
+ if (!IIDecl || (*Res)->getLocation() < IIDecl->getLocation())
IIDecl = *Res;
}
}
return true;
if (lhs.first == rhs.first &&
- lhs.second->getCaseLoc().getRawEncoding()
- < rhs.second->getCaseLoc().getRawEncoding())
+ lhs.second->getCaseLoc() < rhs.second->getCaseLoc())
return true;
return false;
}