Skip to content

Commit d3425e0

Browse files
committed
rename HasOverrideAttr to IsOverride
1 parent d59c28f commit d3425e0

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
@@ -166,7 +166,7 @@ struct FunctionInfo final
166166
bool IsDeleted = false;
167167
bool IsDeletedAsWritten = false;
168168
bool IsNoReturn = false;
169-
bool HasOverrideAttr = false;
169+
bool IsOverride = false;
170170
bool HasTrailingReturn = false;
171171
bool IsNodiscard = false;
172172
bool IsExplicitObjectMemberFunction = false;
@@ -221,7 +221,7 @@ tag_invoke(
221221
io.map("isDeleted", I.IsDeleted);
222222
io.map("isDeletedAsWritten", I.IsDeletedAsWritten);
223223
io.map("isNoReturn", I.IsNoReturn);
224-
io.map("hasOverrideAttr", I.HasOverrideAttr);
224+
io.map("isOverride", I.IsOverride);
225225
io.map("hasTrailingReturn", I.HasTrailingReturn);
226226
io.map("isConst", I.IsConst);
227227
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
@@ -801,7 +801,6 @@ populate(
801801
I.IsDeleted |= D->isDeleted();
802802
I.IsDeletedAsWritten |= D->isDeletedAsWritten();
803803
I.IsNoReturn |= D->isNoReturn();
804-
I.HasOverrideAttr |= D->hasAttr<OverrideAttr>();
805804

806805
if (ConstexprSpecKind const CSK = D->getConstexprKind();
807806
CSK != ConstexprSpecKind::Unspecified)
@@ -927,6 +926,7 @@ populate(FunctionInfo& I, CXXMethodDecl const* D)
927926
I.IsVolatile |= D->isVolatile();
928927
I.RefQualifier = toReferenceKind(D->getRefQualifier());
929928
I.IsFinal |= D->hasAttr<FinalAttr>();
929+
I.IsOverride |= D->hasAttr<OverrideAttr>();
930930
}
931931

932932
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
@@ -331,11 +331,11 @@ merge(FunctionInfo& I, FunctionInfo&& Other)
331331
I.IsDeleted |= Other.IsDeleted;
332332
I.IsDeletedAsWritten |= Other.IsDeletedAsWritten;
333333
I.IsNoReturn |= Other.IsNoReturn;
334-
I.HasOverrideAttr |= Other.HasOverrideAttr;
335334
I.HasTrailingReturn |= Other.HasTrailingReturn;
336335
I.IsConst |= Other.IsConst;
337336
I.IsVolatile |= Other.IsVolatile;
338337
I.IsFinal |= Other.IsFinal;
338+
I.IsOverride |= Other.IsOverride;
339339
I.IsNodiscard |= Other.IsNodiscard;
340340
I.IsExplicitObjectMemberFunction |= Other.IsExplicitObjectMemberFunction;
341341
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)