Fix pure cpp1 header file generated using -import-std#1319
Open
MatthieuHernandez wants to merge 1 commit intohsutter:mainfrom
Open
Fix pure cpp1 header file generated using -import-std#1319MatthieuHernandez wants to merge 1 commit intohsutter:mainfrom
MatthieuHernandez wants to merge 1 commit intohsutter:mainfrom
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
31e6312 to
df266a6
Compare
Contributor
Unless you specify the flag to either import or include the standard library, then it adds extra stuff. Lines 1298 to 1305 in 68b716a |
gregmarr
reviewed
Oct 17, 2024
source/to_cpp1.h
Outdated
| assert(ret.cpp2_lines == 0); | ||
| if ( | ||
| cpp1_filename.back() == 'h' | ||
| && flag_import_std |
Contributor
There was a problem hiding this comment.
(flag_import_std || flag_include_std) to match
Lines 1301 to 1305 in 68b716a
Contributor
Author
There was a problem hiding this comment.
I force-pushed with your suggestion. Thanks 😊
df266a6 to
ed1fa67
Compare
JohelEGP
approved these changes
Oct 17, 2024
Owner
|
Thanks for your pull request! It looks like this may be your first contribution to cppfront. I've emailed you the Contributor License Agreement (CLA), and once it's completed I can look at your pull request. Thanks again for your contribution. |
This file contains hidden or 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
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.
I've noticed that if I execute
cppfront.exewith the-import-stdoption on a .h file that doesn't contain any cpp2 code, then an#endifwill be missing at the end of the file. See #1320 for more info.