[PATCH] D59639: [clangd] Print template arguments helper

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 22 03:05:57 PDT 2019


ilya-biryukov added inline comments.


================
Comment at: clang-tools-extra/clangd/AST.cpp:26
+llvm::Optional<llvm::ArrayRef<TemplateArgumentLoc>>
+getTemplateSpecializationArgLocs(const NamedDecl &ND) {
+  if (auto *Func = llvm::dyn_cast<FunctionDecl>(&ND)) {
----------------
Eugene.Zelenko wrote:
> Functions should be static, not in anonymous namespace. See LLVM Coding Guidelines.
We tend to put internal functions to anonymous namespace quite a lot in clangd.
While technically a small violation of the LLVM style guide, this aligns with the rest of the code and we don't consider that to be a problem.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59639





More information about the cfe-commits mailing list