http://llvm.org/bugs/show_bug.cgi?id=6757
Summary: ternary operator: incompatible operand types ('Foo
const' and 'Foo')
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Created an attachment (id=4621)
--> (http://llvm.org/bugs/attachment.cgi?id=4621)
test case as found in bug
This came up in WebCore.
Simplified test case follows, will also attach.
I believe this may have worked in the past, which would make this a regression.
But it's also possible the code in WebCore changed since the last time I
compiled this area.
build with
clang++ -c test.cc
test.cc:12:16: error: incompatible operand types ('Foo const' and 'Foo')
Foo x = true ? Bar() : Foo();
^ ~~~~~ ~~~~~
struct Foo {
};
struct Bar {
operator const Foo&() const;
};
void f() {
Foo x = true ? Bar() : Foo();
}
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs