Skip to content

Commit bac74a5

Browse files
committed
[clang] NFC: remove trailing white spaces from some tests
Differential Revision: https://reviews.llvm.org/D99826
1 parent c318746 commit bac74a5

File tree

6 files changed

+47
-47
lines changed

6 files changed

+47
-47
lines changed

clang/test/CXX/drs/dr3xx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ namespace dr384 { // dr384: yes
11031103
}
11041104

11051105
namespace dr385 { // dr385: yes
1106-
struct A { protected: void f(); };
1106+
struct A { protected: void f(); };
11071107
struct B : A { using A::f; };
11081108
struct C : A { void g(B b) { b.f(); } };
11091109
void h(B b) { b.f(); }

clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-1y.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ int &f = [] (int r) -> decltype(auto) { return r; } (a); // expected-error {{can
99
int &g = [] (int r) -> decltype(auto) { return (r); } (a); // expected-warning {{reference to stack}}
1010

1111

12-
int test_explicit_auto_return()
12+
int test_explicit_auto_return()
1313
{
1414
struct X {};
1515
auto L = [](auto F, auto a) { return F(a); };
@@ -18,32 +18,32 @@ int test_explicit_auto_return()
1818
auto MPtr = [](auto c) -> auto* { return &c; }; //expected-warning{{address of stack}}
1919
auto MDeclType = [](auto&& d) -> decltype(auto) { return static_cast<decltype(d)>(d); }; //OK
2020
M(3);
21-
21+
2222
auto &&x = MDeclType(X{});
2323
auto &&x1 = M(X{});
2424
auto &&x2 = MRef(X{});//expected-note{{in instantiation of}}
2525
auto &&x3 = MPtr(X{}); //expected-note{{in instantiation of}}
26-
return 0;
26+
return 0;
2727
}
2828

29-
int test_implicit_auto_return()
30-
{
29+
int test_implicit_auto_return()
30+
{
3131
{
3232
auto M = [](auto a) { return a; };
3333
struct X {};
3434
X x = M(X{});
35-
35+
3636
}
3737
}
38-
38+
3939
int test_multiple_returns() {
40-
auto M = [](auto a) {
40+
auto M = [](auto a) {
4141
bool k;
4242
if (k)
4343
return a;
4444
else
4545
return 5; //expected-error{{deduced as 'int' here}}
46-
};
46+
};
4747
M(3); // OK
4848
M('a'); //expected-note{{in instantiation of}}
4949
return 0;
@@ -60,7 +60,7 @@ int test_no_parameter_list()
6060
}
6161

6262
int test_conditional_in_return() {
63-
auto Fac = [](auto f, auto n) {
63+
auto Fac = [](auto f, auto n) {
6464
return n <= 0 ? n : f(f, n - 1) * n;
6565
};
6666
// FIXME: this test causes a recursive limit - need to error more gracefully.

clang/test/CXX/special/class.copy/p33-0x.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void throw_move_only(X x) {
2222
throw x;
2323
throw x2;
2424
}
25-
25+
2626
namespace PR10142 {
2727
struct X {
2828
X();

clang/test/CXX/temp/temp.decls/temp.mem/p5.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// RUN: %clang_cc1 -fsyntax-only -verify %s
2-
struct A {
2+
struct A {
33
template <class T> operator T*();
4-
};
4+
};
55

66
template <class T> A::operator T*() { return 0; }
77
template <> A::operator char*(){ return 0; } // specialization
88
template A::operator void*(); // explicit instantiation
99

10-
int main() {
10+
int main() {
1111
A a;
12-
int *ip;
12+
int *ip;
1313
ip = a.operator int*();
1414
}
1515

@@ -33,7 +33,7 @@ namespace PR5742 {
3333
class Foo {
3434
public:
3535
template <typename T> operator T();
36-
36+
3737
template <typename T>
3838
T As() {
3939
return this->operator T();
@@ -43,7 +43,7 @@ class Foo {
4343
T As2() {
4444
return operator T();
4545
}
46-
46+
4747
int AsInt() {
4848
return this->operator int();
4949
}
@@ -58,9 +58,9 @@ struct X0 {
5858
T x = 1; // expected-note{{variable 'x' declared const here}}
5959
x = 17; // expected-error{{cannot assign to variable 'x' with const-qualified type 'const int'}}
6060
}
61-
61+
6262
template<typename T> operator T*() const; // expected-note{{explicit instantiation refers here}}
63-
63+
6464
template<typename T> operator const T*() const {
6565
T x = T();
6666
return x; // expected-error{{cannot initialize return object of type 'const char *' with an lvalue of type 'char'}} \

clang/test/SemaCXX/conversion-function.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// RUN: %clang_cc1 -triple %itanium_abi_triple -fsyntax-only -Wbind-to-temporary-copy -verify %s
1+
// RUN: %clang_cc1 -triple %itanium_abi_triple -fsyntax-only -Wbind-to-temporary-copy -verify %s
22
// RUN: %clang_cc1 -triple %itanium_abi_triple -fsyntax-only -Wbind-to-temporary-copy -verify -std=c++98 %s
33
// RUN: %clang_cc1 -triple %itanium_abi_triple -fsyntax-only -Wbind-to-temporary-copy -verify -std=c++11 %s
44

5-
class X {
5+
class X {
66
public:
77
operator bool();
88
operator int() const;
@@ -31,11 +31,11 @@ class Y {
3131
// expected-error{{conversion function cannot have any parameters}}
3232

3333
operator bool(int a = 4, int b = 6) const; // expected-error{{conversion function cannot have any parameters}}
34-
35-
34+
35+
3636
operator float(...) const; // expected-error{{conversion function cannot be variadic}}
37-
38-
37+
38+
3939
operator func_type(); // expected-error{{conversion function cannot convert to a function type}}
4040
operator array_type(); // expected-error{{conversion function cannot convert to an array type}}
4141
};
@@ -44,10 +44,10 @@ class Y {
4444
typedef int INT;
4545
typedef INT* INT_PTR;
4646

47-
class Z {
47+
class Z {
4848
operator int(); // expected-note {{previous declaration is here}}
4949
operator int**(); // expected-note {{previous declaration is here}}
50-
50+
5151
operator INT(); // expected-error{{conversion function cannot be redeclared}}
5252
operator INT_PTR*(); // expected-error{{conversion function cannot be redeclared}}
5353
};
@@ -103,12 +103,12 @@ void f(const C& c) {
103103
}
104104

105105
// Test. Conversion in base class is visible in derived class.
106-
class XB {
106+
class XB {
107107
public:
108108
operator int(); // expected-note {{candidate function}}
109109
};
110110

111-
class Yb : public XB {
111+
class Yb : public XB {
112112
public:
113113
operator char(); // expected-note {{candidate function}}
114114
};
@@ -124,23 +124,23 @@ class AutoPtrRef { };
124124

125125
class AutoPtr {
126126
AutoPtr(AutoPtr &); // expected-note{{declared private here}}
127-
127+
128128
public:
129129
AutoPtr();
130130
AutoPtr(AutoPtrRef);
131-
131+
132132
operator AutoPtrRef();
133133
};
134134

135135
AutoPtr make_auto_ptr();
136136

137137
AutoPtr test_auto_ptr(bool Cond) {
138138
AutoPtr p1( make_auto_ptr() );
139-
139+
140140
AutoPtr p;
141141
if (Cond)
142142
return p; // expected-error{{calling a private constructor}}
143-
143+
144144
return AutoPtr();
145145
}
146146

@@ -185,7 +185,7 @@ namespace source_locations {
185185
const A<float, int> &caf2 = E();
186186
}
187187

188-
// Check
188+
// Check
189189
template<typename T>
190190
struct E2 {
191191
operator T
@@ -212,7 +212,7 @@ namespace crazy_declarators {
212212
}
213213

214214
namespace smart_ptr {
215-
class Y {
215+
class Y {
216216
class YRef { };
217217

218218
Y(Y&);
@@ -246,7 +246,7 @@ struct Any {
246246
};
247247

248248
struct Other {
249-
Other(const Other &);
249+
Other(const Other &);
250250
Other();
251251
};
252252

@@ -289,7 +289,7 @@ namespace PR7055 {
289289
struct Y {
290290
Y(X);
291291
};
292-
292+
293293
Y f2(foo());
294294
}
295295

@@ -339,7 +339,7 @@ namespace rdar8018274 {
339339

340340
struct Derived2 : Base { };
341341

342-
struct SuperDerived : Derived1, Derived2 {
342+
struct SuperDerived : Derived1, Derived2 {
343343
using Derived1::operator int;
344344
};
345345

@@ -359,7 +359,7 @@ namespace rdar8018274 {
359359
operator int();
360360
};
361361

362-
struct Derived23 : Base2, Base3 {
362+
struct Derived23 : Base2, Base3 {
363363
using Base2::operator int;
364364
};
365365

@@ -404,7 +404,7 @@ namespace PR9336 {
404404
{
405405
template<class Container>
406406
operator Container()
407-
{
407+
{
408408
Container ar;
409409
T* i;
410410
ar[0]=*i;

clang/test/SemaCXX/cxx1y-deduced-return-type.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -377,15 +377,15 @@ namespace MemberTemplatesWithDeduction {
377377
return 5;
378378
}
379379
template<class T> operator T() { return T{}; }
380-
operator auto() { return &static_foo<int>; }
380+
operator auto() { return &static_foo<int>; }
381381
};
382382
struct N : M {
383383
using M::foo;
384384
using M::operator();
385385
using M::static_foo;
386386
using M::operator auto;
387387
};
388-
388+
389389
template <class T> int test() {
390390
int i = T{}.foo(3);
391391
T m = T{}.foo(M{});
@@ -400,7 +400,7 @@ namespace MemberTemplatesWithDeduction {
400400
}
401401
int Minst = test<M>();
402402
int Ninst = test<N>();
403-
403+
404404
}
405405
}
406406

@@ -451,11 +451,11 @@ namespace CurrentInstantiation {
451451
auto f(); // expected-note {{here}}
452452
int g() { return f(); } // expected-error {{cannot be used before it is defined}}
453453
#else
454-
auto f();
455-
int g() { return f(); }
454+
auto f();
455+
int g() { return f(); }
456456
#endif
457457
};
458-
#ifndef DELAYED_TEMPLATE_PARSING
458+
#ifndef DELAYED_TEMPLATE_PARSING
459459
template int U<int>::g(); // expected-note {{in instantiation of}}
460460
#else
461461
template int U<int>::g();

0 commit comments

Comments
 (0)