summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-03-02 18:46:05 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-03-02 18:46:05 +0000
commitb100410365acb4c8c8b5a13f7ebb8b78244e9ff5 (patch)
treef59834f6137404f13717f5a283d774a193aee01e /clang/test
parentf7a07a5010e7abd97b3f5e56eb8a5c044c43ad6a (diff)
downloadbcm5719-llvm-b100410365acb4c8c8b5a13f7ebb8b78244e9ff5.tar.gz
bcm5719-llvm-b100410365acb4c8c8b5a13f7ebb8b78244e9ff5.zip
Normalize line endings
Some files had CRLF line terminators, some only had a mixture of CRLF and LF. Switch to LF. llvm-svn: 202659
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Analysis/NewDeleteLeaks-PR18394.cpp32
-rw-r--r--clang/test/CXX/expr/expr.prim/expr.prim.lambda/p2-generic-lambda-1y.cpp50
-rw-r--r--clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5-generic-lambda-1y.cpp262
-rw-r--r--clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp4
-rw-r--r--clang/test/CodeGenCXX/microsoft-new.cpp78
-rw-r--r--clang/test/FixIt/fixit-include.h2
-rw-r--r--clang/test/SemaCXX/abstract.cpp20
-rw-r--r--clang/test/SemaCXX/cxx-altivec.cpp10
-rw-r--r--clang/test/SemaTemplate/ms-if-exists.cpp10
9 files changed, 234 insertions, 234 deletions
diff --git a/clang/test/Analysis/NewDeleteLeaks-PR18394.cpp b/clang/test/Analysis/NewDeleteLeaks-PR18394.cpp
index 452781d07a5..dfd94561628 100644
--- a/clang/test/Analysis/NewDeleteLeaks-PR18394.cpp
+++ b/clang/test/Analysis/NewDeleteLeaks-PR18394.cpp
@@ -1,16 +1,16 @@
-// RUN: %clang_cc1 -analyzer-config graph-trim-interval=1 -analyzer-max-loop 1 -analyze -analyzer-checker=core,alpha.cplusplus.NewDeleteLeaks -verify %s
-// expected-no-diagnostics
-
-class A {
-public:
- void f() {};
- ~A() {
- for (int i=0; i<3; i++)
- f();
- }
-};
-
-void error() {
- A *a = new A();
- delete a;
-}
+// RUN: %clang_cc1 -analyzer-config graph-trim-interval=1 -analyzer-max-loop 1 -analyze -analyzer-checker=core,alpha.cplusplus.NewDeleteLeaks -verify %s
+// expected-no-diagnostics
+
+class A {
+public:
+ void f() {};
+ ~A() {
+ for (int i=0; i<3; i++)
+ f();
+ }
+};
+
+void error() {
+ A *a = new A();
+ delete a;
+}
diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p2-generic-lambda-1y.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p2-generic-lambda-1y.cpp
index d41c4507a85..03147a692dd 100644
--- a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p2-generic-lambda-1y.cpp
+++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p2-generic-lambda-1y.cpp
@@ -1,25 +1,25 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1y -DCXX1Y
-
-// prvalue
-void prvalue() {
- auto&& x = [](auto a)->void { };
- auto& y = [](auto *a)->void { }; // expected-error{{cannot bind to a temporary of type}}
-}
-
-namespace std {
- class type_info;
-}
-
-struct P {
- virtual ~P();
-};
-
-void unevaluated_operand(P &p, int i) { //expected-note{{declared here}}
- // FIXME: this should only emit one error.
- int i2 = sizeof([](auto a, auto b)->void{}(3, '4')); // expected-error{{lambda expression in an unevaluated operand}} \
- // expected-error{{invalid application of 'sizeof'}}
- const std::type_info &ti1 = typeid([](auto &a) -> P& { static P p; return p; }(i));
- const std::type_info &ti2 = typeid([](auto) -> int { return i; }(i)); // expected-error{{lambda expression in an unevaluated operand}}\
- // expected-error{{cannot be implicitly captured}}\
- // expected-note{{begins here}}
-}
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1y -DCXX1Y
+
+// prvalue
+void prvalue() {
+ auto&& x = [](auto a)->void { };
+ auto& y = [](auto *a)->void { }; // expected-error{{cannot bind to a temporary of type}}
+}
+
+namespace std {
+ class type_info;
+}
+
+struct P {
+ virtual ~P();
+};
+
+void unevaluated_operand(P &p, int i) { //expected-note{{declared here}}
+ // FIXME: this should only emit one error.
+ int i2 = sizeof([](auto a, auto b)->void{}(3, '4')); // expected-error{{lambda expression in an unevaluated operand}} \
+ // expected-error{{invalid application of 'sizeof'}}
+ const std::type_info &ti1 = typeid([](auto &a) -> P& { static P p; return p; }(i));
+ const std::type_info &ti2 = typeid([](auto) -> int { return i; }(i)); // expected-error{{lambda expression in an unevaluated operand}}\
+ // expected-error{{cannot be implicitly captured}}\
+ // expected-note{{begins here}}
+}
diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5-generic-lambda-1y.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5-generic-lambda-1y.cpp
index c5d3bf6d1bc..415c3d84560 100644
--- a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5-generic-lambda-1y.cpp
+++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5-generic-lambda-1y.cpp
@@ -1,131 +1,131 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1y -DCXX1Y
-
-namespace test_factorial {
-
-auto Fact = [](auto Self, unsigned n) -> unsigned {
- return !n ? 1 : Self(Self, n - 1) * n;
-};
-
-auto six = Fact(Fact, 3);
-
-}
-
-namespace overload_generic_lambda {
- template <class F1, class F2> struct overload : F1, F2 {
- using F1::operator();
- using F2::operator();
- overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
- };
-
- auto NumParams = [](auto Self, auto h, auto ... rest) -> unsigned {
- return 1 + Self(Self, rest...);
- };
- auto Base = [](auto Self, auto h) -> unsigned {
- return 1;
- };
- overload<decltype(Base), decltype(NumParams)> O(Base, NumParams);
- int num_params = O(O, 5, 3, "abc", 3.14, 'a');
-}
-
-
-namespace overload_generic_lambda_return_type_deduction {
- template <class F1, class F2> struct overload : F1, F2 {
- using F1::operator();
- using F2::operator();
- overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
- };
-
- auto NumParams = [](auto Self, auto h, auto ... rest) {
- return 1 + Self(Self, rest...);
- };
- auto Base = [](auto Self, auto h) {
- return 1;
- };
- overload<decltype(Base), decltype(NumParams)> O(Base, NumParams);
- int num_params = O(O, 5, 3, "abc", 3.14, 'a');
-}
-
-namespace test_standard_p5 {
-// FIXME: This test should eventually compile without an explicit trailing return type
-auto glambda = [](auto a, auto&& b) ->bool { return a < b; };
-bool b = glambda(3, 3.14); // OK
-
-}
-namespace test_deduction_failure {
- int test() {
- auto g = [](auto *a) { //expected-note{{candidate template ignored}}
- return a;
- };
- struct X { };
- X *x;
- g(x);
- g(3); //expected-error{{no matching function}}
- return 0;
- }
-
-}
-
-namespace test_instantiation_or_sfinae_failure {
-int test2() {
- {
- auto L = [](auto *a) {
- return (*a)(a); }; //expected-error{{called object type 'double' is not a function}}
- double d;
- L(&d); //expected-note{{in instantiation of}}
- auto M = [](auto b) { return b; };
- L(&M); // ok
- }
- {
- auto L = [](auto *a) ->decltype (a->foo()) { //expected-note2{{candidate template ignored:}}
- return (*a)(a); };
- double d;
- L(&d); //expected-error{{no matching function for call}}
- auto M = [](auto b) { return b; };
- L(&M); //expected-error{{no matching function for call}}
-
- }
- return 0;
-}
-
-
-}
-
-namespace test_misc {
-auto GL = [](auto a, decltype(a) b) //expected-note{{candidate function}}
- -> int { return a + b; };
-
-void test() {
- struct X { };
- GL(3, X{}); //expected-error{{no matching function}}
-}
-
-void test2() {
- auto l = [](auto *a) -> int {
- (*a)(a); return 0; }; //expected-error{{called object type 'double' is not a function}}
- l(&l);
- double d;
- l(&d); //expected-note{{in instantiation of}}
-}
-
-}
-
-namespace nested_lambdas {
- int test() {
- auto L = [](auto a) {
- return [=](auto b) {
- return a + b;
- };
- };
- }
- auto get_lambda() {
- return [](auto a) {
- return a;
- };
- };
-
- int test2() {
- auto L = get_lambda();
- L(3);
- }
-}
-
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1y -DCXX1Y
+
+namespace test_factorial {
+
+auto Fact = [](auto Self, unsigned n) -> unsigned {
+ return !n ? 1 : Self(Self, n - 1) * n;
+};
+
+auto six = Fact(Fact, 3);
+
+}
+
+namespace overload_generic_lambda {
+ template <class F1, class F2> struct overload : F1, F2 {
+ using F1::operator();
+ using F2::operator();
+ overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
+ };
+
+ auto NumParams = [](auto Self, auto h, auto ... rest) -> unsigned {
+ return 1 + Self(Self, rest...);
+ };
+ auto Base = [](auto Self, auto h) -> unsigned {
+ return 1;
+ };
+ overload<decltype(Base), decltype(NumParams)> O(Base, NumParams);
+ int num_params = O(O, 5, 3, "abc", 3.14, 'a');
+}
+
+
+namespace overload_generic_lambda_return_type_deduction {
+ template <class F1, class F2> struct overload : F1, F2 {
+ using F1::operator();
+ using F2::operator();
+ overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
+ };
+
+ auto NumParams = [](auto Self, auto h, auto ... rest) {
+ return 1 + Self(Self, rest...);
+ };
+ auto Base = [](auto Self, auto h) {
+ return 1;
+ };
+ overload<decltype(Base), decltype(NumParams)> O(Base, NumParams);
+ int num_params = O(O, 5, 3, "abc", 3.14, 'a');
+}
+
+namespace test_standard_p5 {
+// FIXME: This test should eventually compile without an explicit trailing return type
+auto glambda = [](auto a, auto&& b) ->bool { return a < b; };
+bool b = glambda(3, 3.14); // OK
+
+}
+namespace test_deduction_failure {
+ int test() {
+ auto g = [](auto *a) { //expected-note{{candidate template ignored}}
+ return a;
+ };
+ struct X { };
+ X *x;
+ g(x);
+ g(3); //expected-error{{no matching function}}
+ return 0;
+ }
+
+}
+
+namespace test_instantiation_or_sfinae_failure {
+int test2() {
+ {
+ auto L = [](auto *a) {
+ return (*a)(a); }; //expected-error{{called object type 'double' is not a function}}
+ double d;
+ L(&d); //expected-note{{in instantiation of}}
+ auto M = [](auto b) { return b; };
+ L(&M); // ok
+ }
+ {
+ auto L = [](auto *a) ->decltype (a->foo()) { //expected-note2{{candidate template ignored:}}
+ return (*a)(a); };
+ double d;
+ L(&d); //expected-error{{no matching function for call}}
+ auto M = [](auto b) { return b; };
+ L(&M); //expected-error{{no matching function for call}}
+
+ }
+ return 0;
+}
+
+
+}
+
+namespace test_misc {
+auto GL = [](auto a, decltype(a) b) //expected-note{{candidate function}}
+ -> int { return a + b; };
+
+void test() {
+ struct X { };
+ GL(3, X{}); //expected-error{{no matching function}}
+}
+
+void test2() {
+ auto l = [](auto *a) -> int {
+ (*a)(a); return 0; }; //expected-error{{called object type 'double' is not a function}}
+ l(&l);
+ double d;
+ l(&d); //expected-note{{in instantiation of}}
+}
+
+}
+
+namespace nested_lambdas {
+ int test() {
+ auto L = [](auto a) {
+ return [=](auto b) {
+ return a + b;
+ };
+ };
+ }
+ auto get_lambda() {
+ return [](auto a) {
+ return a;
+ };
+ };
+
+ int test2() {
+ auto L = get_lambda();
+ L(3);
+ }
+}
+
diff --git a/clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp b/clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp
index 92bc0fcac2e..c8477f4cbdd 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp
@@ -6,5 +6,5 @@ struct A : virtual B {} a;
// The <> indicate that the pointer is packed, which is required to support
// microsoft layout in 32 bit mode, but not 64 bit mode.
-// CHECK: %struct.A = type <{ i32*, %struct.B }>
-// CHECK-X64: %struct.A = type { i32*, %struct.B }
+// CHECK: %struct.A = type <{ i32*, %struct.B }>
+// CHECK-X64: %struct.A = type { i32*, %struct.B }
diff --git a/clang/test/CodeGenCXX/microsoft-new.cpp b/clang/test/CodeGenCXX/microsoft-new.cpp
index 4c3d72e9f4c..7857e478ef8 100644
--- a/clang/test/CodeGenCXX/microsoft-new.cpp
+++ b/clang/test/CodeGenCXX/microsoft-new.cpp
@@ -1,39 +1,39 @@
-// RUN: %clang_cc1 -triple i686-pc-win32 -fms-compatibility %s -emit-llvm -o - | FileCheck %s
-
-#include <stddef.h>
-
-struct arbitrary_t {} arbitrary;
-void *operator new(size_t size, arbitrary_t);
-
-struct arbitrary2_t {} arbitrary2;
-void *operator new[](size_t size, arbitrary2_t);
-
-namespace PR13164 {
- void f() {
- // MSVC will fall back on the non-array operator new.
- void *a;
- int *p = new(arbitrary) int[4];
- // CHECK: call i8* @"\01??2@YAPAXIUarbitrary_t@@@Z"(i32 16, %struct.arbitrary_t*
- }
-
- struct S {
- void *operator new[](size_t size, arbitrary_t);
- };
-
- void g() {
- S *s = new(arbitrary) S[2];
- // CHECK: call i8* @"\01??_US@PR13164@@SAPAXIUarbitrary_t@@@Z"(i32 2, %struct.arbitrary_t*
- S *s1 = new(arbitrary) S;
- // CHECK: call i8* @"\01??2@YAPAXIUarbitrary_t@@@Z"(i32 1, %struct.arbitrary_t*
- }
-
- struct T {
- void *operator new(size_t size, arbitrary2_t);
- };
-
- void h() {
- // This should still call the global operator new[].
- T *t = new(arbitrary2) T[2];
- // CHECK: call i8* @"\01??_U@YAPAXIUarbitrary2_t@@@Z"(i32 2, %struct.arbitrary2_t*
- }
-}
+// RUN: %clang_cc1 -triple i686-pc-win32 -fms-compatibility %s -emit-llvm -o - | FileCheck %s
+
+#include <stddef.h>
+
+struct arbitrary_t {} arbitrary;
+void *operator new(size_t size, arbitrary_t);
+
+struct arbitrary2_t {} arbitrary2;
+void *operator new[](size_t size, arbitrary2_t);
+
+namespace PR13164 {
+ void f() {
+ // MSVC will fall back on the non-array operator new.
+ void *a;
+ int *p = new(arbitrary) int[4];
+ // CHECK: call i8* @"\01??2@YAPAXIUarbitrary_t@@@Z"(i32 16, %struct.arbitrary_t*
+ }
+
+ struct S {
+ void *operator new[](size_t size, arbitrary_t);
+ };
+
+ void g() {
+ S *s = new(arbitrary) S[2];
+ // CHECK: call i8* @"\01??_US@PR13164@@SAPAXIUarbitrary_t@@@Z"(i32 2, %struct.arbitrary_t*
+ S *s1 = new(arbitrary) S;
+ // CHECK: call i8* @"\01??2@YAPAXIUarbitrary_t@@@Z"(i32 1, %struct.arbitrary_t*
+ }
+
+ struct T {
+ void *operator new(size_t size, arbitrary2_t);
+ };
+
+ void h() {
+ // This should still call the global operator new[].
+ T *t = new(arbitrary2) T[2];
+ // CHECK: call i8* @"\01??_U@YAPAXIUarbitrary2_t@@@Z"(i32 2, %struct.arbitrary2_t*
+ }
+}
diff --git a/clang/test/FixIt/fixit-include.h b/clang/test/FixIt/fixit-include.h
index 6a22d2e88eb..358609b4066 100644
--- a/clang/test/FixIt/fixit-include.h
+++ b/clang/test/FixIt/fixit-include.h
@@ -1 +1 @@
-// This file is purposefully left empty
+// This file is purposefully left empty
diff --git a/clang/test/SemaCXX/abstract.cpp b/clang/test/SemaCXX/abstract.cpp
index d7e2d0a3dcf..b521196c23b 100644
--- a/clang/test/SemaCXX/abstract.cpp
+++ b/clang/test/SemaCXX/abstract.cpp
@@ -268,16 +268,16 @@ namespace pr9247 {
}
namespace pr12658 {
- class C {
- public:
- C(int v){}
- virtual void f() = 0; // expected-note {{unimplemented pure virtual method 'f' in 'C'}}
- };
-
- void foo( C& c ) {}
-
- void bar( void ) {
- foo(C(99)); // expected-error {{allocating an object of abstract class type 'pr12658::C'}}
+ class C {
+ public:
+ C(int v){}
+ virtual void f() = 0; // expected-note {{unimplemented pure virtual method 'f' in 'C'}}
+ };
+
+ void foo( C& c ) {}
+
+ void bar( void ) {
+ foo(C(99)); // expected-error {{allocating an object of abstract class type 'pr12658::C'}}
}
}
diff --git a/clang/test/SemaCXX/cxx-altivec.cpp b/clang/test/SemaCXX/cxx-altivec.cpp
index 15b5d0d315e..baacbac7d03 100644
--- a/clang/test/SemaCXX/cxx-altivec.cpp
+++ b/clang/test/SemaCXX/cxx-altivec.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple=powerpc-apple-darwin8 -faltivec -fsyntax-only -verify %s
-
-struct Vector {
- __vector float xyzw;
-} __attribute__((vecreturn)) __attribute__((vecreturn)); // expected-error {{'vecreturn' attribute cannot be repeated}}
+// RUN: %clang_cc1 -triple=powerpc-apple-darwin8 -faltivec -fsyntax-only -verify %s
+
+struct Vector {
+ __vector float xyzw;
+} __attribute__((vecreturn)) __attribute__((vecreturn)); // expected-error {{'vecreturn' attribute cannot be repeated}}
diff --git a/clang/test/SemaTemplate/ms-if-exists.cpp b/clang/test/SemaTemplate/ms-if-exists.cpp
index 04f4a636236..9b95bba5068 100644
--- a/clang/test/SemaTemplate/ms-if-exists.cpp
+++ b/clang/test/SemaTemplate/ms-if-exists.cpp
@@ -48,11 +48,11 @@ void f(T t) {
{ }
}
- int array2[] = {
- 0,
- __if_exists(T::bar) {2, }// expected-warning{{dependent __if_exists declarations are ignored}}
- 3
- };
+ int array2[] = {
+ 0,
+ __if_exists(T::bar) {2, }// expected-warning{{dependent __if_exists declarations are ignored}}
+ 3
+ };
}
template void f(HasFoo); // expected-note{{in instantiation of function template specialization 'f<HasFoo>' requested here}}
OpenPOWER on IntegriCloud