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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to