Skip to content

Commit

Permalink
[clang-doc] Fix a warning
Browse files Browse the repository at this point in the history
This patch fixes:

  clang-tools-extra/clang-doc/BitcodeReader.cpp:78:3: error: default
  label in switch which covers all enumeration values
  [-Werror,-Wcovered-switch-default]
  • Loading branch information
kazutakahirata committed Nov 3, 2023
1 parent 3fe69ba commit 2b76bdc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions clang-tools-extra/clang-doc/BitcodeReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ llvm::Error decodeRecord(const Record &R, TagTypeKind &Field,
case TagTypeKind::Enum:
Field = static_cast<TagTypeKind>(R[0]);
return llvm::Error::success();
default:
return llvm::createStringError(llvm::inconvertibleErrorCode(),
"invalid value for TagTypeKind");
}
return llvm::createStringError(llvm::inconvertibleErrorCode(),
"invalid value for TagTypeKind");
}

llvm::Error decodeRecord(const Record &R, std::optional<Location> &Field,
Expand Down

0 comments on commit 2b76bdc

Please sign in to comment.