]> granicus.if.org Git - clang/commitdiff
Fix 'control reaches end of non-void' warning by using llvm_unreachable.
authorManuel Klimek <klimek@google.com>
Wed, 29 Nov 2017 15:09:12 +0000 (15:09 +0000)
committerManuel Klimek <klimek@google.com>
Wed, 29 Nov 2017 15:09:12 +0000 (15:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319318 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Format/BreakableToken.cpp

index db350b9a5ad93b9a964096b0de71bec5d54e9c1c..a5fabfe2379ecf9b9e7beebec13ec7c3435f1cb8 100644 (file)
@@ -195,9 +195,8 @@ unsigned BreakableStringLiteral::getRangeLength(unsigned LineIndex,
                                                 unsigned Offset,
                                                 StringRef::size_type Length,
                                                 unsigned StartColumn) const {
-  assert(false &&
-         "Getting the length of a part of the string literal indicates that "
-         "the code tries to reflow it.");
+  llvm_unreachable("Getting the length of a part of the string literal "
+                   "indicates that the code tries to reflow it.");
 }
 
 unsigned