[PATCH] D71239: [clang-format] Fix ObjC keywords following try/catch getting split.

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 10 11:05:00 PST 2019


MyDeveloperDay added inline comments.


================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1849
+      } while (FormatTok->is(tok::comment));
+    }
     if (!(FormatTok->isOneOf(tok::kw_catch, Keywords.kw___except,
----------------
can you use `FormatTok->getNextNonComment()`?


================
Comment at: clang/unittests/Format/FormatTestObjC.cpp:200
+               "} @catch (NSException *e) {\n"
+               "}\n");
   verifyFormat("DEBUG({\n"
----------------
Nit: Could you not keep the original test? just add a new testcase? I get uncomfortable about changing tests no matter how trivial


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71239





More information about the cfe-commits mailing list