Reformat code

This commit is contained in:
Jacob Dufault 2017-11-19 14:11:54 -08:00
parent 297ed1d13e
commit 97417ecc93
9 changed files with 537 additions and 529 deletions

View File

@ -114,13 +114,13 @@ lsCompletionItemKind GetCompletionKind(CXCursorKind cursor_kind) {
case CXCursor_TypeRef: case CXCursor_TypeRef:
return lsCompletionItemKind::Reference; return lsCompletionItemKind::Reference;
// return lsCompletionItemKind::Property; // return lsCompletionItemKind::Property;
// return lsCompletionItemKind::Unit; // return lsCompletionItemKind::Unit;
// return lsCompletionItemKind::Value; // return lsCompletionItemKind::Value;
// return lsCompletionItemKind::Keyword; // return lsCompletionItemKind::Keyword;
// return lsCompletionItemKind::Snippet; // return lsCompletionItemKind::Snippet;
// return lsCompletionItemKind::Color; // return lsCompletionItemKind::Color;
// return lsCompletionItemKind::File; // return lsCompletionItemKind::File;
case CXCursor_NotImplemented: case CXCursor_NotImplemented:
return lsCompletionItemKind::Text; return lsCompletionItemKind::Text;
@ -146,7 +146,8 @@ void BuildDetailString(CXCompletionString completion_string,
case CXCompletionChunk_Optional: { case CXCompletionChunk_Optional: {
CXCompletionString nested = CXCompletionString nested =
clang_getCompletionChunkCompletionString(completion_string, i); clang_getCompletionChunkCompletionString(completion_string, i);
BuildDetailString(nested, label, detail, insert, parameters, include_snippets); BuildDetailString(nested, label, detail, insert, parameters,
include_snippets);
break; break;
} }
@ -156,7 +157,10 @@ void BuildDetailString(CXCompletionString completion_string,
parameters->push_back(text); parameters->push_back(text);
detail += text; detail += text;
// Add parameter declarations as snippets if enabled // Add parameter declarations as snippets if enabled
if (include_snippets) { insert += "${" + std::to_string(parameters->size()) + ":" + text + "}"; } if (include_snippets) {
insert +=
"${" + std::to_string(parameters->size()) + ":" + text + "}";
}
break; break;
} }
@ -198,7 +202,9 @@ void BuildDetailString(CXCompletionString completion_string,
detail += "("; detail += "(";
insert += "("; insert += "(";
// Put cursor between parentheses if snippets are not enabled // Put cursor between parentheses if snippets are not enabled
if (!include_snippets) { insert += "$1"; } if (!include_snippets) {
insert += "$1";
}
break; break;
case CXCompletionChunk_RightParen: case CXCompletionChunk_RightParen:
detail += ")"; detail += ")";
@ -231,7 +237,9 @@ void BuildDetailString(CXCompletionString completion_string,
case CXCompletionChunk_Comma: case CXCompletionChunk_Comma:
detail += ", "; detail += ", ";
// Only put comma's between parentheses if snippets are enabled // Only put comma's between parentheses if snippets are enabled
if (include_snippets) { insert += ", "; } if (include_snippets) {
insert += ", ";
}
break; break;
case CXCompletionChunk_Colon: case CXCompletionChunk_Colon:
detail += ":"; detail += ":";
@ -409,11 +417,11 @@ void CompletionQueryMain(ClangCompleteManager* completion_manager) {
// kind/label/detail/docs/sortText // kind/label/detail/docs/sortText
ls_completion_item.kind = GetCompletionKind(result.CursorKind); ls_completion_item.kind = GetCompletionKind(result.CursorKind);
BuildDetailString(result.CompletionString, ls_completion_item.label, BuildDetailString(
ls_completion_item.detail, result.CompletionString, ls_completion_item.label,
ls_completion_item.insertText, ls_completion_item.detail, ls_completion_item.insertText,
&ls_completion_item.parameters_, &ls_completion_item.parameters_,
completion_manager->config_->enableSnippetInsertion); completion_manager->config_->enableSnippetInsertion);
ls_completion_item.documentation = ToString( ls_completion_item.documentation = ToString(
clang_getCompletionBriefComment(result.CompletionString)); clang_getCompletionBriefComment(result.CompletionString));

View File

@ -3265,12 +3265,12 @@ TEST_SUITE("LexFunctionDeclaration") {
int newlines_after_name = 0; int newlines_after_name = 0;
LexFunctionDeclaration(buffer_content, declaration, nullopt, &insert_text, LexFunctionDeclaration(buffer_content, declaration, nullopt, &insert_text,
&newlines_after_name); &newlines_after_name);
REQUIRE(insert_text == "void Foo() {\n}"); REQUIRE(insert_text == "void Foo() {\n}");
REQUIRE(newlines_after_name == 0); REQUIRE(newlines_after_name == 0);
LexFunctionDeclaration(buffer_content, declaration, std::string("Type"), LexFunctionDeclaration(buffer_content, declaration, std::string("Type"),
&insert_text, &newlines_after_name); &insert_text, &newlines_after_name);
REQUIRE(insert_text == "void Type::Foo() {\n}"); REQUIRE(insert_text == "void Type::Foo() {\n}");
REQUIRE(newlines_after_name == 0); REQUIRE(newlines_after_name == 0);
} }
@ -3282,7 +3282,7 @@ TEST_SUITE("LexFunctionDeclaration") {
int newlines_after_name = 0; int newlines_after_name = 0;
LexFunctionDeclaration(buffer_content, declaration, std::string("Foo"), LexFunctionDeclaration(buffer_content, declaration, std::string("Foo"),
&insert_text, &newlines_after_name); &insert_text, &newlines_after_name);
REQUIRE(insert_text == "Foo::Foo() {\n}"); REQUIRE(insert_text == "Foo::Foo() {\n}");
REQUIRE(newlines_after_name == 0); REQUIRE(newlines_after_name == 0);
} }
@ -3294,7 +3294,7 @@ TEST_SUITE("LexFunctionDeclaration") {
int newlines_after_name = 0; int newlines_after_name = 0;
LexFunctionDeclaration(buffer_content, declaration, std::string("Foo"), LexFunctionDeclaration(buffer_content, declaration, std::string("Foo"),
&insert_text, &newlines_after_name); &insert_text, &newlines_after_name);
REQUIRE(insert_text == "Foo::~Foo() {\n}"); REQUIRE(insert_text == "Foo::~Foo() {\n}");
REQUIRE(newlines_after_name == 0); REQUIRE(newlines_after_name == 0);
} }
@ -3306,12 +3306,12 @@ TEST_SUITE("LexFunctionDeclaration") {
int newlines_after_name = 0; int newlines_after_name = 0;
LexFunctionDeclaration(buffer_content, declaration, nullopt, &insert_text, LexFunctionDeclaration(buffer_content, declaration, nullopt, &insert_text,
&newlines_after_name); &newlines_after_name);
REQUIRE(insert_text == "std::vector<int> Foo() {\n}"); REQUIRE(insert_text == "std::vector<int> Foo() {\n}");
REQUIRE(newlines_after_name == 0); REQUIRE(newlines_after_name == 0);
LexFunctionDeclaration(buffer_content, declaration, std::string("Type"), LexFunctionDeclaration(buffer_content, declaration, std::string("Type"),
&insert_text, &newlines_after_name); &insert_text, &newlines_after_name);
REQUIRE(insert_text == "std::vector<int> Type::Foo() {\n}"); REQUIRE(insert_text == "std::vector<int> Type::Foo() {\n}");
REQUIRE(newlines_after_name == 0); REQUIRE(newlines_after_name == 0);
} }
@ -3323,12 +3323,12 @@ TEST_SUITE("LexFunctionDeclaration") {
int newlines_after_name = 0; int newlines_after_name = 0;
LexFunctionDeclaration(buffer_content, declaration, nullopt, &insert_text, LexFunctionDeclaration(buffer_content, declaration, nullopt, &insert_text,
&newlines_after_name); &newlines_after_name);
REQUIRE(insert_text == "std::function < int() > \n Foo() {\n}"); REQUIRE(insert_text == "std::function < int() > \n Foo() {\n}");
REQUIRE(newlines_after_name == 0); REQUIRE(newlines_after_name == 0);
LexFunctionDeclaration(buffer_content, declaration, std::string("Type"), LexFunctionDeclaration(buffer_content, declaration, std::string("Type"),
&insert_text, &newlines_after_name); &insert_text, &newlines_after_name);
REQUIRE(insert_text == "std::function < int() > \n Type::Foo() {\n}"); REQUIRE(insert_text == "std::function < int() > \n Type::Foo() {\n}");
REQUIRE(newlines_after_name == 0); REQUIRE(newlines_after_name == 0);
} }
@ -3340,12 +3340,12 @@ TEST_SUITE("LexFunctionDeclaration") {
int newlines_after_name = 0; int newlines_after_name = 0;
LexFunctionDeclaration(buffer_content, declaration, nullopt, &insert_text, LexFunctionDeclaration(buffer_content, declaration, nullopt, &insert_text,
&newlines_after_name); &newlines_after_name);
REQUIRE(insert_text == "void Foo(int a,\n\n int b) {\n}"); REQUIRE(insert_text == "void Foo(int a,\n\n int b) {\n}");
REQUIRE(newlines_after_name == 2); REQUIRE(newlines_after_name == 2);
LexFunctionDeclaration(buffer_content, declaration, std::string("Type"), LexFunctionDeclaration(buffer_content, declaration, std::string("Type"),
&insert_text, &newlines_after_name); &insert_text, &newlines_after_name);
REQUIRE(insert_text == "void Type::Foo(int a,\n\n int b) {\n}"); REQUIRE(insert_text == "void Type::Foo(int a,\n\n int b) {\n}");
REQUIRE(newlines_after_name == 2); REQUIRE(newlines_after_name == 2);
} }

View File

@ -65,7 +65,8 @@ struct Config {
// Version of the client. // Version of the client.
int clientVersion = 0; int clientVersion = 0;
// If true parameter declarations are included in code completion when calling a function or method // If true parameter declarations are included in code completion when calling
// a function or method
bool enableSnippetInsertion = true; bool enableSnippetInsertion = true;
}; };
MAKE_REFLECT_STRUCT(Config, MAKE_REFLECT_STRUCT(Config,

View File

@ -114,7 +114,8 @@ TEST_SUITE("FindIncludeLine") {
REQUIRE(parse_correct("Content-Length: 4\r\n\r\nabcd") == "abcd"); REQUIRE(parse_correct("Content-Length: 4\r\n\r\nabcd") == "abcd");
REQUIRE(parse_incorrect("ggg") == optional<std::string>()); REQUIRE(parse_incorrect("ggg") == optional<std::string>());
REQUIRE(parse_incorrect("Content-Length: 0\r\n") == optional<std::string>()); REQUIRE(parse_incorrect("Content-Length: 0\r\n") ==
optional<std::string>());
REQUIRE(parse_incorrect("Content-Length: 5\r\n\r\nab") == REQUIRE(parse_incorrect("Content-Length: 5\r\n\r\nab") ==
optional<std::string>()); optional<std::string>());
} }
@ -217,7 +218,7 @@ void lsDocumentUri::SetPath(const std::string& path) {
raw_uri = ReplaceAll(raw_uri, "(", "%28"); raw_uri = ReplaceAll(raw_uri, "(", "%28");
raw_uri = ReplaceAll(raw_uri, ")", "%29"); raw_uri = ReplaceAll(raw_uri, ")", "%29");
// TODO: proper fix // TODO: proper fix
#if defined(_WIN32) #if defined(_WIN32)
raw_uri = "file:///" + raw_uri; raw_uri = "file:///" + raw_uri;
#else #else
@ -255,7 +256,7 @@ std::string lsDocumentUri::GetPath() const {
std::replace(result.begin(), result.end(), '\\', '/'); std::replace(result.begin(), result.end(), '\\', '/');
#if defined(_WIN32) #if defined(_WIN32)
// std::transform(result.begin(), result.end(), result.begin(), ::tolower); // std::transform(result.begin(), result.end(), result.begin(), ::tolower);
#endif #endif
return result; return result;

View File

@ -28,7 +28,8 @@ std::vector<std::string> Split(const std::string& s, char delim) {
return elems; return elems;
} }
std::string Join(const std::vector<std::string>& entries, char delim, std::string Join(const std::vector<std::string>& entries,
char delim,
size_t end) { size_t end) {
std::string result; std::string result;
bool first = true; bool first = true;

View File

@ -157,7 +157,7 @@ std::string GetWorkingDirectory() {
std::string NormalizePath(const std::string& path) { std::string NormalizePath(const std::string& path) {
errno = 0; errno = 0;
char name[PATH_MAX + 1]; char name[PATH_MAX + 1];
(void) realpath(path.c_str(), name); (void)realpath(path.c_str(), name);
if (errno) if (errno)
return path; return path;
return name; return name;

View File

@ -52,15 +52,10 @@ static std::vector<std::string> kBlacklistMulti = {
// Blacklisted flags which are always removed from the command line. // Blacklisted flags which are always removed from the command line.
static std::vector<std::string> kBlacklist = { static std::vector<std::string> kBlacklist = {
"-c", "-c", "-MP", "-MD", "-MMD", "--fcolor-diagnostics",
"-MP",
"-MD",
"-MMD",
"--fcolor-diagnostics",
// This strips path-like args but is a bit hacky. // This strips path-like args but is a bit hacky.
"/", "/", "..",
"..",
}; };
// Arguments which are followed by a potentially relative path. We need to make // Arguments which are followed by a potentially relative path. We need to make
@ -412,8 +407,7 @@ void Project::ForAllFilteredFiles(
} }
TEST_SUITE("Project") { TEST_SUITE("Project") {
void CheckFlags(const std::string& directory, void CheckFlags(const std::string& directory, const std::string& file,
const std::string& file,
std::vector<std::string> raw, std::vector<std::string> raw,
std::vector<std::string> expected) { std::vector<std::string> expected) {
g_disable_normalize_path_for_test = true; g_disable_normalize_path_for_test = true;
@ -456,12 +450,12 @@ TEST_SUITE("Project") {
"-resource-dir=/w/resource_dir/"}); "-resource-dir=/w/resource_dir/"});
CheckFlags(/* raw */ {"goma", "clang"}, CheckFlags(/* raw */ {"goma", "clang"},
/* expected */ {"clang", "-xc++", "-std=c++11", /* expected */ {"clang", "-xc++", "-std=c++11",
"-resource-dir=/w/resource_dir/"}); "-resource-dir=/w/resource_dir/"});
CheckFlags(/* raw */ {"goma", "clang", "--foo"}, CheckFlags(/* raw */ {"goma", "clang", "--foo"},
/* expected */ {"clang", "--foo", "-xc++", "-std=c++11", /* expected */ {"clang", "--foo", "-xc++", "-std=c++11",
"-resource-dir=/w/resource_dir/"}); "-resource-dir=/w/resource_dir/"});
} }
// Checks flag parsing for a random chromium file in comparison to what // Checks flag parsing for a random chromium file in comparison to what
@ -649,163 +643,164 @@ TEST_SUITE("Project") {
/* expected */ /* expected */
{"../../third_party/llvm-build/Release+Asserts/bin/clang++", {"../../third_party/llvm-build/Release+Asserts/bin/clang++",
"-DV8_DEPRECATION_WARNINGS", "-DV8_DEPRECATION_WARNINGS",
"-DDCHECK_ALWAYS_ON=1", "-DDCHECK_ALWAYS_ON=1",
"-DUSE_UDEV", "-DUSE_UDEV",
"-DUSE_AURA=1", "-DUSE_AURA=1",
"-DUSE_NSS_CERTS=1", "-DUSE_NSS_CERTS=1",
"-DUSE_OZONE=1", "-DUSE_OZONE=1",
"-DFULL_SAFE_BROWSING", "-DFULL_SAFE_BROWSING",
"-DSAFE_BROWSING_CSD", "-DSAFE_BROWSING_CSD",
"-DSAFE_BROWSING_DB_LOCAL", "-DSAFE_BROWSING_DB_LOCAL",
"-DCHROMIUM_BUILD", "-DCHROMIUM_BUILD",
"-DFIELDTRIAL_TESTING_ENABLED", "-DFIELDTRIAL_TESTING_ENABLED",
"-D_FILE_OFFSET_BITS=64", "-D_FILE_OFFSET_BITS=64",
"-D_LARGEFILE_SOURCE", "-D_LARGEFILE_SOURCE",
"-D_LARGEFILE64_SOURCE", "-D_LARGEFILE64_SOURCE",
"-DCR_CLANG_REVISION=\"313786-1\"", "-DCR_CLANG_REVISION=\"313786-1\"",
"-D__STDC_CONSTANT_MACROS", "-D__STDC_CONSTANT_MACROS",
"-D__STDC_FORMAT_MACROS", "-D__STDC_FORMAT_MACROS",
"-DCOMPONENT_BUILD", "-DCOMPONENT_BUILD",
"-DOS_CHROMEOS", "-DOS_CHROMEOS",
"-DNDEBUG", "-DNDEBUG",
"-DNVALGRIND", "-DNVALGRIND",
"-DDYNAMIC_ANNOTATIONS_ENABLED=0", "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
"-DGL_GLEXT_PROTOTYPES", "-DGL_GLEXT_PROTOTYPES",
"-DUSE_GLX", "-DUSE_GLX",
"-DUSE_EGL", "-DUSE_EGL",
"-DANGLE_ENABLE_RELEASE_ASSERTS", "-DANGLE_ENABLE_RELEASE_ASSERTS",
"-DTOOLKIT_VIEWS=1", "-DTOOLKIT_VIEWS=1",
"-DGTEST_API_=", "-DGTEST_API_=",
"-DGTEST_HAS_POSIX_RE=0", "-DGTEST_HAS_POSIX_RE=0",
"-DGTEST_LANG_CXX11=1", "-DGTEST_LANG_CXX11=1",
"-DUNIT_TEST", "-DUNIT_TEST",
"-DUSING_V8_SHARED", "-DUSING_V8_SHARED",
"-DU_USING_ICU_NAMESPACE=0", "-DU_USING_ICU_NAMESPACE=0",
"-DU_ENABLE_DYLOAD=0", "-DU_ENABLE_DYLOAD=0",
"-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE", "-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE",
"-DUCHAR_TYPE=uint16_t", "-DUCHAR_TYPE=uint16_t",
"-DGOOGLE_PROTOBUF_NO_RTTI", "-DGOOGLE_PROTOBUF_NO_RTTI",
"-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
"-DHAVE_PTHREAD", "-DHAVE_PTHREAD",
"-DPROTOBUF_USE_DLLS", "-DPROTOBUF_USE_DLLS",
"-DBORINGSSL_SHARED_LIBRARY", "-DBORINGSSL_SHARED_LIBRARY",
"-DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS", "-DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS",
"-DSK_HAS_PNG_LIBRARY", "-DSK_HAS_PNG_LIBRARY",
"-DSK_HAS_WEBP_LIBRARY", "-DSK_HAS_WEBP_LIBRARY",
"-DSK_HAS_JPEG_LIBRARY", "-DSK_HAS_JPEG_LIBRARY",
"-DSKIA_DLL", "-DSKIA_DLL",
"-DGR_GL_IGNORE_ES3_MSAA=0", "-DGR_GL_IGNORE_ES3_MSAA=0",
"-DSK_SUPPORT_GPU=1", "-DSK_SUPPORT_GPU=1",
"-DMESA_EGL_NO_X11_HEADERS", "-DMESA_EGL_NO_X11_HEADERS",
"-I&/w/c/s/out/Release/../..", "-I&/w/c/s/out/Release/../..",
"-I&/w/c/s/out/Release/gen", "-I&/w/c/s/out/Release/gen",
"-I&/w/c/s/out/Release/../../third_party/libwebp/src", "-I&/w/c/s/out/Release/../../third_party/libwebp/src",
"-I&/w/c/s/out/Release/../../third_party/khronos", "-I&/w/c/s/out/Release/../../third_party/khronos",
"-I&/w/c/s/out/Release/../../gpu", "-I&/w/c/s/out/Release/../../gpu",
"-I&/w/c/s/out/Release/../../third_party/googletest/src/googletest/" "-I&/w/c/s/out/Release/../../third_party/googletest/src/googletest/"
"include", "include",
"-I&/w/c/s/out/Release/../../third_party/WebKit", "-I&/w/c/s/out/Release/../../third_party/WebKit",
"-I&/w/c/s/out/Release/gen/third_party/WebKit", "-I&/w/c/s/out/Release/gen/third_party/WebKit",
"-I&/w/c/s/out/Release/../../v8/include", "-I&/w/c/s/out/Release/../../v8/include",
"-I&/w/c/s/out/Release/gen/v8/include", "-I&/w/c/s/out/Release/gen/v8/include",
"-I&/w/c/s/out/Release/../../third_party/icu/source/common", "-I&/w/c/s/out/Release/../../third_party/icu/source/common",
"-I&/w/c/s/out/Release/../../third_party/icu/source/i18n", "-I&/w/c/s/out/Release/../../third_party/icu/source/i18n",
"-I&/w/c/s/out/Release/../../third_party/protobuf/src", "-I&/w/c/s/out/Release/../../third_party/protobuf/src",
"-I&/w/c/s/out/Release/gen/protoc_out", "-I&/w/c/s/out/Release/gen/protoc_out",
"-I&/w/c/s/out/Release/../../third_party/protobuf/src", "-I&/w/c/s/out/Release/../../third_party/protobuf/src",
"-I&/w/c/s/out/Release/../../third_party/boringssl/src/include", "-I&/w/c/s/out/Release/../../third_party/boringssl/src/include",
"-I&/w/c/s/out/Release/../../build/linux/debian_jessie_amd64-sysroot/" "-I&/w/c/s/out/Release/../../build/linux/debian_jessie_amd64-sysroot/"
"usr/include/nss", "usr/include/nss",
"-I&/w/c/s/out/Release/../../build/linux/debian_jessie_amd64-sysroot/" "-I&/w/c/s/out/Release/../../build/linux/debian_jessie_amd64-sysroot/"
"usr/include/nspr", "usr/include/nspr",
"-I&/w/c/s/out/Release/../../skia/config", "-I&/w/c/s/out/Release/../../skia/config",
"-I&/w/c/s/out/Release/../../skia/ext", "-I&/w/c/s/out/Release/../../skia/ext",
"-I&/w/c/s/out/Release/../../third_party/skia/include/c", "-I&/w/c/s/out/Release/../../third_party/skia/include/c",
"-I&/w/c/s/out/Release/../../third_party/skia/include/config", "-I&/w/c/s/out/Release/../../third_party/skia/include/config",
"-I&/w/c/s/out/Release/../../third_party/skia/include/core", "-I&/w/c/s/out/Release/../../third_party/skia/include/core",
"-I&/w/c/s/out/Release/../../third_party/skia/include/effects", "-I&/w/c/s/out/Release/../../third_party/skia/include/effects",
"-I&/w/c/s/out/Release/../../third_party/skia/include/encode", "-I&/w/c/s/out/Release/../../third_party/skia/include/encode",
"-I&/w/c/s/out/Release/../../third_party/skia/include/gpu", "-I&/w/c/s/out/Release/../../third_party/skia/include/gpu",
"-I&/w/c/s/out/Release/../../third_party/skia/include/images", "-I&/w/c/s/out/Release/../../third_party/skia/include/images",
"-I&/w/c/s/out/Release/../../third_party/skia/include/lazy", "-I&/w/c/s/out/Release/../../third_party/skia/include/lazy",
"-I&/w/c/s/out/Release/../../third_party/skia/include/pathops", "-I&/w/c/s/out/Release/../../third_party/skia/include/pathops",
"-I&/w/c/s/out/Release/../../third_party/skia/include/pdf", "-I&/w/c/s/out/Release/../../third_party/skia/include/pdf",
"-I&/w/c/s/out/Release/../../third_party/skia/include/pipe", "-I&/w/c/s/out/Release/../../third_party/skia/include/pipe",
"-I&/w/c/s/out/Release/../../third_party/skia/include/ports", "-I&/w/c/s/out/Release/../../third_party/skia/include/ports",
"-I&/w/c/s/out/Release/../../third_party/skia/include/utils", "-I&/w/c/s/out/Release/../../third_party/skia/include/utils",
"-I&/w/c/s/out/Release/../../third_party/skia/third_party/vulkan", "-I&/w/c/s/out/Release/../../third_party/skia/third_party/vulkan",
"-I&/w/c/s/out/Release/../../third_party/skia/include/codec", "-I&/w/c/s/out/Release/../../third_party/skia/include/codec",
"-I&/w/c/s/out/Release/../../third_party/skia/src/gpu", "-I&/w/c/s/out/Release/../../third_party/skia/src/gpu",
"-I&/w/c/s/out/Release/../../third_party/skia/src/sksl", "-I&/w/c/s/out/Release/../../third_party/skia/src/sksl",
"-I&/w/c/s/out/Release/../../third_party/ced/src", "-I&/w/c/s/out/Release/../../third_party/ced/src",
"-I&/w/c/s/out/Release/../../third_party/mesa/src/include", "-I&/w/c/s/out/Release/../../third_party/mesa/src/include",
"-I&/w/c/s/out/Release/../../third_party/libwebm/source", "-I&/w/c/s/out/Release/../../third_party/libwebm/source",
"-I&/w/c/s/out/Release/gen", "-I&/w/c/s/out/Release/gen",
"-I&/w/c/s/out/Release/../../build/linux/debian_jessie_amd64-sysroot/" "-I&/w/c/s/out/Release/../../build/linux/debian_jessie_amd64-sysroot/"
"usr/include/dbus-1.0", "usr/include/dbus-1.0",
"-I&/w/c/s/out/Release/../../build/linux/debian_jessie_amd64-sysroot/" "-I&/w/c/s/out/Release/../../build/linux/debian_jessie_amd64-sysroot/"
"usr/lib/x86_64-linux-gnu/dbus-1.0/include", "usr/lib/x86_64-linux-gnu/dbus-1.0/include",
"-I&/w/c/s/out/Release/../../third_party/googletest/custom", "-I&/w/c/s/out/Release/../../third_party/googletest/custom",
"-I&/w/c/s/out/Release/../../third_party/googletest/src/googlemock/" "-I&/w/c/s/out/Release/../../third_party/googletest/src/googlemock/"
"include", "include",
"-fno-strict-aliasing", "-fno-strict-aliasing",
"-Wno-builtin-macro-redefined", "-Wno-builtin-macro-redefined",
"-D__DATE__=", "-D__DATE__=",
"-D__TIME__=", "-D__TIME__=",
"-D__TIMESTAMP__=", "-D__TIMESTAMP__=",
"-funwind-tables", "-funwind-tables",
"-fPIC", "-fPIC",
"-pipe", "-pipe",
"-B../../third_party/binutils/Linux_x64/Release/bin", "-B../../third_party/binutils/Linux_x64/Release/bin",
"-pthread", "-pthread",
"-fcolor-diagnostics", "-fcolor-diagnostics",
"-no-canonical-prefixes", "-no-canonical-prefixes",
"-m64", "-m64",
"-march=x86-64", "-march=x86-64",
"-Wall", "-Wall",
"-Werror", "-Werror",
"-Wextra", "-Wextra",
"-Wno-missing-field-initializers", "-Wno-missing-field-initializers",
"-Wno-unused-parameter", "-Wno-unused-parameter",
"-Wno-c++11-narrowing", "-Wno-c++11-narrowing",
"-Wno-covered-switch-default", "-Wno-covered-switch-default",
"-Wno-unneeded-internal-declaration", "-Wno-unneeded-internal-declaration",
"-Wno-inconsistent-missing-override", "-Wno-inconsistent-missing-override",
"-Wno-undefined-var-template", "-Wno-undefined-var-template",
"-Wno-nonportable-include-path", "-Wno-nonportable-include-path",
"-Wno-address-of-packed-member", "-Wno-address-of-packed-member",
"-Wno-unused-lambda-capture", "-Wno-unused-lambda-capture",
"-Wno-user-defined-warnings", "-Wno-user-defined-warnings",
"-Wno-enum-compare-switch", "-Wno-enum-compare-switch",
"-Wno-tautological-unsigned-zero-compare", "-Wno-tautological-unsigned-zero-compare",
"-Wno-null-pointer-arithmetic", "-Wno-null-pointer-arithmetic",
"-Wno-tautological-unsigned-enum-zero-compare", "-Wno-tautological-unsigned-enum-zero-compare",
"-O2", "-O2",
"-fno-ident", "-fno-ident",
"-fdata-sections", "-fdata-sections",
"-ffunction-sections", "-ffunction-sections",
"-fno-omit-frame-pointer", "-fno-omit-frame-pointer",
"-g0", "-g0",
"-fvisibility=hidden", "-fvisibility=hidden",
"-Wheader-hygiene", "-Wheader-hygiene",
"-Wstring-conversion", "-Wstring-conversion",
"-Wtautological-overlap-compare", "-Wtautological-overlap-compare",
"-Wno-header-guard", "-Wno-header-guard",
"-std=gnu++14", "-std=gnu++14",
"-fno-rtti", "-fno-rtti",
"-nostdinc++", "-nostdinc++",
"-isystem&/w/c/s/out/Release/../../buildtools/third_party/libc++/trunk/" "-isystem&/w/c/s/out/Release/../../buildtools/third_party/libc++/"
"include", "trunk/"
"-isystem&/w/c/s/out/Release/../../buildtools/third_party/libc++abi/" "include",
"trunk/" "-isystem&/w/c/s/out/Release/../../buildtools/third_party/libc++abi/"
"include", "trunk/"
"--sysroot=&/w/c/s/out/Release/../../build/linux/" "include",
"debian_jessie_amd64-sysroot", "--sysroot=&/w/c/s/out/Release/../../build/linux/"
"-fno-exceptions", "debian_jessie_amd64-sysroot",
"-fvisibility-inlines-hidden", "-fno-exceptions",
"-xc++", "-fvisibility-inlines-hidden",
"-resource-dir=/w/resource_dir/"}); "-xc++",
"-resource-dir=/w/resource_dir/"});
} }
// Checks flag parsing for an example chromium file. // Checks flag parsing for an example chromium file.
@ -814,316 +809,317 @@ TEST_SUITE("Project") {
"/w/c/s/out/Release", "../../apps/app_lifetime_monitor.cc", "/w/c/s/out/Release", "../../apps/app_lifetime_monitor.cc",
/* raw */ /* raw */
{"/work/goma/gomacc", {"/work/goma/gomacc",
"../../third_party/llvm-build/Release+Asserts/bin/clang++", "../../third_party/llvm-build/Release+Asserts/bin/clang++",
"-MMD", "-MMD",
"-MF", "-MF",
"obj/apps/apps/app_lifetime_monitor.o.d", "obj/apps/apps/app_lifetime_monitor.o.d",
"-DV8_DEPRECATION_WARNINGS", "-DV8_DEPRECATION_WARNINGS",
"-DDCHECK_ALWAYS_ON=1", "-DDCHECK_ALWAYS_ON=1",
"-DUSE_UDEV", "-DUSE_UDEV",
"-DUSE_ASH=1", "-DUSE_ASH=1",
"-DUSE_AURA=1", "-DUSE_AURA=1",
"-DUSE_NSS_CERTS=1", "-DUSE_NSS_CERTS=1",
"-DUSE_OZONE=1", "-DUSE_OZONE=1",
"-DDISABLE_NACL", "-DDISABLE_NACL",
"-DFULL_SAFE_BROWSING", "-DFULL_SAFE_BROWSING",
"-DSAFE_BROWSING_CSD", "-DSAFE_BROWSING_CSD",
"-DSAFE_BROWSING_DB_LOCAL", "-DSAFE_BROWSING_DB_LOCAL",
"-DCHROMIUM_BUILD", "-DCHROMIUM_BUILD",
"-DFIELDTRIAL_TESTING_ENABLED", "-DFIELDTRIAL_TESTING_ENABLED",
"-DCR_CLANG_REVISION=\"310694-1\"", "-DCR_CLANG_REVISION=\"310694-1\"",
"-D_FILE_OFFSET_BITS=64", "-D_FILE_OFFSET_BITS=64",
"-D_LARGEFILE_SOURCE", "-D_LARGEFILE_SOURCE",
"-D_LARGEFILE64_SOURCE", "-D_LARGEFILE64_SOURCE",
"-D__STDC_CONSTANT_MACROS", "-D__STDC_CONSTANT_MACROS",
"-D__STDC_FORMAT_MACROS", "-D__STDC_FORMAT_MACROS",
"-DCOMPONENT_BUILD", "-DCOMPONENT_BUILD",
"-DOS_CHROMEOS", "-DOS_CHROMEOS",
"-DNDEBUG", "-DNDEBUG",
"-DNVALGRIND", "-DNVALGRIND",
"-DDYNAMIC_ANNOTATIONS_ENABLED=0", "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
"-DGL_GLEXT_PROTOTYPES", "-DGL_GLEXT_PROTOTYPES",
"-DUSE_GLX", "-DUSE_GLX",
"-DUSE_EGL", "-DUSE_EGL",
"-DANGLE_ENABLE_RELEASE_ASSERTS", "-DANGLE_ENABLE_RELEASE_ASSERTS",
"-DTOOLKIT_VIEWS=1", "-DTOOLKIT_VIEWS=1",
"-DV8_USE_EXTERNAL_STARTUP_DATA", "-DV8_USE_EXTERNAL_STARTUP_DATA",
"-DU_USING_ICU_NAMESPACE=0", "-DU_USING_ICU_NAMESPACE=0",
"-DU_ENABLE_DYLOAD=0", "-DU_ENABLE_DYLOAD=0",
"-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE", "-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE",
"-DUCHAR_TYPE=uint16_t", "-DUCHAR_TYPE=uint16_t",
"-DGOOGLE_PROTOBUF_NO_RTTI", "-DGOOGLE_PROTOBUF_NO_RTTI",
"-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
"-DHAVE_PTHREAD", "-DHAVE_PTHREAD",
"-DPROTOBUF_USE_DLLS", "-DPROTOBUF_USE_DLLS",
"-DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS", "-DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS",
"-DSK_HAS_PNG_LIBRARY", "-DSK_HAS_PNG_LIBRARY",
"-DSK_HAS_WEBP_LIBRARY", "-DSK_HAS_WEBP_LIBRARY",
"-DSK_HAS_JPEG_LIBRARY", "-DSK_HAS_JPEG_LIBRARY",
"-DSKIA_DLL", "-DSKIA_DLL",
"-DGR_GL_IGNORE_ES3_MSAA=0", "-DGR_GL_IGNORE_ES3_MSAA=0",
"-DSK_SUPPORT_GPU=1", "-DSK_SUPPORT_GPU=1",
"-DMESA_EGL_NO_X11_HEADERS", "-DMESA_EGL_NO_X11_HEADERS",
"-DBORINGSSL_SHARED_LIBRARY", "-DBORINGSSL_SHARED_LIBRARY",
"-DUSING_V8_SHARED", "-DUSING_V8_SHARED",
"-I../..", "-I../..",
"-Igen", "-Igen",
"-I../../third_party/libwebp/src", "-I../../third_party/libwebp/src",
"-I../../third_party/khronos", "-I../../third_party/khronos",
"-I../../gpu", "-I../../gpu",
"-I../../third_party/ced/src", "-I../../third_party/ced/src",
"-I../../third_party/icu/source/common", "-I../../third_party/icu/source/common",
"-I../../third_party/icu/source/i18n", "-I../../third_party/icu/source/i18n",
"-I../../third_party/protobuf/src", "-I../../third_party/protobuf/src",
"-I../../skia/config", "-I../../skia/config",
"-I../../skia/ext", "-I../../skia/ext",
"-I../../third_party/skia/include/c", "-I../../third_party/skia/include/c",
"-I../../third_party/skia/include/config", "-I../../third_party/skia/include/config",
"-I../../third_party/skia/include/core", "-I../../third_party/skia/include/core",
"-I../../third_party/skia/include/effects", "-I../../third_party/skia/include/effects",
"-I../../third_party/skia/include/encode", "-I../../third_party/skia/include/encode",
"-I../../third_party/skia/include/gpu", "-I../../third_party/skia/include/gpu",
"-I../../third_party/skia/include/images", "-I../../third_party/skia/include/images",
"-I../../third_party/skia/include/lazy", "-I../../third_party/skia/include/lazy",
"-I../../third_party/skia/include/pathops", "-I../../third_party/skia/include/pathops",
"-I../../third_party/skia/include/pdf", "-I../../third_party/skia/include/pdf",
"-I../../third_party/skia/include/pipe", "-I../../third_party/skia/include/pipe",
"-I../../third_party/skia/include/ports", "-I../../third_party/skia/include/ports",
"-I../../third_party/skia/include/utils", "-I../../third_party/skia/include/utils",
"-I../../third_party/skia/third_party/vulkan", "-I../../third_party/skia/third_party/vulkan",
"-I../../third_party/skia/src/gpu", "-I../../third_party/skia/src/gpu",
"-I../../third_party/skia/src/sksl", "-I../../third_party/skia/src/sksl",
"-I../../third_party/mesa/src/include", "-I../../third_party/mesa/src/include",
"-I../../third_party/libwebm/source", "-I../../third_party/libwebm/source",
"-I../../third_party/protobuf/src", "-I../../third_party/protobuf/src",
"-Igen/protoc_out", "-Igen/protoc_out",
"-I../../third_party/boringssl/src/include", "-I../../third_party/boringssl/src/include",
"-I../../build/linux/debian_jessie_amd64-sysroot/usr/include/nss", "-I../../build/linux/debian_jessie_amd64-sysroot/usr/include/nss",
"-I../../build/linux/debian_jessie_amd64-sysroot/usr/include/nspr", "-I../../build/linux/debian_jessie_amd64-sysroot/usr/include/nspr",
"-Igen", "-Igen",
"-I../../third_party/WebKit", "-I../../third_party/WebKit",
"-Igen/third_party/WebKit", "-Igen/third_party/WebKit",
"-I../../v8/include", "-I../../v8/include",
"-Igen/v8/include", "-Igen/v8/include",
"-Igen", "-Igen",
"-I../../third_party/flatbuffers/src/include", "-I../../third_party/flatbuffers/src/include",
"-Igen", "-Igen",
"-fno-strict-aliasing", "-fno-strict-aliasing",
"-Wno-builtin-macro-redefined", "-Wno-builtin-macro-redefined",
"-D__DATE__=", "-D__DATE__=",
"-D__TIME__=", "-D__TIME__=",
"-D__TIMESTAMP__=", "-D__TIMESTAMP__=",
"-funwind-tables", "-funwind-tables",
"-fPIC", "-fPIC",
"-pipe", "-pipe",
"-B../../third_party/binutils/Linux_x64/Release/bin", "-B../../third_party/binutils/Linux_x64/Release/bin",
"-pthread", "-pthread",
"-fcolor-diagnostics", "-fcolor-diagnostics",
"-m64", "-m64",
"-march=x86-64", "-march=x86-64",
"-Wall", "-Wall",
"-Werror", "-Werror",
"-Wextra", "-Wextra",
"-Wno-missing-field-initializers", "-Wno-missing-field-initializers",
"-Wno-unused-parameter", "-Wno-unused-parameter",
"-Wno-c++11-narrowing", "-Wno-c++11-narrowing",
"-Wno-covered-switch-default", "-Wno-covered-switch-default",
"-Wno-unneeded-internal-declaration", "-Wno-unneeded-internal-declaration",
"-Wno-inconsistent-missing-override", "-Wno-inconsistent-missing-override",
"-Wno-undefined-var-template", "-Wno-undefined-var-template",
"-Wno-nonportable-include-path", "-Wno-nonportable-include-path",
"-Wno-address-of-packed-member", "-Wno-address-of-packed-member",
"-Wno-unused-lambda-capture", "-Wno-unused-lambda-capture",
"-Wno-user-defined-warnings", "-Wno-user-defined-warnings",
"-Wno-enum-compare-switch", "-Wno-enum-compare-switch",
"-O2", "-O2",
"-fno-ident", "-fno-ident",
"-fdata-sections", "-fdata-sections",
"-ffunction-sections", "-ffunction-sections",
"-fno-omit-frame-pointer", "-fno-omit-frame-pointer",
"-g0", "-g0",
"-fvisibility=hidden", "-fvisibility=hidden",
"-Xclang", "-Xclang",
"-load", "-load",
"-Xclang", "-Xclang",
"../../third_party/llvm-build/Release+Asserts/lib/" "../../third_party/llvm-build/Release+Asserts/lib/"
"libFindBadConstructs.so", "libFindBadConstructs.so",
"-Xclang", "-Xclang",
"-add-plugin", "-add-plugin",
"-Xclang", "-Xclang",
"find-bad-constructs", "find-bad-constructs",
"-Xclang", "-Xclang",
"-plugin-arg-find-bad-constructs", "-plugin-arg-find-bad-constructs",
"-Xclang", "-Xclang",
"check-auto-raw-pointer", "check-auto-raw-pointer",
"-Xclang", "-Xclang",
"-plugin-arg-find-bad-constructs", "-plugin-arg-find-bad-constructs",
"-Xclang", "-Xclang",
"check-ipc", "check-ipc",
"-Wheader-hygiene", "-Wheader-hygiene",
"-Wstring-conversion", "-Wstring-conversion",
"-Wtautological-overlap-compare", "-Wtautological-overlap-compare",
"-Wexit-time-destructors", "-Wexit-time-destructors",
"-Wno-header-guard", "-Wno-header-guard",
"-Wno-exit-time-destructors", "-Wno-exit-time-destructors",
"-std=gnu++14", "-std=gnu++14",
"-fno-rtti", "-fno-rtti",
"-nostdinc++", "-nostdinc++",
"-isystem../../buildtools/third_party/libc++/trunk/include", "-isystem../../buildtools/third_party/libc++/trunk/include",
"-isystem../../buildtools/third_party/libc++abi/trunk/include", "-isystem../../buildtools/third_party/libc++abi/trunk/include",
"--sysroot=../../build/linux/debian_jessie_amd64-sysroot", "--sysroot=../../build/linux/debian_jessie_amd64-sysroot",
"-fno-exceptions", "-fno-exceptions",
"-fvisibility-inlines-hidden"}, "-fvisibility-inlines-hidden"},
/* expected */ /* expected */
{"../../third_party/llvm-build/Release+Asserts/bin/clang++", {"../../third_party/llvm-build/Release+Asserts/bin/clang++",
"-DV8_DEPRECATION_WARNINGS", "-DV8_DEPRECATION_WARNINGS",
"-DDCHECK_ALWAYS_ON=1", "-DDCHECK_ALWAYS_ON=1",
"-DUSE_UDEV", "-DUSE_UDEV",
"-DUSE_ASH=1", "-DUSE_ASH=1",
"-DUSE_AURA=1", "-DUSE_AURA=1",
"-DUSE_NSS_CERTS=1", "-DUSE_NSS_CERTS=1",
"-DUSE_OZONE=1", "-DUSE_OZONE=1",
"-DDISABLE_NACL", "-DDISABLE_NACL",
"-DFULL_SAFE_BROWSING", "-DFULL_SAFE_BROWSING",
"-DSAFE_BROWSING_CSD", "-DSAFE_BROWSING_CSD",
"-DSAFE_BROWSING_DB_LOCAL", "-DSAFE_BROWSING_DB_LOCAL",
"-DCHROMIUM_BUILD", "-DCHROMIUM_BUILD",
"-DFIELDTRIAL_TESTING_ENABLED", "-DFIELDTRIAL_TESTING_ENABLED",
"-DCR_CLANG_REVISION=\"310694-1\"", "-DCR_CLANG_REVISION=\"310694-1\"",
"-D_FILE_OFFSET_BITS=64", "-D_FILE_OFFSET_BITS=64",
"-D_LARGEFILE_SOURCE", "-D_LARGEFILE_SOURCE",
"-D_LARGEFILE64_SOURCE", "-D_LARGEFILE64_SOURCE",
"-D__STDC_CONSTANT_MACROS", "-D__STDC_CONSTANT_MACROS",
"-D__STDC_FORMAT_MACROS", "-D__STDC_FORMAT_MACROS",
"-DCOMPONENT_BUILD", "-DCOMPONENT_BUILD",
"-DOS_CHROMEOS", "-DOS_CHROMEOS",
"-DNDEBUG", "-DNDEBUG",
"-DNVALGRIND", "-DNVALGRIND",
"-DDYNAMIC_ANNOTATIONS_ENABLED=0", "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
"-DGL_GLEXT_PROTOTYPES", "-DGL_GLEXT_PROTOTYPES",
"-DUSE_GLX", "-DUSE_GLX",
"-DUSE_EGL", "-DUSE_EGL",
"-DANGLE_ENABLE_RELEASE_ASSERTS", "-DANGLE_ENABLE_RELEASE_ASSERTS",
"-DTOOLKIT_VIEWS=1", "-DTOOLKIT_VIEWS=1",
"-DV8_USE_EXTERNAL_STARTUP_DATA", "-DV8_USE_EXTERNAL_STARTUP_DATA",
"-DU_USING_ICU_NAMESPACE=0", "-DU_USING_ICU_NAMESPACE=0",
"-DU_ENABLE_DYLOAD=0", "-DU_ENABLE_DYLOAD=0",
"-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE", "-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE",
"-DUCHAR_TYPE=uint16_t", "-DUCHAR_TYPE=uint16_t",
"-DGOOGLE_PROTOBUF_NO_RTTI", "-DGOOGLE_PROTOBUF_NO_RTTI",
"-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
"-DHAVE_PTHREAD", "-DHAVE_PTHREAD",
"-DPROTOBUF_USE_DLLS", "-DPROTOBUF_USE_DLLS",
"-DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS", "-DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS",
"-DSK_HAS_PNG_LIBRARY", "-DSK_HAS_PNG_LIBRARY",
"-DSK_HAS_WEBP_LIBRARY", "-DSK_HAS_WEBP_LIBRARY",
"-DSK_HAS_JPEG_LIBRARY", "-DSK_HAS_JPEG_LIBRARY",
"-DSKIA_DLL", "-DSKIA_DLL",
"-DGR_GL_IGNORE_ES3_MSAA=0", "-DGR_GL_IGNORE_ES3_MSAA=0",
"-DSK_SUPPORT_GPU=1", "-DSK_SUPPORT_GPU=1",
"-DMESA_EGL_NO_X11_HEADERS", "-DMESA_EGL_NO_X11_HEADERS",
"-DBORINGSSL_SHARED_LIBRARY", "-DBORINGSSL_SHARED_LIBRARY",
"-DUSING_V8_SHARED", "-DUSING_V8_SHARED",
"-I&/w/c/s/out/Release/../..", "-I&/w/c/s/out/Release/../..",
"-I&/w/c/s/out/Release/gen", "-I&/w/c/s/out/Release/gen",
"-I&/w/c/s/out/Release/../../third_party/libwebp/src", "-I&/w/c/s/out/Release/../../third_party/libwebp/src",
"-I&/w/c/s/out/Release/../../third_party/khronos", "-I&/w/c/s/out/Release/../../third_party/khronos",
"-I&/w/c/s/out/Release/../../gpu", "-I&/w/c/s/out/Release/../../gpu",
"-I&/w/c/s/out/Release/../../third_party/ced/src", "-I&/w/c/s/out/Release/../../third_party/ced/src",
"-I&/w/c/s/out/Release/../../third_party/icu/source/common", "-I&/w/c/s/out/Release/../../third_party/icu/source/common",
"-I&/w/c/s/out/Release/../../third_party/icu/source/i18n", "-I&/w/c/s/out/Release/../../third_party/icu/source/i18n",
"-I&/w/c/s/out/Release/../../third_party/protobuf/src", "-I&/w/c/s/out/Release/../../third_party/protobuf/src",
"-I&/w/c/s/out/Release/../../skia/config", "-I&/w/c/s/out/Release/../../skia/config",
"-I&/w/c/s/out/Release/../../skia/ext", "-I&/w/c/s/out/Release/../../skia/ext",
"-I&/w/c/s/out/Release/../../third_party/skia/include/c", "-I&/w/c/s/out/Release/../../third_party/skia/include/c",
"-I&/w/c/s/out/Release/../../third_party/skia/include/config", "-I&/w/c/s/out/Release/../../third_party/skia/include/config",
"-I&/w/c/s/out/Release/../../third_party/skia/include/core", "-I&/w/c/s/out/Release/../../third_party/skia/include/core",
"-I&/w/c/s/out/Release/../../third_party/skia/include/effects", "-I&/w/c/s/out/Release/../../third_party/skia/include/effects",
"-I&/w/c/s/out/Release/../../third_party/skia/include/encode", "-I&/w/c/s/out/Release/../../third_party/skia/include/encode",
"-I&/w/c/s/out/Release/../../third_party/skia/include/gpu", "-I&/w/c/s/out/Release/../../third_party/skia/include/gpu",
"-I&/w/c/s/out/Release/../../third_party/skia/include/images", "-I&/w/c/s/out/Release/../../third_party/skia/include/images",
"-I&/w/c/s/out/Release/../../third_party/skia/include/lazy", "-I&/w/c/s/out/Release/../../third_party/skia/include/lazy",
"-I&/w/c/s/out/Release/../../third_party/skia/include/pathops", "-I&/w/c/s/out/Release/../../third_party/skia/include/pathops",
"-I&/w/c/s/out/Release/../../third_party/skia/include/pdf", "-I&/w/c/s/out/Release/../../third_party/skia/include/pdf",
"-I&/w/c/s/out/Release/../../third_party/skia/include/pipe", "-I&/w/c/s/out/Release/../../third_party/skia/include/pipe",
"-I&/w/c/s/out/Release/../../third_party/skia/include/ports", "-I&/w/c/s/out/Release/../../third_party/skia/include/ports",
"-I&/w/c/s/out/Release/../../third_party/skia/include/utils", "-I&/w/c/s/out/Release/../../third_party/skia/include/utils",
"-I&/w/c/s/out/Release/../../third_party/skia/third_party/vulkan", "-I&/w/c/s/out/Release/../../third_party/skia/third_party/vulkan",
"-I&/w/c/s/out/Release/../../third_party/skia/src/gpu", "-I&/w/c/s/out/Release/../../third_party/skia/src/gpu",
"-I&/w/c/s/out/Release/../../third_party/skia/src/sksl", "-I&/w/c/s/out/Release/../../third_party/skia/src/sksl",
"-I&/w/c/s/out/Release/../../third_party/mesa/src/include", "-I&/w/c/s/out/Release/../../third_party/mesa/src/include",
"-I&/w/c/s/out/Release/../../third_party/libwebm/source", "-I&/w/c/s/out/Release/../../third_party/libwebm/source",
"-I&/w/c/s/out/Release/../../third_party/protobuf/src", "-I&/w/c/s/out/Release/../../third_party/protobuf/src",
"-I&/w/c/s/out/Release/gen/protoc_out", "-I&/w/c/s/out/Release/gen/protoc_out",
"-I&/w/c/s/out/Release/../../third_party/boringssl/src/include", "-I&/w/c/s/out/Release/../../third_party/boringssl/src/include",
"-I&/w/c/s/out/Release/../../build/linux/debian_jessie_amd64-sysroot/" "-I&/w/c/s/out/Release/../../build/linux/debian_jessie_amd64-sysroot/"
"usr/include/nss", "usr/include/nss",
"-I&/w/c/s/out/Release/../../build/linux/debian_jessie_amd64-sysroot/" "-I&/w/c/s/out/Release/../../build/linux/debian_jessie_amd64-sysroot/"
"usr/include/nspr", "usr/include/nspr",
"-I&/w/c/s/out/Release/gen", "-I&/w/c/s/out/Release/gen",
"-I&/w/c/s/out/Release/../../third_party/WebKit", "-I&/w/c/s/out/Release/../../third_party/WebKit",
"-I&/w/c/s/out/Release/gen/third_party/WebKit", "-I&/w/c/s/out/Release/gen/third_party/WebKit",
"-I&/w/c/s/out/Release/../../v8/include", "-I&/w/c/s/out/Release/../../v8/include",
"-I&/w/c/s/out/Release/gen/v8/include", "-I&/w/c/s/out/Release/gen/v8/include",
"-I&/w/c/s/out/Release/gen", "-I&/w/c/s/out/Release/gen",
"-I&/w/c/s/out/Release/../../third_party/flatbuffers/src/include", "-I&/w/c/s/out/Release/../../third_party/flatbuffers/src/include",
"-I&/w/c/s/out/Release/gen", "-I&/w/c/s/out/Release/gen",
"-fno-strict-aliasing", "-fno-strict-aliasing",
"-Wno-builtin-macro-redefined", "-Wno-builtin-macro-redefined",
"-D__DATE__=", "-D__DATE__=",
"-D__TIME__=", "-D__TIME__=",
"-D__TIMESTAMP__=", "-D__TIMESTAMP__=",
"-funwind-tables", "-funwind-tables",
"-fPIC", "-fPIC",
"-pipe", "-pipe",
"-B../../third_party/binutils/Linux_x64/Release/bin", "-B../../third_party/binutils/Linux_x64/Release/bin",
"-pthread", "-pthread",
"-fcolor-diagnostics", "-fcolor-diagnostics",
"-m64", "-m64",
"-march=x86-64", "-march=x86-64",
"-Wall", "-Wall",
"-Werror", "-Werror",
"-Wextra", "-Wextra",
"-Wno-missing-field-initializers", "-Wno-missing-field-initializers",
"-Wno-unused-parameter", "-Wno-unused-parameter",
"-Wno-c++11-narrowing", "-Wno-c++11-narrowing",
"-Wno-covered-switch-default", "-Wno-covered-switch-default",
"-Wno-unneeded-internal-declaration", "-Wno-unneeded-internal-declaration",
"-Wno-inconsistent-missing-override", "-Wno-inconsistent-missing-override",
"-Wno-undefined-var-template", "-Wno-undefined-var-template",
"-Wno-nonportable-include-path", "-Wno-nonportable-include-path",
"-Wno-address-of-packed-member", "-Wno-address-of-packed-member",
"-Wno-unused-lambda-capture", "-Wno-unused-lambda-capture",
"-Wno-user-defined-warnings", "-Wno-user-defined-warnings",
"-Wno-enum-compare-switch", "-Wno-enum-compare-switch",
"-O2", "-O2",
"-fno-ident", "-fno-ident",
"-fdata-sections", "-fdata-sections",
"-ffunction-sections", "-ffunction-sections",
"-fno-omit-frame-pointer", "-fno-omit-frame-pointer",
"-g0", "-g0",
"-fvisibility=hidden", "-fvisibility=hidden",
"-Wheader-hygiene", "-Wheader-hygiene",
"-Wstring-conversion", "-Wstring-conversion",
"-Wtautological-overlap-compare", "-Wtautological-overlap-compare",
"-Wexit-time-destructors", "-Wexit-time-destructors",
"-Wno-header-guard", "-Wno-header-guard",
"-Wno-exit-time-destructors", "-Wno-exit-time-destructors",
"-std=gnu++14", "-std=gnu++14",
"-fno-rtti", "-fno-rtti",
"-nostdinc++", "-nostdinc++",
"-isystem&/w/c/s/out/Release/../../buildtools/third_party/libc++/trunk/" "-isystem&/w/c/s/out/Release/../../buildtools/third_party/libc++/"
"include", "trunk/"
"-isystem&/w/c/s/out/Release/../../buildtools/third_party/libc++abi/" "include",
"trunk/" "-isystem&/w/c/s/out/Release/../../buildtools/third_party/libc++abi/"
"include", "trunk/"
"--sysroot=&/w/c/s/out/Release/../../build/linux/" "include",
"debian_jessie_amd64-sysroot", "--sysroot=&/w/c/s/out/Release/../../build/linux/"
"-fno-exceptions", "debian_jessie_amd64-sysroot",
"-fvisibility-inlines-hidden", "-fno-exceptions",
"-xc++", "-fvisibility-inlines-hidden",
"-resource-dir=/w/resource_dir/"}); "-xc++",
"-resource-dir=/w/resource_dir/"});
} }
TEST_CASE("Directory extraction") { TEST_CASE("Directory extraction") {

View File

@ -603,7 +603,7 @@ IndexUpdate::IndexUpdate(const IdMap& previous_id_map,
} }
void IndexUpdate::Merge(const IndexUpdate& update) { void IndexUpdate::Merge(const IndexUpdate& update) {
// This function runs on an indexer thread. // This function runs on an indexer thread.
#define INDEX_UPDATE_APPEND(name) AddRange(&name, update.name); #define INDEX_UPDATE_APPEND(name) AddRange(&name, update.name);
#define INDEX_UPDATE_MERGE(name) AddMergeableRange(&name, update.name); #define INDEX_UPDATE_MERGE(name) AddMergeableRange(&name, update.name);
@ -858,7 +858,7 @@ TEST_SUITE("query") {
->uses.push_back(Range(Position(1, 0))); ->uses.push_back(Range(Position(1, 0)));
previous.Resolve(previous.ToFuncId("usr2")) previous.Resolve(previous.ToFuncId("usr2"))
->callers.push_back(IndexFuncRef(IndexFuncId(0), Range(Position(2, 0)), ->callers.push_back(IndexFuncRef(IndexFuncId(0), Range(Position(2, 0)),
false /*is_implicit*/)); false /*is_implicit*/));
previous.Resolve(previous.ToVarId("usr3")) previous.Resolve(previous.ToVarId("usr3"))
->uses.push_back(Range(Position(3, 0))); ->uses.push_back(Range(Position(3, 0)));
@ -877,9 +877,9 @@ TEST_SUITE("query") {
IndexFunc* cf = current.Resolve(current.ToFuncId("usr")); IndexFunc* cf = current.Resolve(current.ToFuncId("usr"));
pf->callers.push_back(IndexFuncRef(IndexFuncId(0), Range(Position(1, 0)), pf->callers.push_back(IndexFuncRef(IndexFuncId(0), Range(Position(1, 0)),
false /*is_implicit*/)); false /*is_implicit*/));
cf->callers.push_back(IndexFuncRef(IndexFuncId(0), Range(Position(2, 0)), cf->callers.push_back(IndexFuncRef(IndexFuncId(0), Range(Position(2, 0)),
false /*is_implicit*/)); false /*is_implicit*/));
IndexUpdate update = GetDelta(previous, current); IndexUpdate update = GetDelta(previous, current);
@ -890,7 +890,8 @@ TEST_SUITE("query") {
REQUIRE(update.funcs_callers[0].to_remove[0].loc.range == REQUIRE(update.funcs_callers[0].to_remove[0].loc.range ==
Range(Position(1, 0))); Range(Position(1, 0)));
REQUIRE(update.funcs_callers[0].to_add.size() == 1); REQUIRE(update.funcs_callers[0].to_add.size() == 1);
REQUIRE(update.funcs_callers[0].to_add[0].loc.range == Range(Position(2, 0))); REQUIRE(update.funcs_callers[0].to_add[0].loc.range ==
Range(Position(2, 0)));
} }
TEST_CASE("type usages") { TEST_CASE("type usages") {
@ -921,13 +922,13 @@ TEST_SUITE("query") {
IndexFunc* pf = previous.Resolve(previous.ToFuncId("usr")); IndexFunc* pf = previous.Resolve(previous.ToFuncId("usr"));
IndexFunc* cf = current.Resolve(current.ToFuncId("usr")); IndexFunc* cf = current.Resolve(current.ToFuncId("usr"));
pf->callers.push_back(IndexFuncRef(IndexFuncId(0), Range(Position(1, 0)), pf->callers.push_back(IndexFuncRef(IndexFuncId(0), Range(Position(1, 0)),
false /*is_implicit*/)); false /*is_implicit*/));
pf->callers.push_back(IndexFuncRef(IndexFuncId(0), Range(Position(2, 0)), pf->callers.push_back(IndexFuncRef(IndexFuncId(0), Range(Position(2, 0)),
false /*is_implicit*/)); false /*is_implicit*/));
cf->callers.push_back(IndexFuncRef(IndexFuncId(0), Range(Position(4, 0)), cf->callers.push_back(IndexFuncRef(IndexFuncId(0), Range(Position(4, 0)),
false /*is_implicit*/)); false /*is_implicit*/));
cf->callers.push_back(IndexFuncRef(IndexFuncId(0), Range(Position(5, 0)), cf->callers.push_back(IndexFuncRef(IndexFuncId(0), Range(Position(5, 0)),
false /*is_implicit*/)); false /*is_implicit*/));
QueryDatabase db; QueryDatabase db;
IdMap previous_map(&db, previous.id_cache); IdMap previous_map(&db, previous.id_cache);

View File

@ -380,8 +380,8 @@ std::vector<CXUnsavedFile> WorkingFiles::AsUnsavedFiles() {
} }
lsPosition CharPos(const WorkingFile& file, lsPosition CharPos(const WorkingFile& file,
char character, char character,
int character_offset = 0) { int character_offset = 0) {
return CharPos(file.buffer_content, character, character_offset); return CharPos(file.buffer_content, character, character_offset);
} }
@ -449,19 +449,19 @@ TEST_SUITE("WorkingFile") {
std::string existing_completion; std::string existing_completion;
f.FindStableCompletionSource(CharPos(f, '.'), &is_global_completion, f.FindStableCompletionSource(CharPos(f, '.'), &is_global_completion,
&existing_completion); &existing_completion);
REQUIRE(existing_completion == "zzz"); REQUIRE(existing_completion == "zzz");
f.FindStableCompletionSource(CharPos(f, 'a', 1), &is_global_completion, f.FindStableCompletionSource(CharPos(f, 'a', 1), &is_global_completion,
&existing_completion); &existing_completion);
REQUIRE(existing_completion == "a"); REQUIRE(existing_completion == "a");
f.FindStableCompletionSource(CharPos(f, 's', 1), &is_global_completion, f.FindStableCompletionSource(CharPos(f, 's', 1), &is_global_completion,
&existing_completion); &existing_completion);
REQUIRE(existing_completion == "as"); REQUIRE(existing_completion == "as");
f.FindStableCompletionSource(CharPos(f, 'd', 1), &is_global_completion, f.FindStableCompletionSource(CharPos(f, 'd', 1), &is_global_completion,
&existing_completion); &existing_completion);
REQUIRE(existing_completion == "asd"); REQUIRE(existing_completion == "asd");
f.FindStableCompletionSource(CharPos(f, 'f', 1), &is_global_completion, f.FindStableCompletionSource(CharPos(f, 'f', 1), &is_global_completion,
&existing_completion); &existing_completion);
REQUIRE(existing_completion == "asdf"); REQUIRE(existing_completion == "asdf");
} }
@ -471,13 +471,13 @@ TEST_SUITE("WorkingFile") {
std::string existing_completion; std::string existing_completion;
f.FindStableCompletionSource(CharPos(f, 'C'), &is_global_completion, f.FindStableCompletionSource(CharPos(f, 'C'), &is_global_completion,
&existing_completion); &existing_completion);
REQUIRE(existing_completion == "AB"); REQUIRE(existing_completion == "AB");
f.FindStableCompletionSource(CharPos(f, '_'), &is_global_completion, f.FindStableCompletionSource(CharPos(f, '_'), &is_global_completion,
&existing_completion); &existing_completion);
REQUIRE(existing_completion == "ABC"); REQUIRE(existing_completion == "ABC");
f.FindStableCompletionSource(CharPos(f, 'D'), &is_global_completion, f.FindStableCompletionSource(CharPos(f, 'D'), &is_global_completion,
&existing_completion); &existing_completion);
REQUIRE(existing_completion == "ABC_"); REQUIRE(existing_completion == "ABC_");
} }
} }