[clang-tools-extra] r342052 - Fix MSVC "not all control paths return a value" warnings. NFCI.

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 12 05:56:58 PDT 2018


Author: rksimon
Date: Wed Sep 12 05:56:58 2018
New Revision: 342052

URL: http://llvm.org/viewvc/llvm-project?rev=342052&view=rev
Log:
Fix MSVC "not all control paths return a value" warnings. NFCI.

Modified:
    clang-tools-extra/trunk/clang-doc/MDGenerator.cpp

Modified: clang-tools-extra/trunk/clang-doc/MDGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-doc/MDGenerator.cpp?rev=342052&r1=342051&r2=342052&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-doc/MDGenerator.cpp (original)
+++ clang-tools-extra/trunk/clang-doc/MDGenerator.cpp Wed Sep 12 05:56:58 2018
@@ -32,6 +32,7 @@ std::string getAccess(AccessSpecifier AS
   case AccessSpecifier::AS_none:
     return {};
   }
+  llvm_unreachable("Unknown AccessSpecifier");
 }
 
 std::string getTagType(TagTypeKind AS) {
@@ -47,6 +48,7 @@ std::string getTagType(TagTypeKind AS) {
   case TagTypeKind::TTK_Enum:
     return "enum";
   }
+  llvm_unreachable("Unknown TagTypeKind");
 }
 
 // Markdown generation




More information about the cfe-commits mailing list