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

__has_builtin(__reference_binds_to_temporary) became false in Clang 19 #111477

Closed
timsong-cpp opened this issue Oct 8, 2024 · 5 comments · Fixed by #111516
Closed

__has_builtin(__reference_binds_to_temporary) became false in Clang 19 #111477

timsong-cpp opened this issue Oct 8, 2024 · 5 comments · Fixed by #111516
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" release:backport release:cherry-pick-failed

Comments

@timsong-cpp
Copy link

timsong-cpp commented Oct 8, 2024

Likewise for __has_builtin(__reference_constructs_from_temporary).

Is that intentional? What's the replacement if I want to detect whether the compiler supports them?

@github-actions github-actions bot added the clang Clang issues not falling into any other category label Oct 8, 2024
@EugeneZelenko EugeneZelenko added clang:frontend Language frontend issues, e.g. anything involving "Sema" and removed clang Clang issues not falling into any other category labels Oct 8, 2024
@llvmbot
Copy link
Member

llvmbot commented Oct 8, 2024

@llvm/issue-subscribers-clang-frontend

Author: None (timsong-cpp)

Likewise for `__has_builtin(__reference_constructs_from_temporary)`.

Is that intentional? What's the replacement if I want to detect whether the compiler supports them?

cor3ntin added a commit to cor3ntin/llvm-project that referenced this issue Oct 8, 2024
`__has_builtin` was relying on reversible identifiers and
string matching to recognize builtin-type traits, leading
to some newer type traits not being recognized.

Fixes llvm#111477
cor3ntin added a commit to cor3ntin/llvm-project that referenced this issue Oct 8, 2024
`__has_builtin` was relying on reversible identifiers and
string matching to recognize builtin-type traits, leading
to some newer type traits not being recognized.

Fixes llvm#111477
@timsong-cpp
Copy link
Author

@cor3ntin Can a fix for the two intrinsics named in the issue be backported to clang 19? This is a regression from clang 18 - and for __reference_binds_to_temporary, from clang 10.

@cor3ntin
Copy link
Contributor

cor3ntin commented Oct 9, 2024

@cor3ntin Can a fix for the two intrinsics named in the issue be backported to clang 19? This is a regression from clang 18 - and for __reference_binds_to_temporary, from clang 10.

This seems reasonable

@cor3ntin
Copy link
Contributor

cor3ntin commented Oct 9, 2024

/cherry-pick 75611ca

@llvmbot
Copy link
Member

llvmbot commented Oct 9, 2024

Failed to cherry-pick: 75611ca

https://github.com/llvm/llvm-project/actions/runs/11249798451

Please manually backport the fix and push it to your github fork. Once this is done, please create a pull request

cor3ntin added a commit to cor3ntin/llvm-project that referenced this issue Oct 9, 2024
`__has_builtin` was relying on reversible identifiers and string
matching to recognize builtin-type traits, leading to some newer type
traits not being recognized.

Fixes llvm#111477
@tru tru moved this from Needs Triage to Done in LLVM Release Status Oct 10, 2024
tru pushed a commit to cor3ntin/llvm-project that referenced this issue Oct 15, 2024
`__has_builtin` was relying on reversible identifiers and string
matching to recognize builtin-type traits, leading to some newer type
traits not being recognized.

Fixes llvm#111477
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" release:backport release:cherry-pick-failed
Projects
Development

Successfully merging a pull request may close this issue.

4 participants