[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Coverage / unresolved-ctor-expr.cpp
blob2c57320949f7babfab3a8ede70077b8ba82a9f29
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 -fcoverage-mapping %s
2 // expected-no-diagnostics
4 // GH62105 demonstrated a crash with this example code when calculating
5 // coverage mapping because some source location information was being dropped.
6 // Demonstrate that we do not crash on this code.
7 namespace std { template <typename E> class initializer_list { const E *a, *b; }; }
9 template <typename> struct T {
10 T(std::initializer_list<int>, int = int());
11 bool b;
14 template <typename> struct S1 {
15 static void foo() {
16 class C;
17 (void)(0 ? T<C>{} : T<C>{});
21 void bar() {
22 S1<int>::foo();