When we're checking access in a dependent context, don't try to look
at the bases of an undefined class. Fixes <rdar://problem/10438657>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144582 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/crash-10438657.cpp b/test/SemaTemplate/crash-10438657.cpp
new file mode 100644
index 0000000..2ee64bd
--- /dev/null
+++ b/test/SemaTemplate/crash-10438657.cpp
@@ -0,0 +1,15 @@
+// RUN: not %clang_cc1 -fsyntax-only %s 2> %t
+// RUN: FileCheck %s < %t
+// CHECK: 10 errors
+template<typename _CharT>
+class collate : public locale::facet {
+
+protected:
+virtual ~collate() {}
+  class wxObject;
+  class __attribute__ ((visibility("default"))) wxGDIRefData 
+    : public wxObjectRefData {};
+  class __attribute__ ((visibility("default"))) wxGDIObject : public wxObject { \
+      public:
+      virtual bool IsOk() const {
+        return m_refData && static_cast<wxGDIRefData *>(m_refData)->IsOk();