-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]regression:19Regression in 19 releaseRegression in 19 release
Description
https://godbolt.org/z/d5ha1EEj4
change the using WinAPIGLFunc = attribute((ms_abi)) GLFunc; to using WinAPIGLFunc = attribute((ms_abi)) Result (*)(Args...); and it doesnt crash
#include <stdint.h>
#include <utility>
template<class T>
class GLFunctor;
template<class Result, class... Args>
class GLFunctor<Result (Args...)>
{
using GLFunc = Result (*)(Args...);
public:
Result operator()(Args... args) const
{
using WinAPIGLFunc = __attribute__((ms_abi)) GLFunc;
return reinterpret_cast<WinAPIGLFunc>(glProc)(std::forward<Args>(args)...);
}
private:
GLFunc glProc = nullptr;
};
GLFunctor<void (int pname)> test_functor;
void Test()
{
test_functor(0);
}
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]regression:19Regression in 19 releaseRegression in 19 release
Type
Projects
Status
No status