summaryrefslogtreecommitdiffstats
path: root/test/Index/pr20320.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erikjv@me.com>2016-10-27 08:37:14 +0000
committerErik Verbruggen <erikjv@me.com>2016-10-27 08:37:14 +0000
commit82e4eed54697e4cab9a4628a0b1e4bae1e6fbb88 (patch)
tree6c04e809259eed1c188439d834d97d5938350200 /test/Index/pr20320.cpp
parent0834a353d3d8b3c730d0073ed3b1d6ad92402f2b (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285275 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/pr20320.cpp')
-rw-r--r--test/Index/pr20320.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/Index/pr20320.cpp b/test/Index/pr20320.cpp
new file mode 100644
index 0000000000..cb54cea642
--- /dev/null
+++ b/test/Index/pr20320.cpp
@@ -0,0 +1,2 @@
+// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 local -x c++ %s
+#include "pr20320.h"