Commit afca3735 authored by Brad King's avatar Brad King

Help clang-format wrap after braces on long initializer lists

Add a long comment inside a few braced initializer lists in order to
convince clang-format to break after the opening brace and format the
list without indenting every value past the opening brace.
parent 85425a3e
......@@ -6,7 +6,9 @@ const char info_sizeof_dptr[] = {
'I', 'N', 'F', 'O', ':', 's', 'i', 'z', 'e', 'o', 'f', '_', 'd', 'p', 't', 'r', '[',
('0' + ((SIZEOF_DPTR / 10)%10)),
('0' + (SIZEOF_DPTR % 10)),
']','\0'};
']','\0'
/* clang-format needs this comment to break after the opening brace */
};
/*--------------------------------------------------------------------------*/
......
......@@ -96,6 +96,7 @@ bool cmWIXAccessControlList::IsBooleanAttribute(std::string const& name)
{
static const char* validAttributes[] =
{
/* clang-format needs this comment to break after the opening brace */
"Append",
"ChangePermission",
"CreateChild",
......
......@@ -167,6 +167,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
if (this->GetType() != cmState::UTILITY)
{
const char* configProps[] = {
/* clang-format needs this comment to break after the opening brace */
"ARCHIVE_OUTPUT_DIRECTORY_",
"LIBRARY_OUTPUT_DIRECTORY_",
"RUNTIME_OUTPUT_DIRECTORY_",
......
......@@ -17,6 +17,7 @@
//----------------------------------------------------------------------------
const char* cmXCodeObject::PBXTypeNames[] = {
/* clang-format needs this comment to break after the opening brace */
"PBXGroup", "PBXBuildStyle", "PBXProject", "PBXHeadersBuildPhase",
"PBXSourcesBuildPhase", "PBXFrameworksBuildPhase", "PBXNativeTarget",
"PBXFileReference", "PBXBuildFile", "PBXContainerItemProxy",
......
......@@ -1431,6 +1431,7 @@ int cmake::ActualConfigure()
const char* GeneratorName;
};
VSRegistryEntryName version[] = {
/* clang-format needs this comment to break after the opening brace */
{"7.1", "Visual Studio 7 .NET 2003"},
{"8.0", "Visual Studio 8 2005"},
{"9.0", "Visual Studio 9 2008"},
......
......@@ -69,6 +69,7 @@ int testVisualStudioSlnParser(int, char*[])
"cmsysTestsCxx", "cmsys_c", "cmw9xcom", "cmzlib", "cpack", "ctest",
"documentation", "memcheck_fail", "pseudo_BC", "pseudo_purify",
"pseudo_valgrind", "test_clean", "uninstall"
/* clang-format needs this comment to break after the opening brace */
};
const size_t expectedProjectCount = sizeof(names) / sizeof(*names);
if (projects.size() != expectedProjectCount)
......@@ -160,6 +161,7 @@ int testVisualStudioSlnParser(int, char*[])
{
"header", "projectArgs", "topLevel", "projectContents", "projectSection",
"global", "unclosed", "strayQuote", "strayParen", "strayQuote2"
/* clang-format needs this comment to break after the opening brace */
};
for (size_t idx = 0; idx < sizeof(files) / sizeof(files[0]); ++idx)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment