In our codebase, we use macros when exporting types for dlls.
This enables conditionally enabling exporting the type, as well as supporting different compilers (e.g. __declspec(dllexport) vs __attribute__ ((dllexport))).
In clang-format 18.1.6 this formats as expected.
E.g. using the default style:
struct EXPORT StructName {};
class EXPORT ClassName {
public:
ClassName() {}
};
However, testing the latest version of clang-format 19 (f779ec7), the formatting has changed.
It appears that it is instead interpreting it as an initialization.
I.e.
struct EXPORT StructName{};
class EXPORT ClassName{public : ClassName(){}};