]> granicus.if.org Git - clang/commitdiff
Remove a nonsensical bit of code from InitListChecker::getStructuredSubobjectInit...
authorEli Friedman <eli.friedman@gmail.com>
Tue, 4 Oct 2011 20:31:48 +0000 (20:31 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Tue, 4 Oct 2011 20:31:48 +0000 (20:31 +0000)
(No testcase because I don't think we have any way to actually write a testcase for this; the chosen value of NumElements has no effects on anything other than performance and memory usage.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141106 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaInit.cpp

index 451abd45346086c4720fb2676f6351335a4b96ee..145a7ecaba4cb6052f64a86a1433c39bbf6d7576 100644 (file)
@@ -2037,9 +2037,6 @@ InitListChecker::getStructuredSubobjectInit(InitListExpr *IList, unsigned Index,
                                   RDecl->field_end());
   }
 
-  if (NumElements < NumInits)
-    NumElements = IList->getNumInits();
-
   Result->reserveInits(SemaRef.Context, NumElements);
 
   // Link this new initializer list into the structured initializer