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

Add heuristics for C++ macros #6715

Merged
merged 3 commits into from
Mar 8, 2024
Merged

Conversation

jtibshirani
Copy link
Contributor

This PR adds a new heuristic for C++ that checks for the preprocessor macros
__has_cpp_attribute and __cplusplus. These are commonly-used macros that check
what version of C++ is supported, and the available attributes.

Checklist:

  • I am fixing a misclassified language
    • I have included a new sample for the misclassified language:
      • Sample source(s): NoDiscard.h from Swift project
      • Sample license(s): Apache v2
    • I have included a change to the heuristics to distinguish my language from others using the same extension.

This PR adds a new heuristic for C++ that checks forthe  preprocessor
macros __has_cpp_attribute and __cplusplus.
@jtibshirani jtibshirani marked this pull request as ready for review February 23, 2024 00:09
@jtibshirani jtibshirani requested a review from a team as a code owner February 23, 2024 00:09
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

Note: this PR will not be merged until close to when the next release is made. See here for more details.

@jtibshirani
Copy link
Contributor Author

Thanks for the speedy review!

@lildude lildude added this pull request to the merge queue Mar 8, 2024
Merged via the queue into github-linguist:master with commit cb3d957 Mar 8, 2024
5 checks passed
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 19, 2024
@jtibshirani jtibshirani deleted the cpp-macros branch July 9, 2024 20:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants