From e11bd86a98a5c3cec4e9d2bc74b8fd94638642be Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Sun, 20 Oct 2013 19:04:19 +0000 Subject: Switch attribute test line endings from CRLF The convention is LF unless specifically testing line endings. llvm-svn: 193056 --- clang/test/CodeGenCXX/attr-cleanup.cpp | 22 ++++++------- clang/test/Sema/attr-ownership.c | 38 ++++++++++----------- clang/test/SemaCXX/attr-cleanup-gcc.cpp | 32 +++++++++--------- clang/test/SemaCXX/attr-cleanup.cpp | 58 ++++++++++++++++----------------- 4 files changed, 75 insertions(+), 75 deletions(-) (limited to 'clang') diff --git a/clang/test/CodeGenCXX/attr-cleanup.cpp b/clang/test/CodeGenCXX/attr-cleanup.cpp index 1829df8fced..ff15b03de57 100644 --- a/clang/test/CodeGenCXX/attr-cleanup.cpp +++ b/clang/test/CodeGenCXX/attr-cleanup.cpp @@ -1,11 +1,11 @@ -// 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; -} +// 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; +} diff --git a/clang/test/Sema/attr-ownership.c b/clang/test/Sema/attr-ownership.c index 1fd97e6e5eb..e31b429ef6e 100644 --- a/clang/test/Sema/attr-ownership.c +++ b/clang/test/Sema/attr-ownership.c @@ -1,19 +1,19 @@ -// 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}} +// 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}} diff --git a/clang/test/SemaCXX/attr-cleanup-gcc.cpp b/clang/test/SemaCXX/attr-cleanup-gcc.cpp index 03001b6f7b1..daebbe66c8d 100644 --- a/clang/test/SemaCXX/attr-cleanup-gcc.cpp +++ b/clang/test/SemaCXX/attr-cleanup-gcc.cpp @@ -1,16 +1,16 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only -Wgcc-compat - -namespace N { - void c1(int *a) {} -} - -void c2(int *a) {} - -template -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))); // expected-warning {{GCC does not allow the 'cleanup' attribute argument to be anything other than a simple identifier}} -} +// RUN: %clang_cc1 %s -verify -fsyntax-only -Wgcc-compat + +namespace N { + void c1(int *a) {} +} + +void c2(int *a) {} + +template +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))); // expected-warning {{GCC does not allow the 'cleanup' attribute argument to be anything other than a simple identifier}} +} diff --git a/clang/test/SemaCXX/attr-cleanup.cpp b/clang/test/SemaCXX/attr-cleanup.cpp index 764df997dec..32d10683ede 100644 --- a/clang/test/SemaCXX/attr-cleanup.cpp +++ b/clang/test/SemaCXX/attr-cleanup.cpp @@ -1,29 +1,29 @@ -// 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}} - } -} +// 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}} + } +} -- cgit v1.2.3