[PATCH] D72378: [clang-tidy] Add `bugprone-reserved-identifier`
Logan Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 7 17:34:57 PST 2020
logan-5 created this revision.
logan-5 added reviewers: JonasToth, alexfh, aaron.ballman.
logan-5 added a project: clang-tools-extra.
Herald added subscribers: cfe-commits, xazax.hun, mgorny.
Herald added a project: clang.
This patch adds `bugprone-reserved-identifier`, which flags uses of `__names` `_Like` `::_this`, which are reserved for the implementation. The check can optionally be inverted, i.e. configured to flag any names that are _not_ reserved, which may be useful for e.g. standard library implementors.
This diff is relative to, and dependent on, https://reviews.llvm.org/D72284. Not sure if there's a way to chain it or flag it as such within Phabricator, if so let me know.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D72378
Files:
clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.cpp
clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.h
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/bugprone-reserved-identifier.rst
clang-tools-extra/test/clang-tidy/checkers/Inputs/bugprone-reserved-identifier/system/system-header.h
clang-tools-extra/test/clang-tidy/checkers/Inputs/bugprone-reserved-identifier/user-header.h
clang-tools-extra/test/clang-tidy/checkers/bugprone-reserved-identifier-invert.cpp
clang-tools-extra/test/clang-tidy/checkers/bugprone-reserved-identifier.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72378.236724.patch
Type: text/x-patch
Size: 26934 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200108/74104b7f/attachment-0001.bin>
More information about the cfe-commits
mailing list