[PATCH] D67901: [clangd] Improve semantic highlighting in dependent contexts (fixes #154)

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 23 06:08:36 PDT 2019


hokein added a comment.

The heuristic of guessing a concrete type seems fragile, and may not work for all cases.  Instead of trying out test to guess the underlying type, I think we could introduce a new highlighting kind (e.g. `entity.name.type.dependent`) for this.



================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:181
+      addToken(E->getMemberLoc(), E->getQualifier()
+                                      ? HighlightingKind::StaticField
+                                      : HighlightingKind::Field);
----------------
This could be member functions, a case is like

```
template<class T>
class Foo {
public:
  void foo() {
    this->foo();
  }
};
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67901





More information about the cfe-commits mailing list