https://llvm.org/bugs/show_bug.cgi?id=23341
Bug ID: 23341
Summary: bad diagnostic on "override" in out-of-line definition
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
Testcase:
class Y {
virtual void foo();
};
class X : public Y {
void foo() override;
};
void X::foo() override { }
$ clang b15592394.cc -std=c++11
b15592394.cc:8:15: error: expected function body after function declarator
void X::foo() override { }
^
1 error generated.
I wanted something like what we do for static. Something like this:
b15592394.cc:8:1: error: 'static' can only be specified inside the class
definition
static void X::foo() { }
^~~~~~~
If you're looking at this, please also note related bug 22075 which may be
fixable at the same time.
--
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