[PATCH] D129499: [clang] Do not crash on "requires" after a fatal error occurred.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 12 03:00:46 PDT 2022


ilya-biryukov added a comment.

Thanks! The fix LG, just a small nitpick for the test from my side



================
Comment at: clang/test/SemaCXX/concept-fatal-error.cpp:8
+  // We test that we do not crash in such cases (#55401)
+  int i = requires { { i } f } // expected-error {{expected ';' at end of declaration list}}
+
----------------
We need want to pass `-verify` to clang for these directives to have an effect.
The fatal error can be matched by `// expected-error@* {{too...}}` (maybe that's obvious, but it took me some time to figure it out first time I needed it)
And there is no need to run `FileCheck` after that!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129499/new/

https://reviews.llvm.org/D129499



More information about the cfe-commits mailing list