[Lldb-commits] [lldb] r341163 - Silence some "control reaches end of non-void function" warnings with gcc

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 30 22:18:12 PDT 2018


Author: labath
Date: Thu Aug 30 22:18:11 2018
New Revision: 341163

URL: http://llvm.org/viewvc/llvm-project?rev=341163&view=rev
Log:
Silence some "control reaches end of non-void function" warnings with gcc

Modified:
    lldb/trunk/source/Core/Mangled.cpp
    lldb/trunk/source/Core/RichManglingContext.cpp

Modified: lldb/trunk/source/Core/Mangled.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Mangled.cpp?rev=341163&r1=341162&r2=341163&view=diff
==============================================================================
--- lldb/trunk/source/Core/Mangled.cpp (original)
+++ lldb/trunk/source/Core/Mangled.cpp Thu Aug 30 22:18:11 2018
@@ -354,6 +354,7 @@ bool Mangled::DemangleWithRichManglingIn
     }
   }
   }
+  llvm_unreachable("Fully covered switch above!");
 }
 
 //----------------------------------------------------------------------

Modified: lldb/trunk/source/Core/RichManglingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/RichManglingContext.cpp?rev=341163&r1=341162&r2=341163&view=diff
==============================================================================
--- lldb/trunk/source/Core/RichManglingContext.cpp (original)
+++ lldb/trunk/source/Core/RichManglingContext.cpp Thu Aug 30 22:18:11 2018
@@ -74,6 +74,7 @@ bool RichManglingContext::IsCtorOrDtor()
   case None:
     return false;
   }
+  llvm_unreachable("Fully covered switch above!");
 }
 
 bool RichManglingContext::IsFunction() const {
@@ -86,6 +87,7 @@ bool RichManglingContext::IsFunction() c
   case None:
     return false;
   }
+  llvm_unreachable("Fully covered switch above!");
 }
 
 void RichManglingContext::processIPDStrResult(char *ipd_res, size_t res_size) {




More information about the lldb-commits mailing list