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

View File

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

View File

@ -65,7 +65,8 @@ struct Config {
// Version of the client.
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;
};
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_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") ==
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, ")", "%29");
// TODO: proper fix
// TODO: proper fix
#if defined(_WIN32)
raw_uri = "file:///" + raw_uri;
#else
@ -255,7 +256,7 @@ std::string lsDocumentUri::GetPath() const {
std::replace(result.begin(), result.end(), '\\', '/');
#if defined(_WIN32)
// std::transform(result.begin(), result.end(), result.begin(), ::tolower);
// std::transform(result.begin(), result.end(), result.begin(), ::tolower);
#endif
return result;

View File

@ -28,7 +28,8 @@ std::vector<std::string> Split(const std::string& s, char delim) {
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) {
std::string result;
bool first = true;

View File

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

View File

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

View File

@ -603,7 +603,7 @@ IndexUpdate::IndexUpdate(const IdMap& previous_id_map,
}
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_MERGE(name) AddMergeableRange(&name, update.name);
@ -858,7 +858,7 @@ TEST_SUITE("query") {
->uses.push_back(Range(Position(1, 0)));
previous.Resolve(previous.ToFuncId("usr2"))
->callers.push_back(IndexFuncRef(IndexFuncId(0), Range(Position(2, 0)),
false /*is_implicit*/));
false /*is_implicit*/));
previous.Resolve(previous.ToVarId("usr3"))
->uses.push_back(Range(Position(3, 0)));
@ -877,9 +877,9 @@ TEST_SUITE("query") {
IndexFunc* cf = current.Resolve(current.ToFuncId("usr"));
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)),
false /*is_implicit*/));
false /*is_implicit*/));
IndexUpdate update = GetDelta(previous, current);
@ -890,7 +890,8 @@ TEST_SUITE("query") {
REQUIRE(update.funcs_callers[0].to_remove[0].loc.range ==
Range(Position(1, 0)));
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") {
@ -921,13 +922,13 @@ TEST_SUITE("query") {
IndexFunc* pf = previous.Resolve(previous.ToFuncId("usr"));
IndexFunc* cf = current.Resolve(current.ToFuncId("usr"));
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)),
false /*is_implicit*/));
false /*is_implicit*/));
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)),
false /*is_implicit*/));
false /*is_implicit*/));
QueryDatabase db;
IdMap previous_map(&db, previous.id_cache);

View File

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