[all-commits] [llvm/llvm-project] 3d6467: Thread safety analysis: Factor out function for me...

Aaron Puchert via All-commits all-commits at lists.llvm.org
Thu May 27 08:46:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d64677c28072867ea6025a22805977386b767f8
      https://github.com/llvm/llvm-project/commit/3d64677c28072867ea6025a22805977386b767f8
  Author: Aaron Puchert <aaron.puchert at sap.com>
  Date:   2021-05-27 (Thu, 27 May 2021)

  Changed paths:
    M clang/lib/Analysis/ThreadSafety.cpp

  Log Message:
  -----------
  Thread safety analysis: Factor out function for merging locks (NFC)

It's going to become a bit more complicated, so let's have it separate.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D102025


  Commit: cf0b337c1b1f064c81fe40124ddba178572778d6
      https://github.com/llvm/llvm-project/commit/cf0b337c1b1f064c81fe40124ddba178572778d6
  Author: Aaron Puchert <aaron.puchert at sap.com>
  Date:   2021-05-27 (Thu, 27 May 2021)

  Changed paths:
    M clang/lib/Analysis/ThreadSafety.cpp
    M clang/test/SemaCXX/warn-thread-safety-analysis.cpp

  Log Message:
  -----------
  Thread safety analysis: Allow exlusive/shared joins for managed and asserted capabilities

Similar to how we allow managed and asserted locks to be held and not
held in joining branches, we also allow them to be held shared and
exclusive. The scoped lock should restore the original state at the end
of the scope in any event, and asserted locks need not be released.

We should probably only allow asserted locks to be subsumed by managed,
not by (directly) acquired locks, but that's for another change.

Reviewed By: delesley

Differential Revision: https://reviews.llvm.org/D102026


Compare: https://github.com/llvm/llvm-project/compare/192b4141f0d7...cf0b337c1b1f


More information about the All-commits mailing list