[PATCH] D58293: [clang][Index] Enable indexing of Template Type Parameters behind a flag

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 19 07:15:36 PST 2019


ilya-biryukov added inline comments.


================
Comment at: include/clang/Index/IndexingAction.h:49
   bool IndexParametersInDeclarations = false;
+  bool IndexTemplateParmDecls = false;
 };
----------------
NIT: maybe rename to `IndexTemplateParameters`? The `ParmDecl` is a somewhat weird name that does not add much clarity.


================
Comment at: lib/Index/IndexingContext.cpp:51
+
 bool IndexingContext::handleDecl(const Decl *D,
                                  SymbolRoleSet Roles,
----------------
kadircet wrote:
> ilya-biryukov wrote:
> > Do we call `handleDecl` for template parameters now too?
> No we don't. I believe having the decl itself is not that useful for a template parameter without a reference to it. We only call handlereference.
I'm probably call both just for the sake of symmetry.
How does `IndexParametersInDeclarations` behaves? When set to true will it call both `handleDecl` and `handleReference`?
I'd argue we should do the same for template parameters.


Repository:
  rC Clang

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

https://reviews.llvm.org/D58293





More information about the cfe-commits mailing list