]> granicus.if.org Git - clang/commitdiff
Add braces to avoid an ambiguous else, fixing a GCC warning.
authorChandler Carruth <chandlerc@gmail.com>
Fri, 21 May 2010 10:29:28 +0000 (10:29 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 21 May 2010 10:29:28 +0000 (10:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104314 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBlocks.cpp

index d7e0d5fcbc147ead25a29552b4aa103d689e15c4..f49b6ee18b8e3ab0bd8b03ac7e0c48be31bd4a34 100644 (file)
@@ -157,10 +157,11 @@ static void CollectBlockDeclRefInfo(const Stmt *S, CGBlockInfo &Info) {
   }
 
   // Make sure to capture implicit 'self' references due to super calls.
-  else if (const ObjCMessageExpr *E = dyn_cast<ObjCMessageExpr>(S))
+  else if (const ObjCMessageExpr *E = dyn_cast<ObjCMessageExpr>(S)) {
     if (E->getReceiverKind() == ObjCMessageExpr::SuperClass || 
         E->getReceiverKind() == ObjCMessageExpr::SuperInstance)
       Info.NeedsObjCSelf = true;
+  }
 
   // Getter/setter uses may also cause implicit super references,
   // which we can check for with: