[PATCH] D129499: [clang] Do not crash on "requires" after a fatal error occurred.
Adam Czachorowski via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 13 09:44:27 PDT 2022
adamcz added inline comments.
================
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}}
+
----------------
ilya-biryukov wrote:
> 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!
Ah, thanks! I knew there was a way to match fatal errors, I just didn't know what it was.
No clue what happened to -verify, I swear it was there at some point ;-)
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