Skip to content

Commit 9d35f70

Browse files
committed
template fixes
1 parent 53899ef commit 9d35f70

File tree

5 files changed

+9
-1
lines changed

5 files changed

+9
-1
lines changed

source/api/AST/AnyBlock.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ class TemplateBlock
670670
: public BitcodeReader::AnyBlock
671671
{
672672
BitcodeReader& br_;
673-
llvm::Optional<TemplateInfo> I_;
673+
llvm::Optional<TemplateInfo>& I_;
674674

675675
public:
676676
explicit

source/api/_XML/XMLWriter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ visit(
154154

155155
write(I.specs, tags_);
156156

157+
if(I.Template)
158+
for(TemplateParamInfo const& J : I.Template->Params)
159+
writeTemplateParam(J);
160+
157161
for(auto const& J : I.Bases)
158162
writeBaseRecord(J);
159163
// VFALCO data members?

test-files/old-tests/explicit-conv-operator.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
</struct>
2626
<struct name="ExplicitExpression" id="ztb0u1Q4SVBUQ0roTOM7MFlUt/o=">
2727
<file path="explicit-conv-operator.cpp" line="16" class="def"/>
28+
<tparam decl="bool B"/>
2829
<function name="operator bool" access="public" id="q6N8XkMK9WWWGKNQnlx/o2E1EYc=">
2930
<file path="explicit-conv-operator.cpp" line="17"/>
3031
<return type="_Bool"/>

test-files/old-tests/explicit-ctor.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
</struct>
6565
<struct name="ExplicitExpression" id="ztb0u1Q4SVBUQ0roTOM7MFlUt/o=">
6666
<file path="explicit-ctor.cpp" line="25" class="def"/>
67+
<tparam decl="bool B"/>
6768
<function name="ExplicitExpression&lt;B&gt;" access="public" id="J31K1hQq31LWiQhVy5ro0V+1pD0=">
6869
<file path="explicit-ctor.cpp" line="29"/>
6970
<param type="int"/>

test-files/old-tests/explicit-deduct-guide.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<namespace name="">
55
<struct name="X" id="7wllQWhGGsbbeoZVa3gh4d7bcq8=">
66
<file path="explicit-deduct-guide.cpp" line="4" class="def"/>
7+
<tparam decl="int"/>
78
</struct>
89
<function name="&lt;deduction guide for X&gt;" id="AtQyLakD3CjcM24GabAbHMNgVU4=">
910
<file path="explicit-deduct-guide.cpp" line="8"/>
@@ -16,6 +17,7 @@
1617
<attr id="has-trailing-return"/>
1718
<return type="X&lt;0&gt;"/>
1819
<param type="long"/>
20+
<tparam decl="bool B = true"/>
1921
</function>
2022
<function name="&lt;deduction guide for X&gt;" id="tkYkUU6H8cbFpCU7yBuvBLkT6dg=">
2123
<file path="explicit-deduct-guide.cpp" line="10"/>

0 commit comments

Comments
 (0)