<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 --- - Incorrect -Woverloaded-virtual when parent overload is private."
href="http://llvm.org/bugs/show_bug.cgi?id=17218">17218</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Incorrect -Woverloaded-virtual when parent overload is private.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.2
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>kalaxy@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Using the following compiler:
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
To compile the following code:
template <typename Type>
class A {
virtual void func(Type) {}
};
class B : A<int>, A<double> {
virtual void func(int);
};
Using the following command line:
clang -Wall -c test.cpp
Generates the following warning:
clang_hides_overload.cpp:7:15: warning: 'B::func' hides overloaded virtual
function [-Woverloaded-virtual]
virtual void func(int);
^
clang_hides_overload.cpp:3:15: note: hidden overloaded virtual function
'A<double>::func' declared here
virtual void func(Type) {}
^
1 warning generated.
I believe this is not true since the base method 'A<double>::func' is private
and thus was never available to B anyway.</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>