Lines Matching refs:Spaces
7850 FormatStyle Spaces = getLLVMStyle(); in TEST_F() local
7851 Spaces.SpacesInCStyleCastParentheses = true; in TEST_F()
7852 verifyFormat("Deleted &operator=(const Deleted &) & = default;", Spaces); in TEST_F()
7853 verifyFormat("SomeType MemberFunction(const Deleted &) & = delete;", Spaces); in TEST_F()
7854 verifyFormat("Deleted &operator=(const Deleted &) &;", Spaces); in TEST_F()
7855 verifyFormat("SomeType MemberFunction(const Deleted &) &;", Spaces); in TEST_F()
7857 Spaces.SpacesInCStyleCastParentheses = false; in TEST_F()
7858 Spaces.SpacesInParentheses = true; in TEST_F()
7859 verifyFormat("Deleted &operator=( const Deleted & ) & = default;", Spaces); in TEST_F()
7861 Spaces); in TEST_F()
7862 verifyFormat("Deleted &operator=( const Deleted & ) &;", Spaces); in TEST_F()
7863 verifyFormat("SomeType MemberFunction( const Deleted & ) &;", Spaces); in TEST_F()
11845 FormatStyle Spaces = getLLVMStyle(); in TEST_F() local
11846 Spaces.SpaceAfterLogicalNot = true; in TEST_F()
11848 verifyFormat("bool x = ! y", Spaces); in TEST_F()
11849 verifyFormat("if (! isFailure())", Spaces); in TEST_F()
11850 verifyFormat("if (! (a && b))", Spaces); in TEST_F()
11851 verifyFormat("\"Error!\"", Spaces); in TEST_F()
11852 verifyFormat("! ! x", Spaces); in TEST_F()
11856 FormatStyle Spaces = getLLVMStyle(); in TEST_F() local
11858 Spaces.SpacesInParentheses = true; in TEST_F()
11859 verifyFormat("do_something( ::globalVar );", Spaces); in TEST_F()
11860 verifyFormat("call( x, y, z );", Spaces); in TEST_F()
11861 verifyFormat("call();", Spaces); in TEST_F()
11862 verifyFormat("std::function<void( int, int )> callback;", Spaces); in TEST_F()
11864 Spaces); in TEST_F()
11867 Spaces); in TEST_F()
11870 Spaces); in TEST_F()
11875 Spaces); in TEST_F()
11879 Spaces); in TEST_F()
11884 Spaces); in TEST_F()
11886 Spaces.SpacesInParentheses = false; in TEST_F()
11887 Spaces.SpacesInCStyleCastParentheses = true; in TEST_F()
11888 verifyFormat("Type *A = ( Type * )P;", Spaces); in TEST_F()
11889 verifyFormat("Type *A = ( vector<Type *, int *> )P;", Spaces); in TEST_F()
11890 verifyFormat("x = ( int32 )y;", Spaces); in TEST_F()
11891 verifyFormat("int a = ( int )(2.0f);", Spaces); in TEST_F()
11892 verifyFormat("#define AA(X) sizeof((( X * )NULL)->a)", Spaces); in TEST_F()
11893 verifyFormat("my_int a = ( my_int )sizeof(int);", Spaces); in TEST_F()
11894 verifyFormat("#define x (( int )-1)", Spaces); in TEST_F()
11897 Spaces.SpacesInParentheses = false; in TEST_F()
11898 Spaces.SpaceInEmptyParentheses = true; in TEST_F()
11899 Spaces.SpacesInCStyleCastParentheses = true; in TEST_F()
11900 verifyFormat("call(x, y, z);", Spaces); in TEST_F()
11901 verifyFormat("call( );", Spaces); in TEST_F()
11902 verifyFormat("std::function<void(int, int)> callback;", Spaces); in TEST_F()
11905 Spaces); in TEST_F()
11908 Spaces); in TEST_F()
11913 Spaces); in TEST_F()
11917 Spaces); in TEST_F()
11922 Spaces); in TEST_F()
11925 Spaces.SpaceAfterCStyleCast = true; in TEST_F()
11926 verifyFormat("call(x, y, z);", Spaces); in TEST_F()
11927 verifyFormat("call( );", Spaces); in TEST_F()
11928 verifyFormat("std::function<void(int, int)> callback;", Spaces); in TEST_F()
11931 Spaces); in TEST_F()
11934 Spaces); in TEST_F()
11939 Spaces); in TEST_F()
11943 Spaces); in TEST_F()
11948 Spaces); in TEST_F()
11951 Spaces.SpacesInCStyleCastParentheses = false; in TEST_F()
11952 Spaces.SpaceAfterCStyleCast = true; in TEST_F()
11955 Spaces); in TEST_F()
11959 Spaces); in TEST_F()
11966 FormatStyle Spaces = getLLVMStyle(); in TEST_F() local
11967 Spaces.SpacesInSquareBrackets = true; in TEST_F()
11969 verifyFormat("int a[ 5 ];", Spaces); in TEST_F()
11970 verifyFormat("a[ 3 ] += 42;", Spaces); in TEST_F()
11971 verifyFormat("constexpr char hello[]{\"hello\"};", Spaces); in TEST_F()
11974 Spaces); in TEST_F()
11975 verifyFormat("std::unique_ptr<int[]> foo() {}", Spaces); in TEST_F()
11976 verifyFormat("int i = a[ a ][ a ]->f();", Spaces); in TEST_F()
11977 verifyFormat("int i = (*b)[ a ]->f();", Spaces); in TEST_F()
11979 verifyFormat("int c = []() -> int { return 2; }();\n", Spaces); in TEST_F()
11980 verifyFormat("return [ i, args... ] {};", Spaces); in TEST_F()
11981 verifyFormat("int foo = [ &bar ]() {};", Spaces); in TEST_F()
11982 verifyFormat("int foo = [ = ]() {};", Spaces); in TEST_F()
11983 verifyFormat("int foo = [ & ]() {};", Spaces); in TEST_F()
11984 verifyFormat("int foo = [ =, &bar ]() {};", Spaces); in TEST_F()
11985 verifyFormat("int foo = [ &bar, = ]() {};", Spaces); in TEST_F()
12028 FormatStyle Spaces = getLLVMStyle(); in TEST_F() local
12029 Spaces.SpaceBeforeAssignmentOperators = false; in TEST_F()
12030 verifyFormat("int a= 5;", Spaces); in TEST_F()
12031 verifyFormat("a+= 42;", Spaces); in TEST_F()
12032 verifyFormat("a or_eq 8;", Spaces); in TEST_F()
12198 FormatStyle Spaces = getLLVMStyle(); in TEST_F() local
12199 Spaces.AttributeMacros.push_back("qualified"); in TEST_F()
12200 Spaces.PointerAlignment = FormatStyle::PAS_Right; in TEST_F()
12201 Spaces.SpaceAroundPointerQualifiers = FormatStyle::SAPQ_Default; in TEST_F()
12202 verifyFormat("SomeType *volatile *a = NULL;", Spaces); in TEST_F()
12203 verifyFormat("SomeType *__attribute__((attr)) *a = NULL;", Spaces); in TEST_F()
12204 verifyFormat("std::vector<SomeType *const *> x;", Spaces); in TEST_F()
12205 verifyFormat("std::vector<SomeType *qualified *> x;", Spaces); in TEST_F()
12206 verifyFormat("std::vector<SomeVar * NotAQualifier> x;", Spaces); in TEST_F()
12207 Spaces.SpaceAroundPointerQualifiers = FormatStyle::SAPQ_Before; in TEST_F()
12208 verifyFormat("SomeType * volatile *a = NULL;", Spaces); in TEST_F()
12209 verifyFormat("SomeType * __attribute__((attr)) *a = NULL;", Spaces); in TEST_F()
12210 verifyFormat("std::vector<SomeType * const *> x;", Spaces); in TEST_F()
12211 verifyFormat("std::vector<SomeType * qualified *> x;", Spaces); in TEST_F()
12212 verifyFormat("std::vector<SomeVar * NotAQualifier> x;", Spaces); in TEST_F()
12215 Spaces.PointerAlignment = FormatStyle::PAS_Left; in TEST_F()
12216 Spaces.SpaceAroundPointerQualifiers = FormatStyle::SAPQ_Before; in TEST_F()
12217 verifyFormat("SomeType* volatile* a = NULL;", Spaces); in TEST_F()
12218 verifyFormat("SomeType* __attribute__((attr))* a = NULL;", Spaces); in TEST_F()
12219 verifyFormat("std::vector<SomeType* const*> x;", Spaces); in TEST_F()
12220 verifyFormat("std::vector<SomeType* qualified*> x;", Spaces); in TEST_F()
12221 verifyFormat("std::vector<SomeVar * NotAQualifier> x;", Spaces); in TEST_F()
12223 Spaces.SpaceAroundPointerQualifiers = FormatStyle::SAPQ_After; in TEST_F()
12224 verifyFormat("SomeType* volatile * a = NULL;", Spaces); in TEST_F()
12225 verifyFormat("SomeType* __attribute__((attr)) * a = NULL;", Spaces); in TEST_F()
12226 verifyFormat("std::vector<SomeType* const *> x;", Spaces); in TEST_F()
12227 verifyFormat("std::vector<SomeType* qualified *> x;", Spaces); in TEST_F()
12228 verifyFormat("std::vector<SomeVar * NotAQualifier> x;", Spaces); in TEST_F()
12231 Spaces.PointerAlignment = FormatStyle::PAS_Middle; in TEST_F()
12232 Spaces.SpaceAroundPointerQualifiers = FormatStyle::SAPQ_After; in TEST_F()
12233 verifyFormat("SomeType * volatile * a = NULL;", Spaces); in TEST_F()
12234 verifyFormat("SomeType * __attribute__((attr)) * a = NULL;", Spaces); in TEST_F()
12235 verifyFormat("std::vector<SomeType * const *> x;", Spaces); in TEST_F()
12236 verifyFormat("std::vector<SomeType * qualified *> x;", Spaces); in TEST_F()
12237 verifyFormat("std::vector<SomeVar * NotAQualifier> x;", Spaces); in TEST_F()
16153 FormatStyle Spaces = getLLVMStyle(); in TEST_F() local
16154 Spaces.SpacesInAngles = true; in TEST_F()
16156 verifyFormat("static_cast< int >(arg);", Spaces); in TEST_F()
16157 verifyFormat("template < typename T0, typename T1 > void f() {}", Spaces); in TEST_F()
16158 verifyFormat("f< int, float >();", Spaces); in TEST_F()
16159 verifyFormat("template <> g() {}", Spaces); in TEST_F()
16160 verifyFormat("template < std::vector< int > > f() {}", Spaces); in TEST_F()
16161 verifyFormat("std::function< void(int, int) > fct;", Spaces); in TEST_F()
16163 Spaces); in TEST_F()
16165 Spaces.Standard = FormatStyle::LS_Cpp03; in TEST_F()
16166 Spaces.SpacesInAngles = true; in TEST_F()
16167 verifyFormat("A< A< int > >();", Spaces); in TEST_F()
16169 Spaces.SpacesInAngles = false; in TEST_F()
16170 verifyFormat("A<A<int> >();", Spaces); in TEST_F()
16172 Spaces.Standard = FormatStyle::LS_Cpp11; in TEST_F()
16173 Spaces.SpacesInAngles = true; in TEST_F()
16174 verifyFormat("A< A< int > >();", Spaces); in TEST_F()
16176 Spaces.SpacesInAngles = false; in TEST_F()
16177 verifyFormat("A<A<int>>();", Spaces); in TEST_F()
16372 FormatStyle Spaces = getLLVMStyle(); in TEST_F() local
16373 Spaces.SpacesInSquareBrackets = true; in TEST_F()
16375 format("auto a = new unique_ptr<int > [10];", Spaces)); in TEST_F()
16382 FormatStyle Spaces = getLLVMStyle(); in TEST_F() local
16383 Spaces.SpacesInSquareBrackets = true; in TEST_F()
16385 format("auto a = unique_ptr < Foo < Bar>[10]> ;", Spaces)); in TEST_F()
16631 format::FormatStyle Spaces = format::getLLVMStyle(); in TEST_F() local
16632 Spaces.SpacesInSquareBrackets = true; in TEST_F()
16633 verifyFormat("auto [ a, b ] = f();", Spaces); in TEST_F()
16634 verifyFormat("auto &&[ a, b ] = f();", Spaces); in TEST_F()
16635 verifyFormat("auto &[ a, b ] = f();", Spaces); in TEST_F()
16636 verifyFormat("auto const &&[ a, b ] = f();", Spaces); in TEST_F()
16637 verifyFormat("auto const &[ a, b ] = f();", Spaces); in TEST_F()
16876 FormatStyle Spaces = getLLVMStyle(); in TEST_F() local
16877 Spaces.SpacesInConditionalStatement = true; in TEST_F()
16878 verifyFormat("for ( int i = 0; i; i++ )\n continue;", Spaces); in TEST_F()
16879 verifyFormat("if ( !a )\n return;", Spaces); in TEST_F()
16880 verifyFormat("if ( a )\n return;", Spaces); in TEST_F()
16881 verifyFormat("if constexpr ( a )\n return;", Spaces); in TEST_F()
16882 verifyFormat("switch ( a )\ncase 1:\n return;", Spaces); in TEST_F()
16883 verifyFormat("while ( a )\n return;", Spaces); in TEST_F()
16884 verifyFormat("while ( (a && b) )\n return;", Spaces); in TEST_F()
16885 verifyFormat("do {\n} while ( 1 != 0 );", Spaces); in TEST_F()
16886 verifyFormat("try {\n} catch ( const std::exception & ) {\n}", Spaces); in TEST_F()
16889 verifyFormat("while ( ::func() )\n return;", Spaces); in TEST_F()