r262965 - Fix -Werror build.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 8 15:16:16 PST 2016


Author: rsmith
Date: Tue Mar  8 17:16:16 2016
New Revision: 262965

URL: http://llvm.org/viewvc/llvm-project?rev=262965&view=rev
Log:
Fix -Werror build.

Modified:
    cfe/trunk/lib/CodeGen/CGExprAgg.cpp

Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=262965&r1=262964&r2=262965&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprAgg.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprAgg.cpp Tue Mar  8 17:16:16 2016
@@ -1344,7 +1344,7 @@ static CharUnits GetNumNonZeroBytesInIni
       
       unsigned ILEElement = 0;
       if (auto *CXXRD = dyn_cast<CXXRecordDecl>(SD))
-        for (auto &Base : CXXRD->bases())
+        while (ILEElement != CXXRD->getNumBases())
           NumNonZeroBytes +=
               GetNumNonZeroBytesInInit(ILE->getInit(ILEElement++), CGF);
       for (const auto *Field : SD->fields()) {




More information about the cfe-commits mailing list