-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Crash on usage incomplete type with __is_trivially_destructible #114802
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
confirmed
Verified by a second party
crash
Prefer [crash-on-valid] or [crash-on-invalid]
regression:15
Regression in 15 release
Comments
EugeneZelenko
added
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash
Prefer [crash-on-valid] or [crash-on-invalid]
and removed
new issue
labels
Nov 4, 2024
@llvm/issue-subscribers-clang-frontend Author: None (JVApen)
This problem was found while using clangd and was reduced from `std::optional` in the MSVC STL.
Problem was discovered on LLVM 16, though is reproducible on LLVM trunk.
class IncompleteType;
template<bool b>
struct ForceCalculate
{
using type = IncompleteType;
};
template<typename t>
struct RequiresCompleteType
{
static constexpr bool value = __is_trivially_destructible(t);
};
template<typename t>
using Base = typename ForceCalculate<RequiresCompleteType<t>::value>::type;
template<typename t>
struct Redirect : Base<t>
{
using Base<t>::operator*;
};
void f(Redirect<IncompleteType> &a)
{
*a;
} Compiler output:
|
Looks like this goes back to clang-15: https://compiler-explorer.com/z/MxEhMn4ba |
shafik
added
confirmed
Verified by a second party
regression:15
Regression in 15 release
labels
Nov 4, 2024
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"
confirmed
Verified by a second party
crash
Prefer [crash-on-valid] or [crash-on-invalid]
regression:15
Regression in 15 release
This problem was found while using clangd and was reduced from
std::optional
in the MSVC STL.Problem was discovered on LLVM 16, though is reproducible on LLVM trunk.
Compiler-explorer link
Compiler output:
The text was updated successfully, but these errors were encountered: