[PATCH] D64257: [clangd] Added highlighting for non-builtin types

Johan Vikström via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 8 03:37:24 PDT 2019


jvikstrom marked 4 inline comments as done.
jvikstrom added inline comments.


================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:68
+
+    TagDecl *D = TL.getTypePtr()->getAsTagDecl();
+    if (!D)
----------------
hokein wrote:
> We are only interested in `TagDecl`, maybe use the `VisitTagLoc` callback, so that you can get rid of the filtering code above.
With just VisitTagLoc it does not catch this case: 
```
namespace abc {
  template<typename T>
  struct $Type[[A]] {};
}
abc::$Type[[A]]<int> $Variable[[AA]];```

I guess I could add a bunch of ```Visit*TypeLoc``` methods but I can't seem to find the correct Visit method for the case above... 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64257





More information about the cfe-commits mailing list