djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.

Looks good.



================
Comment at: lib/Format/TokenAnnotator.cpp:2357
+      return false;
+    else
+      // Protocol list -> space if configured. @interface Foo : Bar <Baz>
----------------
Don't use else after return.
https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return

I'd have a slight preference for writing:

  bool IsLightweightGeneric = 
      Right.MatchingParen && Right.MatchingParen->Next &&
      Right.MatchingParen->Next->is(tok::colon);
  return !IsLightweightGeneric && Style.ObjCSpaceBeforeProtocolList;

Then I think it might not even need a comment (or a shorter one).


Repository:
  rC Clang

https://reviews.llvm.org/D45498



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

Reply via email to