Fix linux build

This commit is contained in:
Jacob Dufault 2017-09-13 10:53:13 -07:00
parent d9143f065d
commit 104cfd167c
3 changed files with 9 additions and 9 deletions

View File

@ -2626,7 +2626,6 @@ bool QueryDbMainLoop(
} }
case IpcId::CqueryQueryDbWaitForIdleIndexer: { case IpcId::CqueryQueryDbWaitForIdleIndexer: {
auto msg = static_cast<Ipc_CqueryQueryDbWaitForIdleIndexer*>(message.get());
LOG_S(INFO) << "Waiting for idle"; LOG_S(INFO) << "Waiting for idle";
int idle_count = 0; int idle_count = 0;
while (true) { while (true) {

View File

@ -43,7 +43,7 @@ optional<std::string> ReadJsonRpcContentFrom(std::function<optional<char>()> rea
stringified_content_length += c; stringified_content_length += c;
} }
constexpr char* kContentLengthStart = "Content-Length: "; const char* kContentLengthStart = "Content-Length: ";
assert(StartsWith(stringified_content_length, kContentLengthStart)); assert(StartsWith(stringified_content_length, kContentLengthStart));
int content_length = atoi(stringified_content_length.c_str() + strlen(kContentLengthStart)); int content_length = atoi(stringified_content_length.c_str() + strlen(kContentLengthStart));
@ -74,8 +74,9 @@ optional<std::string> ReadJsonRpcContentFrom(std::function<optional<char>()> rea
TEST_SUITE("FindIncludeLine"); TEST_SUITE("FindIncludeLine");
auto MakeContentReader(std::string* content, bool can_be_empty) { std::function<optional<char>()>
return [=]() -> optional<char> { MakeContentReader(std::string* content, bool can_be_empty) {
return [content, can_be_empty]() -> optional<char> {
if (!can_be_empty) if (!can_be_empty)
REQUIRE(!content->empty()); REQUIRE(!content->empty());
if (content->empty()) if (content->empty())
@ -87,14 +88,14 @@ auto MakeContentReader(std::string* content, bool can_be_empty) {
} }
TEST_CASE("ReadContentFromSource") { TEST_CASE("ReadContentFromSource") {
auto parse_correct = [](std::string content) { auto parse_correct = [](std::string content) -> std::string {
auto reader = MakeContentReader(&content, false /*can_be_empty*/); auto reader = MakeContentReader(&content, false /*can_be_empty*/);
auto got = ReadJsonRpcContentFrom(reader); auto got = ReadJsonRpcContentFrom(reader);
REQUIRE(got); REQUIRE(got);
return got.value(); return got.value();
}; };
auto parse_incorrect = [](std::string content) { auto parse_incorrect = [](std::string content) -> optional<std::string> {
auto reader = MakeContentReader(&content, true /*can_be_empty*/); auto reader = MakeContentReader(&content, true /*can_be_empty*/);
return ReadJsonRpcContentFrom(reader); return ReadJsonRpcContentFrom(reader);
}; };

View File

@ -24,7 +24,7 @@ global CLANG_PLATFORM_NAME
global CLANG_TARBALL_PLATFORM_NAME global CLANG_TARBALL_PLATFORM_NAME
if sys.platform == 'linux' or sys.platform == 'linux2': if sys.platform == 'linux' or sys.platform == 'linux2':
CLANG_PLATFORM_NAME = 'linux-x86_64-gnu-ubuntu14.04' CLANG_PLATFORM_NAME = 'linux-x86_64-ubuntu14.04'
CLANG_TARBALL_PLATFORM_NAME = 'clang+llvm' CLANG_TARBALL_PLATFORM_NAME = 'clang+llvm'
elif sys.platform == 'darwin': elif sys.platform == 'darwin':
CLANG_PLATFORM_NAME = 'x86_64-apple-darwin' CLANG_PLATFORM_NAME = 'x86_64-apple-darwin'