[llvm-bugs] [Bug 27037] New: CV qualifier check is unexpectedly skipped on a method pointer call
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Mar 22 20:30:08 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27037
Bug ID: 27037
Summary: CV qualifier check is unexpectedly skipped on a method
pointer call
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: mail+llvm at tzik.jp
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
CV qualifier check is unexpectedly skipped when a method is called through a
method pointer and the receiver is a subclass.
Here is an example:
struct Parent {
void Foo() {}
};
struct Child : Parent {};
int main() {
const Child child;
// Fail. |child| is a const instance and Parent::Foo is not marked as const.
// child.Foo();
// This should also fail.
(child.*&Child::Foo)();
return 0;
}
--
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/20160323/2771571c/attachment.html>
More information about the llvm-bugs
mailing list