[PATCH] D137340: [clang-tidy] Add modernize-use-anonymous-namespace check

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 3 08:26:41 PDT 2022


Eugene.Zelenko added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/modernize/UseAnonymousNamespaceCheck.cpp:31
+static bool isInAnonymousNamespace(const Decl *Decl) {
+  const auto *DC = Decl->getDeclContext();
+  if (DC && DC->isNamespace()) {
----------------
Please don't use `auto` unless type is explicitly spelled in same statement or iterator.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137340



More information about the cfe-commits mailing list