[LLVMbugs] [Bug 19303] New: Warnings for Unused Parameters in llvm header files (when function is = delete)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Apr 1 14:59:51 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19303
Bug ID: 19303
Summary: Warnings for Unused Parameters in llvm header files
(when function is = delete)
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: matsp.llvm at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 12317
--> http://llvm.org/bugs/attachment.cgi?id=12317&action=edit
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140401/7bd58b5a/attachment.html>
More information about the llvm-bugs
mailing list