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

Avoid reserved identifiers in macros #2336

Merged
merged 1 commit into from Dec 16, 2021

Conversation

bernhardmgruber
Copy link
Contributor

Description

This PR renames all macros that are flagged by clang with -Werror -Wreserved-identifier. Leading underscores are removed, multi-underscores inside macros reduced to one.

With the proposed changes, Catch2 v2 can be used in a project which enables -Werror -Wreserved-identifier with clang-13 and above.

GitHub Issues

Fixes part of #578.

Such identifiers are reserved by the C++ standard.
Fixes part of catchorg#578.
@codecov
Copy link

codecov bot commented Dec 16, 2021

Codecov Report

Merging #2336 (dc8e5cf) into v2.x (8a06a6d) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             v2.x    #2336   +/-   ##
=======================================
  Coverage   90.10%   90.10%           
=======================================
  Files         113      113           
  Lines        5038     5038           
=======================================
  Hits         4539     4539           
  Misses        499      499           

@horenmar
Copy link
Member

Thanks. I would've used different names, but these are fine too.

@horenmar horenmar merged commit e9e4117 into catchorg:v2.x Dec 16, 2021
@bernhardmgruber bernhardmgruber deleted the reserved_identifiers branch December 16, 2021 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants