[llvm-branch-commits] [clang] 7e5d41a - [clang] NFC: Remove else if after return

Kirill Bobyrev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jan 25 02:03:19 PST 2021


Author: Kirill Bobyrev
Date: 2021-01-25T10:58:22+01:00
New Revision: 7e5d41a68255d2a890977047be339091cc113e25

URL: https://github.com/llvm/llvm-project/commit/7e5d41a68255d2a890977047be339091cc113e25
DIFF: https://github.com/llvm/llvm-project/commit/7e5d41a68255d2a890977047be339091cc113e25.diff

LOG: [clang] NFC: Remove else if after return

Update the code to be compatible with LLVM Coding Guidelines.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D95336

Added: 
    

Modified: 
    clang/lib/AST/DeclBase.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index dc59f3dd1f15..1b59f217e3c1 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/lib/AST/DeclBase.cpp
@@ -1171,10 +1171,8 @@ bool DeclContext::isDependentContext() const {
 bool DeclContext::isTransparentContext() const {
   if (getDeclKind() == Decl::Enum)
     return !cast<EnumDecl>(this)->isScoped();
-  else if (getDeclKind() == Decl::LinkageSpec || getDeclKind() == Decl::Export)
-    return true;
 
-  return false;
+  return getDeclKind() == Decl::LinkageSpec || getDeclKind() == Decl::Export;
 }
 
 static bool isLinkageSpecContext(const DeclContext *DC,


        


More information about the llvm-branch-commits mailing list