Skip to content

Commit 2d5e6a1

Browse files
committed
rename HasOverrideAttr to IsOverride
1 parent ff33c4b commit 2d5e6a1

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

docs/modules/ROOT/pages/generators.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,9 @@ When the symbol kind is `function`, the symbol object has the following addition
330330
| `bool`
331331
| Whether the function is noreturn.
332332

333-
| `hasOverrideAttr`
333+
| `isOverride`
334334
| `bool`
335-
| Whether the function has the override attribute.
335+
| Whether the function is override.
336336

337337
| `hasTrailingReturn`
338338
| `bool`

include/mrdocs/Metadata/Info/Function.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ struct FunctionInfo final
161161
bool IsDeleted = false;
162162
bool IsDeletedAsWritten = false;
163163
bool IsNoReturn = false;
164-
bool HasOverrideAttr = false;
164+
bool IsOverride = false;
165165
bool HasTrailingReturn = false;
166166
bool IsNodiscard = false;
167167
bool IsExplicitObjectMemberFunction = false;
@@ -216,7 +216,7 @@ tag_invoke(
216216
io.map("isDeleted", I.IsDeleted);
217217
io.map("isDeletedAsWritten", I.IsDeletedAsWritten);
218218
io.map("isNoReturn", I.IsNoReturn);
219-
io.map("hasOverrideAttr", I.HasOverrideAttr);
219+
io.map("isOverride", I.IsOverride);
220220
io.map("hasTrailingReturn", I.HasTrailingReturn);
221221
io.map("isConst", I.IsConst);
222222
io.map("isVolatile", I.IsVolatile);

share/mrdocs/addons/generator/common/partials/symbol/signature/function.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{{#if requires}}
2929

3030
requires {{requires}}{{/if~}}
31-
{{#if hasOverrideAttr}} override{{/if~}}
31+
{{#if isOverride}} override{{/if~}}
3232
{{#if isFinal}} final{{/if~}}
3333
{{#if isPure}} = 0{{/if~}}
3434
{{#if isDeleted}} = delete{{/if~}}

src/lib/AST/ASTVisitor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,6 @@ populate(
768768
I.IsDeleted |= D->isDeleted();
769769
I.IsDeletedAsWritten |= D->isDeletedAsWritten();
770770
I.IsNoReturn |= D->isNoReturn();
771-
I.HasOverrideAttr |= D->hasAttr<OverrideAttr>();
772771

773772
if (ConstexprSpecKind const CSK = D->getConstexprKind();
774773
CSK != ConstexprSpecKind::Unspecified)
@@ -895,6 +894,7 @@ populate(FunctionInfo& I, CXXMethodDecl const* D)
895894
I.IsVolatile |= D->isVolatile();
896895
I.RefQualifier = toReferenceKind(D->getRefQualifier());
897896
I.IsFinal |= D->hasAttr<FinalAttr>();
897+
I.IsOverride |= D->hasAttr<OverrideAttr>();
898898
}
899899

900900
void

src/lib/Gen/xml/XMLWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ writeFunction(
334334
writeAttr(I.IsDeleted, "is-deleted", tags_);
335335
writeAttr(I.IsDeletedAsWritten, "is-deleted-as-written", tags_);
336336
writeAttr(I.IsNoReturn, "is-no-return", tags_);
337-
writeAttr(I.HasOverrideAttr, "has-override", tags_);
337+
writeAttr(I.IsOverride, "is-override", tags_);
338338
writeAttr(I.HasTrailingReturn, "has-trailing-return", tags_);
339339
writeAttr(I.Constexpr, "constexpr-kind", tags_);
340340
writeAttr(I.OverloadedOperator, "operator", tags_);

src/lib/Metadata/Info/Function.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,11 @@ merge(FunctionInfo& I, FunctionInfo&& Other)
302302
I.IsDeleted |= Other.IsDeleted;
303303
I.IsDeletedAsWritten |= Other.IsDeletedAsWritten;
304304
I.IsNoReturn |= Other.IsNoReturn;
305-
I.HasOverrideAttr |= Other.HasOverrideAttr;
306305
I.HasTrailingReturn |= Other.HasTrailingReturn;
307306
I.IsConst |= Other.IsConst;
308307
I.IsVolatile |= Other.IsVolatile;
309308
I.IsFinal |= Other.IsFinal;
309+
I.IsOverride |= Other.IsOverride;
310310
I.IsNodiscard |= Other.IsNodiscard;
311311
I.IsExplicitObjectMemberFunction |= Other.IsExplicitObjectMemberFunction;
312312
if (I.Constexpr == ConstexprKind::None)

test-files/golden-tests/filters/symbol-name/excluded-base-class.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
</function>
1414
<function name="g" id="o+85JO3Sv4bIWiG3+bfyUw5gJWI=">
1515
<file short-path="excluded-base-class.cpp" source-path="excluded-base-class.cpp" line="17"/>
16-
<attr id="has-override"/>
16+
<attr id="is-override"/>
1717
</function>
1818
<function name="h" id="NiHV825xQJhfQDhKCeAex3UuHGY=">
1919
<file short-path="excluded-base-class.cpp" source-path="excluded-base-class.cpp" line="18"/>
20-
<attr id="has-override"/>
20+
<attr id="is-override"/>
2121
</function>
2222
<function name="i" id="d5/JtPJCrP6OG8ToxUKNR5xqJ4I=">
2323
<file short-path="excluded-base-class.cpp" source-path="excluded-base-class.cpp" line="19"/>
@@ -37,7 +37,7 @@
3737
</function>
3838
<function name="h" id="KiY+7o+uUp3h7bndNOpI2AuCrAE=">
3939
<file short-path="excluded-base-class.cpp" source-path="excluded-base-class.cpp" line="29"/>
40-
<attr id="has-override"/>
40+
<attr id="is-override"/>
4141
</function>
4242
<function name="i" id="0wO8aZwuOLvF7/RooHUZJ5SyKzk=">
4343
<file short-path="excluded-base-class.cpp" source-path="excluded-base-class.cpp" line="30"/>

test-files/golden-tests/symbols/function/mem-fn.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
</base>
116116
<function name="f" id="5+yfyWtDpz80IwKT3xugro18Ev0=">
117117
<file short-path="mem-fn.cpp" source-path="mem-fn.cpp" line="20"/>
118-
<attr id="has-override"/>
118+
<attr id="is-override"/>
119119
</function>
120120
</struct>
121121
<struct name="U" id="FLgkhM3m0U3Lo2o3XLPUizWPH00=">
@@ -163,7 +163,7 @@
163163
</function>
164164
<function name="f3" exception-spec="noexcept" id="/C2pxLlwRMKnr6YRbVnykUArzEI=">
165165
<file short-path="mem-fn.cpp" source-path="mem-fn.cpp" line="31"/>
166-
<attr id="has-override"/>
166+
<attr id="is-override"/>
167167
<attr id="is-const"/>
168168
<attr id="is-volatile"/>
169169
<return>

0 commit comments

Comments
 (0)