Re: [PATCH] D19058: clang-format: Pointer `*` is seen as multiplication in C-style casts

2016-04-14 Thread Maxime Beaulieu via cfe-commits
mxbOctasic updated this revision to Diff 53755. mxbOctasic added a comment. Moved cast detection logic to `rParenEndsCast`. http://reviews.llvm.org/D19058 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp ===

Re: [PATCH] D19058: clang-format: Pointer `*` is seen as multiplication in C-style casts

2016-04-13 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:1272 @@ +1271,3 @@ +// Casts are never binary operators, regardless of IsExpression +if (NextToken->isOneOf(tok::r_paren, tok::greater)) + return TT_PointerOrReference; I think i

[PATCH] D19058: clang-format: Pointer `*` is seen as multiplication in C-style casts

2016-04-13 Thread Maxime Beaulieu via cfe-commits
mxbOctasic created this revision. mxbOctasic added a reviewer: djasper. mxbOctasic added subscribers: cameron314, cfe-commits. Herald added a subscriber: klimek. The `*` was treated as multiplication operator in complex pointer type casts. e.g. (type *const)bar (type *restrict)bar Patch by came