[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / PCH / chain-invalid-code.cpp
blob9de88f0cee77bf0a301dfb27f601516cde987b0f
1 // RUN: %clang_cc1 -fsyntax-only %s -chain-include %s -Wuninitialized -Wunused -verify
3 // Make sure there is no crash.
5 #ifndef HEADER
6 #define HEADER
8 #include "non-existent-header.h"
10 class A {
11 public:
12 ~A();
15 class ForwardCls;
16 struct B {
17 ForwardCls f;
18 A a;
21 #else
23 static void test() {
24 int x; // expected-warning {{unused}}
25 B b;
28 #endif