[PATCH] cp11-migrate: Integration with LibFormat.
Edwin Vane
edwin.vane at intel.com
Mon Jul 22 12:10:02 PDT 2013
================
Comment at: cpp11-migrate/Core/FileOverrides.cpp:104
@@ +103,3 @@
+
+ for (Replacements::iterator I = Replaces.begin(), E = Replaces.end(); I != E;
+ ++I) {
----------------
Perhaps a comment saying you're grouping Replacements by file name.
================
Comment at: cpp11-migrate/Core/FileOverrides.cpp:207
@@ +206,3 @@
+ // replacement inside range -> resize the range
+ if (Range.contains(Replace)) {
+ int Difference = ReplaceNewSize - Replace.getLength();
----------------
Why change the range at all? If a replacement is completely within an existing range, the part of the range outside of the replacement is still something that has changed right?
================
Comment at: cpp11-migrate/Core/FileOverrides.cpp:224
@@ +223,3 @@
+
+ const tooling::Range Replace;
+ const unsigned ReplaceNewSize;
----------------
Can't you just use const lvalue ref here instead of constructing a new Range?
http://llvm-reviews.chandlerc.com/D1136
More information about the cfe-commits
mailing list