Richard Smith | ad762fc | 2011-04-14 22:09:26 +0000 | [diff] [blame] | 1 | // Test this without pch. |
Richard Smith | 762bb9d | 2011-10-13 22:29:44 +0000 | [diff] [blame^] | 2 | // RUN: %clang_cc1 -x c++ -std=c++11 -include %S/cxx-for-range.h -fsyntax-only -emit-llvm -o - %s |
Richard Smith | ad762fc | 2011-04-14 22:09:26 +0000 | [diff] [blame] | 3 | |
| 4 | // Test with pch. |
Richard Smith | 762bb9d | 2011-10-13 22:29:44 +0000 | [diff] [blame^] | 5 | // RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t %S/cxx-for-range.h |
| 6 | // RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t -fsyntax-only -emit-llvm -o - %s |
Richard Smith | ad762fc | 2011-04-14 22:09:26 +0000 | [diff] [blame] | 7 | |
| 8 | void h() { |
| 9 | f(); |
| 10 | |
| 11 | g<int>(); |
| 12 | |
| 13 | char a[3] = { 0, 1, 2 }; |
| 14 | for (auto w : a) |
| 15 | for (auto x : S()) |
| 16 | for (auto y : T()) |
| 17 | for (auto z : U()) |
| 18 | ; |
| 19 | } |