[LLVMbugs] [Bug 21942] New: "final" and "override" specifiers are not recognized for some methods of class templates
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Dec 17 12:02:54 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=21942
Bug ID: 21942
Summary: "final" and "override" specifiers are not recognized
for some methods of class templates
Product: new-bugs
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: dmichael at chromium.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
"final" and "override" specifiers are not recognized for some methods of class
templates. It seems primarily to affect methods that are declared in the class
definition, but specialized outside the class definition.
I found this first when working on a fix to Chromium's style checker plugin,
but it appears that the problem also affects clang-modernize and the compiler
itself. See:
http://llvm.org/bugs/show_bug.cgi?id=18440
for the clang-tools-extra bug.
Here's a small reproducer:
=============================================
template<int> struct A
{
virtual void foo() final;
};
template<> void A<0>::foo() {}
struct B : A<0>
{
virtual void foo() override {};
};
=============================================
Note that B::foo() overrides a final method, but I get no diagnostic. If
A::foo() is defined in the body of A without specialization, the diagnostic
appears.
--
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/20141217/c1a063e3/attachment.html>
More information about the llvm-bugs
mailing list