[all-commits] [llvm/llvm-project] 0eb7d5: [clang-tidy] add modernize-use-std-numbers (#66583)
Piotr Zegar via All-commits
all-commits at lists.llvm.org
Wed Dec 6 12:51:09 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0eb7d53cfc48f2e9287bb116415620618ca850b7
https://github.com/llvm/llvm-project/commit/0eb7d53cfc48f2e9287bb116415620618ca850b7
Author: Julian Schmidt <44101708+5chmidti at users.noreply.github.com>
Date: 2023-12-06 (Wed, 06 Dec 2023)
Changed paths:
M clang-tools-extra/clang-tidy/modernize/CMakeLists.txt
M clang-tools-extra/clang-tidy/modernize/ModernizeTidyModule.cpp
A clang-tools-extra/clang-tidy/modernize/UseStdNumbersCheck.cpp
A clang-tools-extra/clang-tidy/modernize/UseStdNumbersCheck.h
M clang-tools-extra/docs/ReleaseNotes.rst
M clang-tools-extra/docs/clang-tidy/checks/list.rst
A clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-numbers.rst
A clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-numbers.cpp
Log Message:
-----------
[clang-tidy] add modernize-use-std-numbers (#66583)
Finds constants and function calls to math functions that can be
replaced with c++20's mathematical constants from the 'numbers'
header and offers fix-it hints.
Does not match the use of variables with that value, and instead,
offers a replacement at the definition of those variables.
Commit: e1fa2fea03ff94627008054267a244744d76b5c2
https://github.com/llvm/llvm-project/commit/e1fa2fea03ff94627008054267a244744d76b5c2
Author: Piotr Zegar <me at piotrzegar.pl>
Date: 2023-12-06 (Wed, 06 Dec 2023)
Changed paths:
M clang-tools-extra/clang-tidy/modernize/UseStdNumbersCheck.cpp
Log Message:
-----------
[clang-tidy][NFC] Change ArrayRef into std::vector in modernize-use-std-numbers
To avoid compiler errors on some platforms introduced
by #66583, now using std::vector to pass list of
matchers into main matcher, and removed static variable
as it could introduce some other issues.
Compare: https://github.com/llvm/llvm-project/compare/b4e19155171e...e1fa2fea03ff
More information about the All-commits
mailing list