Specify lambda return type to work around clang 3.5 build issue

This commit is contained in:
Fangrui Song 2017-12-20 19:28:57 -08:00
parent 3410f9769c
commit 6e231628fe

View File

@ -155,7 +155,7 @@ void RunIndexTests(const std::string& filter_path) {
// FIXME: promote to utils, find and remove duplicates (ie, // FIXME: promote to utils, find and remove duplicates (ie,
// cquery_call_tree.cc, maybe something in project.cc). // cquery_call_tree.cc, maybe something in project.cc).
auto basename = [](const std::string& path) { auto basename = [](const std::string& path) -> std::string {
size_t last_index = path.find_last_of('/'); size_t last_index = path.find_last_of('/');
if (last_index == std::string::npos) if (last_index == std::string::npos)
return path; return path;