[llvm-bugs] [Bug 38399] New: No thread safety warning when forgetting lock name

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 31 20:16:41 PDT 2018


            Bug ID: 38399
           Summary: No thread safety warning when forgetting lock name
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rtrieu at google.com
                CC: llvm-bugs at lists.llvm.org

Test case:
#include "mutex.h"

struct S {
  void f1() ACQUIRE();
  void f2() RELEASE();

  Mutex mu;

The thread safety macros are missing "mu" as an argument, meaning they will
instead make "S" into a mutex as well.  There should be a warning that the
struct should have capability attribute before it can use these macros or
suggest that the mutex name is missing.

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/20180801/ba0f8c83/attachment.html>

More information about the llvm-bugs mailing list