[cfe-commits] r159860 - in /cfe/trunk/lib/AST: Comment.cpp CommentParser.cpp

Matt Beaumont-Gay matthewbg at google.com
Fri Jul 6 14:13:10 PDT 2012


Author: matthewbg
Date: Fri Jul  6 16:13:09 2012
New Revision: 159860

URL: http://llvm.org/viewvc/llvm-project?rev=159860&view=rev
Log:
Sprinkle llvm_unreachable around to placate GCC's -Wreturn-type.

Modified:
    cfe/trunk/lib/AST/Comment.cpp
    cfe/trunk/lib/AST/CommentParser.cpp

Modified: cfe/trunk/lib/AST/Comment.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Comment.cpp?rev=159860&r1=159859&r2=159860&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Comment.cpp (original)
+++ cfe/trunk/lib/AST/Comment.cpp Fri Jul  6 16:13:09 2012
@@ -69,6 +69,7 @@
 #undef COMMENT
 #undef ABSTRACT_COMMENT
   }
+  llvm_unreachable("Unknown comment kind!");
 }
 
 Comment::child_iterator Comment::child_end() const {
@@ -82,9 +83,9 @@
 #undef COMMENT
 #undef ABSTRACT_COMMENT
   }
+  llvm_unreachable("Unknown comment kind!");
 }
 
 
 } // end namespace comments
 } // end namespace clang
-

Modified: cfe/trunk/lib/AST/CommentParser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CommentParser.cpp?rev=159860&r1=159859&r2=159860&view=diff
==============================================================================
--- cfe/trunk/lib/AST/CommentParser.cpp (original)
+++ cfe/trunk/lib/AST/CommentParser.cpp Fri Jul  6 16:13:09 2012
@@ -390,6 +390,7 @@
   case tok::html_greater:
     llvm_unreachable("should not see this token");
   }
+  llvm_unreachable("bogus token kind");
 }
 
 FullComment *Parser::parseFullComment() {
@@ -410,5 +411,3 @@
 
 } // end namespace comments
 } // end namespace clang
-
-





More information about the cfe-commits mailing list