<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 --- - Warnings for Unused Parameters in llvm header files (when function is = delete)"
href="http://llvm.org/bugs/show_bug.cgi?id=19303">19303</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Warnings for Unused Parameters in llvm header files (when function is = delete)
</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++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>matsp.llvm@gmail.com
</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>Created <span class=""><a href="attachment.cgi?id=12317" name="attach_12317" title="Much simplified source file to show problem.">attachment 12317</a> <a href="attachment.cgi?id=12317&action=edit" title="Much simplified source file to show problem.">[details]</a></span>
Much simplified source file to show problem.
When compiling my toy pascal compiler, including the header files from llvm
(d73449481daee33615d907608a3a08548ce2ba65), I get warnings like this:
/usr/local/llvm-debug/include/llvm/Support/MathExtras.h:223:15: error: unused
parameter 'Val'
[-Werror,-Wunused-parameter]
findLastSet(T Val, ZeroBehavior ZB = ZB_Max) LLVM_DELETED_FUNCTION;
^
/usr/local/llvm-debug/include/llvm/Support/MathExtras.h:223:33: error: unused
parameter 'ZB'
[-Werror,-Wunused-parameter]
findLastSet(T Val, ZeroBehavior ZB = ZB_Max) LLVM_DELETED_FUNCTION;
preprocessed output of the source shows that "LLVM_DELETED_FUNCTION" translates
to = delete:
template <typename T>
typename std::enable_if<std::numeric_limits<T>::is_integer &&
std::numeric_limits<T>::is_signed, T>::type
findLastSet(T Val, ZeroBehavior ZB = ZB_Max) = delete;
My compile command looks like this:
clang++ -g -Wall -Werror -Wextra -Wno-unused-private-field -std=c++11
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I
`/usr/local/llvm-debug/bin/llvm-config --includedir` -c -o lexer.o lexer.cpp
where lexer.cpp has been simplified to the file attached (one line of
#include...)
(There are multiple errors like this one - I fixed them temporarily by
commenting out the offending variable name, leaving the type declaration in
place, which fixes the warning).
I'm not convinced whether this is a bug in LLVM or clang++, but I feel that I
should report it somewhere, and expect it can be "moved" to the appropriate
place if necessary.</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>