diff options
author | Kitware Robot <kwrobot@kitware.com> | 2016-05-16 14:34:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-16 20:05:19 (GMT) |
commit | d9fd2f5402eeaa345691313658e02b51038f570b (patch) | |
tree | dca71b9a7e267f4c6300da3eb770415381726785 /Tests/Complex/Library | |
parent | 82df6deaafb36cbbfd450202bb20b320f637751a (diff) | |
download | CMake-d9fd2f5402eeaa345691313658e02b51038f570b.zip CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.bz2 |
Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Diffstat (limited to 'Tests/Complex/Library')
-rw-r--r-- | Tests/Complex/Library/SystemDir/testSystemDir.h | 5 | ||||
-rw-r--r-- | Tests/Complex/Library/create_file.cxx | 19 | ||||
-rw-r--r-- | Tests/Complex/Library/notInAllLib.cxx | 7 | ||||
-rw-r--r-- | Tests/Complex/Library/sharedFile.h | 4 | ||||
-rw-r--r-- | Tests/Complex/Library/testConly.h | 5 |
5 files changed, 21 insertions, 19 deletions
diff --git a/Tests/Complex/Library/SystemDir/testSystemDir.h b/Tests/Complex/Library/SystemDir/testSystemDir.h index 73be353..074ff75 100644 --- a/Tests/Complex/Library/SystemDir/testSystemDir.h +++ b/Tests/Complex/Library/SystemDir/testSystemDir.h @@ -1,2 +1,5 @@ // Purposely leave off the return type to create a warning. -foo() { return 0; } +foo() +{ + return 0; +} diff --git a/Tests/Complex/Library/create_file.cxx b/Tests/Complex/Library/create_file.cxx index 050ed0b..62a1975 100644 --- a/Tests/Complex/Library/create_file.cxx +++ b/Tests/Complex/Library/create_file.cxx @@ -1,26 +1,23 @@ #include <stdio.h> #include <stdlib.h> -int main (int argc, char *argv[]) +int main(int argc, char* argv[]) { - if (argc < 2) - { + if (argc < 2) { fprintf(stderr, "Missing name of file to create.\n"); return EXIT_FAILURE; - } + } - FILE *stream = fopen(argv[1], "w"); - if(stream == NULL) - { + FILE* stream = fopen(argv[1], "w"); + if (stream == NULL) { fprintf(stderr, "Unable to open %s for writing!\n", argv[1]); return EXIT_FAILURE; - } + } - if(fclose(stream)) - { + if (fclose(stream)) { fprintf(stderr, "Unable to close %s!\n", argv[1]); return EXIT_FAILURE; - } + } fprintf(stdout, ">> Creating %s!\n", argv[1]); diff --git a/Tests/Complex/Library/notInAllLib.cxx b/Tests/Complex/Library/notInAllLib.cxx index 5d928f4..e66ea05 100644 --- a/Tests/Complex/Library/notInAllLib.cxx +++ b/Tests/Complex/Library/notInAllLib.cxx @@ -1,5 +1,8 @@ -int notInAllLibFunc() { return 0; } +int notInAllLibFunc() +{ + return 0; +} #if 1 -# error "This target should not be compiled by ALL." +#error "This target should not be compiled by ALL." #endif diff --git a/Tests/Complex/Library/sharedFile.h b/Tests/Complex/Library/sharedFile.h index 65ac2e2..e32fcb7 100644 --- a/Tests/Complex/Library/sharedFile.h +++ b/Tests/Complex/Library/sharedFile.h @@ -1,8 +1,8 @@ #if defined(_WIN32) || defined(WIN32) /* Win32 version */ #ifdef CMakeTestLibraryShared_EXPORTS -# define CMakeTest_EXPORT __declspec(dllexport) +#define CMakeTest_EXPORT __declspec(dllexport) #else -# define CMakeTest_EXPORT __declspec(dllimport) +#define CMakeTest_EXPORT __declspec(dllimport) #endif #else /* unix needs nothing */ diff --git a/Tests/Complex/Library/testConly.h b/Tests/Complex/Library/testConly.h index ba84589..9b0fb73 100644 --- a/Tests/Complex/Library/testConly.h +++ b/Tests/Complex/Library/testConly.h @@ -1,8 +1,8 @@ #if defined(_WIN32) || defined(WIN32) /* Win32 version */ #ifdef CMakeTestCLibraryShared_EXPORTS -# define CMakeTest_EXPORT __declspec(dllexport) +#define CMakeTest_EXPORT __declspec(dllexport) #else -# define CMakeTest_EXPORT __declspec(dllimport) +#define CMakeTest_EXPORT __declspec(dllimport) #endif #else /* unix needs nothing */ @@ -10,4 +10,3 @@ #endif CMakeTest_EXPORT int CsharedFunction(); - |