[PATCH] D127403: [clangd] Implement semantic token modifier "definition"

Christian Kandeler via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 12 23:53:54 PDT 2022


ckandeler added inline comments.


================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:847-849
+            } else if (const auto Iface =
+                           dyn_cast<const ObjCInterfaceDecl>(Decl)) {
+              if (Iface->isThisDeclarationADefinition())
----------------
dgoldman wrote:
> Do we need similar code for ObjCProtocolDecl? Also should ObjCImplDecl be considered definitions here?
Possibly. I know next to nothing about Objective C, so I'll just do as I'm told here. On a related note, the code above regarding ObjCMethodDecl does not seem to do anything, i.e. none of the constructs that to my eye appear to be Objective-C methods get the "def" modifier. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127403



More information about the cfe-commits mailing list