From f0344750f209becb1e408dfbd9d776a1951d5da7 Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Fri, 22 Mar 2019 13:37:39 +0000 Subject: [PATCH] [llvm-exegesis] Fix compilation before c++17. ClusteringTest.cpp:25:23: error: constexpr variable cannot have non-literal type 'const llvm::exegesis::(anonymous namespace)::(lambda at /home/buildslave/ps4-buildslave4/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.src/unittests/tools/llvm-exegesis/ClusteringTest.cpp:25:35)' static constexpr auto HasPoints = [](const std::vector &Indices) { git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356748 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/tools/llvm-exegesis/ClusteringTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittests/tools/llvm-exegesis/ClusteringTest.cpp b/unittests/tools/llvm-exegesis/ClusteringTest.cpp index 174dd4300c5..2833d557ba2 100644 --- a/unittests/tools/llvm-exegesis/ClusteringTest.cpp +++ b/unittests/tools/llvm-exegesis/ClusteringTest.cpp @@ -22,7 +22,7 @@ using testing::Field; using testing::UnorderedElementsAre; using testing::UnorderedElementsAreArray; -static constexpr auto HasPoints = [](const std::vector &Indices) { +static const auto HasPoints = [](const std::vector &Indices) { return Field(&InstructionBenchmarkClustering::Cluster::PointIndices, UnorderedElementsAreArray(Indices)); }; -- 2.50.1