[clang-format] Fix template arguments in macros
Fixes https://github.com/llvm/llvm-project/issues/57738 old ``` #define FOO(typeName, realClass) \ { \ #typeName, foo < FooType>(new foo <realClass>(#typeName)) \ } ``` new ``` #define FOO(typeName, realClass) \ { #typeName, foo<FooType>(new foo<realClass>(#typeName)) } ``` Previously, when an UnwrappedLine began with a hash in a macro definition, the program incorrectly assumed the line was a preprocessor directive. It should be stringification. The rule in spaceRequiredBefore was added in 8b529711. Its purpose is to add a space in an include directive. It also added a space to a template opener when the line began with a stringification hash. So we changed it. Reviewed By: HazardyKnusperkeks, owenpan Differential Revision: https://reviews.llvm.org/D133954
Loading
Please sign in to comment