[PATCH] D19058: clang-format: Pointer `*` is seen as multiplication in C-style casts
Daniel Jasper via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 13 12:37:46 PDT 2016
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 it would be better to not have such cast detection heuristics in several places. Could we change the type of the "*" to TT_PointerOrReference after the fact, when rParenEndsCast returns true?
http://reviews.llvm.org/D19058
More information about the cfe-commits
mailing list