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 <yronglin...@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 <yronglin...@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@-1 + {{infinite loop}}
+                                      // expected-note@-2 {{in call}}
+TEST_EVALUATE(ForCond, for (; !!;){};);// expected-error + {{}}
+TEST_EVALUATE(ForInc, for (;; !!){};);// expected-error + {{}}
+                                      // expected-note@-1 + {{infinite loop}}
+                                      // expected-note@-2 {{in call}}

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to