[PATCH] clang-format: Add support for SEH __try / __except / __finally blocks.

Nico Weber thakis at chromium.org
Tue Feb 3 11:53:10 PST 2015


The only reason I'm sending this out for pre-commit review is the `MicrosoftExt` bit. I think it should be ok to set this, though.


================
Comment at: lib/Format/UnwrappedLineFormatter.cpp:218
@@ -215,1 +217,3 @@
+      if (Line.First->isOneOf(tok::kw_try, tok::kw___try, tok::kw_catch,
+                              Keywords.kw___except, tok::kw___finally))
         return 0;
----------------
Note: The if down here doesn't have any effect, neither for SEH try statements nor for regular try statements, according to the test suite. I added kw___try here because kw_try was here, but maybe this block used to do try formatting and now no longer does.

(All other changes are covered by the tests added in this change.)

http://reviews.llvm.org/D7386

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list