llvm-project/lldb/source
Greg Clayton 23c12ca922 Make sure that we succeed in starting a definition before we complete it and emit an error if we fail to start the definition.
ClangASTContext::StartTagDeclarationDefinition(...) was starting definitions for any TagType instances that have TagDecl, but ClangASTContext::CompleteTagDeclarationDefinition(...) was getting the type to a CXXRecordDecl with:

    clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl();
    
The problem is that getAsCXXRecordDecl() might dig a bit deeper into a type and dig out a different decl, which means we might call ClangASTContext::StartTagDeclarationDefinition(...), but it might not do anything, and then we might call ClangASTContext::CompleteTagDeclarationDefinition(...) and it might try to complete something that didn't have its definition started and this will crash.

This change fixes that, and also makes sure that starting a definition succeeds before any calls to ClangASTContext::CompleteTagDeclarationDefinition().
                                                    
<rdar://problem/24091798>

llvm-svn: 270891
2016-05-26 19:24:02 +00:00
..
API Make sure to try and take the process stop lock when calling: 2016-05-26 00:08:39 +00:00
Breakpoint second pass over removal of Mutex and Condition 2016-05-19 05:13:57 +00:00
Commands second pass over removal of Mutex and Condition 2016-05-19 05:13:57 +00:00
Core Guard against the C++ destructor chain by not letting the debugger list clean up after itself in the C++ destructor chain. 2016-05-26 16:51:23 +00:00
DataFormatters remove use of Mutex in favour of std::{,recursive_}mutex 2016-05-18 01:59:10 +00:00
Expression remove use of Mutex in favour of std::{,recursive_}mutex 2016-05-18 01:59:10 +00:00
Host second pass over removal of Mutex and Condition 2016-05-19 05:13:57 +00:00
Initialization remove use of Mutex in favour of std::{,recursive_}mutex 2016-05-18 01:59:10 +00:00
Interpreter second pass over removal of Mutex and Condition 2016-05-19 05:13:57 +00:00
Plugins Make sure that we succeed in starting a definition before we complete it and emit an error if we fail to start the definition. 2016-05-26 19:24:02 +00:00
Symbol Make sure that we succeed in starting a definition before we complete it and emit an error if we fail to start the definition. 2016-05-26 19:24:02 +00:00
Target Lock out Process::RunThreadPlan so only one can be in flight at a time. 2016-05-24 18:29:36 +00:00
Utility Skip leading spaces when decoding hex values 2016-05-24 18:19:45 +00:00
CMakeLists.txt Add initial CMake glue for the NetBSD platform 2015-10-24 00:27:04 +00:00
lldb.cpp Add more NetBSD platform glue for lldb 2015-11-07 15:31:54 +00:00