<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 --- - Using ErrorOr produces warnings when compiling with clang."
href="http://llvm.org/bugs/show_bug.cgi?id=21019">21019</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Using ErrorOr produces warnings when compiling with clang.
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</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>Support Libraries
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>james410@cowgill.org.uk
</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>(This bug affects version 3.5, but it wasn't on the version list)
I get warnings related to llvm headers when compiling the following code with
clang and with extra warnings turned on.
---
#include <llvm/Support/ErrorOr.h>
int main(void)
{
llvm::ErrorOr<int> blob = 42;
return blob.get();
}
---
$ clang++ -Wall -Wextra $(llvm-config --cxxflags) test.cpp
In file included from test.cpp:1:
/usr/lib/llvm-3.5/include/llvm/Support/ErrorOr.h:198:47: warning: unused
parameter 'a' [-Wunused-parameter]
static bool compareThisIfSameType(const T1 &a, const T2 &b) {
^
/usr/lib/llvm-3.5/include/llvm/Support/ErrorOr.h:198:60: warning: unused
parameter 'b' [-Wunused-parameter]
static bool compareThisIfSameType(const T1 &a, const T2 &b) {
^
2 warnings generated.
---
Looking at ErrorOr.h, the values a and b are infact not used, so I'm guessing
this is a bug in ErrorOr.h</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>