[flang][cuda] Adapt ExternalNameConversion to work in gpu module (#117039)
[llvm-project.git] / clang / test / AST / ByteCode / depth-limit2.cpp
blob72285ae9ddae0da0ec4d7b82145afd7175bd5b4e
1 // RUN: %clang_cc1 -fexperimental-new-constant-interpreter -fconstexpr-depth=2 -verify %s
2 // RUN: %clang_cc1 -fconstexpr-depth=2 -verify=ref %s
5 constexpr int func() {
6 return 12;
9 constexpr int foo() {
10 return func(); // expected-note {{exceeded maximum depth of 2 calls}} \
11 // ref-note {{exceeded maximum depth of 2 calls}}
14 constexpr int bar() {
15 return foo(); // expected-note {{in call to 'foo()'}} \
16 // ref-note {{in call to 'foo()'}}
19 static_assert(bar() == 12, ""); // expected-error {{not an integral constant expression}} \
20 // expected-note {{in call to 'bar()'}} \
21 // ref-error {{not an integral constant expression}} \
22 // ref-note {{in call to 'bar()'}}