File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -83,14 +83,17 @@ namespace readability {
83
83
m (Member) \
84
84
m (ClassConstant) \
85
85
m (ClassMember) \
86
+ m (ConstexprGlobalVariable) \
86
87
m (GlobalConstant) \
87
88
m (GlobalConstantPointer) \
88
89
m (GlobalPointer) \
89
90
m (GlobalVariable) \
91
+ m (ConstexprLocalVariable) \
90
92
m (LocalConstant) \
91
93
m (LocalConstantPointer) \
92
94
m (LocalPointer) \
93
95
m (LocalVariable) \
96
+ m (ConstexprStaticVariable) \
94
97
m (StaticConstant) \
95
98
m (StaticVariable) \
96
99
m (Constant) \
@@ -1497,8 +1500,19 @@ StyleKind IdentifierNamingCheck::findStyleKindForField(
1497
1500
StyleKind IdentifierNamingCheck::findStyleKindForVar (
1498
1501
const VarDecl *Var, QualType Type,
1499
1502
ArrayRef<std::optional<NamingStyle>> NamingStyles) const {
1500
- if (Var->isConstexpr () && NamingStyles[SK_ConstexprVariable])
1501
- return SK_ConstexprVariable;
1503
+ if (Var->isConstexpr ()) {
1504
+ if (Var->isFileVarDecl () && NamingStyles[SK_ConstexprGlobalVariable])
1505
+ return SK_ConstexprGlobalVariable;
1506
+
1507
+ if (Var->isStaticLocal () && NamingStyles[SK_ConstexprStaticVariable])
1508
+ return SK_ConstexprStaticVariable;
1509
+
1510
+ if (Var->isLocalVarDecl () && NamingStyles[SK_ConstexprLocalVariable])
1511
+ return SK_ConstexprLocalVariable;
1512
+
1513
+ if (NamingStyles[SK_ConstexprVariable])
1514
+ return SK_ConstexprVariable;
1515
+ }
1502
1516
1503
1517
if (!Type.isNull () && Type.isConstQualified ()) {
1504
1518
if (Var->isStaticDataMember () && NamingStyles[SK_ClassConstant])
You can’t perform that action at this time.
0 commit comments