[clang] b7526cc - [NFC][clang][IFS] Adding braces to if-statement as prep for D71301.

Puyan Lotfi via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 13 13:04:51 PST 2020


Author: Puyan Lotfi
Date: 2020-01-13T16:04:27-05:00
New Revision: b7526cc21ce55c8b53250df3d659fbdae3f894a7

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

LOG: [NFC][clang][IFS] Adding braces to if-statement as prep for D71301.

Just trying to make https://reviews.llvm.org/D71301 look cleaner.

Added: 
    

Modified: 
    clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp b/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
index 3b0a5668af94..e7d6fee5ac67 100644
--- a/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
+++ b/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
@@ -52,11 +52,12 @@ class InterfaceStubFunctionsConsumer : public ASTConsumer {
       if (!isVisible(ND))
         return true;
 
-      if (const VarDecl *VD = dyn_cast<VarDecl>(ND))
+      if (const VarDecl *VD = dyn_cast<VarDecl>(ND)) {
         if ((VD->getStorageClass() == StorageClass::SC_Extern) ||
             (VD->getStorageClass() == StorageClass::SC_Static &&
              VD->getParentFunctionOrMethod() == nullptr))
           return true;
+      }
 
       if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
         if (FD->isInlined() && !isa<CXXMethodDecl>(FD) &&


        


More information about the cfe-commits mailing list