Author: spyffe
Date: Wed Feb 19 17:37:25 2014
New Revision: 201737
URL: http://llvm.org/viewvc/llvm-project?rev=201737&view=rev
Log:
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*.
Modified:
lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=201737&r1=201736&r2=201737&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Wed Feb 19 17:37:25
2014
@@ -1428,6 +1428,10 @@ ClangExpressionDeclMap::FindExternalVisi
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;
}
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits