[llvm] 5e91314 - [ADT] Improve a comment in APInt.h (#156390)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 2 09:21:13 PDT 2025
Author: Kazu Hirata
Date: 2025-09-02T09:21:09-07:00
New Revision: 5e91314b9bfb79855314d53713a893be400f7d10
URL: https://github.com/llvm/llvm-project/commit/5e91314b9bfb79855314d53713a893be400f7d10
DIFF: https://github.com/llvm/llvm-project/commit/5e91314b9bfb79855314d53713a893be400f7d10.diff
LOG: [ADT] Improve a comment in APInt.h (#156390)
We don't have to remove this constructor if we are worried about
accidental binding. We can use "= delete" instead. Also, this patch
replaces "captured by" with "bound to" as that is more precise.
Added:
Modified:
llvm/include/llvm/ADT/APInt.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/APInt.h b/llvm/include/llvm/ADT/APInt.h
index e68dc8bd14d96..9fa98ad4ddde1 100644
--- a/llvm/include/llvm/ADT/APInt.h
+++ b/llvm/include/llvm/ADT/APInt.h
@@ -151,9 +151,9 @@ class [[nodiscard]] APInt {
/// deprecated because this constructor is prone to ambiguity with the
/// APInt(unsigned, uint64_t, bool) constructor.
///
- /// If this overload is ever deleted, care should be taken to prevent calls
- /// from being incorrectly captured by the APInt(unsigned, uint64_t, bool)
- /// constructor.
+ /// Once all uses of this constructor are migrated to other constructors,
+ /// consider marking this overload ""= delete" to prevent calls from being
+ /// incorrectly bound to the APInt(unsigned, uint64_t, bool) constructor.
LLVM_ABI APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]);
/// Construct an APInt from a string representation.
More information about the llvm-commits
mailing list