<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - -Winconsistent-missing-override fires on class templates with dependent bases"
href="http://llvm.org/bugs/show_bug.cgi?id=22582">22582</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>-Winconsistent-missing-override fires on class templates with dependent bases
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dblaikie@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, fjahanian@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>We probably shouldn't warn for the code below (since some bases might not have
a virtual func() function, so override might not be suitable there).
$ cat over.cpp
struct base {
virtual ~base();
virtual void func();
};
template<typename T>
struct derived: T {
void func();
~derived() override;
};
derived<base> d;
$ clang++-tot -Winconsistent-missing-override -fsyntax-only over.cpp -std=c++11
over.cpp:8:8: warning: 'func' overrides a member function but is not marked
'override' [-Winconsistent-missing-override]
void func();
^
over.cpp:12:15: note: in instantiation of template class 'derived<base>'
requested here
derived<base> d;
^
over.cpp:3:16: note: overridden virtual function is here
virtual void func();
^
1 warning generated.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>