diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-10-16 23:45:15 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-10-16 23:45:15 +0000 |
commit | 915c07db05375d563187f8b75fa4f766a5220b75 (patch) | |
tree | b75101004140733090c3f90f8e53c77d9d152dff /test/CXX | |
parent | 57016dda61498294120b1a881d9e6606337b29d9 (diff) | |
download | clang-915c07db05375d563187f8b75fa4f766a5220b75.tar.gz |
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
Diffstat (limited to 'test/CXX')
-rw-r--r-- | test/CXX/ast-print.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CXX/ast-print.cpp b/test/CXX/ast-print.cpp index fb8588d4b1..44b34aa12c 100644 --- a/test/CXX/ast-print.cpp +++ b/test/CXX/ast-print.cpp @@ -19,3 +19,14 @@ int main() (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) { } +} + |