summaryrefslogtreecommitdiffstats
path: root/clang/test/PCH/exprs.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-06-28 22:28:35 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-06-28 22:28:35 +0000
commitd0795b2d787c418a2c87c0d5be5a169eec7552da (patch)
treec73dbfb06fb64dd9538a456e535208976600947f /clang/test/PCH/exprs.h
parent4469a892b464e39c861bef6488aa5da628c1da54 (diff)
downloadbcm5719-llvm-d0795b2d787c418a2c87c0d5be5a169eec7552da.tar.gz
bcm5719-llvm-d0795b2d787c418a2c87c0d5be5a169eec7552da.zip
Modify the way sub-statements are stored and retrieved from PCH.
Before this commit, sub-stmts were stored as encountered and when they were placed in the Stmts stack we had to know what index each stmt operand has. This complicated supporting variable sub-stmts and sub-stmts that were contained in TypeSourceInfos, e.g. x = sizeof(int[1]); would crash PCH. Now, sub-stmts are stored in reverse order, from last to first, so that when reading them, in order to get the next sub-stmt we just need to pop the last stmt from the stack. This greatly simplified the way stmts are written and read (just use PCHWriter::AddStmt and PCHReader::ReadStmt accordingly) and allowed variable stmt operands and TypeSourceInfo exprs. llvm-svn: 107087
Diffstat (limited to 'clang/test/PCH/exprs.h')
-rw-r--r--clang/test/PCH/exprs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/PCH/exprs.h b/clang/test/PCH/exprs.h
index 5af8c7c1a90..80768f8df24 100644
--- a/clang/test/PCH/exprs.h
+++ b/clang/test/PCH/exprs.h
@@ -72,6 +72,8 @@ typedef typeof((void *)0) void_ptr;
// CompoundLiteral
typedef typeof((struct S){.x = 3.5}) compound_literal;
+typedef typeof(i + sizeof(int[i + Enumerator])) add_result_with_typeinfo;
+
// ExtVectorElementExpr
typedef __attribute__(( ext_vector_type(2) )) double double2;
extern double2 vec2, vec2b;
OpenPOWER on IntegriCloud