[PATCH] D73270: [clang-tidy] Fix false positive in bugprone-infinite-loop

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 24 08:05:00 PST 2020


njames93 added a comment.

May not be one for this patch, but how does this check handle volatile loop variables and cases where modification isn't visible in the context e.g.

  extern void mutate(bool &);
  volatile bool* LoopCond;
  
  void foo() {
    for (bool Cond = true; Cond; mutate(Cond)) { wait(0); }
    for (*LoopCond = true; *LoopCond;) { wait(0); }
  }


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

https://reviews.llvm.org/D73270





More information about the cfe-commits mailing list