PCH support for ImaginaryLiteral and ArraySubscriptExpr

llvm-svn: 69233
diff --git a/clang/test/PCH/exprs.c b/clang/test/PCH/exprs.c
index 7337c4c..dd4333c 100644
--- a/clang/test/PCH/exprs.c
+++ b/clang/test/PCH/exprs.c
@@ -8,6 +8,7 @@
 int integer;
 long long_integer;
 double floating;
+_Complex double floating_complex;
 
 // DeclRefExpr
 int_decl_ref *int_ptr1 = &integer;
@@ -20,6 +21,9 @@
 // FloatingLiteral + ParenExpr
 floating_literal *double_ptr = &floating;
 
+// ImaginaryLiteral
+imaginary_literal *cdouble_ptr = &floating_complex;
+
 // StringLiteral
 const char* printHello() {
   return hello;
@@ -36,6 +40,9 @@
 typeof_sizeof *size_t_ptr = &size_t_value;
 typeof_sizeof2 *size_t_ptr2 = &size_t_value;
 
+// ArraySubscriptExpr
+array_subscript *double_ptr1_5 = &floating;
+
 // CallExpr
 call_returning_double *double_ptr2 = &floating;
 
diff --git a/clang/test/PCH/exprs.h b/clang/test/PCH/exprs.h
index 918ca81..0c09e8f 100644
--- a/clang/test/PCH/exprs.h
+++ b/clang/test/PCH/exprs.h
@@ -13,6 +13,9 @@
 // FloatingLiteral and ParenExpr
 typedef typeof((42.5)) floating_literal;
 
+// ImaginaryLiteral
+typedef typeof(17.0i) imaginary_literal;
+
 // StringLiteral
 const char *hello = "Hello" "PCH" "World";
 
@@ -26,6 +29,10 @@
 typedef typeof(sizeof(int)) typeof_sizeof;
 typedef typeof(sizeof(Enumerator)) typeof_sizeof2;
 
+// ArraySubscriptExpr
+extern double values[];
+typedef typeof(values[2]) array_subscript;
+
 // CallExpr
 double dplus(double x, double y);
 double d0, d1;