1) Use %clang_cc1 instead of the driver
2) Validate that the input contains a BOM
3) Validate that the BOM has been stripped from the output
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195886
91177308-0d34-0410-b5e6-
96231b3b80d8
-// RUN: %clang -E -frewrite-includes -I %S/Inputs %s -o - | %clang -fsyntax-only -Xclang -verify -x c -
+// RUN: grep '^\xEF\xBB\xBF' %S/Inputs/rewrite-includes-bom.h
+// RUN: %clang_cc1 -E -frewrite-includes -I %S/Inputs %s -o - | %clang_cc1 -fsyntax-only -verify -x c - | not grep '\xEF\xBB\xBF'
// expected-no-diagnostics
#include "rewrite-includes-bom.h"