[clang-tidy] Enable modernize-concat-nested-namespaces also on headers
authorDmitry Polukhin <dmitry.polukhin@gmail.com>
Fri, 26 Feb 2021 17:07:20 +0000 (09:07 -0800)
committerDmitry Polukhin <dmitry.polukhin@gmail.com>
Mon, 15 Mar 2021 14:32:45 +0000 (07:32 -0700)
commitda55af7f1d348c133774d8e8117d60462363fef5
tree6d7634f7646a69913a81edc9f6b2c0dbb6fe8bee
parent0333dde923c42219863f314d6c9fc0dcd352ef02
[clang-tidy] Enable modernize-concat-nested-namespaces also on headers

For some reason the initial implementation of the check had an explicit check
for the main file to avoid being applied in headers. This diff removes this
check and add a test for the check on a header.

Similar approach was proposed in D61989 but review there got stuck.

Test Plan: added new test case

Differential Revision: https://reviews.llvm.org/D97563
clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp
clang-tools-extra/test/clang-tidy/checkers/Inputs/modernize-concat-nested-namespaces/modernize-concat-nested-namespaces.h [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/modernize-concat-nested-namespaces.cpp