[PATCH] D66990: [clangd] Add distinct highlightings for declarations of functions and methods

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 2 01:33:59 PDT 2019


ilya-biryukov added a comment.

In D66990#1653833 <https://reviews.llvm.org/D66990#1653833>, @nridge wrote:

> There is precedent for highlighting declarations and uses differently in other C++ editors. For example, Eclipse CDT has separate highlightings for function and functions declarations (see screenshot below).


Acknowledged.

> Objectively speaking, I think it makes sense to style function declarations differently from function uses for emphasis. For example, you can use the same color for both, but make the declarations bold. I have found this to aid readability.

As mentioned before, I think doing this:

- adds some confusion: the **same** thing highlighted in **two** different colors,
- provides almost zero value: function declarations have completely different syntax from function usages anyway, there are more than enough signals to distinguish them and we don't need semantic highlighting for that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66990





More information about the cfe-commits mailing list