From: Matt Beaumont-Gay Date: Fri, 6 Jul 2012 21:13:09 +0000 (+0000) Subject: Sprinkle llvm_unreachable around to placate GCC's -Wreturn-type. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d48b5c1d58c381e6e0c719701ef433b530e0e1a;p=clang Sprinkle llvm_unreachable around to placate GCC's -Wreturn-type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159860 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Comment.cpp b/lib/AST/Comment.cpp index 22277ad88a..4681d5a143 100644 --- a/lib/AST/Comment.cpp +++ b/lib/AST/Comment.cpp @@ -69,6 +69,7 @@ Comment::child_iterator Comment::child_begin() const { #undef COMMENT #undef ABSTRACT_COMMENT } + llvm_unreachable("Unknown comment kind!"); } Comment::child_iterator Comment::child_end() const { @@ -82,9 +83,9 @@ Comment::child_iterator Comment::child_end() const { #undef COMMENT #undef ABSTRACT_COMMENT } + llvm_unreachable("Unknown comment kind!"); } } // end namespace comments } // end namespace clang - diff --git a/lib/AST/CommentParser.cpp b/lib/AST/CommentParser.cpp index 14a2d85ae4..2df3759bb9 100644 --- a/lib/AST/CommentParser.cpp +++ b/lib/AST/CommentParser.cpp @@ -390,6 +390,7 @@ BlockContentComment *Parser::parseBlockContent() { case tok::html_greater: llvm_unreachable("should not see this token"); } + llvm_unreachable("bogus token kind"); } FullComment *Parser::parseFullComment() { @@ -410,5 +411,3 @@ FullComment *Parser::parseFullComment() { } // end namespace comments } // end namespace clang - -