[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / fold_expr_expansion_limit.cpp
blob600278da78287c4d8654aac6806d76153b65967d
1 // RUN: %clang_cc1 -fsyntax-only -fbracket-depth 2 -verify -std=c++17 %s
3 template <class T, T... V> struct seq {
4 constexpr bool zero() { return (true && ... && (V == 0)); }; // expected-error {{instantiating fold expression with 3 arguments exceeded expression nesting limit of 2}} \
5 expected-note {{use -fbracket-depth}}
6 };
7 constexpr unsigned N = 3;
8 auto x = __make_integer_seq<seq, int, N>{};
9 static_assert(!x.zero(), ""); // expected-note {{in instantiation of member function}}