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
+5 -5
View File
@@ -1,20 +1,20 @@
#ifndef LINK_C_DEFINE
#error Expected LINK_C_DEFINE
# error Expected LINK_C_DEFINE
#endif
#ifndef LINK_LANGUAGE_IS_C
#error Expected LINK_LANGUAGE_IS_C
# error Expected LINK_LANGUAGE_IS_C
#endif
#ifdef LINK_CXX_DEFINE
#error Unexpected LINK_CXX_DEFINE
# error Unexpected LINK_CXX_DEFINE
#endif
#ifdef LINK_LANGUAGE_IS_CXX
#error Unexpected LINK_LANGUAGE_IS_CXX
# error Unexpected LINK_LANGUAGE_IS_CXX
#endif
#ifdef DEBUG_MODE
#error Unexpected DEBUG_MODE
# error Unexpected DEBUG_MODE
#endif
int main(void)
+46 -46
View File
@@ -1,10 +1,10 @@
#ifndef CMAKE_IS_FUN
#error Expect CMAKE_IS_FUN definition
# error Expect CMAKE_IS_FUN definition
#endif
#if CMAKE_IS != Fun
#error Expect CMAKE_IS=Fun definition
# error Expect CMAKE_IS=Fun definition
#endif
template <bool test>
@@ -43,67 +43,67 @@ enum
};
#ifdef TEST_GENERATOR_EXPRESSIONS
#ifndef CMAKE_IS_DECLARATIVE
#error Expect declarative definition
#endif
#ifdef GE_NOT_DEFINED
#error Expect not defined generator expression
#endif
# ifndef CMAKE_IS_DECLARATIVE
# error Expect declarative definition
# endif
# ifdef GE_NOT_DEFINED
# error Expect not defined generator expression
# endif
#ifndef ARGUMENT
#error Expected define expanded from list
#endif
#ifndef LIST
#error Expected define expanded from list
#endif
# ifndef ARGUMENT
# error Expected define expanded from list
# endif
# ifndef LIST
# error Expected define expanded from list
# endif
#ifndef PREFIX_DEF1
#error Expect PREFIX_DEF1
#endif
# ifndef PREFIX_DEF1
# error Expect PREFIX_DEF1
# endif
#ifndef PREFIX_DEF2
#error Expect PREFIX_DEF2
#endif
# ifndef PREFIX_DEF2
# error Expect PREFIX_DEF2
# endif
#ifndef LINK_CXX_DEFINE
#error Expected LINK_CXX_DEFINE
#endif
#ifndef LINK_LANGUAGE_IS_CXX
#error Expected LINK_LANGUAGE_IS_CXX
#endif
# ifndef LINK_CXX_DEFINE
# error Expected LINK_CXX_DEFINE
# endif
# ifndef LINK_LANGUAGE_IS_CXX
# error Expected LINK_LANGUAGE_IS_CXX
# endif
#ifdef LINK_C_DEFINE
#error Unexpected LINK_C_DEFINE
#endif
#ifdef LINK_LANGUAGE_IS_C
#error Unexpected LINK_LANGUAGE_IS_C
#endif
# ifdef LINK_C_DEFINE
# error Unexpected LINK_C_DEFINE
# endif
# ifdef LINK_LANGUAGE_IS_C
# error Unexpected LINK_LANGUAGE_IS_C
# endif
// TEST_GENERATOR_EXPRESSIONS
#endif
#ifndef BUILD_IS_DEBUG
#error "BUILD_IS_DEBUG not defined!"
# error "BUILD_IS_DEBUG not defined!"
#endif
#ifndef BUILD_IS_NOT_DEBUG
#error "BUILD_IS_NOT_DEBUG not defined!"
# error "BUILD_IS_NOT_DEBUG not defined!"
#endif
// Check per-config definitions.
#ifdef TEST_CONFIG_DEBUG
#if !BUILD_IS_DEBUG
#error "BUILD_IS_DEBUG false with TEST_CONFIG_DEBUG!"
#endif
#if BUILD_IS_NOT_DEBUG
#error "BUILD_IS_NOT_DEBUG true with TEST_CONFIG_DEBUG!"
#endif
# if !BUILD_IS_DEBUG
# error "BUILD_IS_DEBUG false with TEST_CONFIG_DEBUG!"
# endif
# if BUILD_IS_NOT_DEBUG
# error "BUILD_IS_NOT_DEBUG true with TEST_CONFIG_DEBUG!"
# endif
#else
#if BUILD_IS_DEBUG
#error "BUILD_IS_DEBUG true without TEST_CONFIG_DEBUG!"
#endif
#if !BUILD_IS_NOT_DEBUG
#error "BUILD_IS_NOT_DEBUG false without TEST_CONFIG_DEBUG!"
#endif
# if BUILD_IS_DEBUG
# error "BUILD_IS_DEBUG true without TEST_CONFIG_DEBUG!"
# endif
# if !BUILD_IS_NOT_DEBUG
# error "BUILD_IS_NOT_DEBUG false without TEST_CONFIG_DEBUG!"
# endif
#endif
int main(int argc, char** argv)
@@ -1,20 +1,20 @@
#ifndef LINK_CXX_DEFINE
#error Expected LINK_CXX_DEFINE
# error Expected LINK_CXX_DEFINE
#endif
#ifndef LINK_LANGUAGE_IS_CXX
#error Expected LINK_LANGUAGE_IS_CXX
# error Expected LINK_LANGUAGE_IS_CXX
#endif
#ifdef LINK_C_DEFINE
#error Unexpected LINK_C_DEFINE
# error Unexpected LINK_C_DEFINE
#endif
#ifdef LINK_LANGUAGE_IS_C
#error Unexpected LINK_LANGUAGE_IS_C
# error Unexpected LINK_LANGUAGE_IS_C
#endif
#ifndef C_EXECUTABLE_LINK_LANGUAGE_IS_C
#error Expected C_EXECUTABLE_LINK_LANGUAGE_IS_C define
# error Expected C_EXECUTABLE_LINK_LANGUAGE_IS_C define
#endif
void someFunc(void)
@@ -1,20 +1,20 @@
#ifndef LINK_CXX_DEFINE
#error Expected LINK_CXX_DEFINE
# error Expected LINK_CXX_DEFINE
#endif
#ifndef LINK_LANGUAGE_IS_CXX
#error Expected LINK_LANGUAGE_IS_CXX
# error Expected LINK_LANGUAGE_IS_CXX
#endif
#ifdef LINK_C_DEFINE
#error Unexpected LINK_C_DEFINE
# error Unexpected LINK_C_DEFINE
#endif
#ifdef LINK_LANGUAGE_IS_C
#error Unexpected LINK_LANGUAGE_IS_C
# error Unexpected LINK_LANGUAGE_IS_C
#endif
#ifndef C_EXECUTABLE_LINK_LANGUAGE_IS_C
#error Expected C_EXECUTABLE_LINK_LANGUAGE_IS_C define
# error Expected C_EXECUTABLE_LINK_LANGUAGE_IS_C define
#endif
int main(int argc, char** argv)
+1 -1
View File
@@ -3,7 +3,7 @@
#include <string.h>
#ifndef BUILD_CONFIG_NAME
#error "BUILD_CONFIG_NAME not defined!"
# error "BUILD_CONFIG_NAME not defined!"
#endif
int main()
@@ -1,11 +1,11 @@
#ifndef TGT_DEF
#error TGT_DEF incorrectly not defined
# error TGT_DEF incorrectly not defined
#endif
#ifndef TGT_TYPE_STATIC_LIBRARY
#error TGT_TYPE_STATIC_LIBRARY incorrectly not defined
# error TGT_TYPE_STATIC_LIBRARY incorrectly not defined
#endif
#ifdef TGT_TYPE_EXECUTABLE
#error TGT_TYPE_EXECUTABLE incorrectly defined
# error TGT_TYPE_EXECUTABLE incorrectly defined
#endif
int main(void)
{