summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-01-19 14:17:35 (GMT)
committerBrad King <brad.king@kitware.com>2023-01-19 14:17:35 (GMT)
commitdae189fb09b0dabf92c3c4e30ba72896197589c2 (patch)
tree85ae70f268935bef5b582d30bbb7249887497139 /Source
parent35afae59137a31fb8f771469c04043e32a8f330b (diff)
parent4ac17cff4207646f58b473509b73991c94564d7e (diff)
downloadCMake-dae189fb09b0dabf92c3c4e30ba72896197589c2.zip
CMake-dae189fb09b0dabf92c3c4e30ba72896197589c2.tar.gz
CMake-dae189fb09b0dabf92c3c4e30ba72896197589c2.tar.bz2
Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream * upstream-KWSys: KWSys 2023-01-19 (be3c441e)
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/CONTRIBUTING.rst2
-rw-r--r--Source/kwsys/CommandLineArguments.cxx2
-rw-r--r--Source/kwsys/Glob.cxx4
-rw-r--r--Source/kwsys/ProcessWin32.c5
-rw-r--r--Source/kwsys/RegularExpression.cxx4
-rw-r--r--Source/kwsys/RegularExpression.hxx.in8
-rw-r--r--Source/kwsys/kwsysPrivate.h2
-rw-r--r--Source/kwsys/testConfigure.cxx2
-rw-r--r--Source/kwsys/testConsoleBuf.cxx2
-rw-r--r--Source/kwsys/testDirectory.cxx11
-rw-r--r--Source/kwsys/testEncoding.cxx2
-rw-r--r--Source/kwsys/testFStream.cxx2
-rw-r--r--Source/kwsys/testStatus.cxx2
-rw-r--r--Source/kwsys/testSystemInformation.cxx2
-rw-r--r--Source/kwsys/testSystemTools.cxx2
15 files changed, 26 insertions, 26 deletions
diff --git a/Source/kwsys/CONTRIBUTING.rst b/Source/kwsys/CONTRIBUTING.rst
index 32e7b83..ebd3ed3 100644
--- a/Source/kwsys/CONTRIBUTING.rst
+++ b/Source/kwsys/CONTRIBUTING.rst
@@ -27,7 +27,7 @@ copies of KWSys within dependent projects can be updated to get the changes.
Code Style
==========
-We use `clang-format`_ version **6.0** to define our style for C++ code in
+We use `clang-format`_ version **15** to define our style for C++ code in
the KWSys source tree. See the `.clang-format`_ configuration file for
our style settings. Use the `clang-format.bash`_ script to format source
code. It automatically runs ``clang-format`` on the set of source files
diff --git a/Source/kwsys/CommandLineArguments.cxx b/Source/kwsys/CommandLineArguments.cxx
index e45db36..ccd5f6d 100644
--- a/Source/kwsys/CommandLineArguments.cxx
+++ b/Source/kwsys/CommandLineArguments.cxx
@@ -319,7 +319,7 @@ void CommandLineArguments::DeleteRemainingArguments(int argc, char*** argv)
{
int cc;
for (cc = 0; cc < argc; ++cc) {
- delete[](*argv)[cc];
+ delete[] (*argv)[cc];
}
delete[] * argv;
}
diff --git a/Source/kwsys/Glob.cxx b/Source/kwsys/Glob.cxx
index fa2c295..92eae41 100644
--- a/Source/kwsys/Glob.cxx
+++ b/Source/kwsys/Glob.cxx
@@ -390,8 +390,8 @@ bool Glob::FindFiles(const std::string& inexpr, GlobMessages* messages)
#endif
// Handle drive letters on Windows
if (expr[1] == ':' && expr[0] != '/') {
- skip = 2;
- }
+ skip = 2;
+ }
}
if (skip > 0) {
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c
index 17e1507..0b43b4a 100644
--- a/Source/kwsys/ProcessWin32.c
+++ b/Source/kwsys/ProcessWin32.c
@@ -2406,8 +2406,9 @@ static int kwsysProcess_List__Next_NT4(kwsysProcess_List* self)
{
if (self->CurrentInfo) {
if (self->CurrentInfo->NextEntryDelta > 0) {
- self->CurrentInfo = ((PSYSTEM_PROCESS_INFORMATION)(
- (char*)self->CurrentInfo + self->CurrentInfo->NextEntryDelta));
+ self->CurrentInfo =
+ ((PSYSTEM_PROCESS_INFORMATION)((char*)self->CurrentInfo +
+ self->CurrentInfo->NextEntryDelta));
return 1;
}
self->CurrentInfo = 0;
diff --git a/Source/kwsys/RegularExpression.cxx b/Source/kwsys/RegularExpression.cxx
index fb4e380..c96a96d 100644
--- a/Source/kwsys/RegularExpression.cxx
+++ b/Source/kwsys/RegularExpression.cxx
@@ -366,9 +366,9 @@ bool RegularExpression::compile(const char* exp)
}
// Allocate space.
- //#ifndef _WIN32
+ // #ifndef _WIN32
delete[] this->program;
- //#endif
+ // #endif
this->program = new char[comp.regsize];
this->progsize = static_cast<int>(comp.regsize);
diff --git a/Source/kwsys/RegularExpression.hxx.in b/Source/kwsys/RegularExpression.hxx.in
index 2709cde..2cb7f5e 100644
--- a/Source/kwsys/RegularExpression.hxx.in
+++ b/Source/kwsys/RegularExpression.hxx.in
@@ -456,9 +456,9 @@ inline RegularExpression::RegularExpression(const std::string& s)
*/
inline RegularExpression::~RegularExpression()
{
- //#ifndef _WIN32
+ // #ifndef _WIN32
delete[] this->program;
- //#endif
+ // #endif
}
/**
@@ -556,9 +556,9 @@ inline bool RegularExpression::is_valid() const
inline void RegularExpression::set_invalid()
{
- //#ifndef _WIN32
+ // #ifndef _WIN32
delete[] this->program;
- //#endif
+ // #endif
this->program = nullptr;
}
diff --git a/Source/kwsys/kwsysPrivate.h b/Source/kwsys/kwsysPrivate.h
index dd9c127..2f5c2fa 100644
--- a/Source/kwsys/kwsysPrivate.h
+++ b/Source/kwsys/kwsysPrivate.h
@@ -27,7 +27,7 @@
*/
# define KWSYS_NAMESPACE_STRING KWSYS_NAMESPACE_STRING0(KWSYS_NAMESPACE)
# define KWSYS_NAMESPACE_STRING0(x) KWSYS_NAMESPACE_STRING1(x)
-# define KWSYS_NAMESPACE_STRING1(x) # x
+# define KWSYS_NAMESPACE_STRING1(x) #x
#else
# error "kwsysPrivate.h included multiple times."
diff --git a/Source/kwsys/testConfigure.cxx b/Source/kwsys/testConfigure.cxx
index a3c2ed3..4a34e1c 100644
--- a/Source/kwsys/testConfigure.cxx
+++ b/Source/kwsys/testConfigure.cxx
@@ -22,7 +22,7 @@ static bool testFallthrough(int n)
return r == 2;
}
-int testConfigure(int, char* [])
+int testConfigure(int, char*[])
{
bool res = true;
res = testFallthrough(1) && res;
diff --git a/Source/kwsys/testConsoleBuf.cxx b/Source/kwsys/testConsoleBuf.cxx
index 4b7ddf0..f9b826d 100644
--- a/Source/kwsys/testConsoleBuf.cxx
+++ b/Source/kwsys/testConsoleBuf.cxx
@@ -743,7 +743,7 @@ static int testConsole()
#endif
-int testConsoleBuf(int, char* [])
+int testConsoleBuf(int, char*[])
{
int ret = 0;
diff --git a/Source/kwsys/testDirectory.cxx b/Source/kwsys/testDirectory.cxx
index 79bdc98..8c73af2 100644
--- a/Source/kwsys/testDirectory.cxx
+++ b/Source/kwsys/testDirectory.cxx
@@ -19,7 +19,7 @@ file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
#include <testSystemTools.h>
-static int _doLongPathTest()
+static int doLongPathTest()
{
using namespace kwsys;
static const int LONG_PATH_THRESHOLD = 512;
@@ -77,7 +77,7 @@ static int _doLongPathTest()
return res;
}
-static int _nonExistentDirectoryTest()
+static int nonExistentDirectoryTest()
{
using namespace kwsys;
int res = 0;
@@ -105,7 +105,7 @@ static int _nonExistentDirectoryTest()
return res;
}
-static int _copyDirectoryTest()
+static int copyDirectoryTest()
{
using namespace kwsys;
const std::string source(TEST_SYSTEMTOOLS_BINARY_DIR
@@ -136,8 +136,7 @@ static int _copyDirectoryTest()
return 0;
}
-int testDirectory(int, char* [])
+int testDirectory(int, char*[])
{
- return _doLongPathTest() + _nonExistentDirectoryTest() +
- _copyDirectoryTest();
+ return doLongPathTest() + nonExistentDirectoryTest() + copyDirectoryTest();
}
diff --git a/Source/kwsys/testEncoding.cxx b/Source/kwsys/testEncoding.cxx
index 1d605cb..3acb6c8 100644
--- a/Source/kwsys/testEncoding.cxx
+++ b/Source/kwsys/testEncoding.cxx
@@ -266,7 +266,7 @@ static int testToWindowsExtendedPath()
#endif
}
-int testEncoding(int, char* [])
+int testEncoding(int, char*[])
{
const char* loc = setlocale(LC_ALL, "");
if (loc) {
diff --git a/Source/kwsys/testFStream.cxx b/Source/kwsys/testFStream.cxx
index 3325e20..9897a58 100644
--- a/Source/kwsys/testFStream.cxx
+++ b/Source/kwsys/testFStream.cxx
@@ -136,7 +136,7 @@ static int testBOMIO()
return 0;
}
-int testFStream(int, char* [])
+int testFStream(int, char*[])
{
int ret = 0;
diff --git a/Source/kwsys/testStatus.cxx b/Source/kwsys/testStatus.cxx
index 0a767a8..9cadada 100644
--- a/Source/kwsys/testStatus.cxx
+++ b/Source/kwsys/testStatus.cxx
@@ -16,7 +16,7 @@ file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
# include <windows.h>
#endif
-int testStatus(int, char* [])
+int testStatus(int, char*[])
{
bool res = true;
{
diff --git a/Source/kwsys/testSystemInformation.cxx b/Source/kwsys/testSystemInformation.cxx
index 4f0c522..7ae94ff 100644
--- a/Source/kwsys/testSystemInformation.cxx
+++ b/Source/kwsys/testSystemInformation.cxx
@@ -19,7 +19,7 @@
#define printMethod3(info, m, unit) \
std::cout << #m << ": " << info.m << " " << unit << "\n"
-int testSystemInformation(int, char* [])
+int testSystemInformation(int, char*[])
{
std::cout << "CTEST_FULL_OUTPUT\n"; // avoid truncation
diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx
index 487da8d..8afcb68 100644
--- a/Source/kwsys/testSystemTools.cxx
+++ b/Source/kwsys/testSystemTools.cxx
@@ -1209,7 +1209,7 @@ static bool CheckSplitString()
return ret;
}
-int testSystemTools(int, char* [])
+int testSystemTools(int, char*[])
{
bool res = true;