<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 --- - [RFE] Diagnostic for when .cpp file does not implement all methods"
href="http://llvm.org/bugs/show_bug.cgi?id=21116">21116</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[RFE] Diagnostic for when .cpp file does not implement all methods
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>daniel@zuster.org
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>It is a common convention for all out of line methods of a C++ class to be
implemented in a single C++ file.
It would be nice if clang had a warning to enforce this, instead of only having
this mistake be detected at link time (or never, if no one calls the method).
Essentially I want the diagnostic on any unimplemented out-of-line methods when
clang sees that I implemented at least one out-of-line method of a class in the
main file.
--
$ cat t.cpp
class A {
void a();
void b(); // expected-warning{{unimplemented method}}
};
void A::a() {}
$ clang -cc1 -verify t.cpp
error: 'warning' diagnostics expected but not seen:
File t.cpp Line 3: unimplemented method
1 error 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>