summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ASTResultSynthesizer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Expression/ASTResultSynthesizer.cpp')
-rw-r--r--lldb/source/Expression/ASTResultSynthesizer.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lldb/source/Expression/ASTResultSynthesizer.cpp b/lldb/source/Expression/ASTResultSynthesizer.cpp
index e4c1aa6c2f0..1125d6272f9 100644
--- a/lldb/source/Expression/ASTResultSynthesizer.cpp
+++ b/lldb/source/Expression/ASTResultSynthesizer.cpp
@@ -311,7 +311,12 @@ ASTResultSynthesizer::SynthesizeBodyResult (CompoundStmt *Body,
if (is_lvalue)
{
- IdentifierInfo &result_ptr_id = Ctx.Idents.get("$__lldb_expr_result_ptr");
+ IdentifierInfo *result_ptr_id;
+
+ if (expr_type->isFunctionType())
+ result_ptr_id = &Ctx.Idents.get("$__lldb_expr_result"); // functions actually should be treated like function pointers
+ else
+ result_ptr_id = &Ctx.Idents.get("$__lldb_expr_result_ptr");
QualType ptr_qual_type = Ctx.getPointerType(expr_qual_type);
@@ -319,7 +324,7 @@ ASTResultSynthesizer::SynthesizeBodyResult (CompoundStmt *Body,
DC,
SourceLocation(),
SourceLocation(),
- &result_ptr_id,
+ result_ptr_id,
ptr_qual_type,
NULL,
SC_Static,
OpenPOWER on IntegriCloud