[PATCH] D118743: [clang-tidy] Add `modernize-use-inline-const-variables-in-headers` check
Carlos Galvez via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 2 02:31:09 PST 2023
carlosgalvezp added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/modernize/UseInlineConstVariablesInHeadersCheck.cpp:21-23
+AST_MATCHER(NamedDecl, isInAnonymousNamespace) {
+ return Node.isInAnonymousNamespace();
+}
----------------
I recently added this matcher into ASTMatchers, so you can remove this custom matcher :)
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/use-inline-const-variables-in-headers.hpp:1
+// RUN: %check_clang_tidy %s -std=c++17 modernize-use-inline-const-variables-in-headers %t
+
----------------
Should tests be added for the `CheckNonInline` and `CheckExtern` options?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118743/new/
https://reviews.llvm.org/D118743
More information about the cfe-commits
mailing list