<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 - c++2a mode failures compiling LLVM Verifier.h - == overloads !=?"
   href="https://bugs.llvm.org/show_bug.cgi?id=45907">45907</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>c++2a mode failures compiling LLVM Verifier.h - == overloads !=?
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>10.0
          </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>release blocker
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>C++2a
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>llvm-bugs@bleg.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Raised as release blocker because this appears to be a regression.
It seems that operator== and operator!= are judged to be ambiguous overloads in
c++2a mode only (new in clang 10).
/usr/include/llvm/ADT/DenseMap.h:1222:8: note: candidate function
  bool operator!=(const ConstIterator &RHS) const {
       ^
/usr/include/llvm/ADT/DenseMap.h:1215:8: note: candidate function
  bool operator==(const ConstIterator &RHS) const {


$ uname -a
Linux flaky 5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020 x86_64
x86_64 x86_64 GNU/Linux

$ clang++-10 -v
clang version 10.0.0-4ubuntu1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Candidate multilib: .;@m64
Selected multilib: .;@m64


$ cat verifier.cpp 
#include <llvm/IR/Verifier.h>

int main() {
        return 0;
}

$ clang++-10 -c verifier.cpp
<no errors>

$ clang++-9 -c -std=c++2a verifier.cpp
<no errors>

$ clang++-10 -c -std=c++2a verifier.cpp
In file included from verifier.cpp:1:
In file included from /usr/include/llvm/IR/Verifier.h:24:
/usr/include/llvm/IR/PassManager.h:694:17: error: use of overloaded operator
'!=' is ambiguous (with operand types 'llvm::DenseMapIterator<llvm::AnalysisKey
*, bool, llvm::DenseMapInfo<llvm::AnalysisKey *>,
llvm::detail::DenseMapPair<llvm::AnalysisKey *, bool>, false>' and
'llvm::DenseMapBase<llvm::SmallDenseMap<llvm::AnalysisKey *, bool, 8,
llvm::DenseMapInfo<llvm::AnalysisKey *>,
llvm::detail::DenseMapPair<llvm::AnalysisKey *, bool> >, llvm::AnalysisKey *,
bool, llvm::DenseMapInfo<llvm::AnalysisKey *>,
llvm::detail::DenseMapPair<llvm::AnalysisKey *, bool> >::iterator' (aka
'DenseMapIterator<llvm::AnalysisKey *, bool,
llvm::DenseMapInfo<llvm::AnalysisKey *>,
llvm::detail::DenseMapPair<llvm::AnalysisKey *, bool> >'))
      if (IMapI != IsResultInvalidated.end())
          ~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/llvm/ADT/DenseMap.h:1222:8: note: candidate function
  bool operator!=(const ConstIterator &RHS) const {
       ^
/usr/include/llvm/ADT/DenseMap.h:1215:8: note: candidate function
  bool operator==(const ConstIterator &RHS) const {
       ^
/usr/include/llvm/ADT/DenseMap.h:1215:8: note: candidate function (with
reversed parameter order)
...</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>