<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 - invalid argument type 'VMutex' to unary expression on requires_capability"
href="https://bugs.llvm.org/show_bug.cgi?id=34951">34951</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>invalid argument type 'VMutex' to unary expression on requires_capability
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>4.0
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>wsnyder@wsnyder.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=19276" name="attach_19276" title="c11_thread_safety2.cpp">attachment 19276</a> <a href="attachment.cgi?id=19276&action=edit" title="c11_thread_safety2.cpp">[details]</a></span>
c11_thread_safety2.cpp
I am converting code to use thread-safety negative capabilities based on this:
<a href="https://clang.llvm.org/docs/ThreadSafetyAnalysis.html">https://clang.llvm.org/docs/ThreadSafetyAnalysis.html</a>
Perhaps I am doing something wrong, but I can't find any appropriate hints on
the web as to what this could be.
This code (full example attached)
void clear() __attribute__ ((requires_capability(!m_mutex))) {
gives
c11_thread_safety2.cpp:62:54: error: invalid argument type 'VMutex' to unary
expression
void clear() __attribute__ ((requires_capability(!m_mutex))) {
^~~~~~~~
on Ubuntu 16.04 LTS,
clang version 3.8.0-2ubuntu3 (tags/RELEASE_380/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
Likewise:
clang version 4.0.1-6 (tags/RELEASE_401/final)</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>