[PATCH] D117520: [clang-format] Fix SeparateDefinitionBlocks issues

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 20 11:08:25 PST 2022


HazardyKnusperkeks added inline comments.


================
Comment at: clang/lib/Format/DefinitionBlockSeparator.cpp:135
+        // UnwrappedLineParser's recognition of free-standing macro like
+        // Q_OBJECT may also recognize some uppercased type names that may be
+        // used as return type as that kind of macros, which is a bit hard to
----------------
ksyx wrote:
> HazardyKnusperkeks wrote:
> > As a Qt user who also wants to use your patch, please add a test for that case. ;)
> For `Q_OBJECT` if used as pattern like this:
> ```
> class X : ... {
>   Q_OBJECT
> public:
>   // ...
> }
> ```
> I think this patch has no effect on this? The comment here is just a repetition of that in unwrapped parser
Which does indicate even more, that we shouldn't copy the stuff, but let the UnwrappedLineParser mark it as //that//, whatever that is.
What's your opinion @MyDeveloperDay ?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117520/new/

https://reviews.llvm.org/D117520



More information about the cfe-commits mailing list