[all-commits] [llvm/llvm-project] 44ae49: Thread safety analysis: Handle compound assignment...
Aaron Puchert via All-commits
all-commits at lists.llvm.org
Mon May 9 06:36:01 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 44ae49e1a72576ca6aa8835b3f72df9605516403
https://github.com/llvm/llvm-project/commit/44ae49e1a72576ca6aa8835b3f72df9605516403
Author: Aaron Puchert <aaron.puchert at sap.com>
Date: 2022-05-09 (Mon, 09 May 2022)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Analysis/ThreadSafety.cpp
M clang/test/SemaCXX/warn-thread-safety-analysis.cpp
Log Message:
-----------
Thread safety analysis: Handle compound assignment and ->* overloads
Like regular assignment, compound assignment operators can be assumed to
write to their left-hand side operand. So we strengthen the requirements
there. (Previously only the default read access had been required.)
Just like operator->, operator->* can also be assumed to dereference the
left-hand side argument, so we require read access to the pointee. This
will generate new warnings if the left-hand side has a pt_guarded_by
attribute. This overload is rarely used, but it was trivial to add, so
why not. (Supporting the builtin operator requires changes to the TIL.)
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D124966
More information about the All-commits
mailing list