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

Nice.. Removed a lot of complexity :). Let's see whether this heuristic is good 
enough.



================
Comment at: lib/Format/TokenAnnotator.cpp:210
 
-    bool MightBeFunctionType = !Contexts[Contexts.size() - 2].IsExpression;
-    bool ProbablyFunctionType = CurrentToken->isOneOf(tok::star, tok::amp);
+    bool MightBeFunctionOrObjCBlockType =
+        !Contexts[Contexts.size() - 2].IsExpression;
----------------
I'd suggest to put a comment here saying that this is for both ObjC blocks and 
Function types, because they look very similar in nature (maybe giving 
examples) and then not actually rename the variables. To me, the long names 
make the code harder to read.

But if you feel strongly the other way, I'd be ok with it.


Repository:
  rC Clang

https://reviews.llvm.org/D43906



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

Reply via email to