diff options
author | Sean Callanan <scallanan@apple.com> | 2014-02-19 23:37:25 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2014-02-19 23:37:25 +0000 |
commit | 92cdbc8f2d189729fb69c1ede2604fe2751ba407 (patch) | |
tree | a3dc603332d9415aef7097b87acf848c97f36134 /lldb/source/Expression/ClangExpressionDeclMap.cpp | |
parent | 68893db0564d6ead3c69cec9ed6abf560bdaa77c (diff) | |
download | bcm5719-llvm-92cdbc8f2d189729fb69c1ede2604fe2751ba407.tar.gz bcm5719-llvm-92cdbc8f2d189729fb69c1ede2604fe2751ba407.zip |
Emit a warning diagnostic if a symbol was promoted
to a variable. This helps people figure out what
happened if they tried to do something to the variable
and it didn't work because we gave it the default type
of void*.
llvm-svn: 201737
Diffstat (limited to 'lldb/source/Expression/ClangExpressionDeclMap.cpp')
-rw-r--r-- | lldb/source/Expression/ClangExpressionDeclMap.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index 64ef98297cd..198fde93386 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -1428,6 +1428,10 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context, if (data_symbol) { + std::string warning("got name from symbols: "); + warning.append(name.AsCString()); + const unsigned diag_id = m_ast_context->getDiagnostics().getCustomDiagID(clang::DiagnosticsEngine::Level::Warning, "%0"); + m_ast_context->getDiagnostics().Report(diag_id) << warning.c_str(); AddOneGenericVariable(context, *data_symbol, current_id); context.m_found.variable = true; } |