[libcxx-commits] [PATCH] D153977: [libc++][NFC] Add missing includes

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 29 10:49:13 PDT 2023


Mordante added a comment.

Thanks for updating the message!



================
Comment at: libcxx/include/regex:800
 #include <__memory_resource/polymorphic_allocator.h>
+#include <__memory/shared_ptr.h>
 #include <__type_traits/is_swappable.h>
----------------
ldionne wrote:
> Mordante wrote:
> > According the the CI at least this header is not in alphabetic order.
> Thanks -- apparently VS Code disagrees with every other tool about what it means to be sorted.
Maybe is uses locales ;-)


================
Comment at: libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp:23-26
 #include <cassert>
+#include <filesystem>
+#include <fstream>
+#include <type_traits>
----------------
ldionne wrote:
> Mordante wrote:
> > This is now in alphabetic order, in `.clang-format` we explicitly disable that for the tests. Any objections when I make a patch to remove that from that file. Then new tests are automatically formatted with headers sorted.
> I don't think I'd have an objection, however I think you might hit some actual blockers while trying to do that? We probably have tests where the order of includes is important?
> 
> In that case I guess we could always use `// clang-format on/off` around the `#include`s.
Actually I think that is a good reason *not* to do it. Then formatting in the future may accidentally "break" a test. It still would be good when test call out the order is important.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153977



More information about the libcxx-commits mailing list