diff options
| author | Antonio Maiorano <amaiorano@gmail.com> | 2017-01-17 00:13:32 +0000 |
|---|---|---|
| committer | Antonio Maiorano <amaiorano@gmail.com> | 2017-01-17 00:13:32 +0000 |
| commit | 0d7d9c20a531d843e7081154c96e84890b746131 (patch) | |
| tree | 960128faa800f235eaeaec4b6324112f2aecc6c3 /clang-tools-extra/clang-tidy | |
| parent | 3adfb6a3eed268a04275334147a57e165ceb5669 (diff) | |
| download | bcm5719-llvm-0d7d9c20a531d843e7081154c96e84890b746131.tar.gz bcm5719-llvm-0d7d9c20a531d843e7081154c96e84890b746131.zip | |
Update tools to use new getStyle API
Depends on https://reviews.llvm.org/D28081
Differential Revision: https://reviews.llvm.org/D28315
llvm-svn: 292175
Diffstat (limited to 'clang-tools-extra/clang-tidy')
| -rw-r--r-- | clang-tools-extra/clang-tidy/ClangTidy.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/ClangTidy.cpp b/clang-tools-extra/clang-tidy/ClangTidy.cpp index e107e8a2d97..75aaefd56a1 100644 --- a/clang-tools-extra/clang-tidy/ClangTidy.cpp +++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp @@ -197,10 +197,14 @@ public: continue; } StringRef Code = Buffer.get()->getBuffer(); - format::FormatStyle Style = format::getStyle("file", File, FormatStyle); + auto Style = format::getStyle("file", File, FormatStyle); + if (!Style) { + llvm::errs() << llvm::toString(Style.takeError()) << "\n"; + continue; + } llvm::Expected<Replacements> CleanReplacements = format::cleanupAroundReplacements(Code, FileAndReplacements.second, - Style); + *Style); if (!CleanReplacements) { llvm::errs() << llvm::toString(CleanReplacements.takeError()) << "\n"; continue; |

