36 lines · c
1// Preamble detection test: see below for comments and test commands.2//* A BCPL comment that includes '/*'3#include <blah>4#ifndef FOO5#else6#ifdef BAR7#elif WIBBLE8#endif9#pragma unknown10#endif11#ifdef WIBBLE12#include "foo"13int bar;14#endif15 16// This test checks for detection of the preamble of a file, which17// includes all of the starting comments and #includes.18 19// RUN: %clang_cc1 -print-preamble %s > %t20// RUN: echo END. >> %t21// RUN: FileCheck < %t %s22 23// CHECK: // Preamble detection test: see below for comments and test commands.24// CHECK-NEXT: //* A BCPL comment that includes '/*'25// CHECK-NEXT: #include <blah>26// CHECK-NEXT: #ifndef FOO27// CHECK-NEXT: #else28// CHECK-NEXT: #ifdef BAR29// CHECK-NEXT: #elif WIBBLE30// CHECK-NEXT: #endif31// CHECK-NEXT: #pragma unknown32// CHECK-NEXT: #endif33// CHECK-NEXT: #ifdef WIBBLE34// CHECK-NEXT: #include "foo"35// CHECK-NEXT: END.36