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

Support __has_cpp_attribute expressions (C++20) #2376

Closed
guwirth opened this issue May 19, 2022 · 0 comments · Fixed by #2406
Closed

Support __has_cpp_attribute expressions (C++20) #2376

guwirth opened this issue May 19, 2022 · 0 comments · Fixed by #2406
Milestone

Comments

@guwirth
Copy link
Collaborator

guwirth commented May 19, 2022

(since C++20) __has_cpp_attribute expressions, which detects whether a given attribute token is supported and its supported version.

https://en.cppreference.com/w/cpp/preprocessor/conditional

@guwirth guwirth pinned this issue Jun 2, 2022
@guwirth guwirth unpinned this issue Jun 2, 2022
@guwirth guwirth added this to the 2.1.0 milestone Jun 30, 2022
guwirth added a commit to guwirth/sonar-cxx that referenced this issue Jul 26, 2022
* https://clang.llvm.org/docs/LanguageExtensions.html

```
#define __has_builtin(x) 0
#define __has_feature(x) 0
#define __has_extension(x) 0
#define __has_cpp_attribute(x) 0
#define __has_c_attribute(x) 0
#define __has_attribute(x) 0
#define __has_declspec_attribute(x) 0
#define __is_identifier(x) 1
#define __has_warning(x) 0
```

* close SonarOpenCommunity#2395
* close SonarOpenCommunity#2376
* close SonarOpenCommunity#2369
guwirth added a commit to guwirth/sonar-cxx that referenced this issue Jul 26, 2022
* https://clang.llvm.org/docs/LanguageExtensions.html

```
#define __has_builtin(x) 0
#define __has_feature(x) 0
#define __has_extension(x) 0
#define __has_cpp_attribute(x) 0
#define __has_c_attribute(x) 0
#define __has_attribute(x) 0
#define __has_declspec_attribute(x) 0
#define __is_identifier(x) 1
#define __has_warning(x) 0
```

* close SonarOpenCommunity#2395
* close SonarOpenCommunity#2376
* close SonarOpenCommunity#2369
guwirth added a commit to guwirth/sonar-cxx that referenced this issue Jul 26, 2022
* https://clang.llvm.org/docs/LanguageExtensions.html

```
#define __has_builtin(x) 0
#define __has_feature(x) 0
#define __has_extension(x) 0
#define __has_cpp_attribute(x) 0
#define __has_c_attribute(x) 0
#define __has_attribute(x) 0
#define __has_declspec_attribute(x) 0
#define __is_identifier(x) 1
#define __has_warning(x) 0
```

* close SonarOpenCommunity#2395
* close SonarOpenCommunity#2376
* close SonarOpenCommunity#2369
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant