[PATCH] cpp11-migrate: Refactor for driver model of operation
Edwin Vane
edwin.vane at intel.com
Thu Aug 29 06:45:39 PDT 2013
Hi tareqsiraj, arielbernal, Sarcasm,
Massive simplification of how replacements and file overrides are
handled by the migrator:
* Sources and headers are all treated the same.
* All replacements for a given translation unit are stored in the same
TranslationUnitReplacements structure.
* Change tracking is updated only from main file; no need for
propagating "is tracking" flag around.
* Transform base class no longer responsible for applying replacements.
They are simply stored and main() looks after deduplication and
application.
* Renamed -yaml-only to -serialize-replacements. Same restrictions apply:
Can only request one transform. New restriction: formatting cannot also
be turned on since it's basically a transform.
* If -serialize-replacements is requested, changes to files will not be
applied on disk.
* Changed behaviour of function generating names for serialized
replacements: Only the main source file goes into the name of the file
since a file may contain changes for multiple different files.
* Updated HeaderReplacements LIT test for new serialization behaviour.
* Replaced old test that ensures replacements are not serialized if
-serialize-replacements is not provided. New version ensures changes
are made directly to all files in the translation unit.
* Updated unit tests.
* Due to major simplification of structures in FileOverrides.h, the
FileOverridesTest is quite a bit simpler now.
Depends on D1522.
http://llvm-reviews.chandlerc.com/D1545
Files:
cpp11-migrate/AddOverride/AddOverride.cpp
cpp11-migrate/AddOverride/AddOverride.h
cpp11-migrate/AddOverride/AddOverrideActions.cpp
cpp11-migrate/AddOverride/AddOverrideActions.h
cpp11-migrate/CMakeLists.txt
cpp11-migrate/Core/FileOverrides.cpp
cpp11-migrate/Core/FileOverrides.h
cpp11-migrate/Core/Refactoring.h
cpp11-migrate/Core/Reformatting.cpp
cpp11-migrate/Core/Reformatting.h
cpp11-migrate/Core/SyntaxCheck.cpp
cpp11-migrate/Core/Transform.cpp
cpp11-migrate/Core/Transform.h
cpp11-migrate/LoopConvert/LoopActions.cpp
cpp11-migrate/LoopConvert/LoopActions.h
cpp11-migrate/LoopConvert/LoopConvert.cpp
cpp11-migrate/LoopConvert/LoopConvert.h
cpp11-migrate/ReplaceAutoPtr/ReplaceAutoPtr.cpp
cpp11-migrate/ReplaceAutoPtr/ReplaceAutoPtr.h
cpp11-migrate/ReplaceAutoPtr/ReplaceAutoPtrActions.cpp
cpp11-migrate/ReplaceAutoPtr/ReplaceAutoPtrActions.h
cpp11-migrate/UseAuto/UseAuto.cpp
cpp11-migrate/UseAuto/UseAuto.h
cpp11-migrate/UseAuto/UseAutoActions.cpp
cpp11-migrate/UseAuto/UseAutoActions.h
cpp11-migrate/UseNullptr/NullptrActions.cpp
cpp11-migrate/UseNullptr/NullptrActions.h
cpp11-migrate/UseNullptr/UseNullptr.cpp
cpp11-migrate/UseNullptr/UseNullptr.h
cpp11-migrate/tool/CMakeLists.txt
cpp11-migrate/tool/Cpp11Migrate.cpp
test/cpp11-migrate/HeaderReplacements/Inputs/no_yaml.h
test/cpp11-migrate/HeaderReplacements/common_expected.yaml
test/cpp11-migrate/HeaderReplacements/main.cpp
test/cpp11-migrate/HeaderReplacements/main_expected.yaml
test/cpp11-migrate/HeaderReplacements/common.h.yaml
test/cpp11-migrate/HeaderReplacements/no_yaml.cpp
unittests/cpp11-migrate/CMakeLists.txt
unittests/cpp11-migrate/FileOverridesTest.cpp
unittests/cpp11-migrate/PerfSupportTest.cpp
unittests/cpp11-migrate/ReformattingTest.cpp
unittests/cpp11-migrate/TransformTest.cpp
unittests/cpp11-migrate/UniqueHeaderNameTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1545.1.patch
Type: text/x-patch
Size: 91034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130829/0bb7c446/attachment.bin>
More information about the cfe-commits
mailing list