[LLVMbugs] [Bug 22119] New: Debug info for template variables don't have unique names

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jan 7 10:33:23 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22119

            Bug ID: 22119
           Summary: Debug info for template variables don't have unique
                    names
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangbugs at nondot.org
          Reporter: paul_robinson at playstation.sony.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Use -g -std=c++14 to compile this source:

template <typename T> T crazy = T();
int foo() {
  crazy<int> = 5;
  crazy<short> = 10;
  return crazy<int> + crazy<short>;
}

The names of the two local variables get correct types and mangled names,
but DW_AT_name = "crazy" for both.

Probably they should be "crazy<int>" and "crazy<short>" to disambiguate.
And maybe have child template-parameter DIEs too. :-P

-- 
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/20150107/c2a2f17e/attachment.html>


More information about the llvm-bugs mailing list