From b5c9e22ad11b8a89b98ca9b9795a4bd7eb7841fb Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 20 Jan 2018 19:19:19 -0800 Subject: [PATCH] Explicitly use std::move to make clang 3.5 compile --- src/iindexer.cc | 2 +- src/indexer.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/iindexer.cc b/src/iindexer.cc index 3b838241..a2d4680a 100644 --- a/src/iindexer.cc +++ b/src/iindexer.cc @@ -68,7 +68,7 @@ struct TestIndexer : IIndexer { // specific file (atm it is always 1) auto result = std::move(it->second); indexes.erase(it); - return result; + return std::move(result); } std::unordered_map>> diff --git a/src/indexer.cc b/src/indexer.cc index 58f2c133..e2457444 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -1904,7 +1904,7 @@ optional>> Parse( ClangIndex* index, bool dump_ast) { if (!config->enableIndexing) - return {}; + return nullopt; file = NormalizePath(file);