[clang-tools-extra] 3c2c776 - Fix building with GCC5 after e64f99c51a8e
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Mon May 4 02:12:52 PDT 2020
Author: Hans Wennborg
Date: 2020-05-04T11:12:39+02:00
New Revision: 3c2c7760d9eea0236c5c54e8939b3901f4208835
URL: https://github.com/llvm/llvm-project/commit/3c2c7760d9eea0236c5c54e8939b3901f4208835
DIFF: https://github.com/llvm/llvm-project/commit/3c2c7760d9eea0236c5c54e8939b3901f4208835.diff
LOG: Fix building with GCC5 after e64f99c51a8e
It was failing with:
/work/llvm.monorepo/clang-tools-extra/clangd/ClangdServer.cpp: In lambda function:
/work/llvm.monorepo/clang-tools-extra/clangd/ClangdServer.cpp:374:75:
error: could not convert ‘(const char*)""’ from ‘const char*’ to ‘llvm::StringLiteral’
trace::Metric::Distribution);
^
Added:
Modified:
clang-tools-extra/clangd/support/Trace.h
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/support/Trace.h b/clang-tools-extra/clangd/support/Trace.h
index c027595b85ed..90a11bb1feb4 100644
--- a/clang-tools-extra/clangd/support/Trace.h
+++ b/clang-tools-extra/clangd/support/Trace.h
@@ -52,7 +52,7 @@ struct Metric {
Distribution,
};
constexpr Metric(llvm::StringLiteral Name, MetricType Type,
- llvm::StringLiteral LabelName = "")
+ llvm::StringLiteral LabelName = llvm::StringLiteral(""))
: Name(Name), Type(Type), LabelName(LabelName) {}
/// Records a measurement for this metric to active tracer.
More information about the cfe-commits
mailing list