[all-commits] [llvm/llvm-project] 836950: [clang-tidy] Fix nested namespaces in `readability...
Evgeny Shulgin via All-commits
all-commits at lists.llvm.org
Wed Jan 26 21:08:56 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 836950c4e602548e47851b66a261472f124994fa
https://github.com/llvm/llvm-project/commit/836950c4e602548e47851b66a261472f124994fa
Author: Evgeny Shulgin <izaronplatz at gmail.com>
Date: 2022-01-26 (Wed, 26 Jan 2022)
Changed paths:
M clang-tools-extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.cpp
M clang-tools-extra/docs/clang-tidy/checks/readability-static-definition-in-anonymous-namespace.rst
M clang-tools-extra/test/clang-tidy/checkers/readability-static-definition-in-anonymous-namespace.cpp
Log Message:
-----------
[clang-tidy] Fix nested namespaces in `readability-static-definition-in-anonymous-namespace` check
The check previously inspected only the immediate parent namespace.
`static` in a named namespace within an unnamed namespace is still
redundant.
We will use `Decl::isInAnonymousNamespace()` method that traverses the
namespaces hierarchy recursively.
Differential Revision: https://reviews.llvm.org/D118010
More information about the All-commits
mailing list