[clang-format] Detect pointer qualifiers in cast expressions
When guessing whether a closing paren is then end of a cast expression also skip over pointer qualifiers while looking for TT_PointerOrReference. This prevents some address-of and dereference operators from being parsed as a binary operator. Before: x = (foo *const) * v; x = (foo *const volatile restrict __attribute__((foo)) _Nonnull _Null_unspecified _Nonnull) & v; After: x = (foo *const)*v; x = (foo *const volatile restrict __attribute__((foo)) _Nonnull _Null_unspecified _Nonnull)&v; Reviewed By: MyDeveloperDay Differential Revision: https://reviews.llvm.org/D86716
Loading
Please sign in to comment