[PATCH] D71284: [clangd] Consider () part of the FunctionDecl, not the FunctionTypeLoc

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 11 00:13:35 PST 2019


kadircet accepted this revision.
kadircet added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/Selection.cpp:578
 
   // Returns the range of tokens that this node will claim directly, and
   // is not available to the node's children.
----------------
comment needs to be updated


================
Comment at: clang-tools-extra/clangd/unittests/SelectionTests.cpp:253
+      {"[[^void]] foo(int);", "BuiltinTypeLoc"},
+      {"[[void foo^(int)]];", "FunctionDecl"},
+      {"[[^void foo^(int)]];", "FunctionDecl"},
----------------
could you also add  case for closing paren (possibly with a trailing `const` attribute ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71284





More information about the cfe-commits mailing list