Skip to content

Commit 5e91314

Browse files
[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.
1 parent 8bc2eb8 commit 5e91314

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/include/llvm/ADT/APInt.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ class [[nodiscard]] APInt {
151151
/// deprecated because this constructor is prone to ambiguity with the
152152
/// APInt(unsigned, uint64_t, bool) constructor.
153153
///
154-
/// If this overload is ever deleted, care should be taken to prevent calls
155-
/// from being incorrectly captured by the APInt(unsigned, uint64_t, bool)
156-
/// constructor.
154+
/// Once all uses of this constructor are migrated to other constructors,
155+
/// consider marking this overload ""= delete" to prevent calls from being
156+
/// incorrectly bound to the APInt(unsigned, uint64_t, bool) constructor.
157157
LLVM_ABI APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]);
158158

159159
/// Construct an APInt from a string representation.

0 commit comments

Comments
 (0)