<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Diagnostics for non-SFINAE errors triggered by deduction guides should include a line number"
   href="https://bugs.llvm.org/show_bug.cgi?id=40849">40849</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Diagnostics for non-SFINAE errors triggered by deduction guides should include a line number
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>arthur.j.odwyer@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is an example of the diagnostics that Clang produces when it encounters a
slightly buggy deduction guide. The error is quite verbose, but it critically
omits to mention WHICH "function template '<deduction guide for
unordered_set>'" it was considering when the error hit. (There are at least 8
possibilities in my code. Maybe more: I don't know if Clang might be counting
the implicitly generated candidates as "deduction guides".)
I would love it if Clang reported the source line number of the offending
'<deduction guide for unordered_set>'. I wouldn't even ask for the line to be
printed out; just having the number would be really helpful for tracking down
this bug of mine.

```
In file included from llvm/projects/libcxx/include/unordered_set:362:
In file included from llvm/projects/libcxx/include/__hash_table:15:
llvm/projects/libcxx/include/memory:1522:38: error: no type named 'value_type'
in 'std::__1::hash<short>'
    typedef typename allocator_type::value_type value_type;
            ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
llvm/projects/libcxx/include/__hash_table:893:51: note: in instantiation of
template class 'std::__1::allocator_traits<std::__1::hash<short> >' requested
here
      __make_hash_node_types<value_type, typename
__alloc_traits::void_pointer>::type
                                                  ^
llvm/projects/libcxx/include/__hash_table:1410:12: note: in instantiation of
template class 'std::__1::__hash_table<int, std::__1::hash<int>,
std::__1::equal_to<int>, std::__1::hash<short> >' requested here
    bool = __hash_table<_Tp, _Hash, _Equal,
_Alloc>::__allow_trivial_relocation::value>
           ^
llvm/projects/libcxx/include/unordered_set:400:13: note: in instantiation of
default argument for '__hash_table_relocate_base<int, std::__1::hash<int>,
std::__1::equal_to<int>, std::__1::hash<short> >' required here
    typedef __hash_table_relocate_base<value_type, hasher, key_equal,
allocator_type> __table;
           
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvm/projects/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/deduct.pass.cpp:143:24:
note: while substituting deduced template arguments into function template
'<deduction guide for unordered_set>' [with _Value = int, _Hash = (no value),
_Pred = (no value), _Alloc = std::__1::hash<short>]
    std::unordered_set s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<short>());
                       ^
```</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>