[clang-tools-extra] r318809 - Silence some MSVC warnings about not all control paths returning a value; NFC.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 21 14:24:13 PST 2017


Author: aaronballman
Date: Tue Nov 21 14:24:13 2017
New Revision: 318809

URL: http://llvm.org/viewvc/llvm-project?rev=318809&view=rev
Log:
Silence some MSVC warnings about not all control paths returning a value; NFC.

Modified:
    clang-tools-extra/trunk/clangd/JSONExpr.cpp
    clang-tools-extra/trunk/clangd/JSONExpr.h

Modified: clang-tools-extra/trunk/clangd/JSONExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/JSONExpr.cpp?rev=318809&r1=318808&r2=318809&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/JSONExpr.cpp (original)
+++ clang-tools-extra/trunk/clangd/JSONExpr.cpp Tue Nov 21 14:24:13 2017
@@ -519,6 +519,7 @@ bool operator==(const Expr &L, const Exp
   case Expr::Object:
     return *L.object() == *R.object();
   }
+  llvm_unreachable("Unknown expressiopn kind");
 }
 } // namespace json
 } // namespace clangd

Modified: clang-tools-extra/trunk/clangd/JSONExpr.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/JSONExpr.h?rev=318809&r1=318808&r2=318809&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/JSONExpr.h (original)
+++ clang-tools-extra/trunk/clangd/JSONExpr.h Tue Nov 21 14:24:13 2017
@@ -162,6 +162,7 @@ public:
     case T_Array:
       return Array;
     }
+    llvm_unreachable("Unknown kind");
   }
 
   // Typed accessors return None/nullptr if the Expr is not of this type.




More information about the cfe-commits mailing list