Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function return struct #86

Merged
merged 4 commits into from
Jun 28, 2021
Merged

Function return struct #86

merged 4 commits into from
Jun 28, 2021

Conversation

jacky860226
Copy link
Contributor

@jacky860226 jacky860226 commented May 24, 2021

fix the bug of function return a Struct.
prepare for function return a Tuple #85.

@jacky860226 jacky860226 requested a review from hydai May 24, 2021 16:08
@codecov
Copy link

codecov bot commented May 24, 2021

Codecov Report

Merging #86 (579b5c3) into master (90e0c3e) will increase coverage by 0.22%.
The diff coverage is 80.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #86      +/-   ##
==========================================
+ Coverage   66.15%   66.38%   +0.22%     
==========================================
  Files          93       97       +4     
  Lines       13150    13245      +95     
  Branches     2035     1946      -89     
==========================================
+ Hits         8700     8793      +93     
- Misses       3480     3485       +5     
+ Partials      970      967       -3     
Impacted Files Coverage Δ
include/soll/AST/ASTContext.h 100.00% <ø> (ø)
include/soll/AST/Decl.h 90.12% <ø> (-0.13%) ⬇️
include/soll/AST/Expr.h 87.42% <ø> (-0.68%) ⬇️
lib/AST/Expr.cpp 67.74% <0.00%> (+3.59%) ⬆️
lib/CodeGen/CGExpr.cpp 86.62% <ø> (+4.23%) ⬆️
lib/Frontend/ASTConsumers/ASTPrinter.cpp 11.22% <0.00%> (ø)
lib/Basic/Diagnostic.cpp 14.33% <33.33%> (ø)
lib/Sema/Sema.cpp 73.36% <60.78%> (-1.53%) ⬇️
lib/CodeGen/ExprEmitter.cpp 76.52% <76.52%> (ø)
lib/CodeGen/ABICodec.cpp 80.83% <80.83%> (ø)
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90e0c3e...579b5c3. Read the comment docs.

lib/AST/Decl.cpp Outdated Show resolved Hide resolved
include/soll/AST/Type.h Outdated Show resolved Hide resolved
@jacky860226 jacky860226 force-pushed the function_return_struct branch from aa330a8 to 36c7426 Compare June 15, 2021 14:14
include/soll/AST/TypePtr.h Outdated Show resolved Hide resolved
std::vector<TypePtr> ParamTypes;
std::vector<TypePtr> ReturnTypes;
std::vector<std::reference_wrapper<const TypePtr>> ParamTypes;
std::vector<std::reference_wrapper<const TypePtr>> ReturnTypes;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

為什麼不用Type*?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolve UndefineType會更換到TypePtr的本體所以用reference包起來
Type*是從TypePtr.get()來的,.get()拿不到reference

lib/AST/TypePtr.cpp Outdated Show resolved Hide resolved
@jacky860226 jacky860226 force-pushed the function_return_struct branch from d1659e9 to db349e7 Compare June 18, 2021 11:10
@jacky860226 jacky860226 force-pushed the function_return_struct branch from db349e7 to 579b5c3 Compare June 24, 2021 06:41
@hydai hydai merged commit 82126bc into master Jun 28, 2021
@hydai hydai deleted the function_return_struct branch June 28, 2021 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants