Artem Belevich | 224879e | 2018-01-17 19:29:39 +0000 | [diff] [blame] | 1 | // RUN: not %clang_cc1 -triple %ms_abi_triple -ast-print %s -std=gnu++11 \ |
| 2 | // RUN: | FileCheck %s |
| 3 | |
| 4 | // The test compiles a file with a syntax error which used to cause a crash with |
| 5 | // -ast-print. Compilation fails due to the syntax error, but compiler should |
| 6 | // not crash and print out whatever it manager to parse. |
| 7 | |
| 8 | // CHECK: struct { |
| 9 | // CHECK-NEXT: } dont_crash_on_syntax_error; |
Erich Keane | 1b9c746 | 2018-12-14 22:41:18 +0000 | [diff] [blame] | 10 | // CHECK-NEXT: decltype(nullptr) p; |
Artem Belevich | 224879e | 2018-01-17 19:29:39 +0000 | [diff] [blame] | 11 | struct { |
| 12 | } dont_crash_on_syntax_error /* missing ; */ decltype(nullptr) p; |