From 7c7ea7d0ae4041e92a4d510874e78da9f5e3bc1c Mon Sep 17 00:00:00 2001 From: Mandeep Singh Grang Date: Tue, 8 Nov 2016 07:50:19 +0000 Subject: [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 --- .../clang-tidy/readability/RedundantDeclarationCheck.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.cpp') 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(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)); -- cgit v1.2.3