2018-01-18 03:29:39 +08:00
|
|
|
// RUN: not %clang_cc1 -triple %ms_abi_triple -ast-print %s -std=gnu++11 \
|
|
|
|
// RUN: | FileCheck %s
|
|
|
|
|
|
|
|
// The test compiles a file with a syntax error which used to cause a crash with
|
|
|
|
// -ast-print. Compilation fails due to the syntax error, but compiler should
|
|
|
|
// not crash and print out whatever it manager to parse.
|
|
|
|
|
|
|
|
// CHECK: struct {
|
|
|
|
// CHECK-NEXT: } dont_crash_on_syntax_error;
|
2018-12-15 06:41:18 +08:00
|
|
|
// CHECK-NEXT: decltype(nullptr) p;
|
2018-01-18 03:29:39 +08:00
|
|
|
struct {
|
|
|
|
} dont_crash_on_syntax_error /* missing ; */ decltype(nullptr) p;
|