brintos

brintos / llvm-project-archived public Read only

0
0
Text · 450 B · c606b9e Raw
11 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -std=c++20 -ferror-limit 1 -verify %s2 3template <class>4concept f = requires { 42; };5struct h {6  // The missing semicolon will trigger an error and -ferror-limit=1 will make it fatal7  // We test that we do not crash in such cases (#55401)8  int i = requires { { i } f } // expected-error {{expected ';' at end of declaration list}}9                               // expected-error@* {{too many errors emitted}}10};11