<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Erroneous line not mentioned in error messages"
   href="https://llvm.org/bugs/show_bug.cgi?id=28125">28125</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Erroneous line not mentioned in error messages
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>csaba_22@yahoo.co.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=16538" name="attach_16538" title="preprocessor output">attachment 16538</a> <a href="attachment.cgi?id=16538&action=edit" title="preprocessor output">[details]</a></span>
preprocessor output

Compiling the following program:

#include <unordered_map>
#include <memory>
struct ED {};
struct AWI {
    std::unordered_map<int, std::unique_ptr<ED>> ed_;
};
int main() {
    AWI a;
    AWI b{a};
}

with clang version 3.9.0 (trunk 272655) -save-temps -std=c++11
where_is_the_error.cc
results in the following error messages:

In file included from where_is_the_error.cc:1:
In file included from
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../gcc/x86_64-pc-linux-gnu/6.1.0/include/c++/unordered_map:41:
In file included from
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../gcc/x86_64-pc-linux-gnu/6.1.0/include/c++/tuple:39:
In file included from
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../gcc/x86_64-pc-linux-gnu/6.1.0/include/c++/array:39:
In file included from
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../gcc/x86_64-pc-linux-gnu/6.1.0/include/c++/stdexcept:39:
In file included from
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../gcc/x86_64-pc-linux-gnu/6.1.0/include/c++/string:41:
In file included from
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../gcc/x86_64-pc-linux-gnu/6.1.0/include/c++/bits/allocator.h:46:
In file included from
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../gcc/x86_64-pc-linux-gnu/6.1.0/include/c++/x86_64-pc-linux-gnu/bits/c++allocator.h:33:
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../gcc/x86_64-pc-linux-gnu/6.1.0/include/c++/ext/new_allocator.h:120:23:
error: call to implicitly-deleted copy constructor of 'std::pair<const int,
std::unique_ptr<ED, std::default_delete<ED> > >'
 { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
                      ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../gcc/x86_64-pc-linux-gnu/6.1.0/include/c++/bits/alloc_traits.h:455:8:
note: in instantiation of function template specialization
'__gnu_cxx::new_allocator<std::pair<const int, std::unique_ptr<ED,
std::default_delete<ED> > > >::construct<std::pair<const int,
std::unique_ptr<ED, std::default_delete<ED> > >, const std::pair<const int,
std::unique_ptr<ED, std::default_delete<ED> > > &>' requested here
 { __a.construct(__p, std::forward<_Args>(__args)...); }
       ^
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../gcc/x86_64-pc-linux-gnu/6.1.0/include/c++/bits/hashtable_policy.h:1953:28:
note: in instantiation of function template specialization
'std::allocator_traits<std::allocator<std::pair<const int, std::unique_ptr<ED,
std::default_delete<ED> > > > >::construct<std::pair<const int,
std::unique_ptr<ED, std::default_delete<ED> > >, const std::pair<const int,
std::unique_ptr<ED, std::default_delete<ED> > > &>' requested here
     __value_alloc_traits::construct(__a, __n->_M_valptr(),
                           ^
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../gcc/x86_64-pc-linux-gnu/6.1.0/include/c++/bits/hashtable.h:1118:18:
note: in instantiation of function template specialization
'std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<const
int, std::unique_ptr<ED, std::default_delete<ED> > >, false> >
<span class="quote">>::_M_allocate_node<const std::pair<const int, std::unique_ptr<ED,</span >
std::default_delete<ED> > > &>' requested here
  { return this->_M_allocate_node(__n->_M_v()); });
                 ^
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../gcc/x86_64-pc-linux-gnu/6.1.0/include/c++/bits/unordered_map.h:172:7:
note: in instantiation of member function 'std::_Hashtable<int, std::pair<const
int, std::unique_ptr<ED, std::default_delete<ED> > >,
std::allocator<std::pair<const int, std::unique_ptr<ED, std::default_delete<ED>
<span class="quote">> > >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>,</span >
std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash,
std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false,
false, true> >::_Hashtable' requested here
      unordered_map(const unordered_map&) = default;
      ^
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../gcc/x86_64-pc-linux-gnu/6.1.0/include/c++/bits/stl_pair.h:224:17:
note: explicitly defaulted function was implicitly deleted here
      constexpr pair(const pair&) = default;
                ^
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../gcc/x86_64-pc-linux-gnu/6.1.0/include/c++/bits/stl_pair.h:153:11:
note: copy constructor of 'pair<const int, std::unique_ptr<ED,
std::default_delete<ED> > >' is implicitly deleted because field 'second' has a
deleted copy constructor
      _T2 second;
          ^
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../gcc/x86_64-pc-linux-gnu/6.1.0/include/c++/bits/unique_ptr.h:356:7:
note: 'unique_ptr' has been explicitly marked deleted here
      unique_ptr(const unique_ptr&) = delete;
      ^
1 error generated.

Unfortunately, line 9 of where_is_the_error.cc (the one which tries to invoke
the copy constructor) is never mentioned. Without this information, it's
virtually impossible to correct the program.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>