[clang] [clang-format] Add -r option for recursing into directories (PR #160299)

James Henderson via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 29 02:23:31 PDT 2025


jh7370 wrote:

> Its not that I don't agree with you..see https://reviews.llvm.org/D29039 (from 2017-19) , but if you look at this review, Daniel was saying he didn't feel it was our place. Its hard for us to reverse those decisions, especially made my the inventor of cf. But if you could get @owenca and @HazardyKnusperkeks to agree then I'd definitely say, those who don't want to use it, don't,those that do go for it. I would investigate a more sophisticated method like globs (as LLVM has a GlobPattern class) but it should allow multiple extensions '{_.cpp,directory/**/_.h}' in one go (like prettier can do)... but I'd want something better than just -r in my view

Thanks for the comments. It may be a while, but I'll try and look for a smarter alternative (I do agree that a glob pattern would be nicer from a user's perspective).

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


More information about the cfe-commits mailing list