summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorAlexandre Ganea <alexandre.ganea@ubisoft.com>2019-08-27 00:13:52 +0000
committerAlexandre Ganea <alexandre.ganea@ubisoft.com>2019-08-27 00:13:52 +0000
commite6561e00684eb33d66bfbe165e918f8686958ef1 (patch)
tree6c1423d9fd0ada178c05de6969a4d5e350dff5ed /clang/test
parenta8e8dd91f06c0798f0bd615349c38ff7a7c395cc (diff)
downloadbcm5719-llvm-e6561e00684eb33d66bfbe165e918f8686958ef1.tar.gz
bcm5719-llvm-e6561e00684eb33d66bfbe165e918f8686958ef1.zip
[clang-scan-deps] Skip UTF-8 BOM in source minimizer
Differential Revision: https://reviews.llvm.org/D66511 llvm-svn: 369993
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Lexer/minimize_source_to_dependency_directives_utf8bom.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Lexer/minimize_source_to_dependency_directives_utf8bom.c b/clang/test/Lexer/minimize_source_to_dependency_directives_utf8bom.c
new file mode 100644
index 00000000000..305442fbd28
--- /dev/null
+++ b/clang/test/Lexer/minimize_source_to_dependency_directives_utf8bom.c
@@ -0,0 +1,10 @@
+// Test UTF8 BOM at start of file
+// RUN: printf '\xef\xbb\xbf' > %t.c
+// RUN: echo '#ifdef TEST\n' >> %t.c
+// RUN: echo '#include <string>' >> %t.c
+// RUN: echo '#endif' >> %t.c
+// RUN: %clang_cc1 -DTEST -print-dependency-directives-minimized-source %t.c 2>&1 | FileCheck %s
+
+// CHECK: #ifdef TEST
+// CHECK-NEXT: #include <string>
+// CHECK-NEXT: #endif
OpenPOWER on IntegriCloud