Fixed https://github.com/llvm/llvm-project/issues/56022
c++20 support namespace like namespace a::inline b {}.
If an inline namespace is not the first, it can be concatened.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM, just some style comments.
| clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp | ||
|---|---|---|
| 84–86 | if (ND->isInlineNamespace()) {
Str.append("inline ");
}
Str.append(ND->getName()); | |
| 106 | You could extract `ND.isAnonymousNamespace()` and `!ND.attrs().empty();` before if. if (ND.isAnonymousNamespace() || !ND.attrs().empty()) return true; | |
if (ND->isInlineNamespace()) { Str.append("inline "); } Str.append(ND->getName());