Fix a bug causing an assertion when a covariant return type differed from
an overriden type only by reduced qualification.

llvm-svn: 95968
diff --git a/clang/test/CodeGenCXX/vtable-layout.cpp b/clang/test/CodeGenCXX/vtable-layout.cpp
index f7db213..6cc1b0b 100644
--- a/clang/test/CodeGenCXX/vtable-layout.cpp
+++ b/clang/test/CodeGenCXX/vtable-layout.cpp
@@ -113,3 +113,13 @@
 
 void D::f() { } 
 }
+
+// For now, just verify this doesn't crash.
+namespace test0 {
+  struct Obj {};
+
+  struct Base {           virtual const Obj *foo() = 0; };
+  struct Derived : Base { virtual       Obj *foo() { return new Obj(); } };
+
+  void test(Derived *D) { D->foo(); }
+}