2010-07-21 04:18:03 +08:00
|
|
|
// Preamble detection test: see below for comments and test commands.
|
2011-08-26 04:39:19 +08:00
|
|
|
//* A BCPL comment that includes '/*'
|
2010-07-21 04:18:03 +08:00
|
|
|
#include <blah>
|
|
|
|
#ifndef FOO
|
|
|
|
#else
|
|
|
|
#ifdef BAR
|
|
|
|
#elif WIBBLE
|
|
|
|
#endif
|
|
|
|
#pragma unknown
|
|
|
|
#endif
|
|
|
|
#ifdef WIBBLE
|
2017-05-30 19:54:55 +08:00
|
|
|
#include "foo"
|
|
|
|
int bar;
|
2010-07-21 04:18:03 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// This test checks for detection of the preamble of a file, which
|
2017-05-30 19:54:55 +08:00
|
|
|
// includes all of the starting comments and #includes.
|
2010-07-21 04:18:03 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -print-preamble %s > %t
|
2010-07-22 10:22:24 +08:00
|
|
|
// RUN: echo END. >> %t
|
2010-07-22 03:40:01 +08:00
|
|
|
// RUN: FileCheck < %t %s
|
|
|
|
|
|
|
|
// CHECK: // Preamble detection test: see below for comments and test commands.
|
2011-08-26 04:39:19 +08:00
|
|
|
// CHECK-NEXT: //* A BCPL comment that includes '/*'
|
2010-07-22 03:40:01 +08:00
|
|
|
// CHECK-NEXT: #include <blah>
|
|
|
|
// CHECK-NEXT: #ifndef FOO
|
|
|
|
// CHECK-NEXT: #else
|
|
|
|
// CHECK-NEXT: #ifdef BAR
|
|
|
|
// CHECK-NEXT: #elif WIBBLE
|
|
|
|
// CHECK-NEXT: #endif
|
|
|
|
// CHECK-NEXT: #pragma unknown
|
|
|
|
// CHECK-NEXT: #endif
|
2017-05-30 19:54:55 +08:00
|
|
|
// CHECK-NEXT: #ifdef WIBBLE
|
|
|
|
// CHECK-NEXT: #include "foo"
|
2010-07-22 10:22:24 +08:00
|
|
|
// CHECK-NEXT: END.
|