[LLVMbugs] [Bug 8875] New: Rejects qualified call to destructor in templated code
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Dec 30 12:48:10 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=8875
Summary: Rejects qualified call to destructor in templated code
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: rafael.espindola at gmail.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
In this code:
class bar {
};
void foobar() {
bar zed;
zed.bar::~bar();
}
template <class T> class foo2 {
};
typedef foo2<int> bar2;
void foobar2() {
bar2 zed2;
zed2.~bar2();
}
template <class T> class foo3 {
};
typedef foo3<int> bar3;
void foobar3() {
bar3 zed3;
zed3.bar3::~bar3();
}
clang will reject only the third call with the error message:
jspropertytree.ii:21:15: error: expected the class name after '~' to name a
destructor
zed3.bar3::~bar3();
^
It looks strange for that to really be the only invalid case. If clang is
correct, a better error message would be welcome :-)
--
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.
More information about the llvm-bugs
mailing list