[llvm-bugs] [Bug 31647] Clang-cl: conversion from 'long' to 'const QVariant' is ambiguous
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jan 15 10:40:42 PST 2017
https://llvm.org/bugs/show_bug.cgi?id=31647
David Majnemer <david.majnemer at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |david.majnemer at gmail.com
Resolution|--- |INVALID
--- Comment #2 from David Majnemer <david.majnemer at gmail.com> ---
I can't reproduce with:
clang version 5.0.0 (trunk 291737) (llvm/trunk 292034)
$ cat t.cpp
namespace {
struct A {
A(int) {}
A(unsigned int) {}
A(long long) {}
A(unsigned long long) {}
A(bool) {}
A(float) {}
A(double) {}
};
long getLong() { return 42; }
void f(const A &) {}
}
int main(int, char **)
{
long l = 42;
f(l);
return 0;
}
$ ~/llvm/Release+Asserts/bin/clang-cl t.cpp
t.cpp(18,7) : error: conversion from 'long' to 'const (anonymous
namespace)::A' is ambiguous
f(l);
AFAICT, your code is not supposed to compile. The fact that MSVC does is most
likely indicative of a bug in that product.
--
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/20170115/af385fea/attachment.html>
More information about the llvm-bugs
mailing list