[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

Florian Hahn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 10 07:19:39 PST 2021


fhahn created this revision.
fhahn added reviewers: jdoerfert, rjmccall, xbolva00, atmnpatel, aaron.ballman, rsmith.
fhahn requested review of this revision.
Herald added a project: clang.

Currently Clang does not add mustprogress to inifinite loops with a
known constant condition, matching C11 behavior. The forward progress
guarantee in C++11 and later should allow us to add mustprogress to any
loop (http://eel.is/c++draft/intro.progress#1).

This allows us to simplify the code dealing with adding mustprogress a
bit.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96418

Files:
  clang/lib/CodeGen/CGStmt.cpp
  clang/lib/CodeGen/CodeGenFunction.cpp
  clang/lib/CodeGen/CodeGenFunction.h
  clang/test/CodeGen/attr-mustprogress.c
  clang/test/CodeGenCXX/attr-mustprogress.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96418.322677.patch
Type: text/x-patch
Size: 16572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210210/4286cbba/attachment.bin>


More information about the cfe-commits mailing list