[llvm-bugs] [Bug 45907] New: c++2a mode failures compiling LLVM Verifier.h - == overloads !=?
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed May 13 09:10:22 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45907
Bug ID: 45907
Summary: c++2a mode failures compiling LLVM Verifier.h - ==
overloads !=?
Product: clang
Version: 10.0
Hardware: PC
OS: Linux
Status: NEW
Severity: release blocker
Priority: P
Component: C++2a
Assignee: unassignedclangbugs at nondot.org
Reporter: llvm-bugs at bleg.org
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
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)
...
--
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/20200513/a1db70e0/attachment.html>
More information about the llvm-bugs
mailing list