================ @@ -1012,6 +1030,107 @@ void SExprBuilder::exitCFG(const CFGBlock *Last) { IncompleteArgs.clear(); } +bool SExprBuilder::isVariableReassigned(const VarDecl *VD) { + // Note: The search is performed lazily per-variable and result is cached. An + // alternative would have been to eagerly create a set of all reassigned + // variables, but that would consume significantly more memory. The number of ---------------- melver wrote:
This test still fails: ``` --- a/clang/test/SemaCXX/warn-thread-safety-analysis.cpp +++ b/clang/test/SemaCXX/warn-thread-safety-analysis.cpp @@ -7361,6 +7361,17 @@ void testIndirectAccess(ContainerOfPtr *fc) { ptr->mu.Unlock(); } +void testControlFlowDoWhile0(Foo *f, int x) { + Foo *ptr = f; + + f->mu.Lock(); + if (x) { + do { } while (0); + } + ptr->data = 42; + ptr->mu.Unlock(); +} + ``` Hmm... https://github.com/llvm/llvm-project/pull/142955 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits