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

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 22 06:49:11 PDT 2019


Eugene.Zelenko 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)) {
----------------
ilya-biryukov wrote:
> 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.
I don't think it's reasonable to have one style per project. Even if clangd has such historical code, it'll be good idea to change it to confirm to common guidelines. Evolution of LLDB formatting style is good example.


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