aboutsummaryrefslogtreecommitdiff
path: root/clang/test/AST/ByteCode/constexpr-steps.cpp
blob: 490425107a140a2b87b58ef77e4be0f2627c7b55 (plain)
1
2
3
4
5
6
7
8
9
10
// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify %s -fconstexpr-steps=100


constexpr int foo() { // expected-error {{never produces a constant expression}}
  while (1) {} // expected-note 2{{constexpr evaluation hit maximum step limit}}
  return 0;
}
static_assert (foo() == 0, ""); // expected-error {{not an integral constant expression}} \
                                // expected-note {{in call to}}