[PATCH] D155547: [analyzer] Model lifetime of a variable declared in for condition in CFG correctly

Tomasz KamiƄski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 17 23:47:17 PDT 2023


tomasz-kaminski-sonarsource added inline comments.


================
Comment at: clang/test/Analysis/lifetime-cfg-output.cpp:609
 // CHECK-NEXT:    1: [B9.2] (Lifetime ends)
 // CHECK-NEXT:    T: continue;
 // CHECK-NEXT:    Preds (1): B7
----------------
Note that the lifetime ends for `[B10.4]`/`c` was missing here for the `continue` case, as we jumped to increment block. Same happens for the automatic object destructor that was not called in this case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155547/new/

https://reviews.llvm.org/D155547



More information about the cfe-commits mailing list