This revision was automatically updated to reflect the committed changes. Closed by commit rG9f76788b0930: [clang][Sema] Compare SourceLocations directly [NFCI] (authored by miyuki).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94231/new/ https://reviews.llvm.org/D94231 Files: clang/lib/Sema/SemaDecl.cpp clang/lib/Sema/SemaStmt.cpp Index: clang/lib/Sema/SemaStmt.cpp =================================================================== --- clang/lib/Sema/SemaStmt.cpp +++ clang/lib/Sema/SemaStmt.cpp @@ -672,8 +672,7 @@ 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; } Index: clang/lib/Sema/SemaDecl.cpp =================================================================== --- clang/lib/Sema/SemaDecl.cpp +++ clang/lib/Sema/SemaDecl.cpp @@ -436,9 +436,7 @@ 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; } }
Index: clang/lib/Sema/SemaStmt.cpp =================================================================== --- clang/lib/Sema/SemaStmt.cpp +++ clang/lib/Sema/SemaStmt.cpp @@ -672,8 +672,7 @@ 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; } Index: clang/lib/Sema/SemaDecl.cpp =================================================================== --- clang/lib/Sema/SemaDecl.cpp +++ clang/lib/Sema/SemaDecl.cpp @@ -436,9 +436,7 @@ 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; } }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits