<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Redundant expressions in LLVM code"
href="https://bugs.llvm.org/show_bug.cgi?id=44768">44768</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Redundant expressions in LLVM code
</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>Windows NT
</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>Transformation Utilities
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>alexey.v.romanov@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>When running my expanded version of misc-redundant-expression on LLVM source,
following potential problems were found (after filtering false positives):
llvm/utils/TableGen/CodeGenDAGPatterns.cpp:483:35: warning: both sides of
operator are equivalent [misc-redundant-expression]
if (any_of(S, isIntegerOrPtr) && any_of(S, isIntegerOrPtr)) {
^
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:3875:34: warning: 'true' and
'false' expressions are equivalent [misc-redundant-expression]
return UseSPE ? PPC::PRED_LE : PPC::PRED_LE;
^
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:3878:34: warning: 'true' and
'false' expressions are equivalent [misc-redundant-expression]
return UseSPE ? PPC::PRED_GT : PPC::PRED_GT;
^
polly/lib/Support/ISLTools.cpp:67:23: warning: both sides of operator are
equivalent [misc-redundant-expression]
for (auto i = Dims1 - Dims1; i < Dims1; i += 1)
^
polly/lib/Support/ISLTools.cpp:69:23: warning: both sides of operator are
equivalent [misc-redundant-expression]
for (auto i = Dims2 - Dims2; i < Dims2; i += 1) {
^
llvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp:175:79: warning: Operator has
equivalent nested operands [misc-redundant-expression]
Config.DiscardMode != DiscardType::None || !Config.SymbolsToAdd.empty()
||
^
(the last one repeats Config.StripNonAlloc and Config.StripSections twice)
These can probably remain, but I am not sure:
clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp:45:17:
warning: expression is redundant [misc-redundant-expression]
if (TokKind == tok::NUM_TOKENS || TokKind != tok::comment)
^
llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp:122:24: warning: expression is
redundant [misc-redundant-expression]
assert(TiedToIndex == -1 ||
^</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>