[PATCH] D97361: [clang-tidy] Add misc-redundant-using check
Yang Fan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 23 23:28:08 PST 2021
nullptr.cpp created this revision.
nullptr.cpp added reviewers: alexfh, aaron.ballman, njames93, balazske.
Herald added subscribers: xazax.hun, mgorny.
nullptr.cpp requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Finds redundant `using` declarations and directives.
Example:
namespace n {
void func();
}
namespace {
using n::func; // redundant using declaration, already in namespace 'n'.
}
namespace n {
using namespace n; // redundant using directive, already in namespace 'n'.
}
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D97361
Files:
clang-tools-extra/clang-tidy/misc/CMakeLists.txt
clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
clang-tools-extra/clang-tidy/misc/RedundantUsingCheck.cpp
clang-tools-extra/clang-tidy/misc/RedundantUsingCheck.h
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/misc-redundant-using.rst
clang-tools-extra/test/clang-tidy/checkers/misc-redundant-using.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97361.325995.patch
Type: text/x-patch
Size: 13023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210224/2635a2d6/attachment.bin>
More information about the cfe-commits
mailing list