[PATCH] cpp11-migrate: FileOverrides/Transform refactoring.
Guillaume Papin
guillaume.papin at epitech.eu
Wed Jul 10 09:09:48 PDT 2013
Hi revane, arielbernal, tareqsiraj,
This commit include the following changes:
- SourceOverrides is now a class
- it simplifies the usage for the Transform class, since now the replacements
can be applied directly to the file overrides with
SourceOverrides::applyReplacements().
- it contains a method applyRewrites() which was previously named
collectResults() in Transform.cpp. The method has been "optimized" a bit to
re-use the allocated buffer (std::string::clear() is called).
- since the class has some logic it's now unit tested
- Now FileOverrides is a class (not a std::map typedef) and store pointers to
the SourceOverrides. The reason is that the SourceOverrides can't be copied
anymore (which was already something to avoid since it's can be a quite large
object).
- File headers (/License) have been added to the unit tests.
http://llvm-reviews.chandlerc.com/D1122
Files:
cpp11-migrate/Core/FileOverrides.cpp
cpp11-migrate/Core/FileOverrides.h
cpp11-migrate/Core/SyntaxCheck.cpp
cpp11-migrate/Core/SyntaxCheck.h
cpp11-migrate/Core/Transform.cpp
cpp11-migrate/Core/Transform.h
cpp11-migrate/tool/Cpp11Migrate.cpp
unittests/cpp11-migrate/CMakeLists.txt
unittests/cpp11-migrate/FileOverridesTest.cpp
unittests/cpp11-migrate/IncludeExcludeTest.cpp
unittests/cpp11-migrate/PerfSupportTest.cpp
unittests/cpp11-migrate/TransformTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1122.1.patch
Type: text/x-patch
Size: 25959 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130710/22894bce/attachment.bin>
More information about the cfe-commits
mailing list