Skip to content

Commit d98a158

Browse files
committed
[SILValue] Prefer const_cast<> to C-style cast.
Prevents a quite spammy warning with new versions of clang (in the particular case, trunk as per today).
1 parent 5c99929 commit d98a158

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/SIL/SILValue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ class SILValue {
260260

261261
public:
262262
SILValue(const ValueBase *V = nullptr)
263-
: Value((ValueBase *)V) { }
263+
: Value(const_cast<ValueBase *>(V)) { }
264264

265265
ValueBase *operator->() const { return Value; }
266266
ValueBase &operator*() const { return *Value; }

0 commit comments

Comments
 (0)