File tree 3 files changed +11
-0
lines changed 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1135,6 +1135,9 @@ StyleKind IdentifierNamingCheck::findStyleKind(
1135
1135
if (isa<TypeAliasDecl>(D) && NamingStyles[SK_TypeAlias])
1136
1136
return SK_TypeAlias;
1137
1137
1138
+ if (isa<NamespaceAliasDecl>(D) && NamingStyles[SK_Namespace])
1139
+ return SK_Namespace;
1140
+
1138
1141
if (const auto *Decl = dyn_cast<NamespaceDecl>(D)) {
1139
1142
if (Decl->isAnonymousNamespace ())
1140
1143
return SK_Invalid;
Original file line number Diff line number Diff line change @@ -244,6 +244,10 @@ Changes in existing checks
244
244
<clang-tidy/checks/readability/redundant-smartptr-get>` check to
245
245
remove `-> `, when redundant `get() ` is removed.
246
246
247
+ - Improved :doc: `readability-identifier-naming
248
+ <clang-tidy/checks/readability/readability-identifier-naming>` check to
249
+ validate ``namespace `` aliases.
250
+
247
251
Removed checks
248
252
^^^^^^^^^^^^^^
249
253
Original file line number Diff line number Diff line change @@ -101,6 +101,10 @@ inline namespace InlineNamespace {
101
101
// CHECK-MESSAGES: :[[@LINE-1]]:18: warning: invalid case style for inline namespace 'InlineNamespace'
102
102
// CHECK-FIXES: {{^}}inline namespace inline_namespace {{{$}}
103
103
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
+
104
108
SYSTEM_NS::structure g_s1;
105
109
// NO warnings or fixes expected as SYSTEM_NS and structure are declared in a header file
106
110
You can’t perform that action at this time.
0 commit comments