[clang] NFC: Remove else if after return
authorKirill Bobyrev <kbobyrev@google.com>
Mon, 25 Jan 2021 09:58:15 +0000 (10:58 +0100)
committerKirill Bobyrev <kbobyrev@google.com>
Mon, 25 Jan 2021 09:58:22 +0000 (10:58 +0100)
Update the code to be compatible with LLVM Coding Guidelines.

Reviewed By: sammccall

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

clang/lib/AST/DeclBase.cpp

index dc59f3d..1b59f21 100644 (file)
@@ -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,