[clang] [NFC][Clang] Fix test constexpr-function-recovery-crash.cpp (PR #65269)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 4 08:07:23 PDT 2023
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/65269:
None
>From 1c157a6c9fb7a98dc2a2509dcbc9f82b0ce69244 Mon Sep 17 00:00:00 2001
From: yronglin <yronglin777 at gmail.com>
Date: Mon, 4 Sep 2023 23:06:09 +0800
Subject: [PATCH] [NFC][Clang] Fix test constexpr-function-recovery-crash.cpp
Signed-off-by: yronglin <yronglin777 at gmail.com>
---
.../test/SemaCXX/constexpr-function-recovery-crash.cpp | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/clang/test/SemaCXX/constexpr-function-recovery-crash.cpp b/clang/test/SemaCXX/constexpr-function-recovery-crash.cpp
index 16654104a9177ef..e1d97ceafbe9d15 100644
--- a/clang/test/SemaCXX/constexpr-function-recovery-crash.cpp
+++ b/clang/test/SemaCXX/constexpr-function-recovery-crash.cpp
@@ -99,6 +99,10 @@ TEST_EVALUATE(DoWhileCond, do {} while (some_cond < 10);); // expected-error
// expected-error {{constexpr variable 'forceEvaluateDoWhileCond' must be initialized by a constant expression}}
TEST_EVALUATE(If, if (!!){};); // expected-error + {{}}
TEST_EVALUATE(IfInit, if (auto x = !!; 1){};);// expected-error + {{}}
-TEST_EVALUATE(ForInit, if (!!;;){};); // expected-error + {{}}
-TEST_EVALUATE(ForCond, if (; !!;){};); // expected-error + {{}}
-TEST_EVALUATE(ForInc, if (;; !!){};); // expected-error + {{}}
+TEST_EVALUATE(ForInit, for (!!;;){};);// expected-error + {{}}
+ // expected-note at -1 + {{infinite loop}}
+ // expected-note at -2 {{in call}}
+TEST_EVALUATE(ForCond, for (; !!;){};);// expected-error + {{}}
+TEST_EVALUATE(ForInc, for (;; !!){};);// expected-error + {{}}
+ // expected-note at -1 + {{infinite loop}}
+ // expected-note at -2 {{in call}}
More information about the cfe-commits
mailing list