-
Couldn't load subscription status.
- Fork 15k
Closed
Closed
Copy link
Description
While trying out clang-format on the new 19.x branch, I discovered an issue with the formatting in macros.
It is incorrectly treating the rvalue reference as a binary operator.
In clang-format 18.1.7 with the default LLVM style:
#define RVALUE_COPY(CLASS) \
CLASS(CLASS &&That) : my(std::move(That.my)) {}In clang-format 19.1.0 (183e8ec)
#define RVALUE_COPY(CLASS) \
CLASS(CLASS && That) : my(std::move(That.my)) {}I also discovered that a similar thing happens with * and & as well. I.e.
#define PTR_COPY(CLASS) \
CLASS(CLASS * That) : my(That->my) {}#define REF_COPY(CLASS) \
CLASS(CLASS & That) : my(That.my) {}Metadata
Metadata
Assignees
Type
Projects
Status
Done