Skip to content
Snippets Groups Projects
Commit 1e7fc3d3 authored by Richard Smith's avatar Richard Smith
Browse files

Reduce recursion limit on this test further to try to make the msys bot green.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146759 91177308-0d34-0410-b5e6-96231b3b80d8
parent b95ddf15
No related branches found
No related tags found
No related merge requests found
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -pedantic -verify -fcxx-exceptions %s -fconstexpr-depth 256
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -pedantic -verify -fcxx-exceptions %s -fconstexpr-depth 128
// 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 256 calls}} expected-note 9{{in call to 'RecurseForever(}} expected-note {{skipping 246 calls}}
return n + RecurseForever(n+1); // expected-note {{constexpr evaluation exceeded maximum depth of 128 calls}} expected-note 9{{in call to 'RecurseForever(}} expected-note {{skipping 118 calls}}
}
struct AlsoRecurseForever {
constexpr AlsoRecurseForever(int n) :
n(AlsoRecurseForever(n+1).n) // expected-note {{constexpr evaluation exceeded maximum depth of 256 calls}} expected-note 9{{in call to 'AlsoRecurseForever(}} expected-note {{skipping 246 calls}}
n(AlsoRecurseForever(n+1).n) // expected-note {{constexpr evaluation exceeded maximum depth of 128 calls}} expected-note 9{{in call to 'AlsoRecurseForever(}} expected-note {{skipping 118 calls}}
{}
int n;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment