]> granicus.if.org Git - clang/commitdiff
Try fixing CRLF issues in Git with [clang-scan-deps] Minimizer: Correctly handle...
authorAlexandre Ganea <alexandre.ganea@ubisoft.com>
Wed, 28 Aug 2019 15:14:37 +0000 (15:14 +0000)
committerAlexandre Ganea <alexandre.ganea@ubisoft.com>
Wed, 28 Aug 2019 15:14:37 +0000 (15:14 +0000)
Differential Revision: https://reviews.llvm.org/D66556

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370219 91177308-0d34-0410-b5e6-96231b3b80d8

.gitattributes [deleted file]
test/Lexer/minimize_source_to_dependency_directives_invalid_error.c [new file with mode: 0644]

diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644 (file)
index b48a3e3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Windows line ending tests
-test/Lexer/minimize_source_to_dependency_directives_invalid_error.c text eol=crlf
-test/FixIt/fixit-newline-style.c text eol=crlf
diff --git a/test/Lexer/minimize_source_to_dependency_directives_invalid_error.c b/test/Lexer/minimize_source_to_dependency_directives_invalid_error.c
new file mode 100644 (file)
index 0000000..c4a4cf3
--- /dev/null
@@ -0,0 +1,16 @@
+// Test CF+LF are properly handled along with quoted, multi-line #error\r
+// RUN: %clang_cc1 -DOTHER -print-dependency-directives-minimized-source %s 2>&1 | FileCheck %s\r
+\r
+#ifndef TEST\r
+#error "message \\r
+   more message \\r
+   even more"\r
+#endif\r
+\r
+#ifdef OTHER\r
+#include <string>\r
+#endif\r
+\r
+// CHECK:      #ifdef OTHER\r
+// CHECK-NEXT: #include <string>\r
+// CHECK-NEXT: #endif\r