[llvm] r356748 - [llvm-exegesis] Fix compilation before c++17.
Clement Courbet via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 22 06:37:39 PDT 2019
Author: courbet
Date: Fri Mar 22 06:37:39 2019
New Revision: 356748
URL: http://llvm.org/viewvc/llvm-project?rev=356748&view=rev
Log:
[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<int> &Indices) {
Modified:
llvm/trunk/unittests/tools/llvm-exegesis/ClusteringTest.cpp
Modified: llvm/trunk/unittests/tools/llvm-exegesis/ClusteringTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/tools/llvm-exegesis/ClusteringTest.cpp?rev=356748&r1=356747&r2=356748&view=diff
==============================================================================
--- llvm/trunk/unittests/tools/llvm-exegesis/ClusteringTest.cpp (original)
+++ llvm/trunk/unittests/tools/llvm-exegesis/ClusteringTest.cpp Fri Mar 22 06:37:39 2019
@@ -22,7 +22,7 @@ using testing::Field;
using testing::UnorderedElementsAre;
using testing::UnorderedElementsAreArray;
-static constexpr auto HasPoints = [](const std::vector<int> &Indices) {
+static const auto HasPoints = [](const std::vector<int> &Indices) {
return Field(&InstructionBenchmarkClustering::Cluster::PointIndices,
UnorderedElementsAreArray(Indices));
};
More information about the llvm-commits
mailing list