[Lldb-commits] [lldb] r124117 - /lldb/trunk/source/Expression/ClangUserExpression.cpp
Sean Callanan
scallanan at apple.com
Mon Jan 24 00:11:45 PST 2011
Author: spyffe
Date: Mon Jan 24 02:11:45 2011
New Revision: 124117
URL: http://llvm.org/viewvc/llvm-project?rev=124117&view=rev
Log:
Fixed a bug in the expression code which caused
it to interpret a "this" variable that was merely
a pointer -- that is, not a class pointer -- as
meaning that the current context was inside a C++
method. This bug would prevent expressions from
evaluating correctly in regular C code if there
was a pointer variable named "this" in scope.
Modified:
lldb/trunk/source/Expression/ClangUserExpression.cpp
Modified: lldb/trunk/source/Expression/ClangUserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangUserExpression.cpp?rev=124117&r1=124116&r2=124117&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangUserExpression.cpp (original)
+++ lldb/trunk/source/Expression/ClangUserExpression.cpp Mon Jan 24 02:11:45 2011
@@ -89,11 +89,14 @@
{
TypeFromUser target_ast_type(pointer_target_type, this_type->GetClangAST());
- if (target_ast_type.IsDefined())
+ if (target_ast_type.IsDefined() &&
+ ClangASTContext::IsCXXClassType(target_ast_type.GetOpaqueQualType()))
+ {
m_cplusplus = true;
- if (target_ast_type.IsConst())
- m_const_object = true;
+ if (target_ast_type.IsConst())
+ m_const_object = true;
+ }
}
}
else if (self_var.get())
More information about the lldb-commits
mailing list