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

Jordan Rupprecht via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 19 10:46:13 PDT 2020


rupprecht added a comment.

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"


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