[llvm-bugs] [Bug 31611] New: error: calling 'f' with incomplete return type 'string' (aka 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >')

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jan 11 13:11:50 PST 2017


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

            Bug ID: 31611
           Summary: error: calling 'f' with incomplete return type
                    'string' (aka 'std::__cxx11::basic_string<char,
                    std::char_traits<char>, std::allocator<char> >')
           Product: lldb
           Version: 3.9
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: safinaskar at mail.ru
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

root at ideal-os:~# cat /o.cpp
#include <string>

std::string
f (void)
{
  return "abc";
}

int
main (void)
{
  f ();
}
root at ideal-os:~# clang++-3.9 -g -o /o /o.cpp
root at ideal-os:~# lldb-3.9 /o
(lldb) target create "/o"
Current executable set to '/o' (x86_64).
(lldb) b main
Breakpoint 1: where = o`main + 12 at o.cpp:12, address = 0x000000000040084c
(lldb) r
Process 146 launched: '/o' (x86_64)
Process 146 stopped
* thread #1: tid = 146, 0x000000000040084c o`main + 12 at o.cpp:12, name = 'o',
stop reason = breakpoint 1.1
    frame #0: 0x000000000040084c o`main + 12 at o.cpp:12
(lldb) p f ()
error: calling 'f' with incomplete return type 'string' (aka
'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>
>')
'f' declared here
forward declaration of 'std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >'
(lldb) root at ideal-os:~# 
root at ideal-os:~# dpkg -l lldb-3.9 clang-3.9
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                   Version          Architecture     Description
+++-======================-================-================-=================================================
ii  clang-3.9              1:3.9.1-2        amd64            C, C++ and
Objective-C compiler (LLVM based)
ii  lldb-3.9               1:3.9.1-2        amd64            Next generation,
high-performance debugger
root at ideal-os:~# lldb-3.9 --version
lldb version 3.9.1 ( revision )
root at ideal-os:~# clang-3.9 -v
clang version 3.9.1-2 (tags/RELEASE_391/rc2)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.1
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.3.0
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
root at ideal-os:~#

debian gnu/linux sid. clang and lldb from debian repo. amd64

-- 
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/20170111/38949169/attachment.html>


More information about the llvm-bugs mailing list