From b0640dc2b664ba74496ae83740cf66b8fbebaa32 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Tue, 9 Apr 2013 23:22:08 +0000 Subject: [PATCH] Don't erroneously put FunctionDecls into CXXRecordDecls 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). llvm-svn: 179136 --- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 9eea913..19ca60a 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -6498,6 +6498,10 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, } GetClangASTContext().SetMetadata (cxx_method_decl, metadata); } + else + { + return TypeSP(); + } } } else -- 2.7.4