MagentaTreehouse

Results issues of MagentaTreehouse

The following C++20 code causes a crash on clang 17: ```cpp template struct A { template using Func = decltype([] {return U{};}); }; A::Func f{}; int i{f()}; ``` Compiler Explorer:...

clang:frontend
confirmed
crash
lambda

The following code, when using MSVC STL, triggers the clang warning enabled by `-Wctad-maybe-unsupported`. ```cpp #include int main() { return std::equal_to{}(-1, 1); } ``` ``` .\test.cpp:12:9: warning: 'equal_to' may not...

question
clang:diagnostics

The following code fails to compile: ```cpp struct Array { int data[2]; }; Array f() { return {}; } int main() { auto [a, b]{f().data}; // xvalue init using T...

duplicate
clang:frontend

In the following code, the `constexpr` specifier should not be allowed in the explicit instantiation. It is rejected by GCC, but accepted by Clang. ```c++ template inline constexpr int i{};...

clang:frontend
accepts-invalid
constexpr
diverges-from:gcc

Reproducer: ```cpp int main() { void{}; } ``` This expression `void{}` causes an ICE in clang trunk. In clang 19.1, it gets rejected. See compiler Explorer: https://godbolt.org/z/e85YYTaTx

clang:codegen
confirmed
crash
regression:20

Reproducer: ```c++ template constexpr bool b = false; template constexpr bool b = true; ``` Error: ``` :2:33: error: variable template partial specialization does not specialize any template argument; to...

clang:frontend
constexpr
diverges-from:gcc
diverges-from:msvc
diverges-from:edg

```c++ template struct A { template static auto foo(F, G g = {}) { g(); } }; int main() { A::foo(0.); } ``` Unreachable: ```console undeduced type in IR-generation UNREACHABLE...

clang:codegen
confirmed
crash
lambda

```c++ template void f(T t) { [x = t] (decltype(x)) {}; } ``` Crash since clang 17: ```console Program terminated with signal: SIGSEGV Compiler returned: 139 ``` Compiler Explorer: https://godbolt.org/z/6EWaoa79s...

duplicate
clang:frontend
crash

The location of the attribute is non-standard in this code: ```c++ namespace N [[deprecated]] {} ``` But clang doesn't emit any diagnostics with `-Wall -Wextra -Wpedantic`. Compiler Explorer: https://compiler-explorer.com/z/6zcPanj5Y

clang:diagnostics

```c++ struct A { *A(); }; ``` See Compiler Explorer: https://compiler-explorer.com/z/ccf6rqenE

clang:frontend
accepts-invalid
confirmed