djasper accepted this revision. djasper added a comment. Just some nits. Thanks for working on this!
================ Comment at: lib/Format/WhitespaceManager.cpp:158 +static bool IsPointerOrReference(tok::TokenKind Kind) { + return Kind == tok::star || Kind == tok::amp || Kind == tok::ampamp; ---------------- This should be isPointerOrReference according to the coding guidelines. ================ Comment at: lib/Format/WhitespaceManager.cpp:197 + for (int previous = i - 1; + previous >= 0 && IsPointerOrReference(Changes[previous].Kind); + previous--) { ---------------- This really makes me wonder if it wouldn't be much better to just attach the FormatTokens to the changes so we don't have to reimplement more and more of that. But that's probably for a follow up change. https://reviews.llvm.org/D27651 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits