1 // RUN: %clang_cc1 -std=c++17 -fsyntax-only -fexperimental-new-constant-interpreter %s -verify
2 // RUN: %clang_cc1 -std=c++17 -fsyntax-only %s -verify
3 // expected-no-diagnostics
5 constexpr int cond_then_else(int a
, int b
) {
13 constexpr int dontCallMe(unsigned m
) {
15 return dontCallMe(m
- 2);
18 // Can't call this because it will run into infinite recursion.
19 constexpr int assertNotReached() {
23 static_assert(true || true, "");
24 static_assert(true || false, "");
25 static_assert(false || true, "");
26 static_assert(!(false || false), "");
28 static_assert(true || assertNotReached(), "");
29 static_assert(true || true || true || false, "");
31 static_assert(true && true, "");
32 static_assert(!(true && false), "");
33 static_assert(!(false && true), "");
34 static_assert(!(false && false), "");
36 static_assert(!(false && assertNotReached()), "");
37 static_assert(!(true && true && true && false), "");