Closed
Description
I stumbled upon #60627 which describes this same issue. Over there, the conclusion seems to be wont-fix because the intention of the related change (https://reviews.llvm.org/D117142) was to fix exactly the reported case.
However, I'd argue that a slight modification to the example is an unintended regression. If macros hide the "class" token, the scope is not correctly detected.
#define MY_THING(name) class name##Thing final
MY_THING(Foo)
{
int func() { return 7; }
}
is formatted to:
#define MY_THING(name) class name##Thing final
MY_THING(Foo)
{
int func()
{
return 7;
}
}