<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 - Linux::getSupportedSanitizers logic bug"
href="https://bugs.llvm.org/show_bug.cgi?id=33003">33003</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Linux::getSupportedSanitizers logic bug
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>steven@uplinklabs.net
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Noticed due to new warnings in GCC 7.1.1:
[3005/4646] Building CXX object
tools/clang/lib/Driver/CMakeFiles/clangDriver.dir/ToolChains/Linux.cpp.o
../tools/clang/lib/Driver/ToolChains/Linux.cpp: In member function ‘virtual
clang::SanitizerMask clang::driver::toolchains::Linux::getSupportedSanitizers()
const’:
../tools/clang/lib/Driver/ToolChains/Linux.cpp:868:40: warning: enum constant
in boolean context [-Wint-in-bool-context]
llvm::Triple::thumb || llvm::Triple::armeb ||
^~~~~
../tools/clang/lib/Driver/ToolChains/Linux.cpp:868:63: warning: enum constant
in boolean context [-Wint-in-bool-context]
llvm::Triple::thumb || llvm::Triple::armeb ||
^~~~~
../tools/clang/lib/Driver/ToolChains/Linux.cpp:869:40: warning: enum constant
in boolean context [-Wint-in-bool-context]
llvm::Triple::thumbeb;
^~~~~~~
This should fix it:
diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
index 50443a1252..6708505d75 100644
--- a/lib/Driver/ToolChains/Linux.cpp
+++ b/lib/Driver/ToolChains/Linux.cpp
@@ -865,8 +865,9 @@ SanitizerMask Linux::getSupportedSanitizers() const {
const bool IsAArch64 = getTriple().getArch() == llvm::Triple::aarch64 ||
getTriple().getArch() == llvm::Triple::aarch64_be;
const bool IsArmArch = getTriple().getArch() == llvm::Triple::arm ||
- llvm::Triple::thumb || llvm::Triple::armeb ||
- llvm::Triple::thumbeb;
+ getTriple().getArch() == llvm::Triple::thumb ||
+ getTriple().getArch() == llvm::Triple::armeb ||
+ getTriple().getArch() == llvm::Triple::thumbeb;
SanitizerMask Res = ToolChain::getSupportedSanitizers();
Res |= SanitizerKind::Address;
Res |= SanitizerKind::Fuzzer;</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>