File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1135,6 +1135,9 @@ StyleKind IdentifierNamingCheck::findStyleKind(
11351135 if (isa<TypeAliasDecl>(D) && NamingStyles[SK_TypeAlias])
11361136 return SK_TypeAlias;
11371137
1138+ if (isa<NamespaceAliasDecl>(D) && NamingStyles[SK_Namespace])
1139+ return SK_Namespace;
1140+
11381141 if (const auto *Decl = dyn_cast<NamespaceDecl>(D)) {
11391142 if (Decl->isAnonymousNamespace ())
11401143 return SK_Invalid;
Original file line number Diff line number Diff line change @@ -244,6 +244,10 @@ Changes in existing checks
244244 <clang-tidy/checks/readability/redundant-smartptr-get>` check to
245245 remove `-> `, when redundant `get() ` is removed.
246246
247+ - Improved :doc: `readability-identifier-naming
248+ <clang-tidy/checks/readability/readability-identifier-naming>` check to
249+ validate ``namespace `` aliases.
250+
247251Removed checks
248252^^^^^^^^^^^^^^
249253
Original file line number Diff line number Diff line change @@ -101,6 +101,10 @@ inline namespace InlineNamespace {
101101// CHECK-MESSAGES: :[[@LINE-1]]:18: warning: invalid case style for inline namespace 'InlineNamespace'
102102// CHECK-FIXES: {{^}}inline namespace inline_namespace {{{$}}
103103
104+ namespace FOO_ALIAS = FOO_NS;
105+ // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: invalid case style for namespace 'FOO_ALIAS' [readability-identifier-naming]
106+ // CHECK-FIXES: {{^}}namespace foo_alias = FOO_NS;{{$}}
107+
104108SYSTEM_NS::structure g_s1;
105109// NO warnings or fixes expected as SYSTEM_NS and structure are declared in a header file
106110
You can’t perform that action at this time.
0 commit comments