]> granicus.if.org Git - clang/commitdiff
Apply explicit braces to avoid ambiguous 'else' [-Wparentheses]
authorNick Lewycky <nicholas@mxc.ca>
Sat, 9 Apr 2011 00:25:15 +0000 (00:25 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Sat, 9 Apr 2011 00:25:15 +0000 (00:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129176 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index 578ee1a764c5d3298e2a2db895769a68a5e05b85..f3d68e9a8d9932be4e396bed094f436ed2f4b8e8 100644 (file)
@@ -1288,10 +1288,10 @@ llvm::DIType CGDebugInfo::CreateType(const ArrayType *Ty,
     while ((Ty = dyn_cast<ArrayType>(EltTy))) {
       int64_t UpperBound = 0;
       int64_t LowerBound = 0;
-      if (const ConstantArrayType *CAT = dyn_cast<ConstantArrayType>(Ty))
+      if (const ConstantArrayType *CAT = dyn_cast<ConstantArrayType>(Ty)) {
         if (CAT->getSize().getZExtValue())
           UpperBound = CAT->getSize().getZExtValue() - 1;
-      else
+      else
         // This is an unbounded array. Use Low = 1, Hi = 0 to express such 
         // arrays.
         LowerBound = 1;