[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-23 Thread via cfe-commits
github-actions[bot] wrote: @ealcdan Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-23 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-23 Thread via cfe-commits
ealcdan wrote: Sure, I just updated my settings, thanks for the suggestion. https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-22 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/85060 >From 07248879092c0e752811b4c33b98c50d42230d14 Mon Sep 17 00:00:00 2001 From: Daniel Alcaide Nombela Date: Wed, 13 Mar 2024 11:28:34 +0100 Subject: [PATCH] [clang-tidy] Avoid overflow when dumping unsigned

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-22 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Unless you want this to be merged as 115098653+ealc...@users.noreply.github.com, change your email privacy settings. https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-22 Thread via cfe-commits
@@ -251,6 +251,9 @@ Miscellaneous option is specified. Now ``clang-apply-replacements`` applies formatting only with the option. +- Fixed bug where big values for unsigned check options overflowed into negative values + when being printed with ``--dump-config``.

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-22 Thread via cfe-commits
https://github.com/ealcdan updated https://github.com/llvm/llvm-project/pull/85060 >From 07248879092c0e752811b4c33b98c50d42230d14 Mon Sep 17 00:00:00 2001 From: Daniel Alcaide Nombela Date: Wed, 13 Mar 2024 11:28:34 +0100 Subject: [PATCH] [clang-tidy] Avoid overflow when dumping unsigned

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-22 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-22 Thread Piotr Zegar via cfe-commits
@@ -251,6 +251,9 @@ Miscellaneous option is specified. Now ``clang-apply-replacements`` applies formatting only with the option. +- Fixed bug where big values for unsigned check options overflowed into negative values + when being printed with ``--dump-config``.

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-22 Thread via cfe-commits
ealcdan wrote: Great, both points have been addressed in the new patches, hope the release notes entry is clear enough. https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-22 Thread via cfe-commits
https://github.com/ealcdan updated https://github.com/llvm/llvm-project/pull/85060 >From afe6658e869646730a18c52e18f5cb4675d67a6b Mon Sep 17 00:00:00 2001 From: Daniel Alcaide Nombela Date: Wed, 13 Mar 2024 11:28:34 +0100 Subject: [PATCH] [clang-tidy] Avoid overflow when dumping unsigned

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-22 Thread via cfe-commits
https://github.com/ealcdan updated https://github.com/llvm/llvm-project/pull/85060 >From 20f7b3172c6735e8dbdda24ffde7ee8ecd7c7404 Mon Sep 17 00:00:00 2001 From: Daniel Alcaide Nombela Date: Wed, 13 Mar 2024 11:28:34 +0100 Subject: [PATCH] [clang-tidy] Avoid overflow when dumping unsigned

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-22 Thread Piotr Zegar via cfe-commits
@@ -422,7 +425,10 @@ class ClangTidyCheck : public ast_matchers::MatchFinder::MatchCallback { store(ClangTidyOptions::OptionMap , StringRef LocalName, std::optional Value) const { if (Value) -storeInt(Options, LocalName, *Value); +if

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

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

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-22 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. - One code duplication that could be avoided. - Add entry in release notes, about fixing issue with big unsigned config option values printed as negative numbers in --dump-config Overall, fine. As for

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-22 Thread via cfe-commits
ealcdan wrote: ping :) https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-09 Thread via cfe-commits
https://github.com/ealcdan updated https://github.com/llvm/llvm-project/pull/85060 >From 681f04d6cff2c1b2000deaee2f209dd73c1fc42d Mon Sep 17 00:00:00 2001 From: Daniel Alcaide Nombela Date: Wed, 13 Mar 2024 11:28:34 +0100 Subject: [PATCH] [clang-tidy] Avoid overflow when dumping unsigned

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-08 Thread via cfe-commits
https://github.com/ealcdan updated https://github.com/llvm/llvm-project/pull/85060 >From f6196cf0d073c6637fde463cd4fd3f252051d7da Mon Sep 17 00:00:00 2001 From: Daniel Alcaide Nombela Date: Wed, 13 Mar 2024 11:28:34 +0100 Subject: [PATCH] [clang-tidy] Avoid overflow when dumping unsigned

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-08 Thread via cfe-commits
ealcdan wrote: Thanks for the review. I'm adding a test that checks that no '-1' is returned for misc-throw-by-value-catch-by-reference.MaxSize, that should pass even when no value is dumped for the option by default. I also added a test that sets 2⁶⁰ as a value for that option, and checks

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-08 Thread via cfe-commits
https://github.com/ealcdan updated https://github.com/llvm/llvm-project/pull/85060 >From 6ca7a38e44f0b666458a1a991d0120c19a4f5fe9 Mon Sep 17 00:00:00 2001 From: Daniel Alcaide Nombela Date: Wed, 13 Mar 2024 11:28:34 +0100 Subject: [PATCH] [clang-tidy] Avoid overflow when dumping unsigned

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-08 Thread via cfe-commits
https://github.com/ealcdan updated https://github.com/llvm/llvm-project/pull/85060 >From 278a9a649db880c20db19213b93d3470c0b17cd3 Mon Sep 17 00:00:00 2001 From: Daniel Alcaide Nombela Date: Wed, 13 Mar 2024 11:28:34 +0100 Subject: [PATCH] [clang-tidy] Avoid overflow when dumping unsigned

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-04-08 Thread via cfe-commits
https://github.com/ealcdan updated https://github.com/llvm/llvm-project/pull/85060 >From 12a841c53b5a42fd1954fd81a3aad76c9ccbd45d Mon Sep 17 00:00:00 2001 From: Daniel Alcaide Nombela Date: Wed, 13 Mar 2024 11:28:34 +0100 Subject: [PATCH] [clang-tidy] Avoid overflow when dumping unsigned

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: And just one comment, when this check uses max value as "limit", this behavior is also a reason why support for optional values were added. For me in this case check & description should be updated to handle this config as an optional, instead of mentioning max u64 in

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
@@ -408,17 +408,26 @@ class ClangTidyCheck : public ast_matchers::MatchFinder::MatchCallback { /// Stores an option with the check-local name \p LocalName with /// integer value \p Value to \p Options. template -std::enable_if_t> +std::enable_if_t &&

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
@@ -470,6 +491,8 @@ class ClangTidyCheck : public ast_matchers::MatchFinder::MatchCallback { void storeInt(ClangTidyOptions::OptionMap , StringRef LocalName, int64_t Value) const; +void storeUnsigned(ClangTidyOptions::OptionMap , +

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Missing test (based on some check). https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread Piotr Zegar via cfe-commits
@@ -408,17 +408,26 @@ class ClangTidyCheck : public ast_matchers::MatchFinder::MatchCallback { /// Stores an option with the check-local name \p LocalName with /// integer value \p Value to \p Options. template -std::enable_if_t> +std::enable_if_t &&

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (ealcdan) Changes Some options take the maximum unsigned integer value as default, but they are being dumped to a string as integers. This makes -dump-config write invalid '-1' values for these options. This change fixes this

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (ealcdan) Changes Some options take the maximum unsigned integer value as default, but they are being dumped to a string as integers. This makes -dump-config write invalid '-1' values for these options. This change fixes

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread via cfe-commits
ealcdan wrote: This PR attempts to fix #60217 https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you,

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread via cfe-commits
https://github.com/ealcdan created https://github.com/llvm/llvm-project/pull/85060 Some options take the maximum unsigned integer value as default, but they are being dumped to a string as integers. This makes -dump-config write invalid '-1' values for these options. This change fixes this