This revision was automatically updated to reflect the committed changes.
Closed by commit rGcab3cfd013cf: [clang] Do not crash on requires
after a fatal error occurred. (authored by adamcz).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129499/new/
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
lgtm
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129499/new/
https://reviews.llvm.org/D129499
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:
adamcz updated this revision to Diff 444315.
adamcz added a comment.
improved the test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129499/new/
https://reviews.llvm.org/D129499
Files:
clang/lib/Sema/SemaExprCXX.cpp
erichkeane added a comment.
This patch makes sense to me, but please clean up the test as @ilya-biryukov
suggested.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129499/new/
https://reviews.llvm.org/D129499
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 ';'
adamcz created this revision.
adamcz added a reviewer: ilya-biryukov.
Herald added a project: All.
adamcz requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
The code would assume that SubstExpr() cannot fail on concept
specialization. This is