[llvm-bugs] [Bug 34951] New: invalid argument type 'VMutex' to unary expression on requires_capability

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Oct 14 19:21:11 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=34951

            Bug ID: 34951
           Summary: invalid argument type 'VMutex' to unary expression on
                    requires_capability
           Product: new-bugs
           Version: 4.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: wsnyder at wsnyder.org
                CC: llvm-bugs at lists.llvm.org

Created attachment 19276
  --> https://bugs.llvm.org/attachment.cgi?id=19276&action=edit
c11_thread_safety2.cpp

I am converting code to use thread-safety negative capabilities based on this:

https://clang.llvm.org/docs/ThreadSafetyAnalysis.html

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)

-- 
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/20171015/84f7868a/attachment.html>


More information about the llvm-bugs mailing list