summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-rename/FunctionMacro.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2016-07-27 04:43:15 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2016-07-27 04:43:15 +0000
commit8357ccf7fb7c6c2a6ea1bc3c47f4d71fd861b3c6 (patch)
tree4af48e4f3088bf7c6b01bd7bb0b933983c0dd833 /clang-tools-extra/test/clang-rename/FunctionMacro.cpp
parent57a127a7d1323c752936c83daabb7ef4b2e9abd0 (diff)
downloadbcm5719-llvm-8357ccf7fb7c6c2a6ea1bc3c47f4d71fd861b3c6.tar.gz
bcm5719-llvm-8357ccf7fb7c6c2a6ea1bc3c47f4d71fd861b3c6.zip
test: simplify commands, NFC
Rather than copying the file and then doing an in-place edit, perform the replacements to stdout and pass the output to FileCheck directly. Avoids unnecessary copying and seds. llvm-svn: 276836
Diffstat (limited to 'clang-tools-extra/test/clang-rename/FunctionMacro.cpp')
-rw-r--r--clang-tools-extra/test/clang-rename/FunctionMacro.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang-tools-extra/test/clang-rename/FunctionMacro.cpp b/clang-tools-extra/test/clang-rename/FunctionMacro.cpp
index 1cdac27ab3b..78b93e5ea3b 100644
--- a/clang-tools-extra/test/clang-rename/FunctionMacro.cpp
+++ b/clang-tools-extra/test/clang-rename/FunctionMacro.cpp
@@ -1,6 +1,4 @@
-// RUN: cat %s > %t.cpp
-// RUN: clang-rename -offset=199 -new-name=macro_function %t.cpp -i --
-// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
+// RUN: clang-rename -offset=138 -new-name=macro_function %s -- | FileCheck %s
#define moo foo // CHECK: #define moo macro_function
@@ -17,5 +15,5 @@ void qoo() {
boo(moo());
}
-// Use grep -FUbo 'foo;' <file> to get the correct offset of foo when changing
+// Use grep -FUbo 'foo' <file> to get the correct offset of foo when changing
// this file.
OpenPOWER on IntegriCloud