Don't erroneously put FunctionDecls into CXXRecordDecls
authorSean Callanan <scallanan@apple.com>
Tue, 9 Apr 2013 23:22:08 +0000 (23:22 +0000)
committerSean Callanan <scallanan@apple.com>
Tue, 9 Apr 2013 23:22:08 +0000 (23:22 +0000)
if we didn't want to put in a CXXConstructorDecl.  This
prevents malformed classes (i.e., classes with regular C
functions as members) from being generated from type
information (and fixes a crash in the test suite).

<rdar://problem/13550765>

llvm-svn: 179136

lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

index 9eea913..19ca60a 100644 (file)
@@ -6498,6 +6498,10 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
                                                         }
                                                         GetClangASTContext().SetMetadata (cxx_method_decl, metadata);
                                                     }
+                                                    else
+                                                    {
+                                                        return TypeSP();
+                                                    }
                                                 }
                                             }
                                             else