[llvm-bugs] [Bug 44884] New: Debug information shows incorrect lexical scope for typedef.
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Feb 12 05:18:16 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=44884
Bug ID: 44884
Summary: Debug information shows incorrect lexical scope for
typedef.
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: DebugInfo
Assignee: unassignedbugs at nondot.org
Reporter: international.phantom at gmail.com
CC: jdevlieghere at apple.com, keith.walker at arm.com,
llvm-bugs at lists.llvm.org,
paul_robinson at playstation.sony.com
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).
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200212/fd3425d2/attachment.html>
More information about the llvm-bugs
mailing list