Skip to content

[upstream] Using CTU mode in clang-tidy? #2507

@LebedevRI

Description

@LebedevRI

Right now, it appears that clang-tidy is CTU-unaware.
It is true that unlike clang static analyzer which is it's entirety benefits from CTU,
most clang-tidy checks are very local to the code, and won't benefit from CTU.

But that isn't true for all the checks. There are at least 2 existing ones that would benefit:

And i suspect there may be more if/once it's possible

  • Strict no-recursion check - always warn, not just when failing to prove recursion is bounded. <- doesn't really fit into static analyzer as it would not require dataflow analysis, just CallGraph.
    (D72362 [clang-tidy] misc-no-recursion: a new check)
  • ???

I'm wondering if there are any thoughts about it, or a previous disscussion i missed.
Thanks.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions