[PATCH] D36914: Implement CFG construction for __try / __except / __leave.

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 21 09:41:30 PDT 2017


rnk added a comment.

> Don't add any EH edges to the CFG for SEH. In practice, BuildOpts.AddEHEdges is always false in practice from what I can tell, and with SEH every single stmt would have to get an EH edge.

Since we can't mix C++ EH and SEH, do you think it would be better to reuse the TryTerminatedBlock chain so that we get edges from every call to the __except? That's the approximation of SEH that we actually support in LLVM anyway.



================
Comment at: lib/Analysis/CFG.cpp:2570
+  // All __leaves should go to the code following the __try
+  // (FIXME: or if the __try // has a __finally, to the __finally.)
+  SaveAndRestore<JumpTarget> save_break(SEHLeaveJumpTarget);
----------------
Looks like a `//` got re-wrapped in the comment


================
Comment at: test/Sema/warn-unreachable-ms.c:23
+  } __except(1) {  // Filter expression should not be marked as unreachable.
+    // Emtpy __except body.
+  }
----------------
typo empty


https://reviews.llvm.org/D36914





More information about the cfe-commits mailing list