Skip to content

Commit cbde708

Browse files
committed
[clang-doc][NFC] Avoid else after return
1 parent c64f670 commit cbde708

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang-tools-extra/clang-doc/BitcodeReader.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ llvm::Error ClangDocBitcodeReader::validateStream() {
878878
Expected<llvm::SimpleBitstreamCursor::word_t> MaybeRead = Stream.Read(8);
879879
if (!MaybeRead)
880880
return MaybeRead.takeError();
881-
else if (MaybeRead.get() != BitCodeConstants::Signature[Idx])
881+
if (MaybeRead.get() != BitCodeConstants::Signature[Idx])
882882
return llvm::createStringError(llvm::inconvertibleErrorCode(),
883883
"invalid bitcode signature");
884884
}
@@ -890,8 +890,7 @@ llvm::Error ClangDocBitcodeReader::readBlockInfoBlock() {
890890
Stream.ReadBlockInfoBlock();
891891
if (!MaybeBlockInfo)
892892
return MaybeBlockInfo.takeError();
893-
else
894-
BlockInfo = MaybeBlockInfo.get();
893+
BlockInfo = MaybeBlockInfo.get();
895894
if (!BlockInfo)
896895
return llvm::createStringError(llvm::inconvertibleErrorCode(),
897896
"unable to parse BlockInfoBlock");

0 commit comments

Comments
 (0)