Index: lib/Sema/CXXFieldCollector.h
===================================================================
--- lib/Sema/CXXFieldCollector.h	(revision 98723)
+++ lib/Sema/CXXFieldCollector.h	(working copy)
@@ -58,7 +58,10 @@
   }
 
   /// getCurNumField - The number of fields added to the currently parsed class.
-  size_t getCurNumFields() const { return FieldCount.back(); }
+  size_t getCurNumFields() const {
+    assert(FieldCount.size());
+    return FieldCount.back();
+  }
 
   /// getCurFields - Pointer to array of fields added to the currently parsed
   /// class.
