linguist icon indicating copy to clipboard operation
linguist copied to clipboard

Add heuristics for C++ macros

Open jtibshirani opened this issue 1 year ago • 0 comments

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.

jtibshirani avatar Feb 22 '24 23:02 jtibshirani