-
Notifications
You must be signed in to change notification settings - Fork 252
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
Add handling of escaped backslashes in expanded string - closes #461 #464
Merged
hsutter
merged 1 commit into
hsutter:main
from
filipsajdak:fsajdak-fix-escaped-backslash-in-expanded-string
May 29, 2023
Merged
Add handling of escaped backslashes in expanded string - closes #461 #464
hsutter
merged 1 commit into
hsutter:main
from
filipsajdak:fsajdak-fix-escaped-backslash-in-expanded-string
May 29, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filipsajdak
force-pushed
the
fsajdak-fix-escaped-backslash-in-expanded-string
branch
2 times, most recently
from
May 22, 2023 21:08
bd22c59
to
f94ef0b
Compare
filipsajdak
changed the title
Add handling of escaped backslashes in expanded string
Add handling of escaped backslashes in expanded string - closes #461
May 22, 2023
@hsutter fix ready |
filipsajdak
force-pushed
the
fsajdak-fix-escaped-backslash-in-expanded-string
branch
from
May 23, 2023 11:57
f94ef0b
to
617b161
Compare
After sleeping over, I replaced the raw for-loop with the |
The current change iterate over entire string end removes extra backslashes that are used to indicate escape sequence. Closes hsutter#461
filipsajdak
force-pushed
the
fsajdak-fix-escaped-backslash-in-expanded-string
branch
from
May 23, 2023 12:15
617b161
to
c2bbcd2
Compare
Looks good, thanks! |
filipsajdak
added a commit
to filipsajdak/cppfront
that referenced
this pull request
May 31, 2023
Original fix uses std::copy_if algorithm with overlapping input and output ranges - that behaviour is undefined. After reviewing it with @Maiqel and @lukasz-matysiak we have replace it with std::remove_if algorithm - which better describe what is happening and does not excercise undefined behaviour. From https://en.cppreference.com/w/cpp/algorithm/copy: > The behavior is undefined if d_first is within the range [first, last)
hsutter
pushed a commit
that referenced
this pull request
May 31, 2023
Original fix uses std::copy_if algorithm with overlapping input and output ranges - that behaviour is undefined. After reviewing it with @Maiqel and @lukasz-matysiak we have replace it with std::remove_if algorithm - which better describe what is happening and does not excercise undefined behaviour. From https://en.cppreference.com/w/cpp/algorithm/copy: > The behavior is undefined if d_first is within the range [first, last)
zaucy
pushed a commit
to zaucy/cppfront
that referenced
this pull request
Dec 5, 2023
The current change iterate over entire string end removes extra backslashes that are used to indicate escape sequence. Closes hsutter#461
zaucy
pushed a commit
to zaucy/cppfront
that referenced
this pull request
Dec 5, 2023
…sutter#481) Original fix uses std::copy_if algorithm with overlapping input and output ranges - that behaviour is undefined. After reviewing it with @Maiqel and @lukasz-matysiak we have replace it with std::remove_if algorithm - which better describe what is happening and does not excercise undefined behaviour. From https://en.cppreference.com/w/cpp/algorithm/copy: > The behavior is undefined if d_first is within the range [first, last)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current cppfront (c84bf47) does not handle escaped backslashes in an expanded string. That makes the following code fail with an assertion:
This PR removes all redundant backslashes - Closes #461
All regression tests pass.