[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-06 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Thanks https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-06 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: I will compile this locally and try to fix it & recommit. https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-06 Thread Julian Schmidt via cfe-commits
5chmidti wrote: @PiotrZSL check out https://lab.llvm.org/buildbot/#/builders/230/builds/6, the bot was red on previous runs, but those are unrelated to how it fails now. The bot fails for this patch with the following build failure: ```

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-06 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Thank you for the reviews https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-06 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,73 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,73 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,73 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -193,6 +193,13 @@ New checks replacing with ``starts_with`` when the method exists in the class. Notably, this will work with ``std::string`` and ``std::string_view``. +- New :doc:`modernize-use-std-numbers + ` check. + + Finds constants and function calls to math

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -5,7 +5,7 @@ modernize-use-std-numbers 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 or macros with that value and

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
@@ -193,6 +193,13 @@ New checks replacing with ``starts_with`` when the method exists in the class. Notably, this will work with ``std::string`` and ``std::string_view``. +- New :doc:`modernize-use-std-numbers + ` check. + + Finds constants and function calls to math

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -193,6 +193,13 @@ New checks replacing with ``starts_with`` when the method exists in the class. Notably, this will work with ``std::string`` and ``std::string_view``. +- New :doc:`modernize-use-std-numbers + ` check. + + Finds constants and function calls to math

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
@@ -0,0 +1,73 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
@@ -0,0 +1,73 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
@@ -0,0 +1,73 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
@@ -5,7 +5,7 @@ modernize-use-std-numbers 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 or macros with that value and

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
https://github.com/EugeneZelenko edited https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
@@ -193,6 +193,13 @@ New checks replacing with ``starts_with`` when the method exists in the class. Notably, this will work with ``std::string`` and ``std::string_view``. +- New :doc:`modernize-use-std-numbers + ` check. + + Finds constants and function calls to math

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread via cfe-commits
https://github.com/EugeneZelenko requested changes to this pull request. https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,74 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,74 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
5chmidti wrote: That email is fine with me https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,74 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Unless you want this to be merged as 44101708+5chmi...@users.noreply.github.com, correct your github settings, squash all commits into one and make sure that author of commit is correct. https://github.com/llvm/llvm-project/pull/66583

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,74 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Julian Schmidt via cfe-commits
5chmidti wrote: I fetched from the wrong remote. Conflicts are resolved. The options docs were added in 284fa1b94ef72c29f13a2ec50ca76b429c842b0c https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Force push to resolve conflicts https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,58 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,58 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM, this should be merged so other llvm users could test it. As check is complicated I expect that there can be some false-positives or issues reported when llvm 18 would release. https://github.com/llvm/llvm-project/pull/66583

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-03 Thread Julian Schmidt via cfe-commits
@@ -128,169 +128,169 @@ void foo(){ const auto Actually2 = 2; bar::sqrt(Actually2); -// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: prefer std::numbers math constant [modernize-use-std-numbers] +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: prefer

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-03 Thread Julian Schmidt via cfe-commits
5chmidti wrote: It looks like GitHub decided to not list all new commits in the conversation view... there are a few more in the commits tab. The newly pushed changes start at commit [refactor from using transformer to a normal

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-19 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: > @PiotrZSL I have implemented the changes you have requested, but because of > #72536, I am not going to push those changes yet, unless you prefer it if I > do. I might take a look into fixing this issue. I came across this when I > checked what would happen when the big

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-19 Thread Julian Schmidt via cfe-commits
5chmidti wrote: @PiotrZSL I have implemented the changes you have requested, but because of #72536, I am not going to push those changes yet, unless you prefer it if I do. I might take a look into fixing this issue. I came across this when I checked what would happen when the big templated

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-09 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-09 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Example: ``` llvm/include/llvm/Support/MathExtras.h:59:31: warning: prefer std::numbers math constant [modernize-use-std-numbers] 59 | inv_sqrt3f = .577350269F, // (0x1.279a74P-1) |

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,28 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-03 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,284 @@ +//===--- UseStdNumbersCheck.cpp - clang_tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX_License_Identifier:

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,28 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,284 @@ +//===--- UseStdNumbersCheck.cpp - clang_tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX_License_Identifier:

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,284 @@ +//===--- UseStdNumbersCheck.cpp - clang_tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX_License_Identifier:

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-03 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,28 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-03 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,284 @@ +//===--- UseStdNumbersCheck.cpp - clang_tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX_License_Identifier:

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-03 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,284 @@ +//===--- UseStdNumbersCheck.cpp - clang_tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX_License_Identifier:

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-03 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,284 @@ +//===--- UseStdNumbersCheck.cpp - clang_tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX_License_Identifier:

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-02 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 8b8acedc0e6c432545744a113128cfcb4f2da7e5 Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH 01/20] [clang-tidy]

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-28 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Nice, the rebase fixed the Windows failure https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-28 Thread Julian Schmidt via cfe-commits
5chmidti wrote: I rebased and force-pushed my branch to fix the formatting CI (fetch depth for comparison with head was too big). I pushed no actual changes in that force-push (one documentation ordering change in `fix lexicographical ordering in some places after rename` became redundant).

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-28 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 8b8acedc0e6c432545744a113128cfcb4f2da7e5 Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH 01/19] [clang-tidy]

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-27 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 8f5e9e6024b0db8f251625669adbc5d607da83cb Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH 01/19] [clang-tidy]

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-27 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-27 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 8f5e9e6024b0db8f251625669adbc5d607da83cb Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH 01/17] [clang-tidy]

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-27 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 8f5e9e6024b0db8f251625669adbc5d607da83cb Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH 01/16] [clang-tidy]

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-27 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 8f5e9e6024b0db8f251625669adbc5d607da83cb Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH 01/15] [clang-tidy]

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-27 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: No need to change to `sink(std::numbers::phi)`, simply just replace numbers, leave usage like it is. https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-27 Thread Julian Schmidt via cfe-commits
5chmidti wrote: > I think you can't, instead of handling macro definitions, you just should > handle places where macro is used. It's fine if someone define a macro MY_PI, > check should flag usage of such macro, not necessarily a macro. > > Instead of using MacroDefined and try to find those

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-26 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: > * How do I correctly parse the values in a macro? While the test locally > works, it doesn't in CI. I also don't differentiate between what kind of > numeric constant the token is, which might be another problem. Any pointers > on how to do this correctly are greatly

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-07 Thread via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 8f5e9e6024b0db8f251625669adbc5d607da83cb Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH 01/13] [clang-tidy]

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-07 Thread via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 8f5e9e6024b0db8f251625669adbc5d607da83cb Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH 01/12] [clang-tidy]

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-03 Thread via cfe-commits
5chmidti wrote: > * How do I correctly parse the values in a macro? While the test locally > works, it doesn't in CI. I also don't differentiate between what kind of > numeric constant the token is, which might be another problem. Any pointers > on how to do this correctly are greatly

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-09-25 Thread via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 8f5e9e6024b0db8f251625669adbc5d607da83cb Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH 1/9] [clang-tidy]

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-09-18 Thread via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 8f5e9e6024b0db8f251625669adbc5d607da83cb Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH 1/6] [clang-tidy]

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-09-17 Thread via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 8f5e9e6024b0db8f251625669adbc5d607da83cb Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH 1/5] [clang-tidy]

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-09-17 Thread via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-09-17 Thread via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 8f5e9e6024b0db8f251625669adbc5d607da83cb Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH 1/4] [clang-tidy]

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-09-16 Thread via cfe-commits
@@ -0,0 +1,25 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +This check finds constants and function calls to math functions that can be replaced EugeneZelenko wrote: Please synchronize first

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-09-16 Thread via cfe-commits
@@ -168,6 +168,12 @@ New checks Replace ``enable_if`` with C++20 requires clauses. +- New :doc:`modernize-use-std-numbers + ` check. + + Finds constants and function calls to math functions that can be replaced + with c++20's mathematical constants ('numbers' header).

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-09-16 Thread via cfe-commits
@@ -0,0 +1,377 @@ +//===--- UseStdNumbersCheck.cpp - clang_tidy -===// EugeneZelenko wrote: Please make it same length as similar line at bottom of comment. https://github.com/llvm/llvm-project/pull/66583

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-09-16 Thread via cfe-commits
@@ -0,0 +1,25 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +This check finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants ('numbers' header) and offers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-09-16 Thread via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 8f5e9e6024b0db8f251625669adbc5d607da83cb Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH 1/3] [clang-tidy]

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-09-16 Thread via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 8f5e9e6024b0db8f251625669adbc5d607da83cb Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH] [clang-tidy] add

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-09-16 Thread via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 26fb41a2903110b6fc8bd986284d41b1fe6814d5 Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH] [clang-tidy] add

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-09-16 Thread via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits