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: [email protected]
Reporter: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs