[PATCH] D67695: [clangd] Implement getBeginning for overloaded operators.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 1 00:07:48 PDT 2019


ilya-biryukov added inline comments.


================
Comment at: clang-tools-extra/clangd/SourceCode.cpp:256
+
 SourceLocation getBeginningOfIdentifier(const Position &Pos,
                                         const SourceManager &SM,
----------------
hokein wrote:
> the function name doesn't match what it does now, considering a new name for it, `getBeginningOfIdentifierOrOverloadedOperator` seems too verbose, maybe just `getBeginning`?
`getBeginning` sounds too generic too me, would definitely avoid that. I think `getBeginningOfIdentifier` creates less confusion, albeit it definitely creates **some**.

No better alternative comes to mind, though. Maybe keep as is and update the comment to mention it also handles tokens for operators?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67695/new/

https://reviews.llvm.org/D67695





More information about the cfe-commits mailing list