[clang] [clang-format][NFC] Eliminate the IsCpp parameter in all functions (PR #84599)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 9 22:48:36 PST 2024


owenca wrote:

> That's okay for clang-format, but you couldn't use libFormat with different languages at once anymore.

I believe we still could because `IsCpp` is set to `Style.isCpp()` every time new instances of the classes are constructed. I'll add a couple of test cases to demonstrate this.

> I dislike global state in libraries.

So do I, but I prefer this to keeping the `IsCpp` parameter. See also https://github.com/llvm/llvm-project/pull/83709#discussion_r1512657115.

https://github.com/llvm/llvm-project/pull/84599


More information about the cfe-commits mailing list