brintos

brintos / llvm-project-archived public Read only

0
0
Text · 357 B · 9de88f0 Raw
29 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only %s -chain-include %s -Wuninitialized -Wunused -verify2 3// Make sure there is no crash.4 5#ifndef HEADER6#define HEADER7 8#include "non-existent-header.h"9 10class A {11public:12  ~A();13};14 15class ForwardCls;16struct B {17  ForwardCls f;18  A a;19};20 21#else22 23static void test() {24  int x; // expected-warning {{unused}}25  B b;26}27 28#endif29