njames93 added a comment.

In D75184#1932764 <https://reviews.llvm.org/D75184#1932764>, @alexfh wrote:

> There's one more thing to consider: just by looking at the name of a local 
> option we don't know whether it will be read using `get()` or 
> `getLocalOrGlobal()`. By removing local options we may introduce an even more 
> surprising behavior than without this special treatment. WDYT?


There's no perfect solution, but in general clang tidy checks use the 
`getLocalOrGlobal` method when a option is generic. There is a way to implement 
what you are asking for and that's storing a precedence value with each option 
when you load the config. Then if you call `getLocalOrGlobal`it will choose the 
option (local or global) with the highest precedence. That solution would 
require a little retooling of the options class but could be the best solution


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75184



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to