https://bugs.llvm.org/show_bug.cgi?id=32644
Bug ID: 32644
Summary: suppress error about 'override' when the base is
incomplete
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: nlewy...@google.com
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
Testcase:
class ForgotTheInclude;
class C : public ForgotTheInclude {
void f() override {}
};
$ clang++ -std=c++11 b18043312.cc
b18043312.cc:3:18: error: base class has incomplete type
class C : public ForgotTheInclude {
~~~~~~~^~~~~~~~~~~~~~~~
b18043312.cc:1:7: note: forward declaration of 'ForgotTheInclude'
class ForgotTheInclude;
^
b18043312.cc:4:12: error: only virtual member functions can be marked
'override'
void f() override {}
^~~~~~~~~
2 errors generated.
The second error is extraneous because we don't know whether the method is
virtual or not. If you like, as an error recovery you can go ahead and mark it
virtual in what's left of the AST.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs