ymandel added a comment.

In D121120#3494137 <https://reviews.llvm.org/D121120#3494137>, @ymandel wrote:

> In D121120#3494085 <https://reviews.llvm.org/D121120#3494085>, @xazax.hun 
> wrote:
>
>> Most checks in Clang Tidy will run relatively quickly as they usually can do 
>> most/all of their work in a single traversal. I wonder whether flow 
>> sensitive checks will prove to be a bit slower. I think adding slower checks 
>> to Tidy is fine, but it would be nice to properly set the expectations to 
>> the user (e.g. if an IDE is running Tidy in the background it might want to 
>> opt out from flow sensitive checks if they turn out to be slow). In case the 
>> performance is good, I think it should be fine as is. Otherwise I wonder if 
>> we want to add something like a tag to mark flow sensitive checks and give 
>> an option to turn them off.
>
> Excellent point. @aaron.ballman is there a mechanism for this?
>
> I can check on the current performance, but I think this would be good to 
> know regardless of the outcome, given that performance is subject to change 
> and we expect to develop other flow-sensitive checks.

Just realized we left this open. How about a disclaimer at the top of the doc 
(.rst) file noting the potential cost?  Anyone using clang-tidy should be 
explicitly configuring which checks to run, so that may be sufficient. If we 
want to allow users to enable/disable flow-sensitive checks across the board, 
though, it seems like we would need to add a new option to `ClangTidyOptions` 
(https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clang-tidy/ClangTidyOptions.h#L50).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121120

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

Reply via email to