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

Remove supurfluous/confusing {} around a temporary #4183

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

dwblaikie
Copy link
Contributor

@dwblaikie dwblaikie commented Aug 1, 2024

This was failing to build for me locally with some arbitrary Clang HEAD host compiler:

migrate_cpp/rewriter.cpp:225:3: error: call to member function 'SetReplacement' is ambiguous
  225 |   SetReplacement(expr, {OutputSegment(std::move(text))});
      |   ^~~~~~~~~~~~~~
./migrate_cpp/rewriter.h:141:8: note: candidate function [with T = clang::IntegerLiteral]
  141 |   auto SetReplacement(const T* node, std::vector<OutputSegment> output_segments)
      |        ^
./migrate_cpp/rewriter.h:150:8: note: candidate function [with T = clang::IntegerLiteral]
  150 |   auto SetReplacement(const T* node, OutputSegment segment) -> void {
      |        ^

No idea if that's a bug in clang HEAD, but it seemed like removing the {} simplified the code anyway - so here's that.

This was failing to build for me locally with some arbitrary Clang HEAD
host compiler:
migrate_cpp/rewriter.cpp:225:3: error: call to member function 'SetReplacement' is ambiguous
  225 |   SetReplacement(expr, {OutputSegment(std::move(text))});
      |   ^~~~~~~~~~~~~~
./migrate_cpp/rewriter.h:141:8: note: candidate function [with T = clang::IntegerLiteral]
  141 |   auto SetReplacement(const T* node, std::vector<OutputSegment> output_segments)
      |        ^
./migrate_cpp/rewriter.h:150:8: note: candidate function [with T = clang::IntegerLiteral]
  150 |   auto SetReplacement(const T* node, OutputSegment segment) -> void {
      |        ^

No idea if that's a bug in clang HEAD, but it seemed like removing the
{} simplified the code anyway - so here's that.
@github-actions github-actions bot requested a review from josh11b August 1, 2024 22:23
Copy link
Contributor

@jonmeow jonmeow left a comment

Choose a reason for hiding this comment

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

LGTM.

Note migrate_cpp has been mothballed while we focus on other things. But seems fine for a build fix.

@jonmeow jonmeow enabled auto-merge August 1, 2024 22:29
@jonmeow jonmeow added this pull request to the merge queue Aug 1, 2024
Merged via the queue into carbon-language:trunk with commit d72b4e4 Aug 1, 2024
9 checks passed
brymer-meneses pushed a commit to brymer-meneses/carbon-lang that referenced this pull request Aug 15, 2024
)

This was failing to build for me locally with some arbitrary Clang HEAD
host compiler:
```
migrate_cpp/rewriter.cpp:225:3: error: call to member function 'SetReplacement' is ambiguous
  225 |   SetReplacement(expr, {OutputSegment(std::move(text))});
      |   ^~~~~~~~~~~~~~
./migrate_cpp/rewriter.h:141:8: note: candidate function [with T = clang::IntegerLiteral]
  141 |   auto SetReplacement(const T* node, std::vector<OutputSegment> output_segments)
      |        ^
./migrate_cpp/rewriter.h:150:8: note: candidate function [with T = clang::IntegerLiteral]
  150 |   auto SetReplacement(const T* node, OutputSegment segment) -> void {
      |        ^
```
No idea if that's a bug in clang HEAD, but it seemed like removing the
{} simplified the code anyway - so here's that.
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.

2 participants