Skip to content

Commit c593f5e

Browse files
committed
[clang-doc] Silence compiler warning with gcc 7.4 [NFC]
Without the fix gcc 7.4.0 complains with /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp: In member function 'llvm::SmallString<16> clang::doc::{anonymous}::HTMLTag::ToString() const': /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp:165:1: error: control reaches end of non-void function [-Werror=return-type] } ^ /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp: In member function 'bool clang::doc::{anonymous}::HTMLTag::HasInlineChildren() const': /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp:142:1: error: control reaches end of non-void function [-Werror=return-type] } ^ /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp: In member function 'bool clang::doc::{anonymous}::HTMLTag::IsSelfClosing() const': /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp:126:1: error: control reaches end of non-void function [-Werror=return-type] } ^ cc1plus: all warnings being treated as errors llvm-svn: 365736
1 parent 983d7dd commit c593f5e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

+3
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ bool HTMLTag::IsSelfClosing() const {
123123
case HTMLTag::TAG_LI:
124124
return false;
125125
}
126+
llvm_unreachable("Unhandled HTMLTag::TagType");
126127
}
127128

128129
bool HTMLTag::HasInlineChildren() const {
@@ -139,6 +140,7 @@ bool HTMLTag::HasInlineChildren() const {
139140
case HTMLTag::TAG_UL:
140141
return false;
141142
}
143+
llvm_unreachable("Unhandled HTMLTag::TagType");
142144
}
143145

144146
llvm::SmallString<16> HTMLTag::ToString() const {
@@ -162,6 +164,7 @@ llvm::SmallString<16> HTMLTag::ToString() const {
162164
case HTMLTag::TAG_LI:
163165
return llvm::SmallString<16>("li");
164166
}
167+
llvm_unreachable("Unhandled HTMLTag::TagType");
165168
}
166169

167170
void TextNode::Render(llvm::raw_ostream &OS, int IndentationLevel) {

0 commit comments

Comments
 (0)