diff options
| author | Mandeep Singh Grang <mgrang@codeaurora.org> | 2016-11-08 07:50:19 +0000 |
|---|---|---|
| committer | Mandeep Singh Grang <mgrang@codeaurora.org> | 2016-11-08 07:50:19 +0000 |
| commit | 7c7ea7d0ae4041e92a4d510874e78da9f5e3bc1c (patch) | |
| tree | 58745ba1b5123ed61711bbf23879bf5350c74e81 /clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp | |
| parent | d700c357d4689abb48121f61690a4080e39c326d (diff) | |
| download | bcm5719-llvm-7c7ea7d0ae4041e92a4d510874e78da9f5e3bc1c.tar.gz bcm5719-llvm-7c7ea7d0ae4041e92a4d510874e78da9f5e3bc1c.zip | |
[clang-tools-extra] Format sources with clang-format. NFC.
Summary:
Ran clang-format on all .c/.cpp/.h files in clang-tools-extra.
Excluded the test, unittests, clang-reorder-fields, include-fixer, modularize and pptrace directories.
Reviewers: klimek, alexfh
Subscribers: nemanjai
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D26329
llvm-svn: 286221
Diffstat (limited to 'clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp')
| -rw-r--r-- | clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp index a58d32dfbdb..df05e7df640 100644 --- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp +++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp @@ -83,7 +83,7 @@ protected: // applied). if (Err) { llvm::errs() << "Fix conflicts with existing fix! " - << llvm::toString(std::move(Err)) << "\n"; + << llvm::toString(std::move(Err)) << "\n"; assert(false && "Fix conflicts with existing fix!"); } } @@ -124,10 +124,9 @@ ClangTidyMessage::ClangTidyMessage(StringRef Message, ClangTidyError::ClangTidyError(StringRef CheckName, ClangTidyError::Level DiagLevel, - bool IsWarningAsError, - StringRef BuildDirectory) - : CheckName(CheckName), BuildDirectory(BuildDirectory), DiagLevel(DiagLevel), - IsWarningAsError(IsWarningAsError) {} + bool IsWarningAsError, StringRef BuildDirectory) + : CheckName(CheckName), BuildDirectory(BuildDirectory), + DiagLevel(DiagLevel), IsWarningAsError(IsWarningAsError) {} // Returns true if GlobList starts with the negative indicator ('-'), removes it // from the GlobList. @@ -279,7 +278,7 @@ void ClangTidyDiagnosticConsumer::finalizeLastError() { LastErrorPassesLineFilter = false; } -static bool LineIsMarkedWithNOLINT(SourceManager& SM, SourceLocation Loc) { +static bool LineIsMarkedWithNOLINT(SourceManager &SM, SourceLocation Loc) { bool Invalid; const char *CharacterData = SM.getCharacterData(Loc, &Invalid); if (!Invalid) { @@ -312,10 +311,10 @@ void ClangTidyDiagnosticConsumer::HandleDiagnostic( if (LastErrorWasIgnored && DiagLevel == DiagnosticsEngine::Note) return; - if (Info.getLocation().isValid() && - DiagLevel != DiagnosticsEngine::Error && + if (Info.getLocation().isValid() && DiagLevel != DiagnosticsEngine::Error && DiagLevel != DiagnosticsEngine::Fatal && - LineIsMarkedWithNOLINTinMacro(Diags->getSourceManager(), Info.getLocation())) { + LineIsMarkedWithNOLINTinMacro(Diags->getSourceManager(), + Info.getLocation())) { ++Context.Stats.ErrorsIgnoredNOLINT; // Ignored a warning, should ignore related notes as well LastErrorWasIgnored = true; |

