[PATCH] D140290: [clang-tidy] Add misc-static-declaration-in-header check
Carlos Galvez via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 25 11:32:57 PST 2022
carlosgalvezp updated this revision to Diff 485235.
carlosgalvezp added a comment.
Warn only about cases where there really is a problem.
There are other cases which are just a readability issue,
where a separate check for "redundant static" would fit
better. Remove also the automatic fix-it since it leads
to potentially broken code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140290/new/
https://reviews.llvm.org/D140290
Files:
clang-tools-extra/clang-tidy/misc/CMakeLists.txt
clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
clang-tools-extra/clang-tidy/misc/StaticDeclarationInHeaderCheck.cpp
clang-tools-extra/clang-tidy/misc/StaticDeclarationInHeaderCheck.h
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/misc/static-declaration-in-header.rst
clang-tools-extra/test/clang-tidy/checkers/misc/static-declaration-in-header.hpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140290.485235.patch
Type: text/x-patch
Size: 11601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221225/d484b4ad/attachment.bin>
More information about the cfe-commits
mailing list