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/readability/RedundantDeclarationCheck.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/readability/RedundantDeclarationCheck.cpp')
| -rw-r--r-- | clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.cpp b/clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.cpp index 44aa7a5a18e..ea7d8168ad4 100644 --- a/clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.cpp @@ -19,7 +19,8 @@ namespace tidy { namespace readability { void RedundantDeclarationCheck::registerMatchers(MatchFinder *Finder) { - Finder->addMatcher(namedDecl(anyOf(varDecl(), functionDecl())).bind("Decl"), this); + Finder->addMatcher(namedDecl(anyOf(varDecl(), functionDecl())).bind("Decl"), + this); } void RedundantDeclarationCheck::check(const MatchFinder::MatchResult &Result) { @@ -33,8 +34,8 @@ void RedundantDeclarationCheck::check(const MatchFinder::MatchResult &Result) { const SourceManager &SM = *Result.SourceManager; const bool DifferentHeaders = - !SM.isInMainFile(D->getLocation()) && - !SM.isWrittenInSameFile(Prev->getLocation(), D->getLocation()); + !SM.isInMainFile(D->getLocation()) && + !SM.isWrittenInSameFile(Prev->getLocation(), D->getLocation()); bool MultiVar = false; if (const auto *VD = dyn_cast<VarDecl>(D)) { @@ -57,8 +58,7 @@ void RedundantDeclarationCheck::check(const MatchFinder::MatchResult &Result) { SourceLocation EndLoc = Lexer::getLocForEndOfToken( D->getSourceRange().getEnd(), 0, SM, Result.Context->getLangOpts()); { - auto Diag = diag(D->getLocation(), "redundant %0 declaration") - << D; + auto Diag = diag(D->getLocation(), "redundant %0 declaration") << D; if (!MultiVar && !DifferentHeaders) Diag << FixItHint::CreateRemoval( SourceRange(D->getSourceRange().getBegin(), EndLoc)); |

