[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / constexpr-factorial.cpp
blob3f9928bb20ea70e8e153791f8390de96b188fac3
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only %s
2 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -fexperimental-new-constant-interpreter %s
4 constexpr unsigned oddfac(unsigned n) {
5 return n == 1 ? 1 : n * oddfac(n-2);
7 constexpr unsigned k = oddfac(123);
9 using A = int[k % 256];
10 using A = int[43];