diff options
author | Kitware Robot <kwrobot@kitware.com> | 2018-06-01 13:53:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-06-01 13:53:42 (GMT) |
commit | d7204e649ed4ebb19bb341b4e49eb51514364922 (patch) | |
tree | d9ac3ded5ae6899be7188795011743fe3e6da0a6 /Tests/RunCMake/Android | |
parent | 12fed3edb107c949671043196fa94c542b45452a (diff) | |
download | CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.zip CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.tar.gz CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.tar.bz2 |
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.
Diffstat (limited to 'Tests/RunCMake/Android')
-rw-r--r-- | Tests/RunCMake/Android/android.cxx | 38 | ||||
-rw-r--r-- | Tests/RunCMake/Android/android.h | 120 | ||||
-rw-r--r-- | Tests/RunCMake/Android/android_sysinc.c | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Android/android_sysinc.cxx | 2 |
4 files changed, 81 insertions, 81 deletions
diff --git a/Tests/RunCMake/Android/android.cxx b/Tests/RunCMake/Android/android.cxx index 2dee8f9..a6d8c55 100644 --- a/Tests/RunCMake/Android/android.cxx +++ b/Tests/RunCMake/Android/android.cxx @@ -1,19 +1,19 @@ #include "android.h" #ifndef STL_NONE -#include <cmath> -#include <cstdio> -#ifndef STL_SYSTEM -#include <exception> -#include <typeinfo> -#ifndef STL_STLPORT -#include <cxxabi.h> -#endif -#ifndef STL_GABI -#include <iostream> -#include <string> -#endif -#endif +# include <cmath> +# include <cstdio> +# ifndef STL_SYSTEM +# include <exception> +# include <typeinfo> +# ifndef STL_STLPORT +# include <cxxabi.h> +# endif +# ifndef STL_GABI +# include <iostream> +# include <string> +# endif +# endif #endif int main() @@ -30,19 +30,19 @@ int main() try { delete (new int); } catch (std::exception const& e) { -#if defined(STL_GABI) +# if defined(STL_GABI) e.what(); typeid(e).name(); -#else +# else std::cerr << e.what() << std::endl; std::cerr << typeid(e).name() << std::endl; -#endif +# endif } -#if defined(STL_GABI) +# if defined(STL_GABI) return 0; -#else +# else std::string s; return static_cast<int>(s.size()); -#endif +# endif #endif } diff --git a/Tests/RunCMake/Android/android.h b/Tests/RunCMake/Android/android.h index a5fd67e..2c5cd95 100644 --- a/Tests/RunCMake/Android/android.h +++ b/Tests/RunCMake/Android/android.h @@ -1,103 +1,103 @@ #ifndef __ANDROID__ -#error "__ANDROID__ not defined" +# error "__ANDROID__ not defined" #endif #include <android/api-level.h> #if API_LEVEL != __ANDROID_API__ -#error "API levels do not match" +# error "API levels do not match" #endif #ifdef COMPILER_IS_CLANG -#ifndef __clang__ -#error "COMPILER_IS_CLANG but __clang__ is not defined" -#endif +# ifndef __clang__ +# error "COMPILER_IS_CLANG but __clang__ is not defined" +# endif #else -#ifdef __clang__ -#error "!COMPILER_IS_CLANG but __clang__ is defined" -#endif +# ifdef __clang__ +# error "!COMPILER_IS_CLANG but __clang__ is defined" +# endif #endif #ifdef ARM_MODE -#if ARM_MODE == 1 && defined(__thumb__) -#error "ARM_MODE==1 but __thumb__ is defined" -#elif ARM_MODE == 0 && !defined(__thumb__) -#error "ARM_MODE==0 but __thumb__ is not defined" -#endif +# if ARM_MODE == 1 && defined(__thumb__) +# error "ARM_MODE==1 but __thumb__ is defined" +# elif ARM_MODE == 0 && !defined(__thumb__) +# error "ARM_MODE==0 but __thumb__ is not defined" +# endif #endif #ifdef ARM_NEON -#if ARM_NEON == 0 && defined(__ARM_NEON__) -#error "ARM_NEON==0 but __ARM_NEON__ is defined" -#elif ARM_NEON == 1 && !defined(__ARM_NEON__) -#error "ARM_NEON==1 but __ARM_NEON__ is not defined" -#endif +# if ARM_NEON == 0 && defined(__ARM_NEON__) +# error "ARM_NEON==0 but __ARM_NEON__ is defined" +# elif ARM_NEON == 1 && !defined(__ARM_NEON__) +# error "ARM_NEON==1 but __ARM_NEON__ is not defined" +# endif #endif #ifdef ABI_armeabi -#ifndef __ARM_EABI__ -#error "ABI_armeabi: __ARM_EABI__ not defined" -#endif -#if __ARM_ARCH != 5 -#error "ABI_armeabi: __ARM_ARCH is not 5" -#endif +# ifndef __ARM_EABI__ +# error "ABI_armeabi: __ARM_EABI__ not defined" +# endif +# if __ARM_ARCH != 5 +# error "ABI_armeabi: __ARM_ARCH is not 5" +# endif #endif #ifdef ABI_armeabi_v6 -#ifndef __ARM_EABI__ -#error "ABI_armeabi_v6: __ARM_EABI__ not defined" -#endif -#if __ARM_ARCH != 6 -#error "ABI_armeabi_v6: __ARM_ARCH is not 6" -#endif +# ifndef __ARM_EABI__ +# error "ABI_armeabi_v6: __ARM_EABI__ not defined" +# endif +# if __ARM_ARCH != 6 +# error "ABI_armeabi_v6: __ARM_ARCH is not 6" +# endif #endif #ifdef ABI_armeabi_v7a -#ifndef __ARM_EABI__ -#error "ABI_armeabi_v7a: __ARM_EABI__ not defined" -#endif -#if __ARM_ARCH != 7 -#error "ABI_armeabi_v7a: __ARM_ARCH is not 7" -#endif +# ifndef __ARM_EABI__ +# error "ABI_armeabi_v7a: __ARM_EABI__ not defined" +# endif +# if __ARM_ARCH != 7 +# error "ABI_armeabi_v7a: __ARM_ARCH is not 7" +# endif #endif #ifdef ABI_arm64_v8a -#ifdef __ARM_EABI__ -#error "ABI_arm64_v8a: __ARM_EABI__ defined" -#endif -#ifndef __aarch64__ -#error "ABI_arm64_v8a: __aarch64__ not defined" -#endif +# ifdef __ARM_EABI__ +# error "ABI_arm64_v8a: __ARM_EABI__ defined" +# endif +# ifndef __aarch64__ +# error "ABI_arm64_v8a: __aarch64__ not defined" +# endif #endif #ifdef ABI_mips -#if __mips != 32 -#error "ABI_mips: __mips != 32" -#endif -#ifndef _ABIO32 -#error "ABI_mips: _ABIO32 not defined" -#endif +# if __mips != 32 +# error "ABI_mips: __mips != 32" +# endif +# ifndef _ABIO32 +# error "ABI_mips: _ABIO32 not defined" +# endif #endif #ifdef ABI_mips64 -#if __mips != 64 -#error "ABI_mips64: __mips != 64" -#endif -#ifndef _ABI64 -#error "ABI_mips: _ABI64 not defined" -#endif +# if __mips != 64 +# error "ABI_mips64: __mips != 64" +# endif +# ifndef _ABI64 +# error "ABI_mips: _ABI64 not defined" +# endif #endif #ifdef ABI_x86 -#ifndef __i686__ -#error "ABI_x86: __i686__ not defined" -#endif +# ifndef __i686__ +# error "ABI_x86: __i686__ not defined" +# endif #endif #ifdef ABI_x86_64 -#ifndef __x86_64__ -#error "ABI_x86_64: __x86_64__ not defined" -#endif +# ifndef __x86_64__ +# error "ABI_x86_64: __x86_64__ not defined" +# endif #endif #include <stddef.h> diff --git a/Tests/RunCMake/Android/android_sysinc.c b/Tests/RunCMake/Android/android_sysinc.c index 18d73db..f7cc6f0 100644 --- a/Tests/RunCMake/Android/android_sysinc.c +++ b/Tests/RunCMake/Android/android_sysinc.c @@ -1,7 +1,7 @@ #include <dlfcn.h> #ifndef NOT_SYSTEM_DLFCN_HEADER -#error "sysroot /usr/include appears too early" +# error "sysroot /usr/include appears too early" #endif #include "android.c" diff --git a/Tests/RunCMake/Android/android_sysinc.cxx b/Tests/RunCMake/Android/android_sysinc.cxx index 5c5694b..9379f14 100644 --- a/Tests/RunCMake/Android/android_sysinc.cxx +++ b/Tests/RunCMake/Android/android_sysinc.cxx @@ -1,7 +1,7 @@ #include <dlfcn.h> #ifndef NOT_SYSTEM_DLFCN_HEADER -#error "sysroot /usr/include appears too early" +# error "sysroot /usr/include appears too early" #endif #include "android.cxx" |