Skip to content

Commit 120d899

Browse files
committed
[clang-doc][NFC] Avoid else after return
1 parent db97d56 commit 120d899

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ llvm::Error ClangDocBitcodeReader::validateStream() {
874874
Expected<llvm::SimpleBitstreamCursor::word_t> MaybeRead = Stream.Read(8);
875875
if (!MaybeRead)
876876
return MaybeRead.takeError();
877-
else if (MaybeRead.get() != BitCodeConstants::Signature[Idx])
877+
if (MaybeRead.get() != BitCodeConstants::Signature[Idx])
878878
return llvm::createStringError(llvm::inconvertibleErrorCode(),
879879
"invalid bitcode signature");
880880
}
@@ -886,8 +886,7 @@ llvm::Error ClangDocBitcodeReader::readBlockInfoBlock() {
886886
Stream.ReadBlockInfoBlock();
887887
if (!MaybeBlockInfo)
888888
return MaybeBlockInfo.takeError();
889-
else
890-
BlockInfo = MaybeBlockInfo.get();
889+
BlockInfo = MaybeBlockInfo.get();
891890
if (!BlockInfo)
892891
return llvm::createStringError(llvm::inconvertibleErrorCode(),
893892
"unable to parse BlockInfoBlock");

0 commit comments

Comments
 (0)