<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Cannot eval function which returns empty struct. Error [IRForTarget]: Size of result type 'struct foo { }' couldn't be determined"
href="https://llvm.org/bugs/show_bug.cgi?id=31612">31612</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Cannot eval function which returns empty struct. Error [IRForTarget]: Size of result type 'struct foo { }' couldn't be determined
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>3.9
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>lldb-dev@lists.llvm.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>safinaskar@mail.ru
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>root@ideal-os:~# cat /o.cpp
struct foo
{
};
foo
f (void)
{
return {};
}
int
main (void)
{
f ();
}
root@ideal-os:~# clang++-3.9 -std=c++11 -g -o /o /o.cpp
root@ideal-os:~# lldb-3.9 /o
(lldb) target create "/o"
Current executable set to '/o' (x86_64).
(lldb) b main
Breakpoint 1: where = o`main + 4 at o.cpp:14, address = 0x00000000004004e4
(lldb) r
Process 366 launched: '/o' (x86_64)
Process 366 stopped
* thread #1: tid = 366, 0x00000000004004e4 o`main + 4 at o.cpp:14, name = 'o',
stop reason = breakpoint 1.1
frame #0: 0x00000000004004e4 o`main + 4 at o.cpp:14
(lldb) p f ()
Error [IRForTarget]: Size of result type 'struct foo {
}' couldn't be determined
error: The expression could not be prepared to run in the target
(lldb)
Environment same as in <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - error: calling 'f' with incomplete return type 'string' (aka 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >')"
href="show_bug.cgi?id=31611">https://llvm.org/bugs/show_bug.cgi?id=31611</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>