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
===
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
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