<html>
<head>
<base href="http://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 --- - False error err_ref_non_value when variable id spelling matches struct tag spelling"
href="http://llvm.org/bugs/show_bug.cgi?id=17494">17494</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>False error err_ref_non_value when variable id spelling matches struct tag spelling
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</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@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Reporter</th>
<td>james.widman@gmail.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>In the following test case, LLDB issues the undeserved error:
error: 'a' does not refer to a value
... when it should instead match a to the parameter variable. Instead, it
seems to find the struct tag 'a'.
Example:
% cat a.c
#include <stdio.h>
struct a { int m; };
void dump_a( struct a * a ) { printf( "a::m: %d\n", a->m ); }
int f(struct a* a) {
return a->m;
}
int main()
{
struct a x = { 42 };
f(&x);
return 0;
}
% cc -g a.c
% lldb -x ./a.out
Current executable set to './a.out' (x86_64).
(lldb) b f
Breakpoint 1: where = a.out`f + 8 at a.c:9, address = 0x0000000100000eb8
(lldb) r
Process 16064 launched: './a.out' (x86_64)
Process 16064 stopped
* thread #1: tid = 0x77032, 0x0000000100000eb8 a.out`f(a=0x00007fff5fbfea78) +
8 at a.c:9, queue = 'com.apple.main-thread, stop reason = breakpoint 1.1
frame #0: 0x0000000100000eb8 a.out`f(a=0x00007fff5fbfea78) + 8 at a.c:9
6 void dump_a( struct a * a ) { printf( "a::m: %d\n", a->m ); }
7
8 int f(struct a* a) {
-> 9 return a->m;
10 }
11
12 int main()
(lldb) expression -- dump_a(a)
error: 'a' does not refer to a value
note: declared here
error: 1 errors parsing expression
(lldb)</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>