[all-commits] [llvm/llvm-project] 79ebca: [analyzer] Prevent inlining RAII ctors/dtors (#208...
Balázs Benics via All-commits
all-commits at lists.llvm.org
Sat Jul 11 05:38:14 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 79ebcadfd492bb22c2c96e651146bd10b6bd8ae9
https://github.com/llvm/llvm-project/commit/79ebcadfd492bb22c2c96e651146bd10b6bd8ae9
Author: Balázs Benics <benicsbalazs at gmail.com>
Date: 2026-07-11 (Sat, 11 Jul 2026)
Changed paths:
M clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp
A clang/test/Analysis/block-in-critical-section-raii.cpp
Log Message:
-----------
[analyzer] Prevent inlining RAII ctors/dtors (#208729)
BlockInCriticalSectionChecker registers the pre-call for the RAII ctors
and Dtors - and also the raw 'lock' and 'unlock' handlers.
However, pre-call does not prevent inlining. This means that (in the
likely case of) that the body is present, the analyzer will model the
effect of the lock twice. This happens on libc++ unique_lock.
We really should have eval-called the ctor/dtor to avoid the inlining of
those, but here we are.
rdar://175814310
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list