Bug ID: 44884
           Summary: Debug information shows incorrect lexical scope for
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: DebugInfo

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

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.
llvm-bugs mailing list

Reply via email to