[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / fold_expr_typo.cpp
blob0ef9c15b594766aee652f199f95fdb7c9aaf32db
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 %s
3 template <typename... T>
4 void foo(T &&...Params) {
5 foo<T>(Unknown); // expected-error {{expression contains unexpanded parameter pack 'T'}}\
6 expected-error {{use of undeclared identifier 'Unknown'}}
7 ((foo<T>(Unknown)), ...); // expected-error {{use of undeclared identifier 'Unknown'}}
10 template <typename... U> struct A {
11 template <typename... T> void foo(T &&...Params) {
12 foo<T>((... + static_cast<U>(1))); // expected-error {{expression contains unexpanded parameter pack 'T'}}