Fixed an issue where we might not be able to track down a real definition of
a forward declaration to a struct and hangle it gracefully (don't crash
trying to ask clang how many children an empty record has).
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118770 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Symbol/ClangASTContext.cpp b/source/Symbol/ClangASTContext.cpp
index 7d87e99..363b1af 100644
--- a/source/Symbol/ClangASTContext.cpp
+++ b/source/Symbol/ClangASTContext.cpp
@@ -1836,6 +1836,7 @@
break;
case clang::Type::Record:
+ if (ClangASTType::IsDefined (clang_qual_type))
{
const RecordType *record_type = cast<RecordType>(qual_type.getTypePtr());
const RecordDecl *record_decl = record_type->getDecl();