]> granicus.if.org Git - clang/commitdiff
Sprinkle llvm_unreachable around to placate GCC's -Wreturn-type.
authorMatt Beaumont-Gay <matthewbg@google.com>
Fri, 6 Jul 2012 21:13:09 +0000 (21:13 +0000)
committerMatt Beaumont-Gay <matthewbg@google.com>
Fri, 6 Jul 2012 21:13:09 +0000 (21:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159860 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Comment.cpp
lib/AST/CommentParser.cpp

index 22277ad88ae642590f0fffa86f4dcc8c3ff845f2..4681d5a143d45a406d39183c748647d692c0570a 100644 (file)
@@ -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
-
index 14a2d85ae4b5b440ff088718f41aaa36f223cb5c..2df3759bb961bedf3d490b1612b4c61aa08ff764 100644 (file)
@@ -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
-
-