[PATCH] D121120: [clang-tidy] New check for safe usage of `std::optional` and like types.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 5 08:48:07 PDT 2022


ymandel added a comment.

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.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121120



More information about the cfe-commits mailing list