
There are two related issues being fixed in this patch. Both issues relate to use of an invalid structure which contains a member that we error recover such that the field has the same type as the structure. In both cases, we would hit an infinite loop while analyzing the fields because the type of the field matches the type of the record. Fixes #140887
12 lines
401 B
C
12 lines
401 B
C
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
// This invalid code was causing a stack overflow, check that we issue
|
|
// reasonable diagnostics and not crash.
|
|
struct GH140887 { // expected-note {{definition of 'struct GH140887' is not complete until the closing '}'}}
|
|
struct GH140887 s; // expected-error {{field has incomplete type 'struct GH140887'}}
|
|
};
|
|
|
|
void gh140887() {
|
|
struct GH140887 s;
|
|
}
|