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

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 20 04:52:48 PST 2022


curdeius added a comment.

In D117520#3251425 <https://reviews.llvm.org/D117520#3251425>, @MyDeveloperDay wrote:

> For
>
>   class Test
>   {
>   public:
>       static void foo()
>       {
>       }
>   };
>
> F21703157: image.png <https://reviews.llvm.org/F21703157>
>
>   $ clang-format -n test.cxx
>   test.cxx:3:8: warning: code should be clang-formatted [-Wclang-format-violations
>   ]
>   public:
>          ^
>
>
>
>   $ clang-format --output-replacements-xml test.cxx
>   <?xml version='1.0'?>
>   <replacements xml:space='preserve' incomplete_format='false'>
>   <replacement offset='20' length='5'>
    </replacement>
>   </replacements>
>
> but when I run it nothing changes
>
>   $ clang-format test.cxx
>   class Test
>   {
>   public:
>       static void foo()
>       {
>       }
>   };
>
> And no character change
>
> F21703226: image.png <https://reviews.llvm.org/F21703226>

@MyDeveloperDay, @ksyx 
Is there a test for this?
If no, how can we test it? It happens only with `--dry-run`, right?


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

https://reviews.llvm.org/D117520



More information about the cfe-commits mailing list