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

Preprocessor macro expansion #368

Merged
merged 10 commits into from Apr 13, 2024
Merged

Preprocessor macro expansion #368

merged 10 commits into from Apr 13, 2024

Conversation

gnikit
Copy link
Member

@gnikit gnikit commented Mar 30, 2024

Edit of the existing open PR #350, addressing review comments and reducing the size of the test case.

Copy link

codecov bot commented Mar 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.65%. Comparing base (922e984) to head (b2e74ad).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #368      +/-   ##
==========================================
+ Coverage   87.52%   87.65%   +0.13%     
==========================================
  Files          35       35              
  Lines        4760     4787      +27     
==========================================
+ Hits         4166     4196      +30     
+ Misses        594      591       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gnikit gnikit force-pushed the feat/generic-macro-expansions branch from f02e58b to d0d8a20 Compare April 13, 2024 16:27
emanspeaks and others added 6 commits April 13, 2024 17:33
This test is problematic for a few reasons and is in need of refactoring. A summary of the issues are:
- macro expansions are already covered in another test
- test too big
- it pollutes the global workspace of symbols
- names of objects are too generic
- tests indirectly the preprocessor

Its purpose in this PR is to test the preprocessor REGEX patterns work
with leading whitespaces and can perform macro expansions.
I have opted to remove and write a more compact test.
@gnikit gnikit force-pushed the feat/generic-macro-expansions branch from d0d8a20 to c805615 Compare April 13, 2024 16:34
@gnikit gnikit linked an issue Apr 13, 2024 that may be closed by this pull request
We don't actually do the full C expansion, as it can be seen by the
C-style comment character still present in the output, but it's better
than no expansion at all.
@gnikit gnikit force-pushed the feat/generic-macro-expansions branch from 14fb8c8 to b2e74ad Compare April 13, 2024 19:02
@gnikit gnikit merged commit e1b2400 into master Apr 13, 2024
35 checks passed
@gnikit gnikit deleted the feat/generic-macro-expansions branch April 13, 2024 19:09
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.

Leave blank spaces in front of C preprocessing directives
2 participants