From 0a36512b175103d60020aaa857363dca33f36558 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 14 Dec 2011 21:55:23 +0000 Subject: [PATCH] Halve the constexpr recursion depth in this test in an attempt to make the freebsd bots happy. In the longer term, we should have a mechanism for moving constexpr recursion off the call stack, to support the default limit of 512 suggested by the standard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146596 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CXX/expr/expr.const/p2-0x.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/CXX/expr/expr.const/p2-0x.cpp b/test/CXX/expr/expr.const/p2-0x.cpp index dcb4bf4619..2e5e7f2ca4 100644 --- a/test/CXX/expr/expr.const/p2-0x.cpp +++ b/test/CXX/expr/expr.const/p2-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -std=c++11 -pedantic -verify -fcxx-exceptions %s +// RUN: %clang_cc1 -fsyntax-only -std=c++11 -pedantic -verify -fcxx-exceptions %s -fconstexpr-depth 256 // A conditional-expression is a core constant expression unless it involves one // of the following as a potentially evaluated subexpression [...]: @@ -95,11 +95,11 @@ namespace NonConstExprCtor { // exceed the implementation-defined recursion limits (see Annex B); namespace RecursionLimits { constexpr int RecurseForever(int n) { - return n + RecurseForever(n+1); // expected-note {{constexpr evaluation exceeded maximum depth of 512 calls}} + return n + RecurseForever(n+1); // expected-note {{constexpr evaluation exceeded maximum depth of 256 calls}} } struct AlsoRecurseForever { constexpr AlsoRecurseForever(int n) : - n(AlsoRecurseForever(n+1).n) // expected-note {{constexpr evaluation exceeded maximum depth of 512 calls}} + n(AlsoRecurseForever(n+1).n) // expected-note {{constexpr evaluation exceeded maximum depth of 256 calls}} {} int n; }; -- 2.40.0