[PATCH] D66516: [clangd] Highlight typedefs to template parameters as template parameters

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 9 02:35:34 PDT 2019


ilya-biryukov added inline comments.


================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:129
     if (const auto *TSI = TD->getTypeSourceInfo())
-      addType(TD->getLocation(), TSI->getTypeLoc().getTypePtr());
+      addType(TD->getLocation(), TSI->getTypeLoc().getType().getTypePtr());
     return true;
----------------
hokein wrote:
> nit: I think the previous ` TSI->getTypeLoc().getTypePtr()` should work?
Ah, good point, thanks! Fixed.
I've changed this code multiple types and didn't notice that the final result is just a no-op change.


================
Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:270
+        struct $Class[[A]] {
+          $Primitive[[void]] $Method[[foo]]($Class[[A]]*);
+        };
----------------
hokein wrote:
> Is this change relevant to this patch?
A leftover from an older version of the patch. Removed, thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66516





More information about the cfe-commits mailing list