[PATCH] D95336: [clang] NFC: Remove else if after return

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 25 01:37:46 PST 2021


kbobyrev created this revision.
kbobyrev added reviewers: kadircet, sammccall.
kbobyrev requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Update the code to be compatible with LLVM Coding Guidelines.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95336

Files:
  clang/lib/AST/DeclBase.cpp


Index: clang/lib/AST/DeclBase.cpp
===================================================================
--- clang/lib/AST/DeclBase.cpp
+++ clang/lib/AST/DeclBase.cpp
@@ -1171,10 +1171,8 @@
 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,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95336.318922.patch
Type: text/x-patch
Size: 579 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210125/e0e923e5/attachment.bin>


More information about the cfe-commits mailing list