[PATCH] D88640: [Format] Don't treat compound extension headers (foo.proto.h) as foo.cc main file.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 20 01:47:59 PDT 2020


hokein added a comment.

In D88640#2339349 <https://reviews.llvm.org/D88640#2339349>, @rupprecht wrote:

> It looks like this fix caused a different regression in not accepting `name.<x>.h` as the main header for `name.<x>.cc`, e.g.:
>
>   $ cat /tmp/foo.bar.cc
>   #include "a.h"
>   #include "z.h"
>   #include "foo.bar.h"
>   
>   $ clang-format /tmp/foo.bar.cc  # Before
>   #include "foo.bar.h"
>   
>   #include "a.h"
>   #include "z.h"
>   
>   $ clang-format /tmp/foo.bar.cc  # After
>   #include "a.h"
>   #include "foo.bar.h"
>   #include "z.h"

oh, sorry for the regression. Will try to fix that, thanks for the example!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88640



More information about the cfe-commits mailing list