[LLVMbugs] [Bug 21019] New: Using ErrorOr produces warnings when compiling with clang.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Sep 21 12:12:46 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=21019
Bug ID: 21019
Summary: Using ErrorOr produces warnings when compiling with
clang.
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Support Libraries
Assignee: unassignedbugs at nondot.org
Reporter: james410 at cowgill.org.uk
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
(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
--
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/20140921/c5736f01/attachment.html>
More information about the llvm-bugs
mailing list