summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/unittests/cpp11-migrate/TransformTest.cpp
diff options
context:
space:
mode:
authorTareq A. Siraj <tareq.a.sriaj@intel.com>2013-07-12 14:36:20 +0000
committerTareq A. Siraj <tareq.a.sriaj@intel.com>2013-07-12 14:36:20 +0000
commite0a03c3c64b176c272982835798b9adce8056df2 (patch)
tree97ed539f1117bbcf465c5bdd55847feba9ac415c /clang-tools-extra/unittests/cpp11-migrate/TransformTest.cpp
parent9895ac1119f3df3d42205e08f9ad32ee15281c6a (diff)
downloadbcm5719-llvm-e0a03c3c64b176c272982835798b9adce8056df2.tar.gz
bcm5719-llvm-e0a03c3c64b176c272982835798b9adce8056df2.zip
cpp11-migrate: FileOverrides/Transform refactoring.
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). Author: Guillaume Papin <guillaume.papin@epitech.eu> Differential Revision: http://llvm-reviews.chandlerc.com/D1122 llvm-svn: 186161
Diffstat (limited to 'clang-tools-extra/unittests/cpp11-migrate/TransformTest.cpp')
-rw-r--r--clang-tools-extra/unittests/cpp11-migrate/TransformTest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang-tools-extra/unittests/cpp11-migrate/TransformTest.cpp b/clang-tools-extra/unittests/cpp11-migrate/TransformTest.cpp
index dd794f2eb15..555237e073c 100644
--- a/clang-tools-extra/unittests/cpp11-migrate/TransformTest.cpp
+++ b/clang-tools-extra/unittests/cpp11-migrate/TransformTest.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "gtest/gtest.h"
+#include "Core/FileOverrides.h"
#include "Core/Transform.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/DeclGroup.h"
OpenPOWER on IntegriCloud