[PATCH] D100638: [AST][Introspection] Avoid creating temporary strings when comparing LocationCalls.
Stephen Kelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 16 04:28:32 PDT 2021
steveire added inline comments.
================
Comment at: clang/lib/Tooling/NodeIntrospection.cpp:84
+
+ auto LI = Left.rbegin(), LE = Left.rend(), RI = Right.rbegin();
+ for (; LI != LE; ++LI, ++RI) {
----------------
Would it make sense to compare the sizes `(leftsize < rightsize) return true` etc and only loop if the containers are the same size?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100638/new/
https://reviews.llvm.org/D100638
More information about the cfe-commits
mailing list