================ @@ -98,13 +98,6 @@ namespace std_example { using c1c2 = C_check<int *>; // expected-error{{constraints not satisfied for class template 'C_check' [with T = int *]}} } -// typeid() of an expression becomes potentially evaluated if the expression is -// of a polymorphic type. -class X { virtual ~X(); }; -constexpr bool b = requires (X &x) { static_cast<int(*)[(typeid(x), 0)]>(nullptr); }; -// expected-error@-1{{constraint variable 'x' cannot be used in an evaluated context}} -// expected-note@-2{{'x' declared here}} - ---------------- imdj wrote:
Here similarly we get: ``` error: 'expected-warning' diagnostics seen but not expected: File [...]/simple-requirement.cpp Line 104: left operand of comma operator has no effect File [...]/simple-requirement.cpp Line 104: variable length arrays in C++ are a Clang extension error: 'expected-note' diagnostics seen but not expected: File [...]/simple-requirement.cpp Line 104: function parameter 'x' with unknown value cannot be used in a constant expression File [...]/simple-requirement.cpp Line 104: declared here ``` https://github.com/llvm/llvm-project/pull/132919 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits