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

clang-tidy gives incorrect result for __has_builtin #59807

Closed
russellmcc opened this issue Jan 3, 2023 · 3 comments
Closed

clang-tidy gives incorrect result for __has_builtin #59807

russellmcc opened this issue Jan 3, 2023 · 3 comments
Labels
clang-tidy confirmed Verified by a second party duplicate Resolved as duplicate

Comments

@russellmcc
Copy link

russellmcc commented Jan 3, 2023

clang-tidy sometimes gives the wrong result for __has_builtin.

For example:

#if !__has_builtin(__builtin_os_log_format)
#error "Needs built-in"
#endif

int main() {}

gives an error (https://godbolt.org/z/fWdz4zx6h), even though the built-in is actually there (https://godbolt.org/z/oE567Yeve)

@llvmbot
Copy link
Collaborator

llvmbot commented Jan 3, 2023

@llvm/issue-subscribers-clang-tidy

@russellmcc
Copy link
Author

Apparently this only happens in -std=c++20

@AaronBallman AaronBallman added the confirmed Verified by a second party label Jan 24, 2023
@PiotrZSL PiotrZSL assigned PiotrZSL and unassigned PiotrZSL Jun 13, 2023
@PiotrZSL
Copy link
Member

@EugeneZelenko EugeneZelenko added the duplicate Resolved as duplicate label Jun 27, 2023
@EugeneZelenko EugeneZelenko closed this as not planned Won't fix, can't repro, duplicate, stale Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-tidy confirmed Verified by a second party duplicate Resolved as duplicate
Projects
None yet
Development

No branches or pull requests

5 participants