[PATCH] Introducing initial UseAuto transform

Edwin Vane edwin.vane at intel.com
Mon Feb 11 12:21:20 PST 2013



================
Comment at: cpp11-migrate/UseAuto/UseAuto.cpp:43-46
@@ +42,6 @@
+
+  if (int result = UseAutoTool.run(newFrontendActionFactory(&Finder))) {
+    llvm::errs() << "Error encountered during translation.\n";
+    return result;
+  }
+
----------------
Sean Silva wrote:
> <http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly>
Oops. Missed lint. I guess clang-format doesn't catch this sort of stuff.

================
Comment at: test/cpp11-migrate/UseAuto/iterator.cpp:1
@@ +1,2 @@
+// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
+// RUN: cpp11-migrate -use-auto %t.cpp -- --std=c++11
----------------
Sean Silva wrote:
> What is the purpose of this grep?
The transform doesn't touch comments so they make through to the output file exactly as they go in. This includes CHECK: statements. Therefore when FileCheck runs on the output, every test passes because it matches against the CHECK: comment and not the actual code. The grep just strips out all the FileCheck directives.


http://llvm-reviews.chandlerc.com/D392



More information about the cfe-commits mailing list