linguist
linguist copied to clipboard
Add heuristics for C++ macros
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:
- [x] I am fixing a misclassified language
- [x] I have included a new sample for the misclassified language:
- Sample source(s): NoDiscard.h from Swift project
- Sample license(s): Apache v2
- [x] I have included a change to the heuristics to distinguish my language from others using the same extension.
- [x] I have included a new sample for the misclassified language: