dgoldman added inline comments.

================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:863
+              Tok.addModifier(HighlightingModifier::Declaration);
+            if (const auto Func = dyn_cast<FunctionDecl>(Decl)) {
+              if (Func->isThisDeclarationADefinition())
----------------
Instead of doing it like this, I wonder if would make more sense to call 
getDefinition from 
https://cs.github.com/llvm/llvm-project/blob/ae071a59bc6cc09e0e0043e0ef1d9725853f1681/clang-tools-extra/clangd/XRefs.cpp#L76
 and if it matches Decl, add the Definition modifier?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127403

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D127403: [clang... David Goldman via Phabricator via cfe-commits

Reply via email to