pytorch/torch/csrc/lazy
cyy 8fa81a6066 Enable misc-use-internal-linkage check and apply fixes (#148948)
Enables clang-tidy rule [`misc-use-internal-linkage`](https://clang.llvm.org/extra/clang-tidy/checks/misc/use-internal-linkage.html). This new check was introduced in Clang-Tidy 18 and is available due to recent update of Clang-Tidy 19.

The check marks functions and variables used only in the translation unit as static. Therefore undesired symbols are not leaked into other units, more link time optimisations are possible and the resulting binaries may be smaller.

The detected violations were mostly fixed by using static. In other cases, the symbols were indeed consumed by others files, then their declaring headers were included. Still some declarations were wrong and have been fixed.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/148948
Approved by: https://github.com/Skylion007
2025-03-12 14:22:56 +00:00
..
backend Remove unneeded std::make_optional (#141567) 2024-11-28 00:05:21 +00:00
core Cleanup CallOnce.h (#146700) 2025-02-07 16:44:45 +00:00
generated
python Enable misc-use-internal-linkage check and apply fixes (#148948) 2025-03-12 14:22:56 +00:00
ts_backend [Reland][Environment Variable][4/N] Use thread-safe getenv functions (#140593) 2025-01-28 20:51:49 +00:00
test_mnist.py [BE][Easy][17/19] enforce style for empty lines in import segments in torch/[a-c]*/ and torch/[e-n]*/ (#129769) 2024-08-04 10:24:09 +00:00
tutorial.md Add None return type to init (#132335) 2024-08-01 15:26:45 +00:00