diff options
author | Daniel Jasper <djasper@google.com> | 2016-11-08 16:11:33 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2016-11-08 16:11:33 +0000 |
commit | 528d682ff6f5180360b978a93ea0d49ebb758d5c (patch) | |
tree | 584641b67d74d2b77a032a0274717b91b4e0d72c /clang/lib/Format/Format.cpp | |
parent | 73c3a36b9f5036f4e497035193765c465d1b9ca2 (diff) | |
download | bcm5719-llvm-528d682ff6f5180360b978a93ea0d49ebb758d5c.tar.gz bcm5719-llvm-528d682ff6f5180360b978a93ea0d49ebb758d5c.zip |
[clang-format] Remove (SourceManager, FileID) variants
In Format, remove the reformat() and clean() functions taking a SourceManager
and a FileID. Keep the versions taking StringRef Code.
- there was duplicated functionality
- the FileID versions were harder to use
- the clean() version is dead code anyways
Patch by Krasimir Georgiev. Thank you.
llvm-svn: 286243
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 99a192341c6..e1f991a9bf6 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -1719,18 +1719,6 @@ cleanupAroundReplacements(StringRef Code, const tooling::Replacements &Replaces, return processReplacements(Cleanup, Code, NewReplaces, Style); } -tooling::Replacements reformat(const FormatStyle &Style, SourceManager &SM, - FileID ID, ArrayRef<CharSourceRange> Ranges, - bool *IncompleteFormat) { - FormatStyle Expanded = expandPresets(Style); - if (Expanded.DisableFormat) - return tooling::Replacements(); - - Environment Env(SM, ID, Ranges); - Formatter Format(Env, Expanded, IncompleteFormat); - return Format.process(); -} - tooling::Replacements reformat(const FormatStyle &Style, StringRef Code, ArrayRef<tooling::Range> Ranges, StringRef FileName, bool *IncompleteFormat) { @@ -1760,13 +1748,6 @@ tooling::Replacements reformat(const FormatStyle &Style, StringRef Code, return Format.process(); } -tooling::Replacements cleanup(const FormatStyle &Style, SourceManager &SM, - FileID ID, ArrayRef<CharSourceRange> Ranges) { - Environment Env(SM, ID, Ranges); - Cleaner Clean(Env, Style); - return Clean.process(); -} - tooling::Replacements cleanup(const FormatStyle &Style, StringRef Code, ArrayRef<tooling::Range> Ranges, StringRef FileName) { |