[clang-tools-extra] [clang-tidy][doc][NFC] extract common global options in doc (PR #119842)

Carlos Galvez via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 13 11:09:15 PST 2024


carlosgalvezp wrote:

They use getLocalOrGlobal probably by mistake, copy-pasting existing code. We should document what we believe makes sense, and fix the implementation accordingly. The current documentation says these options are check-specific, so users should be using them per-check instead of globally. Thus, we wouldn't break users if we change the implementation. So I would vote for replacing the getLocalOrGlobal with getLocal instead.

If we believe the current implementation is faulty, and document that implementation, then we'll have a much harder time to refactor the implementation to what we want (since by documenting, we "promise" a behavior). 

I remember now that the true global options are documented here:

https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/docs/clang-tidy/index.rst?plain=1#L288

So if we create more global options (like `IncludeStyle`) we should probably put them there.



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


More information about the cfe-commits mailing list