Semantic highlighting: "struct" type not sent

I'm currently adding support for Objective-C to Noctule.

I noticed that all declarations and references to structs in following snippet are highlighted by SourceKit LSP with tokenType "class":

struct First { // <-- First is highlighted as "class", not "struct"
  int a;
};

typedef struct {
  int a;
} Second; // <-- Second is highlighted as "class", not "struct"

int something() {
  struct First first; // <-- First is highlighted as "class", not "struct"

  Second second; // <-- Second is highlighted as "class", not "struct"
}

Is this a limitation of SourceKit LSP and/or clang or is it more likely a bug and "struct" should used for highlighting?

Thanks!

I agree that this should probably be highlighted as struct. We use clangd to compute these highlighting tokens, so it’s likely a bug in clangd.

It looks like this is intentional behavior rather than a bug. The following test ensures that AS in struct AS is highlighted as a “class”:

Original commit:

Maybe C++ bias? In C++ struct and class are interchangeable outside of the original definition (and even within it's just setting the default visibility). And C doesn't have classes at all, so distinguishing them doesn't matter (until it's Objective-C).