diff options
-rw-r--r-- | lldb/source/Expression/ClangASTSource.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lldb/source/Expression/ClangASTSource.cpp b/lldb/source/Expression/ClangASTSource.cpp index 5461f1918c7..4c31c223b89 100644 --- a/lldb/source/Expression/ClangASTSource.cpp +++ b/lldb/source/Expression/ClangASTSource.cpp @@ -76,8 +76,15 @@ ClangASTSource::FindExternalVisibleDeclsByName switch (clang_decl_name.getNameKind()) { // Normal identifiers. case DeclarationName::Identifier: - if (clang_decl_name.getAsIdentifierInfo()->getBuiltinID() != 0) - return SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); + { + clang::IdentifierInfo *identifier_info = clang_decl_name.getAsIdentifierInfo(); + + if (!identifier_info || + identifier_info->getBuiltinID() != 0) + { + return SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); + } + } break; // Operator names. Not important for now. |