diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2011-10-20 21:14:49 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2011-10-20 21:14:49 +0000 |
commit | 36981b17ed939300f6f8fc2355a255f711fcef71 (patch) | |
tree | ee2483e98b09cac943dc93a6969d83ca737ff139 /test/CXX/expr | |
parent | 180abc3db9ae3b4fc63cd65b15697e6ffcc8a657 (diff) | |
download | src-36981b17ed939300f6f8fc2355a255f711fcef71.tar.gz src-36981b17ed939300f6f8fc2355a255f711fcef71.zip |
Notes
Diffstat (limited to 'test/CXX/expr')
-rw-r--r-- | test/CXX/expr/expr.cast/p4-0x.cpp | 2 | ||||
-rw-r--r-- | test/CXX/expr/expr.const/p2-0x.cpp | 2 | ||||
-rw-r--r-- | test/CXX/expr/expr.mptr.oper/p6-0x.cpp | 2 | ||||
-rw-r--r-- | test/CXX/expr/expr.post/expr.call/p7-0x.cpp | 15 | ||||
-rw-r--r-- | test/CXX/expr/expr.post/expr.const.cast/p1-0x.cpp | 2 | ||||
-rw-r--r-- | test/CXX/expr/expr.post/expr.dynamic.cast/p3-0x.cpp | 2 | ||||
-rw-r--r-- | test/CXX/expr/expr.post/expr.reinterpret.cast/p1-0x.cpp | 2 | ||||
-rw-r--r-- | test/CXX/expr/expr.post/expr.static.cast/p3-0x.cpp | 2 | ||||
-rw-r--r-- | test/CXX/expr/expr.post/expr.static.cast/p9-0x.cpp | 2 | ||||
-rw-r--r-- | test/CXX/expr/expr.prim/p12-0x.cpp | 2 | ||||
-rw-r--r-- | test/CXX/expr/expr.prim/p4-0x.cpp | 2 | ||||
-rw-r--r-- | test/CXX/expr/expr.unary/expr.new/p2-cxx0x.cpp | 2 | ||||
-rw-r--r-- | test/CXX/expr/expr.unary/expr.new/p20-0x.cpp | 2 | ||||
-rw-r--r-- | test/CXX/expr/expr.unary/expr.sizeof/p5-0x.cpp | 2 | ||||
-rw-r--r-- | test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp | 6 | ||||
-rw-r--r-- | test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp | 2 | ||||
-rw-r--r-- | test/CXX/expr/expr.unary/expr.unary.op/p6.cpp | 7 |
17 files changed, 34 insertions, 22 deletions
diff --git a/test/CXX/expr/expr.cast/p4-0x.cpp b/test/CXX/expr/expr.cast/p4-0x.cpp index 5824cd21f1e7..96bf5f91196b 100644 --- a/test/CXX/expr/expr.cast/p4-0x.cpp +++ b/test/CXX/expr/expr.cast/p4-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s struct X { }; struct Y : X { }; diff --git a/test/CXX/expr/expr.const/p2-0x.cpp b/test/CXX/expr/expr.const/p2-0x.cpp index 1b38cf19b42e..2c6a46b3beaf 100644 --- a/test/CXX/expr/expr.const/p2-0x.cpp +++ b/test/CXX/expr/expr.const/p2-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s // PR9999 template<bool v> diff --git a/test/CXX/expr/expr.mptr.oper/p6-0x.cpp b/test/CXX/expr/expr.mptr.oper/p6-0x.cpp index d5dc7d2cbe58..917b2dab7c32 100644 --- a/test/CXX/expr/expr.mptr.oper/p6-0x.cpp +++ b/test/CXX/expr/expr.mptr.oper/p6-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s struct X { }; diff --git a/test/CXX/expr/expr.post/expr.call/p7-0x.cpp b/test/CXX/expr/expr.post/expr.call/p7-0x.cpp index bb4726dd3309..d51ba09835d2 100644 --- a/test/CXX/expr/expr.post/expr.call/p7-0x.cpp +++ b/test/CXX/expr/expr.post/expr.call/p7-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s struct X1 { X1(); @@ -15,3 +15,16 @@ void f(X1 x1, X2 x2) { vararg(x1); // okay vararg(x2); // expected-error{{cannot pass object of non-trivial type 'X2' through variadic function; call will abort at runtime}} } + + +namespace PR11131 { + struct S; + + S &getS(); + + void f(...); + + void g() { + (void)sizeof(f(getS())); + } +} diff --git a/test/CXX/expr/expr.post/expr.const.cast/p1-0x.cpp b/test/CXX/expr/expr.post/expr.const.cast/p1-0x.cpp index d46488107ba6..6ba8d519346e 100644 --- a/test/CXX/expr/expr.post/expr.const.cast/p1-0x.cpp +++ b/test/CXX/expr/expr.post/expr.const.cast/p1-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s // The result of the expression const_cast<T>(v) is of type T. If T is // an lvalue reference to object type, the result is an lvalue; if T diff --git a/test/CXX/expr/expr.post/expr.dynamic.cast/p3-0x.cpp b/test/CXX/expr/expr.post/expr.dynamic.cast/p3-0x.cpp index 3b448a80db2b..cddd5cf25e3b 100644 --- a/test/CXX/expr/expr.post/expr.dynamic.cast/p3-0x.cpp +++ b/test/CXX/expr/expr.post/expr.dynamic.cast/p3-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s struct X { virtual ~X(); }; struct Y : public X { }; diff --git a/test/CXX/expr/expr.post/expr.reinterpret.cast/p1-0x.cpp b/test/CXX/expr/expr.post/expr.reinterpret.cast/p1-0x.cpp index e80082a0408a..22892a63ab16 100644 --- a/test/CXX/expr/expr.post/expr.reinterpret.cast/p1-0x.cpp +++ b/test/CXX/expr/expr.post/expr.reinterpret.cast/p1-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s // If T is an lvalue reference type or an rvalue reference to function // type, the result is an lvalue; if T is an rvalue reference to diff --git a/test/CXX/expr/expr.post/expr.static.cast/p3-0x.cpp b/test/CXX/expr/expr.post/expr.static.cast/p3-0x.cpp index c10335183e21..9ef15e6642b1 100644 --- a/test/CXX/expr/expr.post/expr.static.cast/p3-0x.cpp +++ b/test/CXX/expr/expr.post/expr.static.cast/p3-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s // A glvalue of type "cv1 T1" can be cast to type "rvalue reference to // cv2 T2" if "cv2 T2" is reference-compatible with "cv1 T1" (8.5.3). diff --git a/test/CXX/expr/expr.post/expr.static.cast/p9-0x.cpp b/test/CXX/expr/expr.post/expr.static.cast/p9-0x.cpp index 4acafb89acaf..731c50844428 100644 --- a/test/CXX/expr/expr.post/expr.static.cast/p9-0x.cpp +++ b/test/CXX/expr/expr.post/expr.static.cast/p9-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s enum class EC { ec1 }; diff --git a/test/CXX/expr/expr.prim/p12-0x.cpp b/test/CXX/expr/expr.prim/p12-0x.cpp index 0ff29a18825b..aec62ddd97a7 100644 --- a/test/CXX/expr/expr.prim/p12-0x.cpp +++ b/test/CXX/expr/expr.prim/p12-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s struct S { int *j = &nonexistent; // expected-error {{use of undeclared identifier 'nonexistent'}} diff --git a/test/CXX/expr/expr.prim/p4-0x.cpp b/test/CXX/expr/expr.prim/p4-0x.cpp index 13735fab4a9d..143ba897ae95 100644 --- a/test/CXX/expr/expr.prim/p4-0x.cpp +++ b/test/CXX/expr/expr.prim/p4-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s struct S { S *p = this; // ok diff --git a/test/CXX/expr/expr.unary/expr.new/p2-cxx0x.cpp b/test/CXX/expr/expr.unary/expr.new/p2-cxx0x.cpp index c9a8887d2644..4ebbfce289ea 100644 --- a/test/CXX/expr/expr.unary/expr.new/p2-cxx0x.cpp +++ b/test/CXX/expr/expr.unary/expr.new/p2-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 template<typename T> struct only { diff --git a/test/CXX/expr/expr.unary/expr.new/p20-0x.cpp b/test/CXX/expr/expr.unary/expr.new/p20-0x.cpp index 4c924b137ccd..eca1ec790199 100644 --- a/test/CXX/expr/expr.unary/expr.new/p20-0x.cpp +++ b/test/CXX/expr/expr.unary/expr.new/p20-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x -fexceptions %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -fexceptions %s typedef __SIZE_TYPE__ size_t; struct S { diff --git a/test/CXX/expr/expr.unary/expr.sizeof/p5-0x.cpp b/test/CXX/expr/expr.unary/expr.sizeof/p5-0x.cpp index 382461541546..afd8ef05302f 100644 --- a/test/CXX/expr/expr.unary/expr.sizeof/p5-0x.cpp +++ b/test/CXX/expr/expr.unary/expr.sizeof/p5-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s // Test parsing + semantic analysis template<typename ...Types> struct count_types { diff --git a/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp b/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp index 67d853a287f8..5c1029f1a3ff 100644 --- a/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp +++ b/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 -S -emit-llvm -std=c++0x -include %S/ser.h %s -o - | FileCheck %s -// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 -emit-pch -o %t-ser.pch -std=c++0x -x c++ %S/ser.h -// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 -S -emit-llvm -std=c++0x -include-pch %t-ser.pch %s -o - | FileCheck %s +// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 -S -emit-llvm -std=c++11 -include %S/ser.h %s -o - | FileCheck %s +// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 -emit-pch -o %t-ser.pch -std=c++11 -x c++ %S/ser.h +// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 -S -emit-llvm -std=c++11 -include-pch %t-ser.pch %s -o - | FileCheck %s struct D { ~D() throw(); diff --git a/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp b/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp index 6d1e523b51bf..b5de1a7f8fee 100644 --- a/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp +++ b/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify -std=c++0x -fms-extensions %s +// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify -std=c++11 -fms-extensions %s #define P(e) static_assert(noexcept(e), "expected nothrow") #define N(e) static_assert(!noexcept(e), "expected throw") diff --git a/test/CXX/expr/expr.unary/expr.unary.op/p6.cpp b/test/CXX/expr/expr.unary/expr.unary.op/p6.cpp index 30f8c5491951..ac11940c80da 100644 --- a/test/CXX/expr/expr.unary/expr.unary.op/p6.cpp +++ b/test/CXX/expr/expr.unary/expr.unary.op/p6.cpp @@ -29,8 +29,7 @@ bool b8 = !S(); //expected-error {{invalid argument type 'S'}} namespace PR8181 { - void f() { } // expected-note{{candidate function}} - void f(char) { } // expected-note{{candidate function}} - bool b = !&f; //expected-error {{cannot resolve overloaded function 'f' from context}} - + bool f() { } // expected-note{{possible target for call}} + void f(char) { } // expected-note{{possible target for call}} + bool b = !&f; //expected-error {{reference to overloaded function could not be resolved; did you mean to call it with no arguments?}} } |