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

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 30 09:21:27 PDT 2019


ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

Mostly LGTM



================
Comment at: clang-tools-extra/clangd/SourceCode.cpp:258
+
+TokenKind getTokenKind(SourceLocation Loc, const SourceManager &SM,
+                       const LangOptions &LangOpts) {
----------------
hokein wrote:
> ilya-biryukov wrote:
> > NIT: add `static` for consistency with the rest of the function.
> I think the static is redundant here, as the function is in the anonymous namespace, I removed the `static` on the function above.
LG, that's also fine.

I suggested 'static' because other functions in this file are using it (in addition to being in the anonymous namespace, I believe).



================
Comment at: clang-tools-extra/clangd/unittests/SourceCodeTests.cpp:330
+           "/^/ comments", // non-interesting token
+           "void f(int abc) { abc ^ ++; }",    // whitespace
+           "void f(int abc) { ^abc^++; }",     // range of identifier
----------------
Do we test `++^^abc` anywhere?


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