Skip to content

Conversation

@ilovepi
Copy link
Contributor

@ilovepi ilovepi commented Apr 19, 2025

No description provided.

Copy link
Contributor Author

ilovepi commented Apr 19, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link

github-actions bot commented Apr 19, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@ilovepi ilovepi force-pushed the users/ilovepi/avoid-else-ret branch from 120d899 to b074257 Compare April 19, 2025 00:33
@ilovepi ilovepi marked this pull request as ready for review April 19, 2025 00:33
@llvmbot
Copy link
Member

llvmbot commented Apr 19, 2025

@llvm/pr-subscribers-clang-tools-extra

Author: Paul Kirth (ilovepi)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/136389.diff

1 Files Affected:

  • (modified) clang-tools-extra/clang-doc/BitcodeReader.cpp (+2-3)
diff --git a/clang-tools-extra/clang-doc/BitcodeReader.cpp b/clang-tools-extra/clang-doc/BitcodeReader.cpp
index 1f2fb0a8b2b85..dba5fcbeb062e 100644
--- a/clang-tools-extra/clang-doc/BitcodeReader.cpp
+++ b/clang-tools-extra/clang-doc/BitcodeReader.cpp
@@ -874,7 +874,7 @@ llvm::Error ClangDocBitcodeReader::validateStream() {
     Expected<llvm::SimpleBitstreamCursor::word_t> MaybeRead = Stream.Read(8);
     if (!MaybeRead)
       return MaybeRead.takeError();
-    else if (MaybeRead.get() != BitCodeConstants::Signature[Idx])
+    if (MaybeRead.get() != BitCodeConstants::Signature[Idx])
       return llvm::createStringError(llvm::inconvertibleErrorCode(),
                                      "invalid bitcode signature");
   }
@@ -886,8 +886,7 @@ llvm::Error ClangDocBitcodeReader::readBlockInfoBlock() {
       Stream.ReadBlockInfoBlock();
   if (!MaybeBlockInfo)
     return MaybeBlockInfo.takeError();
-  else
-    BlockInfo = MaybeBlockInfo.get();
+  BlockInfo = MaybeBlockInfo.get();
   if (!BlockInfo)
     return llvm::createStringError(llvm::inconvertibleErrorCode(),
                                    "unable to parse BlockInfoBlock");

@ilovepi ilovepi force-pushed the users/ilovepi/avoid-else-ret branch from b074257 to cbde708 Compare April 19, 2025 01:27
Copy link
Contributor Author

ilovepi commented Apr 19, 2025

Merge activity

  • Apr 19, 2:33 AM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Apr 19, 2:34 AM EDT: A user merged this pull request with Graphite.

@ilovepi ilovepi merged commit c5c2851 into main Apr 19, 2025
11 checks passed
@ilovepi ilovepi deleted the users/ilovepi/avoid-else-ret branch April 19, 2025 06:34
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants