benhamilton added inline comments.
================ Comment at: lib/Format/TokenAnnotator.cpp:419 StartsObjCMethodExpr = true; + Left->ParameterCount = 0; Contexts.back().ColonIsObjCMethodExpr = true; ---------------- jolesiak wrote: > benhamilton wrote: > > What does this line do? Seems like it's initialized to 0 already, right? > It is indeed initialized to 0. > However, before 'Left' bracket is recognized as TT_ObjCMethodExpr it has a > different type assigned. Hence it gets updated here: > https://github.com/llvm-mirror/clang/blob/release_60/lib/Format/TokenAnnotator.cpp#L495 > This assignment is due to fact that for other languages number of parameters > is calculated as (1 + number_of_commas). I see. Could you add a comment explaining that? Repository: rC Clang https://reviews.llvm.org/D42493 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits