[PATCH] D23279: clang-reorder-fields

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 22 07:51:54 PDT 2016


compnerd added inline comments.

================
Comment at: test/clang-reorder-fields/ClassMixedInitialization.cpp:1-3
@@ +1,4 @@
+// RUN: cat %s > %t.cpp
+// RUN: clang-reorder-fields -record-name Foo -fields-order e,x,pi,v,s %t.cpp -i -- -std=c++11
+// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
+
----------------
bcraig wrote:
> Nit:
> This general pattern seems suspicious to me.  It really seems like it should be some variation of "clang-reorder-fields [...] | FileCheck %s", without the cat and sed stuff.  Is there a clang-reorder-fields mode where changes are output into a new file / stdout instead of modifying the file in place?
Yes, it seems suspicious to me as well.  However, I think that this is fine as is for @alexshap's patch as this is the model used throughout clang-rename and friends as well.  Its because the tools are missing exactly what you are suggesting (`-verify`).


Repository:
  rL LLVM

https://reviews.llvm.org/D23279





More information about the cfe-commits mailing list