[PATCH] D58294: [clangd] Enable indexing of template type parameters
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 19 01:01:01 PST 2019
ilya-biryukov added inline comments.
================
Comment at: clangd/XRefs.cpp:42
// Only a single declaration is allowed.
- if (isa<ValueDecl>(D)) // except cases above
+ if (isa<ValueDecl>(D) || isa<TemplateTypeParmDecl>(D)) // except cases above
return D;
----------------
Should probably also handle `TemplateTemplateParmDecl`?
Could we add tests for template template parameters too?
```
// two most-used constructs with template template parameter references.
template<template <class> class U>
struct Foo {
^U<int> f;
Foo<^U> x;
};
```
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58294/new/
https://reviews.llvm.org/D58294
More information about the cfe-commits
mailing list