[PATCH] D140290: [clang-tidy] Add misc-static-declaration-in-header check

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 19 07:37:09 PST 2022


Eugene.Zelenko added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/misc/StaticDeclarationInHeaderCheck.cpp:46
+    : ClangTidyCheck(Name, Context),
+      RawStringHeaderFileExtensions(Options.getLocalOrGlobal(
+          "HeaderFileExtensions", utils::defaultHeaderFileExtensions())) {
----------------
Look like this setting should be global for Clang-tidy, because it already used in other checks. It also accompanied by other option.


================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:123
+  <clang-tidy/checks/misc/static-declaration-in-header>` check.
+
 - New :doc:`misc-use-anonymous-namespace
----------------
Please add first sentence from documentation.


================
Comment at: clang-tools-extra/docs/clang-tidy/checks/misc/static-declaration-in-header.rst:39
+   A semicolon-separated list of filename extensions of header files (the filename
+   extensions should not include "." prefix). Default is ";h;hh;hpp;hxx".
+   For extension-less header files, using an empty string or leaving an
----------------
Please replace quotes with single back-ticks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140290



More information about the cfe-commits mailing list