Revise C++ coding style using clang-format-6.0

Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 6.0.

* 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.
This commit is contained in:
Kitware Robot
2018-06-01 09:53:41 -04:00
committed by Brad King
parent 12fed3edb1
commit d7204e649e
445 changed files with 3734 additions and 3181 deletions

View File

@@ -2,13 +2,13 @@
#include "somestruct.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
# include <sys/types.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
# include <stdint.h>
#endif
#ifdef HAVE_STDDEF_H
#include <stddef.h>
# include <stddef.h>
#endif
#include <stdio.h>
@@ -86,17 +86,17 @@ int main()
/* long long */
#if defined(SIZEOF_LONG_LONG)
CHECK(long long, SIZEOF_LONG_LONG);
#if !defined(HAVE_SIZEOF_LONG_LONG)
# if !defined(HAVE_SIZEOF_LONG_LONG)
NODEF(HAVE_SIZEOF_LONG_LONG);
#endif
# endif
#endif
/* __int64 */
#if defined(SIZEOF___INT64)
CHECK(__int64, SIZEOF___INT64);
#if !defined(HAVE_SIZEOF___INT64)
# if !defined(HAVE_SIZEOF___INT64)
NODEF(HAVE_SIZEOF___INT64);
#endif
# endif
#elif defined(HAVE_SIZEOF___INT64)
NODEF(SIZEOF___INT64);
#endif
@@ -114,9 +114,9 @@ int main()
/* ssize_t */
#if defined(SIZEOF_SSIZE_T)
CHECK(ssize_t, SIZEOF_SSIZE_T);
#if !defined(HAVE_SIZEOF_SSIZE_T)
# if !defined(HAVE_SIZEOF_SSIZE_T)
NODEF(HAVE_SIZEOF_SSIZE_T);
#endif
# endif
#elif defined(HAVE_SIZEOF_SSIZE_T)
NODEF(SIZEOF_SSIZE_T);
#endif
@@ -125,9 +125,9 @@ int main()
#if defined(SIZEOF_STRUCTMEMBER_INT)
CHECK(x.someint, SIZEOF_STRUCTMEMBER_INT);
CHECK(x.someint, SIZEOF_INT);
#if !defined(HAVE_SIZEOF_STRUCTMEMBER_INT)
# if !defined(HAVE_SIZEOF_STRUCTMEMBER_INT)
NODEF(HAVE_SIZEOF_STRUCTMEMBER_INT);
#endif
# endif
#elif defined(HAVE_SIZEOF_STRUCTMEMBER_INT)
NODEF(SIZEOF_STRUCTMEMBER_INT);
#endif
@@ -136,9 +136,9 @@ int main()
#if defined(SIZEOF_STRUCTMEMBER_PTR)
CHECK(x.someptr, SIZEOF_STRUCTMEMBER_PTR);
CHECK(x.someptr, SIZEOF_DATA_PTR);
#if !defined(HAVE_SIZEOF_STRUCTMEMBER_PTR)
# if !defined(HAVE_SIZEOF_STRUCTMEMBER_PTR)
NODEF(HAVE_SIZEOF_STRUCTMEMBER_PTR);
#endif
# endif
#elif defined(HAVE_SIZEOF_STRUCTMEMBER_PTR)
NODEF(SIZEOF_STRUCTMEMBER_PTR);
#endif
@@ -147,9 +147,9 @@ int main()
#if defined(SIZEOF_STRUCTMEMBER_CHAR)
CHECK(x.somechar, SIZEOF_STRUCTMEMBER_CHAR);
CHECK(x.somechar, SIZEOF_CHAR);
#if !defined(HAVE_SIZEOF_STRUCTMEMBER_CHAR)
# if !defined(HAVE_SIZEOF_STRUCTMEMBER_CHAR)
NODEF(HAVE_SIZEOF_STRUCTMEMBER_CHAR);
#endif
# endif
#elif defined(HAVE_SIZEOF_STRUCTMEMBER_CHAR)
NODEF(SIZEOF_STRUCTMEMBER_CHAR);
#endif

View File

@@ -3,13 +3,13 @@
#include "someclass.hxx"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
# include <sys/types.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
# include <stdint.h>
#endif
#ifdef HAVE_STDDEF_H
#include <stddef.h>
# include <stddef.h>
#endif
#include <stdio.h>
@@ -87,17 +87,17 @@ int main()
/* long long */
#if defined(SIZEOF_LONG_LONG)
CHECK(long long, SIZEOF_LONG_LONG);
#if !defined(HAVE_SIZEOF_LONG_LONG)
# if !defined(HAVE_SIZEOF_LONG_LONG)
NODEF(HAVE_SIZEOF_LONG_LONG);
#endif
# endif
#endif
/* __int64 */
#if defined(SIZEOF___INT64)
CHECK(__int64, SIZEOF___INT64);
#if !defined(HAVE_SIZEOF___INT64)
# if !defined(HAVE_SIZEOF___INT64)
NODEF(HAVE_SIZEOF___INT64);
#endif
# endif
#elif defined(HAVE_SIZEOF___INT64)
NODEF(SIZEOF___INT64);
#endif
@@ -115,9 +115,9 @@ int main()
/* ssize_t */
#if defined(SIZEOF_SSIZE_T)
CHECK(ssize_t, SIZEOF_SSIZE_T);
#if !defined(HAVE_SIZEOF_SSIZE_T)
# if !defined(HAVE_SIZEOF_SSIZE_T)
NODEF(HAVE_SIZEOF_SSIZE_T);
#endif
# endif
#elif defined(HAVE_SIZEOF_SSIZE_T)
NODEF(SIZEOF_SSIZE_T);
#endif
@@ -126,9 +126,9 @@ int main()
#if defined(SIZEOF_NS_CLASSMEMBER_INT)
CHECK(y.someint, SIZEOF_NS_CLASSMEMBER_INT);
CHECK(y.someint, SIZEOF_INT);
#if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_INT)
# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_INT)
NODEF(HAVE_SIZEOF_STRUCTMEMBER_INT);
#endif
# endif
#elif defined(HAVE_SIZEOF_STRUCTMEMBER_INT)
NODEF(SIZEOF_STRUCTMEMBER_INT);
#endif
@@ -137,9 +137,9 @@ int main()
#if defined(SIZEOF_NS_CLASSMEMBER_PTR)
CHECK(y.someptr, SIZEOF_NS_CLASSMEMBER_PTR);
CHECK(y.someptr, SIZEOF_DATA_PTR);
#if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_PTR)
# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_PTR)
NODEF(HAVE_SIZEOF_NS_CLASSMEMBER_PTR);
#endif
# endif
#elif defined(HAVE_SIZEOF_NS_CLASSMEMBER_PTR)
NODEF(SIZEOF_NS_CLASSMEMBER_PTR);
#endif
@@ -148,9 +148,9 @@ int main()
#if defined(SIZEOF_NS_CLASSMEMBER_CHAR)
CHECK(y.somechar, SIZEOF_NS_CLASSMEMBER_CHAR);
CHECK(y.somechar, SIZEOF_CHAR);
#if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_CHAR)
# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_CHAR)
NODEF(HAVE_SIZEOF_NS_CLASSMEMBER_CHAR);
#endif
# endif
#elif defined(HAVE_SIZEOF_NS_CLASSMEMBER_CHAR)
NODEF(SIZEOF_NS_CLASSMEMBER_CHAR);
#endif
@@ -159,9 +159,9 @@ int main()
#if defined(SIZEOF_NS_CLASSMEMBER_BOOL)
CHECK(y.somechar, SIZEOF_NS_CLASSMEMBER_BOOL);
CHECK(y.somechar, SIZEOF_BOOL);
#if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_BOOL)
# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_BOOL)
NODEF(HAVE_SIZEOF_NS_CLASSMEMBER_BOOL);
#endif
# endif
#elif defined(HAVE_SIZEOF_NS_CLASSMEMBER_BOOL)
NODEF(SIZEOF_NS_CLASSMEMBER_BOOL);
#endif

View File

@@ -1,26 +1,26 @@
#ifndef HAVE_PACK1
#error Expected HAVE_PACK1
# error Expected HAVE_PACK1
#endif
#ifndef HAVE_PACK2
#error Expected HAVE_PACK2
# error Expected HAVE_PACK2
#endif
#ifndef HAVE_PACK3
#error Expected HAVE_PACK3
# error Expected HAVE_PACK3
#endif
#ifndef HAVE_PACK4
#error Expected HAVE_PACK4
# error Expected HAVE_PACK4
#endif
#ifndef HAVE_PACK5
#error Expected HAVE_PACK5
# error Expected HAVE_PACK5
#endif
#ifndef HAVE_PACK6
#error Expected HAVE_PACK6
# error Expected HAVE_PACK6
#endif
int main(int argc, char** argv)

View File

@@ -7,21 +7,21 @@
JOIN(EXPECTED_COMPILER_, FEATURE))
#if !CHECK(CXX_DELEGATING_CONSTRUCTORS)
#error cxx_delegating_constructors expected availability did not match.
# error cxx_delegating_constructors expected availability did not match.
#endif
#if !CHECK(CXX_VARIADIC_TEMPLATES)
#error cxx_variadic_templates expected availability did not match.
# error cxx_variadic_templates expected availability did not match.
#endif
#if !CHECK(VERSION_MAJOR)
#error Compiler major version did not match.
# error Compiler major version did not match.
#endif
#if !CHECK(VERSION_MINOR)
#error Compiler minor version did not match.
# error Compiler minor version did not match.
#endif
#if !CHECK(VERSION_PATCH)
#error Compiler patch version did not match.
# error Compiler patch version did not match.
#endif

View File

@@ -3,25 +3,25 @@
#if !defined(TEST_COMPILER_C_FUNCTION_PROTOTYPES) || \
!TEST_COMPILER_C_FUNCTION_PROTOTYPES
#error Expected TEST_COMPILER_C_FUNCTION_PROTOTYPES
# error Expected TEST_COMPILER_C_FUNCTION_PROTOTYPES
#endif
#if !EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
#error Expected EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
# error Expected EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
#endif
#if !defined(TEST_COMPILER_C_RESTRICT) || !TEST_COMPILER_C_RESTRICT
#if EXPECTED_COMPILER_C_RESTRICT
#error Expected TEST_COMPILER_C_RESTRICT
#endif
# if EXPECTED_COMPILER_C_RESTRICT
# error Expected TEST_COMPILER_C_RESTRICT
# endif
#else
#if !EXPECTED_COMPILER_C_RESTRICT
#error Expect no TEST_COMPILER_C_RESTRICT
#endif
# if !EXPECTED_COMPILER_C_RESTRICT
# error Expect no TEST_COMPILER_C_RESTRICT
# endif
#endif
#ifdef TEST_COMPILER_CXX_STATIC_ASSERT
#error Expect no CXX features defined
# error Expect no CXX features defined
#endif
int main()

View File

@@ -5,7 +5,7 @@
#include "compile_tests.h"
#ifdef TEST_COMPILER_C_STATIC_ASSERT
#error Expect no C features defined
# error Expect no C features defined
#endif
TEST_STATIC_ASSERT(true);

View File

@@ -3,25 +3,25 @@
#if !defined(MULTI_COMPILER_C_FUNCTION_PROTOTYPES) || \
!MULTI_COMPILER_C_FUNCTION_PROTOTYPES
#error Expected MULTI_COMPILER_C_FUNCTION_PROTOTYPES
# error Expected MULTI_COMPILER_C_FUNCTION_PROTOTYPES
#endif
#if !EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
#error Expected EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
# error Expected EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
#endif
#if !defined(MULTI_COMPILER_C_RESTRICT) || !MULTI_COMPILER_C_RESTRICT
#if EXPECTED_COMPILER_C_RESTRICT
#error Expected MULTI_COMPILER_C_RESTRICT
#endif
# if EXPECTED_COMPILER_C_RESTRICT
# error Expected MULTI_COMPILER_C_RESTRICT
# endif
#else
#if !EXPECTED_COMPILER_C_RESTRICT
#error Expect no MULTI_COMPILER_C_RESTRICT
#endif
# if !EXPECTED_COMPILER_C_RESTRICT
# error Expect no MULTI_COMPILER_C_RESTRICT
# endif
#endif
#ifdef MULTI_COMPILER_CXX_STATIC_ASSERT
#error Expect no CXX features defined
# error Expect no CXX features defined
#endif
int main()

View File

@@ -5,7 +5,7 @@
#include "compile_tests.h"
#ifdef MULTI_COMPILER_C_STATIC_ASSERT
#error Expect no C features defined
# error Expect no C features defined
#endif
MULTI_STATIC_ASSERT(true);