Skip to content

Commit 90de46c

Browse files
[clang-doc] Fix warnings
This patch fixes: clang-tools-extra/clang-doc/BitcodeReader.cpp:47:20: error: unused function 'decodeRecord' [-Werror,-Wunused-function] clang-tools-extra/clang-doc/BitcodeReader.cpp:437:31: error: unused function 'getCommentInfo<std::unique_ptr<clang::doc::CommentInfo> &>' [-Werror,-Wunused-function]
1 parent bbd1a15 commit 90de46c

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

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

-14
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,6 @@ static llvm::Error decodeRecord(const Record &R, bool &Field,
4444
return llvm::Error::success();
4545
}
4646

47-
static llvm::Error decodeRecord(const Record &R, int &Field,
48-
llvm::StringRef Blob) {
49-
if (R[0] > INT_MAX)
50-
return llvm::createStringError(llvm::inconvertibleErrorCode(),
51-
"integer too large to parse");
52-
Field = static_cast<int>(R[0]);
53-
return llvm::Error::success();
54-
}
55-
5647
static llvm::Error decodeRecord(const Record &R, AccessSpecifier &Field,
5748
llvm::StringRef Blob) {
5849
switch (R[0]) {
@@ -433,11 +424,6 @@ template <> llvm::Expected<CommentInfo *> getCommentInfo(CommentInfo *I) {
433424
return I->Children.back().get();
434425
}
435426

436-
template <>
437-
llvm::Expected<CommentInfo *> getCommentInfo(std::unique_ptr<CommentInfo> &I) {
438-
return getCommentInfo(I.get());
439-
}
440-
441427
// When readSubBlock encounters a TypeInfo sub-block, it calls addTypeInfo on
442428
// the parent block to set it. The template specializations define what to do
443429
// for each supported parent block.

0 commit comments

Comments
 (0)