]> granicus.if.org Git - llvm/commitdiff
[llvm-exegesis] Fix compilation before c++17.
authorClement Courbet <courbet@google.com>
Fri, 22 Mar 2019 13:37:39 +0000 (13:37 +0000)
committerClement Courbet <courbet@google.com>
Fri, 22 Mar 2019 13:37:39 +0000 (13:37 +0000)
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) {

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356748 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/tools/llvm-exegesis/ClusteringTest.cpp

index 174dd4300c55bcf4f85700cf91b74dc7b748bf4d..2833d557ba21f4966c8380323de303dc274d1cce 100644 (file)
@@ -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));
 };