<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Debug information shows incorrect lexical scope for typedef."
href="https://bugs.llvm.org/show_bug.cgi?id=44884">44884</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Debug information shows incorrect lexical scope for typedef.
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>DebugInfo
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>international.phantom@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>jdevlieghere@apple.com, keith.walker@arm.com, llvm-bugs@lists.llvm.org, paul_robinson@playstation.sony.com
</td>
</tr></table>
<p>
<div>
<pre>Given the following test case:
//------------------------------------------------------------
// typedef.cpp
//------------------------------------------------------------
int bar(float Input) { return (int)Input; }
unsigned foo(char Param) {
typedef int INT;
INT Value = Param;
{
typedef float FLOAT;
{
FLOAT Added = Value + Param;
Value = bar(Added);
}
}
return Value + Param;
}
//------------------------------------------------------------
Using the following command line options to generate debug info
(DWARF) and (COFF):
clang -c -g -O0 typedef.cpp -o typedef.o
clang -c -g -O0 typedef.cpp -o typedef-coff.o -gcodeview
--target=x86_64-windows
Looking at the output generated by llvm-dwarfdump and llvm-diva,
the debug info shows the typedefs 'INT'and 'FLOAT' to be at the same lexical
scope (function scope).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>