[PATCH] D26665: [clang-move] Support moving function.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 16 03:13:04 PST 2016


hokein added inline comments.


================
Comment at: test/clang-move/move-function.cpp:9
+// CHECK-NEW-TEST-H-CASE1: #define {{.*}}NEW_FUNCTION_TEST_H
+// CHECK-NEW-TEST-H-CASE1: inline int g() { return 0; }
+// CHECK-NEW-TEST-H-CASE1: #endif // {{.*}}NEW_FUNCTION_TEST_H
----------------
ioeric wrote:
> Shouldn't there be empty lines around this line?
There should be. FileCheck will skip  empty lines and try to find next matching line here. Have added some `\n` checks.


================
Comment at: test/clang-move/move-function.cpp:18
+// CHECK-NEW-TEST-H-CASE2: #define {{.*}}NEW_FUNCTION_TEST_H
+// CHECK-NEW-TEST-H-CASE2: template <typename T> void h(T t) {}
+// CHECK-NEW-TEST-H-CASE2: template <> void h(int t) {}
----------------
ioeric wrote:
> Why does this become one line after being moved?
> 
> Shouldn't it be:
> ```
> template<typename T>
> void h(T t) {}
> ```
`formatAndApplyReplacements` does this for us ,and this is actually LLVM code style...


https://reviews.llvm.org/D26665





More information about the cfe-commits mailing list