[clang] Support BasedOnStyle referencing an arbitrary file (PR #110634)

2024-10-21 Thread Ryan Saunders via cfe-commits
jediry wrote: Ping @mydeveloperday @owenca https://github.com/llvm/llvm-project/pull/110634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support BasedOnStyle referencing an arbitrary file (PR #110634)

2024-10-15 Thread Ryan Saunders via cfe-commits
https://github.com/jediry updated https://github.com/llvm/llvm-project/pull/110634 >From 82160d1e6de3f197c847bf8ed21ea1fc314b3cf4 Mon Sep 17 00:00:00 2001 From: Ryan Saunders Date: Tue, 1 Oct 2024 00:03:50 -0700 Subject: [PATCH 1/3] Support BasedOnStyle: file:blah.clang-format --- clang/inclu

[clang] Support BasedOnStyle referencing an arbitrary file (PR #110634)

2024-10-15 Thread Ryan Saunders via cfe-commits
jediry wrote: Ping https://github.com/llvm/llvm-project/pull/110634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support BasedOnStyle referencing an arbitrary file (PR #110634)

2024-10-09 Thread Ryan Saunders via cfe-commits
https://github.com/jediry updated https://github.com/llvm/llvm-project/pull/110634 >From 82160d1e6de3f197c847bf8ed21ea1fc314b3cf4 Mon Sep 17 00:00:00 2001 From: Ryan Saunders Date: Tue, 1 Oct 2024 00:03:50 -0700 Subject: [PATCH 1/3] Support BasedOnStyle: file:blah.clang-format --- clang/inclu

[clang] Support BasedOnStyle referencing an arbitrary file (PR #110634)

2024-10-08 Thread Ryan Saunders via cfe-commits
jediry wrote: > Can this have some unit test? Done. Added docs as well. https://github.com/llvm/llvm-project/pull/110634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support BasedOnStyle referencing an arbitrary file (PR #110634)

2024-10-08 Thread Ryan Saunders via cfe-commits
https://github.com/jediry updated https://github.com/llvm/llvm-project/pull/110634 >From 82160d1e6de3f197c847bf8ed21ea1fc314b3cf4 Mon Sep 17 00:00:00 2001 From: Ryan Saunders Date: Tue, 1 Oct 2024 00:03:50 -0700 Subject: [PATCH 1/2] Support BasedOnStyle: file:blah.clang-format --- clang/inclu

[clang] Support BasedOnStyle referencing an arbitrary file (PR #110634)

2024-10-08 Thread Ryan Saunders via cfe-commits
https://github.com/jediry updated https://github.com/llvm/llvm-project/pull/110634 >From 82160d1e6de3f197c847bf8ed21ea1fc314b3cf4 Mon Sep 17 00:00:00 2001 From: Ryan Saunders Date: Tue, 1 Oct 2024 00:03:50 -0700 Subject: [PATCH 1/2] Support BasedOnStyle: file:blah.clang-format --- clang/inclu

[clang] [clang-tools-extra] [llvm] [clang-format] Add support for BasedOnStyle referencing an arbitrary file (PR #107312)

2024-09-08 Thread Ryan Saunders via cfe-commits
jediry wrote: @owenca I've opened an issue [here](https://github.com/llvm/llvm-project/issues/107808) https://github.com/llvm/llvm-project/pull/107312 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang-tools-extra] [llvm] [clang-format] Add support for BasedOnStyle referencing an arbitrary file (PR #107312)

2024-09-06 Thread Ryan Saunders via cfe-commits
jediry wrote: > I am not sure if it's best to push a new command line flag to all other tools > that use clang-format as a library. > > Have you considered any other alternatives that can self-contain this in > clang-format? e.g can we just treat paths as relative to current > `.clang-format`

[clang] [clang-tools-extra] [llvm] [clang-format] Add support for BasedOnStyle referencing an arbitrary file (PR #107312)

2024-09-06 Thread Ryan Saunders via cfe-commits
@@ -39,6 +39,10 @@ IO::IO(void *Context) : Ctxt(Context) {} IO::~IO() = default; +SourceMgr& IO::getSourceMgr() { jediry wrote: Sure, I can break this up. https://github.com/llvm/llvm-project/pull/107312 ___ cfe-c

[clang] [clang-tools-extra] [llvm] [clang-format] Add support for BasedOnStyle referencing an arbitrary file (PR #107312)

2024-09-06 Thread Ryan Saunders via cfe-commits
@@ -5274,9 +5274,17 @@ struct FormatStyle { friend std::error_code parseConfiguration(llvm::MemoryBufferRef Config, FormatStyle *Style, + const std::vector &StyleSearchPaths, jediry wrote: Yes, I can certainly do that if that is prefer

[clang] [clang-tools-extra] [llvm] [clang-format] Add support for BasedOnStyle referencing an arbitrary file (PR #107312)

2024-09-04 Thread Ryan Saunders via cfe-commits
https://github.com/jediry created https://github.com/llvm/llvm-project/pull/107312 At present, the ```BasedOnStyle``` directive can reference a predefined style name, or ```InheritFromParent```, instructing clang-format to search upward in the directory hierarchy for a .clang-format file. This