[PATCH] D157385: [clang][CFG] Cleanup functions

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 1 05:07:24 PDT 2023


tbaeder added a comment.

Not sure I have enough CFG knowledge. Do I just need to create another noreturn block for the cleanup function?

This is the CFG I get when both the cleanup function and the destructor are noreturn:

  int main()
   [B4 (ENTRY)]
     Succs (1): B3
  
   [B1]
     1: CFGScopeEnd(f)
     Succs (1): B0
  
   [B2 (NORETURN)]
     1: [B3.3].~F() (Implicit destructor)
     Succs (1): B0
  
   [B3 (NORETURN)]
     1: CFGScopeBegin(f)
     2:  (CXXConstructExpr, [B3.3], F)
     3: F f __attribute__((cleanup(f_)));
     4: CleanupFunction (f_)
     Preds (1): B4
     Succs (1): B0
  
   [B0 (EXIT)]
     Preds (3): B1 B2 B3


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

https://reviews.llvm.org/D157385



More information about the cfe-commits mailing list