The * was treated as multiplication operator in complex pointer type casts.
e.g.
(type *const)bar
(type *restrict)bar
Patch by cameron314
Paths
| Differential D19058
clang-format: Pointer `*` is seen as multiplication in C-style casts Needs ReviewPublic Authored by mxbOctasic on Apr 13 2016, 7:17 AM.
Details
Summary The * was treated as multiplication operator in complex pointer type casts. e.g. Patch by cameron314
Diff Detail Event TimelinemxbOctasic retitled this revision from to clang-format: Pointer `*` is seen as multiplication in C-style casts. mxbOctasic updated this object.
Revision Contents
Diff 53550 lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTest.cpp
|
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?