[clang] bac74a5 - [clang] NFC: remove trailing white spaces from some tests

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 2 18:18:30 PDT 2021


Author: Matheus Izvekov
Date: 2021-04-03T03:18:22+02:00
New Revision: bac74a50e99f3d014d6e5a67272fd3b20eeb7fed

URL: https://github.com/llvm/llvm-project/commit/bac74a50e99f3d014d6e5a67272fd3b20eeb7fed
DIFF: https://github.com/llvm/llvm-project/commit/bac74a50e99f3d014d6e5a67272fd3b20eeb7fed.diff

LOG: [clang] NFC: remove trailing white spaces from some tests

Differential Revision: https://reviews.llvm.org/D99826

Added: 
    

Modified: 
    clang/test/CXX/drs/dr3xx.cpp
    clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-1y.cpp
    clang/test/CXX/special/class.copy/p33-0x.cpp
    clang/test/CXX/temp/temp.decls/temp.mem/p5.cpp
    clang/test/SemaCXX/conversion-function.cpp
    clang/test/SemaCXX/cxx1y-deduced-return-type.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/CXX/drs/dr3xx.cpp b/clang/test/CXX/drs/dr3xx.cpp
index 5eb6e05126295..239a04c685d73 100644
--- a/clang/test/CXX/drs/dr3xx.cpp
+++ b/clang/test/CXX/drs/dr3xx.cpp
@@ -1103,7 +1103,7 @@ namespace dr384 { // dr384: yes
 }
 
 namespace dr385 { // dr385: yes
-  struct A { protected: void f(); }; 
+  struct A { protected: void f(); };
   struct B : A { using A::f; };
   struct C : A { void g(B b) { b.f(); } };
   void h(B b) { b.f(); }

diff  --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-1y.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-1y.cpp
index f2b0e26e29f94..95ae7f7588088 100644
--- a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-1y.cpp
+++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-1y.cpp
@@ -9,7 +9,7 @@ int &f = [] (int r) -> decltype(auto) { return r; } (a); // expected-error {{can
 int &g = [] (int r) -> decltype(auto) { return (r); } (a); // expected-warning {{reference to stack}}
 
 
-int test_explicit_auto_return() 
+int test_explicit_auto_return()
 {
     struct X {};
     auto L = [](auto F, auto a) { return F(a); };
@@ -18,32 +18,32 @@ int test_explicit_auto_return()
     auto MPtr = [](auto c) -> auto* { return &c; }; //expected-warning{{address of stack}}
     auto MDeclType = [](auto&& d) -> decltype(auto) { return static_cast<decltype(d)>(d); }; //OK
     M(3);
-    
+
     auto &&x = MDeclType(X{});
     auto &&x1 = M(X{});
     auto &&x2 = MRef(X{});//expected-note{{in instantiation of}}
     auto &&x3 = MPtr(X{}); //expected-note{{in instantiation of}}
-    return 0;    
+    return 0;
 }
 
-int test_implicit_auto_return() 
-{  
+int test_implicit_auto_return()
+{
   {
     auto M = [](auto a) { return a; };
     struct X {};
     X x = M(X{});
-    
+
   }
 }
- 
+
 int test_multiple_returns()  {
-    auto M = [](auto a) { 
+    auto M = [](auto a) {
       bool k;
       if (k)
         return a;
       else
         return 5; //expected-error{{deduced as 'int' here}}
-    }; 
+    };
     M(3); // OK
     M('a'); //expected-note{{in instantiation of}}
   return 0;
@@ -60,7 +60,7 @@ int test_no_parameter_list()
 }
 
 int test_conditional_in_return() {
-  auto Fac = [](auto f, auto n) { 
+  auto Fac = [](auto f, auto n) {
     return n <= 0 ? n : f(f, n - 1) * n;
   };
   // FIXME: this test causes a recursive limit - need to error more gracefully.

diff  --git a/clang/test/CXX/special/class.copy/p33-0x.cpp b/clang/test/CXX/special/class.copy/p33-0x.cpp
index 28cd4f33a8aa6..ab6be4782e17d 100644
--- a/clang/test/CXX/special/class.copy/p33-0x.cpp
+++ b/clang/test/CXX/special/class.copy/p33-0x.cpp
@@ -22,7 +22,7 @@ void throw_move_only(X x) {
   throw x;
   throw x2;
 }
-  
+
 namespace PR10142 {
   struct X {
     X();

diff  --git a/clang/test/CXX/temp/temp.decls/temp.mem/p5.cpp b/clang/test/CXX/temp/temp.decls/temp.mem/p5.cpp
index a41ea6b5e109e..10f4988ec5a73 100644
--- a/clang/test/CXX/temp/temp.decls/temp.mem/p5.cpp
+++ b/clang/test/CXX/temp/temp.decls/temp.mem/p5.cpp
@@ -1,15 +1,15 @@
 // RUN: %clang_cc1 -fsyntax-only -verify %s
-struct A { 
+struct A {
   template <class T> operator T*();
-}; 
+};
 
 template <class T> A::operator T*() { return 0; }
 template <> A::operator char*(){ return 0; } // specialization
 template A::operator void*(); // explicit instantiation
 
-int main() { 
+int main() {
   A a;
-  int *ip; 
+  int *ip;
   ip = a.operator int*();
 }
 
@@ -33,7 +33,7 @@ namespace PR5742 {
 class Foo {
  public:
   template <typename T> operator T();
-  
+
   template <typename T>
   T As() {
     return this->operator T();
@@ -43,7 +43,7 @@ class Foo {
   T As2() {
     return operator T();
   }
-  
+
   int AsInt() {
     return this->operator int();
   }
@@ -58,9 +58,9 @@ struct X0 {
     T x = 1; // expected-note{{variable 'x' declared const here}}
     x = 17; // expected-error{{cannot assign to variable 'x' with const-qualified type 'const int'}}
   }
-  
+
   template<typename T> operator T*() const; // expected-note{{explicit instantiation refers here}}
-  
+
   template<typename T> operator const T*() const {
     T x = T();
     return x; // expected-error{{cannot initialize return object of type 'const char *' with an lvalue of type 'char'}} \

diff  --git a/clang/test/SemaCXX/conversion-function.cpp b/clang/test/SemaCXX/conversion-function.cpp
index c18948d9b15c7..b9d22a1600e35 100644
--- a/clang/test/SemaCXX/conversion-function.cpp
+++ b/clang/test/SemaCXX/conversion-function.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -fsyntax-only -Wbind-to-temporary-copy -verify %s 
+// RUN: %clang_cc1 -triple %itanium_abi_triple -fsyntax-only -Wbind-to-temporary-copy -verify %s
 // RUN: %clang_cc1 -triple %itanium_abi_triple -fsyntax-only -Wbind-to-temporary-copy -verify -std=c++98 %s
 // RUN: %clang_cc1 -triple %itanium_abi_triple -fsyntax-only -Wbind-to-temporary-copy -verify -std=c++11 %s
 
-class X { 
+class X {
 public:
   operator bool();
   operator int() const;
@@ -31,11 +31,11 @@ class Y {
   // expected-error{{conversion function cannot have any parameters}}
 
   operator bool(int a = 4, int b = 6) const; // expected-error{{conversion function cannot have any parameters}}
-  
-  
+
+
   operator float(...) const;  // expected-error{{conversion function cannot be variadic}}
-  
-  
+
+
   operator func_type(); // expected-error{{conversion function cannot convert to a function type}}
   operator array_type(); // expected-error{{conversion function cannot convert to an array type}}
 };
@@ -44,10 +44,10 @@ class Y {
 typedef int INT;
 typedef INT* INT_PTR;
 
-class Z { 
+class Z {
   operator int(); // expected-note {{previous declaration is here}}
   operator int**(); // expected-note {{previous declaration is here}}
-  
+
   operator INT();  // expected-error{{conversion function cannot be redeclared}}
   operator INT_PTR*(); // expected-error{{conversion function cannot be redeclared}}
 };
@@ -103,12 +103,12 @@ void f(const C& c) {
 }
 
 // Test. Conversion in base class is visible in derived class.
-class XB { 
+class XB {
 public:
   operator int(); // expected-note {{candidate function}}
 };
 
-class Yb : public XB { 
+class Yb : public XB {
 public:
   operator char(); // expected-note {{candidate function}}
 };
@@ -124,11 +124,11 @@ class AutoPtrRef { };
 
 class AutoPtr {
   AutoPtr(AutoPtr &); // expected-note{{declared private here}}
-  
+
 public:
   AutoPtr();
   AutoPtr(AutoPtrRef);
-  
+
   operator AutoPtrRef();
 };
 
@@ -136,11 +136,11 @@ AutoPtr make_auto_ptr();
 
 AutoPtr test_auto_ptr(bool Cond) {
   AutoPtr p1( make_auto_ptr() );
-  
+
   AutoPtr p;
   if (Cond)
     return p; // expected-error{{calling a private constructor}}
-  
+
   return AutoPtr();
 }
 
@@ -185,7 +185,7 @@ namespace source_locations {
     const A<float, int> &caf2 = E();
   }
 
-  // Check 
+  // Check
   template<typename T>
   struct E2 {
     operator T
@@ -212,7 +212,7 @@ namespace crazy_declarators {
 }
 
 namespace smart_ptr {
-  class Y { 
+  class Y {
     class YRef { };
 
     Y(Y&);
@@ -246,7 +246,7 @@ struct Any {
 };
 
 struct Other {
-  Other(const Other &); 
+  Other(const Other &);
   Other();
 };
 
@@ -289,7 +289,7 @@ namespace PR7055 {
   struct Y {
     Y(X);
   };
-  
+
   Y f2(foo());
 }
 
@@ -339,7 +339,7 @@ namespace rdar8018274 {
 
   struct Derived2 : Base { };
 
-  struct SuperDerived : Derived1, Derived2 { 
+  struct SuperDerived : Derived1, Derived2 {
     using Derived1::operator int;
   };
 
@@ -359,7 +359,7 @@ namespace rdar8018274 {
     operator int();
   };
 
-  struct Derived23 : Base2, Base3 { 
+  struct Derived23 : Base2, Base3 {
     using Base2::operator int;
   };
 
@@ -404,7 +404,7 @@ namespace PR9336 {
   {
     template<class Container>
     operator Container()
-    { 
+    {
       Container ar;
       T* i;
       ar[0]=*i;

diff  --git a/clang/test/SemaCXX/cxx1y-deduced-return-type.cpp b/clang/test/SemaCXX/cxx1y-deduced-return-type.cpp
index 051b0e7b1469f..203842ec0e31d 100644
--- a/clang/test/SemaCXX/cxx1y-deduced-return-type.cpp
+++ b/clang/test/SemaCXX/cxx1y-deduced-return-type.cpp
@@ -377,7 +377,7 @@ namespace MemberTemplatesWithDeduction {
       return 5;
     }
     template<class T> operator T() { return T{}; }
-    operator auto() { return &static_foo<int>; } 
+    operator auto() { return &static_foo<int>; }
   };
   struct N : M {
     using M::foo;
@@ -385,7 +385,7 @@ namespace MemberTemplatesWithDeduction {
     using M::static_foo;
     using M::operator auto;
   };
-  
+
   template <class T> int test() {
     int i = T{}.foo(3);
     T m = T{}.foo(M{});
@@ -400,7 +400,7 @@ namespace MemberTemplatesWithDeduction {
   }
   int Minst = test<M>();
   int Ninst = test<N>();
-  
+
 }
 }
 
@@ -451,11 +451,11 @@ namespace CurrentInstantiation {
     auto f(); // expected-note {{here}}
     int g() { return f(); } // expected-error {{cannot be used before it is defined}}
  #else
-    auto f(); 
-    int g() { return f(); } 
+    auto f();
+    int g() { return f(); }
  #endif
   };
- #ifndef DELAYED_TEMPLATE_PARSING 
+ #ifndef DELAYED_TEMPLATE_PARSING
   template int U<int>::g(); // expected-note {{in instantiation of}}
  #else
   template int U<int>::g();


        


More information about the cfe-commits mailing list