[clang] [Thread Analysis] Fix a bug in context update in alias-analysis (PR #178952)
Ziqing Luo via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 2 11:50:27 PST 2026
ziqingluo-90 wrote:
> > [...]
> > I haven't been able to isolate a minimal reproducer yet that we can use as a test case.
>
> Added a test that fails with this patch: #179049
>
> I think the fix is just this squashed into this patch:
>
> ```
> --- a/clang/lib/Analysis/ThreadSafety.cpp
> +++ b/clang/lib/Analysis/ThreadSafety.cpp
> @@ -2825,6 +2825,7 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
> case CFGElement::Statement: {
> CFGStmt CS = BI.castAs<CFGStmt>();
> LocksetBuilder.Visit(CS.getStmt());
> + LocksetBuilder.updateLocalVarMapCtx(nullptr);
> break;
> }
> // Ignore BaseDtor and MemberDtor for now.
> ```
>
> Please double check though...
Thank you for providing a small enough test. I will look into it.
https://github.com/llvm/llvm-project/pull/178952
More information about the cfe-commits
mailing list