Skip to content

Commit 3268d51

Browse files
authored
[clang][bytecode][NFC] Fix a possible build warning (#114800)
InterpBuiltinBitCast.cpp:95:3: warning: non-void function does not return a value in all control paths [-Wreturn-type] 95 | } | ^ 1 warning generated.
1 parent cd16b07 commit 3268d51

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/AST/ByteCode/InterpBuiltinBitCast.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ struct BitcastBuffer {
8888
const std::byte *data() const { return Data.data(); }
8989

9090
std::byte *getBytes(unsigned BitOffset) const {
91-
if (BitOffset % 8 == 0)
92-
return const_cast<std::byte *>(data() + (BitOffset / 8));
93-
assert(false && "hmm, how to best handle this?");
91+
assert(BitOffset % 8 == 0);
92+
return const_cast<std::byte *>(data() + (BitOffset / 8));
9493
}
9594

9695
bool allInitialized() const {

0 commit comments

Comments
 (0)