Index: lib/AST/VTableBuilder.cpp
===================================================================
--- lib/AST/VTableBuilder.cpp	(revision 181396)
+++ lib/AST/VTableBuilder.cpp	(working copy)
@@ -1237,7 +1237,16 @@
       return Offset;
     }      
   }
-  
+
+  /*llvm_unreachable("Couldn't find the given base subobject "
+                   "in the derived subobject");*/
+
+  // TODO: Hm, I'd expect this to be unreachable.
+  // However, we do get here on A vs E at test/CodeGenCXX/vtable-layout.cpp:686
+  // Why isn't this case covered by the previous for loop?
+  // If this is intentional, we should put a comment here explaining when this
+  // happens and why this is a correct result.
+
   return BaseOffset();
 }
   
@@ -1410,7 +1419,7 @@
 }
 
 /// FindNearestOverriddenMethod - Given a method, returns the overridden method
-/// from the nearest base. Returns null if no method was found.
+/// from the nearest primary base. Returns null if no method was found.
 static const CXXMethodDecl * 
 FindNearestOverriddenMethod(const CXXMethodDecl *MD,
                             VTableBuilder::PrimaryBasesSetVectorTy &Bases) {
@@ -2420,9 +2429,7 @@
   // Add the known thunks.
   Thunks.insert(Builder.thunks_begin(), Builder.thunks_end());
 
-  // If we don't have the vbase information for this class, insert it.
-  // getVirtualBaseOffsetOffset will compute it separately without computing
-  // the rest of the vtable related information.
+  // Now it's time for vbase information unless there are no virtual bases.
   if (!RD->getNumVBases())
     return;
   
@@ -2430,6 +2437,8 @@
     RD->vbases_begin()->getType()->getAs<RecordType>();
   const CXXRecordDecl *VBase = cast<CXXRecordDecl>(VBaseRT->getDecl());
   
+  // getVirtualBaseOffsetOffset might have computed the vbase information
+  // already without computing the rest of the vtable related information.
   if (VirtualBaseClassOffsetOffsets.count(std::make_pair(RD, VBase)))
     return;
   
Index: include/clang/AST/VTableBuilder.h
===================================================================
--- include/clang/AST/VTableBuilder.h	(revision 181396)
+++ include/clang/AST/VTableBuilder.h	(working copy)
@@ -354,6 +354,8 @@
 
   /// getNumVirtualFunctionPointers - Return the number of virtual function
   /// pointers in the vtable for a given record decl.
+  // TODO: I've noticed this is used only in VTableBuilder.cpp
+  // Should we do anything about it?
   uint64_t getNumVirtualFunctionPointers(const CXXRecordDecl *RD);
 
   /// getMethodVTableIndex - Return the index (relative to the vtable address
