[PATCH] D157195: [Clang] Fix the do while statement disappearing in AST when an error occurs in the conditional expression of the do while statement
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 7 00:13:32 PDT 2023
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
thanks, looks good.
================
Comment at: clang/test/SemaCXX/constexpr-function-recovery-crash.cpp:81
+constexpr int test13() { do {} while (a < 10); return 0; } // expected-error {{use of undeclared identifier}}
+static_assert(test13()); // expected-error {{static assertion expression is not an integral constant expression}}
----------------
nit: it is better to use the below `TEST_EVALUATE` macro for the test, `TEST_EVALUATE(DoWhile2, do {} while (undefined < 10); )`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157195/new/
https://reviews.llvm.org/D157195
More information about the cfe-commits
mailing list