diff options
| author | Edwin Vane <edwin.vane@intel.com> | 2013-06-06 20:31:52 +0000 |
|---|---|---|
| committer | Edwin Vane <edwin.vane@intel.com> | 2013-06-06 20:31:52 +0000 |
| commit | 32e3553f838ed05d21b6df2e02f88340c645b5a6 (patch) | |
| tree | 4b46c59fc7019a45608fa3088148e5cb49ffad9c /clang-tools-extra/cpp11-migrate/UseAuto/UseAuto.cpp | |
| parent | fb5bddfd0a3383c9c724212e21857daa9b319595 (diff) | |
| download | bcm5719-llvm-32e3553f838ed05d21b6df2e02f88340c645b5a6.tar.gz bcm5719-llvm-32e3553f838ed05d21b6df2e02f88340c645b5a6.zip | |
cpp11-migrate: Refactor how global options are passed to Transforms
Refactored how global options are passed to Transforms to avoid widespread
changes every time a new global option is added.
Tests updated to reflect new interface.
llvm-svn: 183443
Diffstat (limited to 'clang-tools-extra/cpp11-migrate/UseAuto/UseAuto.cpp')
| -rw-r--r-- | clang-tools-extra/cpp11-migrate/UseAuto/UseAuto.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang-tools-extra/cpp11-migrate/UseAuto/UseAuto.cpp b/clang-tools-extra/cpp11-migrate/UseAuto/UseAuto.cpp index a8e839d1c81..3c75246ea34 100644 --- a/clang-tools-extra/cpp11-migrate/UseAuto/UseAuto.cpp +++ b/clang-tools-extra/cpp11-migrate/UseAuto/UseAuto.cpp @@ -21,7 +21,6 @@ using namespace clang; using namespace clang::tooling; int UseAutoTransform::apply(const FileContentsByPath &InputStates, - RiskLevel MaxRisk, const clang::tooling::CompilationDatabase &Database, const std::vector<std::string> &SourcePaths, FileContentsByPath &ResultStates) { @@ -36,9 +35,9 @@ int UseAutoTransform::apply(const FileContentsByPath &InputStates, MatchFinder Finder; IteratorReplacer ReplaceIterators(UseAutoTool.getReplacements(), - AcceptedChanges, MaxRisk); + AcceptedChanges, Options().MaxRiskLevel); NewReplacer ReplaceNew(UseAutoTool.getReplacements(), AcceptedChanges, - MaxRisk); + Options().MaxRiskLevel); Finder.addMatcher(makeIteratorDeclMatcher(), &ReplaceIterators); Finder.addMatcher(makeDeclWithNewMatcher(), &ReplaceNew); |

