llvm-project/clang/test/Layout/dump-complete-invalid.cpp
Sirraide e4882d83d7
[Clang] [Sema] Do not crash on dependent or invalid record decls when -fdump-record-layouts-complete is passed (#83688)
We no longer try to compute and dump the layout of types in cases where that isn’t possible.

This fixes #83684 and #83671.
2024-03-04 14:04:35 +01:00

7 lines
293 B
C++

// RUN: %clang_cc1 -verify -fsyntax-only -fdump-record-layouts-complete %s
struct Incomplete; // expected-note {{forward declaration}}
// Check we don't crash on trying to print out an invalid declaration.
struct Invalid : Incomplete {}; // expected-error {{base class has incomplete type}}