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 | 5242a87b7665f03c2cb314f35401c707c72f1543 (patch) | |
| tree | 8530ce29edf222c67baafa4fb5cf35ff72d679c2 /change-namespace | |
| parent | 9234817c638eda1885bbb2c546b5219baa889f69 (diff) | |
[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
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@286221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'change-namespace')
| -rw-r--r-- | change-namespace/ChangeNamespace.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/change-namespace/ChangeNamespace.cpp b/change-namespace/ChangeNamespace.cpp index 4157e4df..02ba3e81 100644 --- a/change-namespace/ChangeNamespace.cpp +++ b/change-namespace/ChangeNamespace.cpp @@ -345,7 +345,8 @@ void ChangeNamespaceTool::run( } else if (const auto *TLoc = Result.Nodes.getNodeAs<TypeLoc>("type")) { fixTypeLoc(Result, startLocationForType(*TLoc), EndLocationForType(*TLoc), *TLoc); - } else if (const auto *VarRef = Result.Nodes.getNodeAs<DeclRefExpr>("var_ref")){ + } else if (const auto *VarRef = + Result.Nodes.getNodeAs<DeclRefExpr>("var_ref")) { const auto *Var = Result.Nodes.getNodeAs<VarDecl>("var_decl"); assert(Var); if (Var->getCanonicalDecl()->isStaticDataMember()) @@ -358,8 +359,8 @@ void ChangeNamespaceTool::run( VarRefRange.getEnd(), Name); } else { const auto *Call = Result.Nodes.getNodeAs<clang::CallExpr>("call"); - assert(Call != nullptr &&"Expecting callback for CallExpr."); - const clang::FunctionDecl* Func = Call->getDirectCallee(); + assert(Call != nullptr && "Expecting callback for CallExpr."); + const clang::FunctionDecl *Func = Call->getDirectCallee(); assert(Func != nullptr); // Ignore out-of-line static methods since they will be handled by nested // name specifiers. @@ -548,7 +549,8 @@ void ChangeNamespaceTool::fixUsingShadowDecl( const UsingDecl *UsingDeclaration) { SourceLocation Start = UsingDeclaration->getLocStart(); SourceLocation End = UsingDeclaration->getLocEnd(); - if (Start.isInvalid() || End.isInvalid()) return; + if (Start.isInvalid() || End.isInvalid()) + return; assert(UsingDeclaration->shadow_size() > 0); // FIXME: it might not be always accurate to use the first using-decl. |
