[clang-tools-extra] 6e99199 - Fix "not all control paths return a value" warning on MSVC builds.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Tue May 19 05:16:50 PDT 2020
Author: Simon Pilgrim
Date: 2020-05-19T13:16:24+01:00
New Revision: 6e99199419d95f39ae9d8a11d8632caac7b405b4
URL: https://github.com/llvm/llvm-project/commit/6e99199419d95f39ae9d8a11d8632caac7b405b4
DIFF: https://github.com/llvm/llvm-project/commit/6e99199419d95f39ae9d8a11d8632caac7b405b4.diff
LOG: Fix "not all control paths return a value" warning on MSVC builds.
Use llvm_unreachable as typeName(Metric::MetricType T) should handle all enum values.
Added:
Modified:
clang-tools-extra/clangd/support/Trace.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/support/Trace.cpp b/clang-tools-extra/clangd/support/Trace.cpp
index 10ae461221ee..7ab09cd23e6a 100644
--- a/clang-tools-extra/clangd/support/Trace.cpp
+++ b/clang-tools-extra/clangd/support/Trace.cpp
@@ -225,6 +225,7 @@ class CSVMetricTracer : public EventTracer {
case Metric::Distribution:
return "d";
}
+ llvm_unreachable("Unknown Metric::MetricType enum");
}
static bool needsQuote(llvm::StringRef Text) {
More information about the cfe-commits
mailing list