forked from OSchip/llvm-project
parent
53c038a581
commit
76c21b5a27
|
@ -270,7 +270,7 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
// Write new file to disk
|
// Write new file to disk
|
||||||
std::error_code EC;
|
std::error_code EC;
|
||||||
llvm::raw_fd_ostream FileStream(FileName, EC, llvm::sys::fs::F_Text);
|
llvm::raw_fd_ostream FileStream(FileName, EC, llvm::sys::fs::F_None);
|
||||||
if (EC) {
|
if (EC) {
|
||||||
llvm::errs() << "Could not open " << FileName << " for writing\n";
|
llvm::errs() << "Could not open " << FileName << " for writing\n";
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
// This file intentionally uses a CRLF newlines!
|
||||||
|
|
||||||
|
void foo() {
|
||||||
|
int *x = 0;
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
// This file intentionally uses a CRLF newlines!
|
||||||
|
|
||||||
|
void foo() {
|
||||||
|
int *x = nullptr;
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
MainSourceFile: source1.cpp
|
||||||
|
Replacements:
|
||||||
|
- FilePath: $(path)/crlf.cpp
|
||||||
|
Offset: 79
|
||||||
|
Length: 1
|
||||||
|
ReplacementText: nullptr
|
||||||
|
...
|
|
@ -0,0 +1,5 @@
|
||||||
|
// RUN: mkdir -p %T/Inputs/crlf
|
||||||
|
// RUN: cp %S/Inputs/crlf/crlf.cpp %T/Inputs/crlf/crlf.cpp
|
||||||
|
// RUN: sed "s#\$(path)#%/T/Inputs/crlf#" %S/Inputs/crlf/file1.yaml > %T/Inputs/crlf/file1.yaml
|
||||||
|
// RUN: clang-apply-replacements %T/Inputs/crlf
|
||||||
|
// RUN: diff %T/Inputs/crlf/crlf.cpp %S/Inputs/crlf/crlf.cpp.expected
|
Loading…
Reference in New Issue