The order of replacements is not important here. The vector is populated one
transform at a time and the order of replacements from a given transform is not
important because there are no conflicts.
================
Comment at: cpp11-migrate/tool/Cpp11Migrate.cpp:210
@@ -208,3 +209,3 @@
// written to disk for testing purposes.
- for (HeaderOverrides::const_iterator HeaderI = Overrides.headers_begin(),
+ for (HeaderOverrides::iterator HeaderI = Overrides.headers_begin(),
HeaderE = Overrides.headers_end();
----------------
Tareq A. Siraj wrote:
> Guillaume Papin wrote:
> > Is this non-const iterator really necessary? Seems to me that the
> > HeaderOverrides is not really modified, just read.
> >
> Writing vector<MigratorReplacements> to YAML requires the vector to be
> non-const (not entirely sure why they did it like that) and thus the
> HeaderOverrides need to be non-const.
Can we fix the yaml-writing code?
================
Comment at: cpp11-migrate/Core/Replacement.h:22
@@ +21,3 @@
+/// \brief A replacement struct to store the transform ID and the replacement.
+struct MigratorReplacement {
+ llvm::SmallString<16> TransformID;
----------------
Why do we need a whole new type? This is basically just Replacement with a
string.
http://llvm-reviews.chandlerc.com/D1142
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits