[llvm-bugs] [Bug 49368] New: main::Class vs. Class not found for inferior calls

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 26 12:25:34 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=49368

            Bug ID: 49368
           Summary: main::Class vs. Class not found for inferior calls
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: jan.kratochvil at redhat.com
                CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org

template<class T> class D {
public:
  T t;
  T &m() {
    return t;
  }
};
int main() {
  struct C { unsigned i = 42; };
  D<C> d;
  return d.m().i; // breakpoint
}

(lldb) p d.m()
error: error: function 'D<C>::m' is used but not defined in this translation
unit, and cannot be defined in any other translation unit because its type does
not have linkage
<user expression 0>:1:3: used here
d.m()
  ^
$ llvm-nm -C a.out
0000000000401160 t D<main::C>::m()

(gdb) p d.m()
$1 = (C &) @0x7fffffffcf58: {i = 42}

-- 
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/20210226/f78c527f/attachment.html>


More information about the llvm-bugs mailing list