[PATCH] D100638: [AST][Introspection] Avoid creating temporary strings when comparing LocationCalls.

2021-04-18 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Your implementation is getting very complicated and it requires many comments. Also, if we get to this point in the execution of `RangeLessThan::operator()`, you're creating and populating two vectors for every two elements contained. I know it's `llvm::SmallVector`

[PATCH] D100638: [AST][Introspection] Avoid creating temporary strings when comparing LocationCalls.

2021-04-18 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 338356. njames93 added a comment. Rebase and remove Args from comparison. Add quick check for skippig common prefix calls. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100638/new/

[PATCH] D100638: [AST][Introspection] Avoid creating temporary strings when comparing LocationCalls.

2021-04-16 Thread Stephen Kelly via Phabricator via cfe-commits
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) { njames93 wrote: > steveire wrote: > > Would it make sense to compare the

[PATCH] D100638: [AST][Introspection] Avoid creating temporary strings when comparing LocationCalls.

2021-04-16 Thread Nathan James via Phabricator via cfe-commits
njames93 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) { steveire wrote: > Would it make sense to compare the sizes `(leftsize <

[PATCH] D100638: [AST][Introspection] Avoid creating temporary strings when comparing LocationCalls.

2021-04-16 Thread Stephen Kelly via Phabricator via cfe-commits
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

[PATCH] D100638: [AST][Introspection] Avoid creating temporary strings when comparing LocationCalls.

2021-04-16 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added a reviewer: steveire. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Adds a bit of boiler plate, but removing the need to build temporary strings to compare the calls definitely