Fix pretty-printing for variables declared in a condition.  Patch by Grzegorz Jablonski.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166073 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CXX/ast-print.cpp b/test/CXX/ast-print.cpp
index fb8588d..44b34aa 100644
--- a/test/CXX/ast-print.cpp
+++ b/test/CXX/ast-print.cpp
@@ -19,3 +19,14 @@
     (r->method());
 }
 
+// CHECK: if (int a = 1)
+// CHECK:  while (int a = 1)
+// CHECK:  switch (int a = 1)
+
+void f()
+{
+    if (int a = 1) { }
+    while (int a = 1) { }
+    switch (int a = 1) { }
+}
+