diff options
author | Tareq A. Siraj <tareq.a.siraj@intel.com> | 2013-08-13 14:58:50 +0000 |
---|---|---|
committer | Tareq A. Siraj <tareq.a.siraj@intel.com> | 2013-08-13 14:58:50 +0000 |
commit | 3baabf396876af59f80a06b6ce5cfac8c2c9afda (patch) | |
tree | 2cf08348e4f268a6a79e14940c6681001b10dfd2 /clang-tools-extra/cpp11-migrate/Core/Reformatting.cpp | |
parent | f77718ad1d2b20c834126ce7884755f97a93eb50 (diff) | |
download | bcm5719-llvm-3baabf396876af59f80a06b6ce5cfac8c2c9afda.tar.gz bcm5719-llvm-3baabf396876af59f80a06b6ce5cfac8c2c9afda.zip |
cpp11-migrate: Write header replacements to disk
Another attempt to commit r187204 after windows related problems has
been fixed. Note that changes to this patch reflect the current behavior
of cpp11-migrate.
Header replacements are now written to disk in YAML format for an external tool
to merge. A unique file will be created in the same directory as the header
with all replacements that came from a source file that included the header
file. The YAML file will have:
- Name of the header file
- Name of the source file that included the header file
- Transform ID that generated the replacement
- Offset
- Length
- Replacement text
Any tool reading these replacements should read them using the
HeaderChangeDocument struct.
Differential Revision: http://llvm-reviews.chandlerc.com/D1369
llvm-svn: 188274
Diffstat (limited to 'clang-tools-extra/cpp11-migrate/Core/Reformatting.cpp')
-rw-r--r-- | clang-tools-extra/cpp11-migrate/Core/Reformatting.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/cpp11-migrate/Core/Reformatting.cpp b/clang-tools-extra/cpp11-migrate/Core/Reformatting.cpp index 3fd77612bbf..e50206fc0f7 100644 --- a/clang-tools-extra/cpp11-migrate/Core/Reformatting.cpp +++ b/clang-tools-extra/cpp11-migrate/Core/Reformatting.cpp @@ -47,10 +47,10 @@ void Reformatter::reformatChanges(SourceOverrides &Overrides, I != E; ++I) { const HeaderOverride &Header = I->getValue(); const tooling::Replacements &HeaderReplaces = - reformatSingleFile(Header.FileName, Header.Changes, SM); + reformatSingleFile(Header.getFileName(), Header.getChanges(), SM); Replaces.insert(HeaderReplaces.begin(), HeaderReplaces.end()); } - Overrides.applyReplacements(Replaces, SM); + Overrides.applyReplacements(Replaces, SM, "reformatter"); } tooling::Replacements Reformatter::reformatSingleFile( |