]> granicus.if.org Git - clang/commitdiff
Switch attribute test line endings from CRLF
authorAlp Toker <alp@nuanti.com>
Sun, 20 Oct 2013 19:04:19 +0000 (19:04 +0000)
committerAlp Toker <alp@nuanti.com>
Sun, 20 Oct 2013 19:04:19 +0000 (19:04 +0000)
The convention is LF unless specifically testing line endings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193056 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/attr-cleanup.cpp
test/Sema/attr-ownership.c
test/SemaCXX/attr-cleanup-gcc.cpp
test/SemaCXX/attr-cleanup.cpp

index 1829df8fced4bc5cbb8497a6d55a968c68250d4e..ff15b03de57c5f988b638f74275491a746056272 100644 (file)
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s\r
-\r
-namespace N {\r
-  void free(void *i) {}\r
-}\r
-\r
-int main(void) {\r
-  // CHECK: call void @_ZN1N4freeEPv\r
-  void *fp __attribute__((cleanup(N::free)));\r
-  return 0;\r
-}\r
+// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+
+namespace N {
+  void free(void *i) {}
+}
+
+int main(void) {
+  // CHECK: call void @_ZN1N4freeEPv
+  void *fp __attribute__((cleanup(N::free)));
+  return 0;
+}
index 1fd97e6e5eb4b5658972e713dcd8ab916baa6ed5..e31b429ef6ed1fc3d978320f8cdeeabc242aafef 100644 (file)
@@ -1,19 +1,19 @@
-// RUN: %clang_cc1 %s -verify\r
-\r
-void f1(void) __attribute__((ownership_takes("foo"))); // expected-error {{'ownership_takes' attribute requires parameter 1 to be an identifier}}\r
-void *f2(void) __attribute__((ownership_returns(foo, 1, 2)));  // expected-error {{attribute takes no more than 1 argument}}\r
-void f3(void) __attribute__((ownership_holds(foo, 1))); // expected-error {{'ownership_holds' attribute parameter 1 is out of bounds}}\r
-void *f4(void) __attribute__((ownership_returns(foo)));\r
-void f5(void) __attribute__((ownership_holds(foo)));  // expected-error {{attribute takes at least 2 arguments}}\r
-void f6(void) __attribute__((ownership_holds(foo, 1, 2, 3)));  // expected-error {{'ownership_holds' attribute parameter 1 is out of bounds}}\r
-void f7(void) __attribute__((ownership_takes(foo)));  // expected-error {{attribute takes at least 2 arguments}}\r
-void f8(int *i, int *j, int k) __attribute__((ownership_holds(foo, 1, 2, 4)));  // expected-error {{'ownership_holds' attribute parameter 3 is out of bounds}}\r
-\r
-int f9 __attribute__((ownership_takes(foo, 1)));  // expected-warning {{'ownership_takes' attribute only applies to functions}}\r
-\r
-void f10(int i) __attribute__((ownership_holds(foo, 1)));  // expected-error {{'ownership_holds' attribute only applies to pointer arguments}}\r
-void *f11(float i) __attribute__((ownership_returns(foo, 1)));  // expected-error {{'ownership_returns' attribute only applies to integer arguments}}\r
-void *f12(float i, int k, int f, int *j) __attribute__((ownership_returns(foo, 4)));  // expected-error {{'ownership_returns' attribute only applies to integer arguments}}\r
-\r
-void f13(int *i, int *j) __attribute__((ownership_holds(foo, 1))) __attribute__((ownership_takes(foo, 2)));\r
-void f14(int i, int j, int *k) __attribute__((ownership_holds(foo, 3))) __attribute__((ownership_takes(foo, 3)));  // expected-error {{'ownership_holds' and 'ownership_takes' attributes are not compatible}}\r
+// RUN: %clang_cc1 %s -verify
+
+void f1(void) __attribute__((ownership_takes("foo"))); // expected-error {{'ownership_takes' attribute requires parameter 1 to be an identifier}}
+void *f2(void) __attribute__((ownership_returns(foo, 1, 2)));  // expected-error {{attribute takes no more than 1 argument}}
+void f3(void) __attribute__((ownership_holds(foo, 1))); // expected-error {{'ownership_holds' attribute parameter 1 is out of bounds}}
+void *f4(void) __attribute__((ownership_returns(foo)));
+void f5(void) __attribute__((ownership_holds(foo)));  // expected-error {{attribute takes at least 2 arguments}}
+void f6(void) __attribute__((ownership_holds(foo, 1, 2, 3)));  // expected-error {{'ownership_holds' attribute parameter 1 is out of bounds}}
+void f7(void) __attribute__((ownership_takes(foo)));  // expected-error {{attribute takes at least 2 arguments}}
+void f8(int *i, int *j, int k) __attribute__((ownership_holds(foo, 1, 2, 4)));  // expected-error {{'ownership_holds' attribute parameter 3 is out of bounds}}
+
+int f9 __attribute__((ownership_takes(foo, 1)));  // expected-warning {{'ownership_takes' attribute only applies to functions}}
+
+void f10(int i) __attribute__((ownership_holds(foo, 1)));  // expected-error {{'ownership_holds' attribute only applies to pointer arguments}}
+void *f11(float i) __attribute__((ownership_returns(foo, 1)));  // expected-error {{'ownership_returns' attribute only applies to integer arguments}}
+void *f12(float i, int k, int f, int *j) __attribute__((ownership_returns(foo, 4)));  // expected-error {{'ownership_returns' attribute only applies to integer arguments}}
+
+void f13(int *i, int *j) __attribute__((ownership_holds(foo, 1))) __attribute__((ownership_takes(foo, 2)));
+void f14(int i, int j, int *k) __attribute__((ownership_holds(foo, 3))) __attribute__((ownership_takes(foo, 3)));  // expected-error {{'ownership_holds' and 'ownership_takes' attributes are not compatible}}
index 03001b6f7b15075390b3dbd42fbdd9cd3dc71158..daebbe66c8d026fce8ea3dc1edb50b24c42ca143 100644 (file)
@@ -1,16 +1,16 @@
-// RUN: %clang_cc1 %s -verify -fsyntax-only -Wgcc-compat\r
-\r
-namespace N {\r
-  void c1(int *a) {}\r
-}\r
-\r
-void c2(int *a) {}\r
-\r
-template <typename Ty>\r
-void c3(Ty *a) {}\r
-\r
-void t3() {\r
-  int v1 __attribute__((cleanup(N::c1)));  // expected-warning  {{GCC does not allow the 'cleanup' attribute argument to be anything other than a simple identifier}}\r
-  int v2 __attribute__((cleanup(c2)));\r
-  int v3 __attribute__((cleanup(c3<int>)));  // expected-warning  {{GCC does not allow the 'cleanup' attribute argument to be anything other than a simple identifier}}\r
-}\r
+// RUN: %clang_cc1 %s -verify -fsyntax-only -Wgcc-compat
+
+namespace N {
+  void c1(int *a) {}
+}
+
+void c2(int *a) {}
+
+template <typename Ty>
+void c3(Ty *a) {}
+
+void t3() {
+  int v1 __attribute__((cleanup(N::c1)));  // expected-warning  {{GCC does not allow the 'cleanup' attribute argument to be anything other than a simple identifier}}
+  int v2 __attribute__((cleanup(c2)));
+  int v3 __attribute__((cleanup(c3<int>)));  // expected-warning  {{GCC does not allow the 'cleanup' attribute argument to be anything other than a simple identifier}}
+}
index 764df997decf9f8e695af4187ab36cec026d1dbe..32d10683edebbb551699764ac4a79b1e81d31b55 100644 (file)
@@ -1,29 +1,29 @@
-// RUN: %clang_cc1 %s -verify -fsyntax-only -Wno-gcc-compat\r
-\r
-namespace N {\r
-  void c1(int *a) {}\r
-}\r
-\r
-class C {\r
-  static void c2(int *a) {}  // expected-note {{implicitly declared private here}} expected-note {{implicitly declared private here}}\r
-};\r
-\r
-void t1() {\r
-  int v1 __attribute__((cleanup(N::c1)));\r
-  int v2 __attribute__((cleanup(N::c2)));  // expected-error {{no member named 'c2' in namespace 'N'}}\r
-  int v3 __attribute__((cleanup(C::c2)));  // expected-error {{'c2' is a private member of 'C'}}\r
-}\r
-\r
-class D : public C {\r
-  void t2() {\r
-    int v1 __attribute__((cleanup(c2)));  // expected-error {{'c2' is a private member of 'C'}}\r
-  }\r
-};\r
-\r
-namespace E {\r
-  void c3(int *a) {} // expected-note {{candidate function}}\r
-  void c3() {}       // expected-note {{candidate function}}\r
-  void t3() {\r
-    int v1 __attribute__((cleanup(c3))); // expected-error {{'c3' is not a single function}}\r
-  }\r
-}\r
+// RUN: %clang_cc1 %s -verify -fsyntax-only -Wno-gcc-compat
+
+namespace N {
+  void c1(int *a) {}
+}
+
+class C {
+  static void c2(int *a) {}  // expected-note {{implicitly declared private here}} expected-note {{implicitly declared private here}}
+};
+
+void t1() {
+  int v1 __attribute__((cleanup(N::c1)));
+  int v2 __attribute__((cleanup(N::c2)));  // expected-error {{no member named 'c2' in namespace 'N'}}
+  int v3 __attribute__((cleanup(C::c2)));  // expected-error {{'c2' is a private member of 'C'}}
+}
+
+class D : public C {
+  void t2() {
+    int v1 __attribute__((cleanup(c2)));  // expected-error {{'c2' is a private member of 'C'}}
+  }
+};
+
+namespace E {
+  void c3(int *a) {} // expected-note {{candidate function}}
+  void c3() {}       // expected-note {{candidate function}}
+  void t3() {
+    int v1 __attribute__((cleanup(c3))); // expected-error {{'c3' is not a single function}}
+  }
+}