Author: yronglin Date: 2023-09-05T23:21:44+08:00 New Revision: 111c1ba5b492bd4bf64dfccc675a9db32ff6a28a
URL: https://github.com/llvm/llvm-project/commit/111c1ba5b492bd4bf64dfccc675a9db32ff6a28a DIFF: https://github.com/llvm/llvm-project/commit/111c1ba5b492bd4bf64dfccc675a9db32ff6a28a.diff LOG: [NFC][Clang] Fix test constexpr-function-recovery-crash.cpp (#65269) Signed-off-by: yronglin <yronglin...@gmail.com> Added: Modified: clang/test/SemaCXX/constexpr-function-recovery-crash.cpp Removed: ################################################################################ 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