[PATCH] D44816: [clang-format] Do not insert space before closing brace in ObjC dict literal

Ben Hamilton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 27 07:51:41 PDT 2018


benhamilton added inline comments.


================
Comment at: lib/Format/TokenAnnotator.cpp:2484
+  if (Right.is(tok::r_brace) && Right.MatchingParen &&
+      Right.MatchingParen->is(TT_DictLiteral) &&
+      Right.MatchingParen->Previous &&
----------------
djasper wrote:
> Could you use Right.MatchingParen->endsSequence(TT_DictLiteral, tok::at) here?
Yes, done. I keep forgetting about the reverse order of that method (it makes sense, I just can't keep that info in my brain for some reason.)


Repository:
  rC Clang

https://reviews.llvm.org/D44816





More information about the cfe-commits mailing list