http://llvm.org/bugs/show_bug.cgi?id=18776
Bug ID: 18776
Summary: AST printer doesn't handle conversion operators
correctly
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
$ cat t.cc
struct A {
operator void*();
A operator &(A);
};
void bar(void *);
void foo() {
A a, b;
bar(a & b);
}
$ clang -cc1 -ast-print t.cc
struct A {
void *operator void *();
A operator&(A);
};
void bar(void *);
void foo() {
A a, b;
bar(a & b.operator void *());
}
===
1. Printing a return type on a conversion operator is invalid.
2. If we really want to print the conversion operator call it should emit "(a &
b).operator void *()" to avoid changing behavior.
--
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