Index: lib/Sema/SemaDecl.cpp =================================================================== --- lib/Sema/SemaDecl.cpp +++ lib/Sema/SemaDecl.cpp @@ -15430,10 +15430,10 @@ CXXRecord->getDestructor()); } - if (!CXXRecord->isInvalidDecl()) { - // Add any implicitly-declared members to this class. - AddImplicitlyDeclaredMembersToClass(CXXRecord); + // Add any implicitly-declared members to this class. + AddImplicitlyDeclaredMembersToClass(CXXRecord); + if (!CXXRecord->isInvalidDecl()) { // If we have virtual base classes, we may end up finding multiple // final overriders for a given virtual function. Check for this // problem now. Index: test/Index/Inputs/crash-preamble-classes.h =================================================================== --- /dev/null +++ test/Index/Inputs/crash-preamble-classes.h @@ -0,0 +1,9 @@ +struct Incomplete; + +struct X : Incomplete { + X(); +}; + +struct Y : X { + using X::X; +}; Index: test/Index/crash-preamble-classes.cpp =================================================================== --- /dev/null +++ test/Index/crash-preamble-classes.cpp @@ -0,0 +1,8 @@ +#include "crash-preamble-classes.h" + +struct Z : Y { + Z() {} +}; + +// RUN: env CINDEXTEST_EDITING=1 \ +// RUN: c-index-test -test-load-source-reparse 5 local -I %S/Inputs %s