1 // RUN: %clang_cc1 %s -std=c++20 -fsyntax-only -verify 2 // expected-no-diagnostics 3 4 // Reported by: https://github.com/llvm/llvm-project/issues/57013 5 // The following code should not crash clang 6 struct X { 7 char arr[2]; XX8 constexpr X() {} modifyX9 constexpr void modify() { 10 arr[0] = 0; 11 } 12 }; f(X t)13constexpr X f(X t) { 14 t.modify(); 15 return t; 16 } 17 auto x = f(X()); 18