llvm/clang/test/Index/pr20320.cpp
Erik Verbruggen 52b26713be Mark invalid RecordDecls as completed.
Sema::ActOnTag creates TagDecls for records. However, if those record
declarations are invalid, and the parser is in C++ mode, it would
silently drop the TagDecl (and leave it as "beingDefined"). The problem
is that other code (e.g. the ASTWriter) will serialize all types, and
expects them to be complete. So, leaving them open would result in
failing asserts.

Fixes PR20320

Differential Revision: http://reviews.llvm.org/D21176

llvm-svn: 285275
2016-10-27 08:37:14 +00:00

3 lines
111 B
C++

// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 local -x c++ %s
#include "pr20320.h"