[clang] Thread Safety Analysis: Check managed capabilities of returned scoped capability (PR #131831)

2025-03-18 Thread Malek Ben Slimane via cfe-commits
https://github.com/malek203 updated https://github.com/llvm/llvm-project/pull/131831 >From 7157d4c42e534c5c8c06b564055aed1030b9f690 Mon Sep 17 00:00:00 2001 From: Malek Ben Slimane Date: Wed, 25 Sep 2024 15:21:08 +0200 Subject: [PATCH] Thread Safety Analysis: Check managed capabilities of retu

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-12-09 Thread Malek Ben Slimane via cfe-commits
https://github.com/malek203 updated https://github.com/llvm/llvm-project/pull/110523 >From f5b5d4262318c4a2048c145aea923c1108ba65f2 Mon Sep 17 00:00:00 2001 From: Malek Ben Slimane Date: Wed, 11 Sep 2024 22:07:45 +0200 Subject: [PATCH] Thread Safety Analysis: Support passing scoped locks betwee

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-12-04 Thread Malek Ben Slimane via cfe-commits
@@ -336,6 +336,40 @@ Improvements to Clang's diagnostics local variables passed to function calls using the ``[[clang::musttail]]`` attribute. +- The Thread Safety Analysis (#GH110523) now supports passing scoped capabilities into functions: + an attribute on the scoped

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-12-04 Thread Malek Ben Slimane via cfe-commits
https://github.com/malek203 updated https://github.com/llvm/llvm-project/pull/110523 >From 07b0285587df72ada43705641f06cdce4280c483 Mon Sep 17 00:00:00 2001 From: Malek Ben Slimane Date: Wed, 11 Sep 2024 22:07:45 +0200 Subject: [PATCH] Thread Safety Analysis: Support passing scoped locks betwee

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-29 Thread Malek Ben Slimane via cfe-commits
@@ -3984,6 +3984,10 @@ def warn_thread_attribute_decl_not_lockable : Warning< def warn_thread_attribute_decl_not_pointer : Warning< "%0 only applies to pointer types; type here is %1">, InGroup, DefaultIgnore; +def warn_thread_attribute_not_on_scoped_lockable_param : Warnin

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-29 Thread Malek Ben Slimane via cfe-commits
@@ -1915,6 +1936,101 @@ void BuildLockset::handleCall(const Expr *Exp, const NamedDecl *D, } } + std::optional Args; + if (Exp) { +if (const auto *CE = dyn_cast(Exp)) + Args = CE->arguments(); +else if (const auto *CE = dyn_cast(Exp)) + Args = CE->ar

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-29 Thread Malek Ben Slimane via cfe-commits
https://github.com/malek203 updated https://github.com/llvm/llvm-project/pull/110523 >From 70b03bd0532f55f25f51adda0604b10d4b2150e0 Mon Sep 17 00:00:00 2001 From: Malek Ben Slimane Date: Wed, 11 Sep 2024 22:07:45 +0200 Subject: [PATCH] Thread Safety Analysis: Support passing scoped locks betwee

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-10-03 Thread Malek Ben Slimane via cfe-commits
https://github.com/malek203 updated https://github.com/llvm/llvm-project/pull/110523 >From b66684cb44abcf3b0a191303d1dc01e6aa0d8dec Mon Sep 17 00:00:00 2001 From: Malek Ben Slimane Date: Wed, 11 Sep 2024 22:07:45 +0200 Subject: [PATCH] Thread Safety Analysis: Support passing scoped locks betwee

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-09-30 Thread Malek Ben Slimane via cfe-commits
https://github.com/malek203 created https://github.com/llvm/llvm-project/pull/110523 This is helpful when multiple functions operate on the same capabilities, but we still want to use scoped lockable types for readability and exception safety. - Introduce support for thread safety annotations o

[clang] Thread Safety Analysis: Differentiate between lock sets at real join points and expected/actual sets at function end (PR #105526)

2024-08-21 Thread Malek Ben Slimane via cfe-commits
https://github.com/malek203 created https://github.com/llvm/llvm-project/pull/105526 This fixes false positives related to returning a scoped lockable object. At the end of a function, we check managed locks instead of scoped locks. At real join points, we skip checking managed locks because w