r199130 - Update tests in preparation for using the MS ABI for Win32 targets
Hans Wennborg
hans at hanshq.net
Mon Jan 13 11:48:13 PST 2014
Author: hans
Date: Mon Jan 13 13:48:13 2014
New Revision: 199130
URL: http://llvm.org/viewvc/llvm-project?rev=199130&view=rev
Log:
Update tests in preparation for using the MS ABI for Win32 targets
In preparation for making the Win32 triple imply MS ABI mode,
make all tests pass in this mode, or make them use the Itanium
mode explicitly.
Differential Revision: http://llvm-reviews.chandlerc.com/D2401
Modified:
cfe/trunk/test/Analysis/inlining/dyn-dispatch-bifurcate.cpp
cfe/trunk/test/CXX/dcl.dcl/dcl.link/p7.cpp
cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p2.cpp
cfe/trunk/test/CXX/drs/dr2xx.cpp
cfe/trunk/test/CXX/special/class.copy/implicit-move-def.cpp
cfe/trunk/test/CXX/special/class.dtor/p3-0x.cpp
cfe/trunk/test/CXX/special/class.dtor/p9.cpp
cfe/trunk/test/CodeGen/builtin-ms-noop.cpp
cfe/trunk/test/CodeGen/captured-statements.c
cfe/trunk/test/CodeGen/complex-convert.c
cfe/trunk/test/CodeGen/cxx-default-arg.cpp
cfe/trunk/test/CodeGen/fp-contract-pragma.cpp
cfe/trunk/test/CodeGen/overloadable.c
cfe/trunk/test/CodeGen/tbaa-for-vptr.cpp
cfe/trunk/test/CodeGenCUDA/filter-decl.cu
cfe/trunk/test/CodeGenCXX/instr-profile.cpp
cfe/trunk/test/CodeGenObjC/debug-info-self.m
cfe/trunk/test/CodeGenObjC/overloadable.m
cfe/trunk/test/CodeGenObjCXX/arc-mangle.mm
cfe/trunk/test/CodeGenOpenCL/address-spaces-mangling.cl
cfe/trunk/test/CodeGenOpenCL/local.cl
cfe/trunk/test/PCH/cxx-reference.cpp
cfe/trunk/test/PCH/cxx-required-decls.cpp
cfe/trunk/test/PCH/cxx-templates.cpp
cfe/trunk/test/PCH/irgen-rdar13114142.mm
cfe/trunk/test/PCH/objc_literals.mm
cfe/trunk/test/PCH/objcxx-ivar-class.mm
cfe/trunk/test/Sema/empty1.c
cfe/trunk/test/SemaCXX/deleted-operator.cpp
cfe/trunk/test/SemaCXX/destructor.cpp
cfe/trunk/test/SemaCXX/implicit-virtual-member-functions.cpp
cfe/trunk/test/SemaCXX/primary-base.cpp
cfe/trunk/test/SemaCXX/typeid-ref.cpp
cfe/trunk/test/SemaCXX/undefined-internal.cpp
cfe/trunk/test/SemaCXX/virtual-base-used.cpp
cfe/trunk/test/SemaCXX/warn-reinterpret-base-class.cpp
cfe/trunk/test/SemaCXX/warn-weak-vtables.cpp
cfe/trunk/test/SemaTemplate/inject-templated-friend-post.cpp
cfe/trunk/test/SemaTemplate/inject-templated-friend.cpp
cfe/trunk/test/SemaTemplate/instantiate-complete.cpp
cfe/trunk/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
cfe/trunk/test/SemaTemplate/virtual-member-functions.cpp
Modified: cfe/trunk/test/Analysis/inlining/dyn-dispatch-bifurcate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/inlining/dyn-dispatch-bifurcate.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/inlining/dyn-dispatch-bifurcate.cpp (original)
+++ cfe/trunk/test/Analysis/inlining/dyn-dispatch-bifurcate.cpp Mon Jan 13 13:48:13 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=dynamic-bifurcate -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=dynamic-bifurcate -verify -Wno-reinterpret-base-class %s
void clang_analyzer_eval(bool);
Modified: cfe/trunk/test/CXX/dcl.dcl/dcl.link/p7.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.dcl/dcl.link/p7.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CXX/dcl.dcl/dcl.link/p7.cpp (original)
+++ cfe/trunk/test/CXX/dcl.dcl/dcl.link/p7.cpp Mon Jan 13 13:48:13 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -cxx-abi itanium -emit-llvm -o - %s | FileCheck %s
struct X { };
@@ -7,8 +7,6 @@ struct X { };
// CHECK: @x2 = external global %struct.X
// CHECK: @x3 = external global %struct.X
extern "C" {
-
-
X x1;
}
Modified: cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p2.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p2.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p2.cpp (original)
+++ cfe/trunk/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p2.cpp Mon Jan 13 13:48:13 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm -cxx-abi itanium %s -o - | FileCheck %s
// constexpr functions and constexpr constructors are implicitly inline.
struct S {
Modified: cfe/trunk/test/CXX/drs/dr2xx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr2xx.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CXX/drs/dr2xx.cpp (original)
+++ cfe/trunk/test/CXX/drs/dr2xx.cpp Mon Jan 13 13:48:13 2014
@@ -1,6 +1,10 @@
-// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
-// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
-// RUN: %clang_cc1 -std=c++1y %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -cxx-abi itanium
+// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -cxx-abi itanium
+// RUN: %clang_cc1 -std=c++1y %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -cxx-abi itanium
+
+// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -cxx-abi microsoft -DMSABI
+// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -cxx-abi microsoft -DMSABI
+// RUN: %clang_cc1 -std=c++1y %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -cxx-abi microsoft -DMSABI
// PR13819 -- __SIZE_TYPE__ is incompatible.
typedef __SIZE_TYPE__ size_t; // expected-error 0-1 {{extension}}
@@ -534,17 +538,30 @@ namespace dr250 { // dr250: yes
namespace dr252 { // dr252: yes
struct A {
+#ifdef MSABI
+ // expected-note at +2 {{found}}
+#endif
void operator delete(void*); // expected-note {{found}}
};
struct B {
+#ifdef MSABI
+ // expected-note at +2 {{found}}
+#endif
void operator delete(void*); // expected-note {{found}}
};
struct C : A, B {
+#ifdef MSABI
+ // expected-error at +2 {{'operator delete' found in multiple base classes}}
+#endif
virtual ~C();
};
C::~C() {} // expected-error {{'operator delete' found in multiple base classes}}
struct D {
+#ifdef MSABI
+ // expected-note at +3 {{here}} MSABI
+ // expected-error at +3 {{no suitable member 'operator delete'}}
+#endif
void operator delete(void*, int); // expected-note {{here}}
virtual ~D();
};
@@ -552,18 +569,22 @@ namespace dr252 { // dr252: yes
struct E {
void operator delete(void*, int);
- void operator delete(void*) = delete; // expected-error 0-1{{extension}} expected-note {{here}}
- virtual ~E();
+ void operator delete(void*) = delete; // expected-error 0-1{{extension}} expected-note 1-2 {{here}}
+ virtual ~E(); // expected-error 0-1 {{attempt to use a deleted function}}
};
- E::~E() {} // expected-error {{deleted}}
+ E::~E() {} // expected-error {{attempt to use a deleted function}}
struct F {
// If both functions are available, the first one is a placement delete.
void operator delete(void*, size_t);
+#ifdef MSABI
+ // expected-note at +3 {{here}}
+ // expected-error at +3 {{attempt to use a deleted function}}
+#endif
void operator delete(void*) = delete; // expected-error 0-1{{extension}} expected-note {{here}}
virtual ~F();
};
- F::~F() {} // expected-error {{deleted}}
+ F::~F() {} // expected-error {{attempt to use a deleted function}}
struct G {
void operator delete(void*, size_t);
Modified: cfe/trunk/test/CXX/special/class.copy/implicit-move-def.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/special/class.copy/implicit-move-def.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CXX/special/class.copy/implicit-move-def.cpp (original)
+++ cfe/trunk/test/CXX/special/class.copy/implicit-move-def.cpp Mon Jan 13 13:48:13 2014
@@ -1,6 +1,6 @@
-// FIXME: %clang_cc1 -emit-llvm -o - -std=c++11 %s | FileCheck -check-prefix=CHECK %s
-// RUN: %clang_cc1 -emit-llvm -o - -std=c++11 %s | FileCheck -check-prefix=CHECK-ASSIGN %s
-// RUN: %clang_cc1 -emit-llvm -o - -std=c++11 %s | FileCheck -check-prefix=CHECK-CTOR %s
+// FIXME: %clang_cc1 -emit-llvm -cxx-abi itanium -o - -std=c++11 %s | FileCheck -check-prefix=CHECK %s
+// RUN: %clang_cc1 -emit-llvm -cxx-abi itanium -o - -std=c++11 %s | FileCheck -check-prefix=CHECK-ASSIGN %s
+// RUN: %clang_cc1 -emit-llvm -cxx-abi itanium -o - -std=c++11 %s | FileCheck -check-prefix=CHECK-CTOR %s
// construct
Modified: cfe/trunk/test/CXX/special/class.dtor/p3-0x.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/special/class.dtor/p3-0x.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CXX/special/class.dtor/p3-0x.cpp (original)
+++ cfe/trunk/test/CXX/special/class.dtor/p3-0x.cpp Mon Jan 13 13:48:13 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -cxx-abi itanium -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s
struct A {
~A();
Modified: cfe/trunk/test/CXX/special/class.dtor/p9.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/special/class.dtor/p9.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CXX/special/class.dtor/p9.cpp (original)
+++ cfe/trunk/test/CXX/special/class.dtor/p9.cpp Mon Jan 13 13:48:13 2014
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -cxx-abi itanium -verify %s
+// RUN: %clang_cc1 -fsyntax-only -cxx-abi microsoft -DMSABI -verify %s
typedef typeof(sizeof(int)) size_t;
@@ -28,12 +29,18 @@ namespace test0 {
namespace test1 {
class A {
public:
+#ifdef MSABI
+ // expected-note at +2 {{declared here}}
+#endif
static void operator delete(void *p) {}; // expected-note {{member 'operator delete' declared here}}
virtual ~A();
};
class B : protected A {
public:
+#ifdef MSABI
+ // expected-note at +2 {{declared here}}
+#endif
static void operator delete(void *, size_t) {}; // expected-note {{member 'operator delete' declared here}}
~B();
};
@@ -43,6 +50,9 @@ namespace test1 {
using A::operator delete;
using B::operator delete;
+#ifdef MSABI
+ // expected-error at +2 {{multiple suitable 'operator delete' functions in 'C'}}
+#endif
~C();
};
@@ -52,12 +62,22 @@ namespace test1 {
// ...at the point of definition of a virtual destructor...
namespace test2 {
struct A {
+#ifdef MSABI
+ // expected-error at +3 {{no suitable member 'operator delete' in 'A'}}
+ // expected-note at +3 {{declared here}}
+#endif
virtual ~A();
static void operator delete(void*, const int &);
};
struct B {
+#ifdef MSABI
+ // expected-error at +2 {{no suitable member 'operator delete' in 'B'}}
+#endif
virtual ~B();
+#ifdef MSABI
+ // expected-note at +2 {{declared here}}
+#endif
static void operator delete(void*, const int &); // expected-note {{declared here}}
};
B::~B() {} // expected-error {{no suitable member 'operator delete' in 'B'}}
@@ -74,7 +94,13 @@ namespace test2 {
// PR7346
namespace test3 {
struct A {
+#ifdef MSABI
+ // expected-error at +2 {{no suitable member 'operator delete' in 'A'}}
+#endif
virtual ~A();
+#ifdef MSABI
+ // expected-note at +2 {{declared here}}
+#endif
static void operator delete(void*, const int &);
};
Modified: cfe/trunk/test/CodeGen/builtin-ms-noop.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/builtin-ms-noop.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/builtin-ms-noop.cpp (original)
+++ cfe/trunk/test/CodeGen/builtin-ms-noop.cpp Mon Jan 13 13:48:13 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fms-extensions -triple i686-pc-win32 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fms-extensions -triple i686-pc-win32 -cxx-abi itanium -emit-llvm %s -o - | FileCheck %s
class A {
public:
@@ -11,4 +11,3 @@ void f() {
// CHECK: ret void
__noop(A());
};
-
Modified: cfe/trunk/test/CodeGen/captured-statements.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/captured-statements.c?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/captured-statements.c (original)
+++ cfe/trunk/test/CodeGen/captured-statements.c Mon Jan 13 13:48:13 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o %t
+// RUN: %clang_cc1 -cxx-abi itanium -emit-llvm %s -o %t
// RUN: FileCheck %s -input-file=%t -check-prefix=CHECK-GLOBALS
// RUN: FileCheck %s -input-file=%t -check-prefix=CHECK-1
// RUN: FileCheck %s -input-file=%t -check-prefix=CHECK-2
Modified: cfe/trunk/test/CodeGen/complex-convert.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/complex-convert.c?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/complex-convert.c (original)
+++ cfe/trunk/test/CodeGen/complex-convert.c Mon Jan 13 13:48:13 2014
@@ -22,9 +22,14 @@ void foo(signed char sc, unsigned char u
_Complex signed long long csll1;
_Complex unsigned long long cull1;
// CHECK-LABEL: define void @foo(
- // CHECK: alloca i[[CHSIZE:[0-9]+]], align [[CHALIGN:[0-9]+]]
- // CHECK-NEXT: alloca i[[CHSIZE]], align [[CHALIGN]]
- // CHECK-NEXT: alloca i[[LLSIZE:[0-9]+]], align [[LLALIGN:[0-9]+]]
+ // Match the prototype to pick up the size of sc and sll.
+ // CHECK: i[[CHSIZE:[0-9]+]]{{[^,]*}},
+ // CHECK: i[[CHSIZE]]{{[^,]*}},
+ // CHECK: i[[LLSIZE:[0-9]+]]
+
+ // Match against the allocas to pick up the alignments.
+ // CHECK: alloca i[[CHSIZE]], align [[CHALIGN:[0-9]+]]
+ // CHECK: alloca i[[LLSIZE]], align [[LLALIGN:[0-9]+]]
sc1 = csc;
// CHECK: %[[VAR1:[A-Za-z0-9.]+]] = getelementptr inbounds { i[[CHSIZE]], i[[CHSIZE]] }* %[[CSC:[A-Za-z0-9.]+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
Modified: cfe/trunk/test/CodeGen/cxx-default-arg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/cxx-default-arg.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/cxx-default-arg.cpp (original)
+++ cfe/trunk/test/CodeGen/cxx-default-arg.cpp Mon Jan 13 13:48:13 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o %t
+// RUN: %clang_cc1 -cxx-abi itanium -emit-llvm %s -o %t
// Note-LABEL: define CLANG_GENERATE_KNOWN_GOOD and compile to generate code
// that makes all of the defaulted arguments explicit. The resulting
Modified: cfe/trunk/test/CodeGen/fp-contract-pragma.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/fp-contract-pragma.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/fp-contract-pragma.cpp (original)
+++ cfe/trunk/test/CodeGen/fp-contract-pragma.cpp Mon Jan 13 13:48:13 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -O3 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -O3 -cxx-abi itanium -emit-llvm -o - %s | FileCheck %s
// Is FP_CONTRACT is honored in a simple case?
float fp_contract_1(float a, float b, float c) {
Modified: cfe/trunk/test/CodeGen/overloadable.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/overloadable.c?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/overloadable.c (original)
+++ cfe/trunk/test/CodeGen/overloadable.c Mon Jan 13 13:48:13 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | grep _Z1fPA10_1X
+// RUN: %clang_cc1 -cxx-abi itanium -emit-llvm %s -o - | grep _Z1fPA10_1X
int __attribute__((overloadable)) f(int x) { return x; }
float __attribute__((overloadable)) f(float x) { return x; }
double __attribute__((overloadable)) f(double x) { return x; }
Modified: cfe/trunk/test/CodeGen/tbaa-for-vptr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/tbaa-for-vptr.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/tbaa-for-vptr.cpp (original)
+++ cfe/trunk/test/CodeGen/tbaa-for-vptr.cpp Mon Jan 13 13:48:13 2014
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -emit-llvm -o - -fsanitize=thread %s | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -o - -O1 %s | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -o - -O1 -relaxed-aliasing -fsanitize=thread %s | FileCheck %s
+// RUN: %clang_cc1 -cxx-abi itanium -emit-llvm -o - -fsanitize=thread %s | FileCheck %s
+// RUN: %clang_cc1 -cxx-abi itanium -emit-llvm -o - -O1 %s | FileCheck %s
+// RUN: %clang_cc1 -cxx-abi itanium -emit-llvm -o - -O1 -relaxed-aliasing -fsanitize=thread %s | FileCheck %s
//
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s --check-prefix=NOTBAA
-// RUN: %clang_cc1 -emit-llvm -o - -O2 -relaxed-aliasing %s | FileCheck %s --check-prefix=NOTBAA
+// RUN: %clang_cc1 -cxx-abi itanium -emit-llvm -o - %s | FileCheck %s --check-prefix=NOTBAA
+// RUN: %clang_cc1 -cxx-abi itanium -emit-llvm -o - -O2 -relaxed-aliasing %s | FileCheck %s --check-prefix=NOTBAA
//
// Check that we generate TBAA for vtable pointer loads and stores.
// When -fthread-sanitizer is used TBAA should be generated at all opt levels
Modified: cfe/trunk/test/CodeGenCUDA/filter-decl.cu
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCUDA/filter-decl.cu?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCUDA/filter-decl.cu (original)
+++ cfe/trunk/test/CodeGenCUDA/filter-decl.cu Mon Jan 13 13:48:13 2014
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-HOST %s
-// RUN: %clang_cc1 -emit-llvm %s -o - -fcuda-is-device | FileCheck -check-prefix=CHECK-DEVICE %s
+// RUN: %clang_cc1 -cxx-abi itanium -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-HOST %s
+// RUN: %clang_cc1 -cxx-abi itanium -emit-llvm %s -o - -fcuda-is-device | FileCheck -check-prefix=CHECK-DEVICE %s
#include "../SemaCUDA/cuda.h"
Modified: cfe/trunk/test/CodeGenCXX/instr-profile.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/instr-profile.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/instr-profile.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/instr-profile.cpp Mon Jan 13 13:48:13 2014
@@ -7,11 +7,11 @@
// FIXME: Don't seek bb labels, like "if.else"
// REQUIRES: asserts
-// RUN: %clangxx %s -o - -emit-llvm -S -fprofile-instr-generate | FileCheck -check-prefix=PGOGEN %s
-// RUN: %clangxx %s -o - -emit-llvm -S -fprofile-instr-generate | FileCheck -check-prefix=PGOGEN-EXC %s
+// RUN: %clangxx %s -o - -emit-llvm -S -fprofile-instr-generate -Xclang -cxx-abi -Xclang itanium | FileCheck -check-prefix=PGOGEN %s
+// RUN: %clangxx %s -o - -emit-llvm -S -fprofile-instr-generate -Xclang -cxx-abi -Xclang itanium | FileCheck -check-prefix=PGOGEN-EXC %s
-// RUN: %clang %s -o - -emit-llvm -S -fprofile-instr-use=%S/Inputs/instr-profile.pgodata | FileCheck -check-prefix=PGOUSE %s
-// RUN: %clang %s -o - -emit-llvm -S -fprofile-instr-use=%S/Inputs/instr-profile.pgodata | FileCheck -check-prefix=PGOUSE-EXC %s
+// RUN: %clang %s -o - -emit-llvm -S -fprofile-instr-use=%S/Inputs/instr-profile.pgodata -Xclang -cxx-abi -Xclang itanium | FileCheck -check-prefix=PGOUSE %s
+// RUN: %clang %s -o - -emit-llvm -S -fprofile-instr-use=%S/Inputs/instr-profile.pgodata -Xclang -cxx-abi -Xclang itanium | FileCheck -check-prefix=PGOUSE-EXC %s
// PGOGEN: @[[THC:__llvm_pgo_ctr[0-9]*]] = private global [11 x i64] zeroinitializer
// PGOGEN-EXC: @[[THC:__llvm_pgo_ctr[0-9]*]] = private global [11 x i64] zeroinitializer
Modified: cfe/trunk/test/CodeGenObjC/debug-info-self.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-self.m?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-self.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-self.m Mon Jan 13 13:48:13 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -cxx-abi itanium -g %s -o - | FileCheck %s
// self and _cmd are marked as DW_AT_artificial.
// myarg is not marked as DW_AT_artificial.
Modified: cfe/trunk/test/CodeGenObjC/overloadable.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/overloadable.m?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/overloadable.m (original)
+++ cfe/trunk/test/CodeGenObjC/overloadable.m Mon Jan 13 13:48:13 2014
@@ -1,10 +1,12 @@
// rdar://6657613
-// RUN: %clang_cc1 -emit-llvm %s -o %t
+// RUN: %clang_cc1 -cxx-abi itanium -emit-llvm %s -o - | FileCheck %s
@class C;
-// RUN: grep _Z1fP11objc_object %t | count 1
+// CHECK: _Z1fP11objc_object
+// CHECK-NOT: _Z1fP11objc_object
void __attribute__((overloadable)) f(id c) { }
-// RUN: grep _Z1fP1C %t | count 1
+// CHECK: _Z1fP1C
+// CHECK-NOT: _Z1fP1C
void __attribute__((overloadable)) f(C *c) { }
Modified: cfe/trunk/test/CodeGenObjCXX/arc-mangle.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/arc-mangle.mm?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/arc-mangle.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/arc-mangle.mm Mon Jan 13 13:48:13 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fobjc-arc -fobjc-runtime-has-weak -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fobjc-arc -fobjc-runtime-has-weak -cxx-abi itanium -emit-llvm -o - %s | FileCheck %s
// CHECK-LABEL: define void @_Z1fPU8__strongP11objc_object(i8**)
void f(__strong id *) {}
Modified: cfe/trunk/test/CodeGenOpenCL/address-spaces-mangling.cl
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenOpenCL/address-spaces-mangling.cl?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenOpenCL/address-spaces-mangling.cl (original)
+++ cfe/trunk/test/CodeGenOpenCL/address-spaces-mangling.cl Mon Jan 13 13:48:13 2014
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=yes -emit-llvm -o - | FileCheck -check-prefix=ASMANG %s
-// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=no -emit-llvm -o - | FileCheck -check-prefix=NOASMANG %s
+// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=yes -cxx-abi itanium -emit-llvm -o - | FileCheck -check-prefix=ASMANG %s
+// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=no -cxx-abi itanium -emit-llvm -o - | FileCheck -check-prefix=NOASMANG %s
// We can't name this f as private is equivalent to default
// no specifier given address space so we get multiple definition
Modified: cfe/trunk/test/CodeGenOpenCL/local.cl
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenOpenCL/local.cl?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenOpenCL/local.cl (original)
+++ cfe/trunk/test/CodeGenOpenCL/local.cl Mon Jan 13 13:48:13 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=no -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=no -cxx-abi itanium -emit-llvm -o - | FileCheck %s
__kernel void foo(void) {
// CHECK: @foo.i = internal addrspace(2)
Modified: cfe/trunk/test/PCH/cxx-reference.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/cxx-reference.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/PCH/cxx-reference.cpp (original)
+++ cfe/trunk/test/PCH/cxx-reference.cpp Mon Jan 13 13:48:13 2014
@@ -1,6 +1,6 @@
// Test this without pch.
-// RUN: %clang_cc1 -x c++ -std=c++11 -include %S/cxx-reference.h -fsyntax-only -emit-llvm -o - %s
+// RUN: %clang_cc1 -x c++ -cxx-abi itanium -std=c++11 -include %S/cxx-reference.h -fsyntax-only -emit-llvm -o - %s
// Test with pch.
-// RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t %S/cxx-reference.h
-// RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t -fsyntax-only -emit-llvm -o - %s
+// RUN: %clang_cc1 -x c++ -cxx-abi itanium -std=c++11 -emit-pch -o %t %S/cxx-reference.h
+// RUN: %clang_cc1 -x c++ -cxx-abi itanium -std=c++11 -include-pch %t -fsyntax-only -emit-llvm -o - %s
Modified: cfe/trunk/test/PCH/cxx-required-decls.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/cxx-required-decls.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/PCH/cxx-required-decls.cpp (original)
+++ cfe/trunk/test/PCH/cxx-required-decls.cpp Mon Jan 13 13:48:13 2014
@@ -1,9 +1,9 @@
// Test this without pch.
-// RUN: %clang_cc1 -include %S/cxx-required-decls.h %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -include %S/cxx-required-decls.h %s -cxx-abi itanium -emit-llvm -o - | FileCheck %s
// Test with pch.
-// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/cxx-required-decls.h
-// RUN: %clang_cc1 -include-pch %t %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -x c++-header -cxx-abi itanium -emit-pch -o %t %S/cxx-required-decls.h
+// RUN: %clang_cc1 -include-pch %t %s -cxx-abi itanium -emit-llvm -o - | FileCheck %s
// CHECK: @_ZL5globS = internal global %struct.S zeroinitializer
// CHECK: @_ZL3bar = internal global i32 0, align 4
Modified: cfe/trunk/test/PCH/cxx-templates.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/cxx-templates.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/PCH/cxx-templates.cpp (original)
+++ cfe/trunk/test/PCH/cxx-templates.cpp Mon Jan 13 13:48:13 2014
@@ -1,21 +1,21 @@
// Test this without pch.
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -include %S/cxx-templates.h -verify %s -ast-dump -o -
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -include %S/cxx-templates.h %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -cxx-abi itanium -fcxx-exceptions -fexceptions -include %S/cxx-templates.h -verify %s -ast-dump -o -
+// RUN: %clang_cc1 -std=c++11 -cxx-abi itanium -fcxx-exceptions -fexceptions -include %S/cxx-templates.h %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s
// Test with pch.
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -include-pch %t -verify %s -ast-dump -o -
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -include-pch %t %s -emit-llvm -o - -error-on-deserialized-decl doNotDeserialize -DNO_ERRORS | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -cxx-abi itanium -fcxx-exceptions -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h
+// RUN: %clang_cc1 -std=c++11 -cxx-abi itanium -fcxx-exceptions -fexceptions -include-pch %t -verify %s -ast-dump -o -
+// RUN: %clang_cc1 -std=c++11 -cxx-abi itanium -fcxx-exceptions -fexceptions -include-pch %t %s -emit-llvm -o - -error-on-deserialized-decl doNotDeserialize -DNO_ERRORS | FileCheck %s
// Test with modules.
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -fmodules -x c++-header -emit-pch -o %t %S/cxx-templates.h
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -fmodules -include-pch %t -verify %s -ast-dump -o -
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -fmodules -include-pch %t %s -emit-llvm -o - -error-on-deserialized-decl doNotDeserialize -DNO_ERRORS | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -cxx-abi itanium -fcxx-exceptions -fexceptions -fmodules -x c++-header -emit-pch -o %t %S/cxx-templates.h
+// RUN: %clang_cc1 -std=c++11 -cxx-abi itanium -fcxx-exceptions -fexceptions -fmodules -include-pch %t -verify %s -ast-dump -o -
+// RUN: %clang_cc1 -std=c++11 -cxx-abi itanium -fcxx-exceptions -fexceptions -fmodules -include-pch %t %s -emit-llvm -o - -error-on-deserialized-decl doNotDeserialize -DNO_ERRORS | FileCheck %s
// Test with pch and delayed template parsing.
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fdelayed-template-parsing -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t -verify %s -ast-dump -o -
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -cxx-abi itanium -fcxx-exceptions -fdelayed-template-parsing -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h
+// RUN: %clang_cc1 -std=c++11 -cxx-abi itanium -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t -verify %s -ast-dump -o -
+// RUN: %clang_cc1 -std=c++11 -cxx-abi itanium -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s
// CHECK: define weak_odr {{.*}}void @_ZN2S4IiE1mEv
// CHECK: define linkonce_odr {{.*}}void @_ZN2S3IiE1mEv
Modified: cfe/trunk/test/PCH/irgen-rdar13114142.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/irgen-rdar13114142.mm?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/PCH/irgen-rdar13114142.mm (original)
+++ cfe/trunk/test/PCH/irgen-rdar13114142.mm Mon Jan 13 13:48:13 2014
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %s -emit-pch -o %t.pch
-// RUN: %clang_cc1 %s -emit-llvm -include-pch %t.pch -o - | FileCheck %s
+// RUN: %clang_cc1 %s -cxx-abi itanium -emit-pch -o %t.pch
+// RUN: %clang_cc1 %s -cxx-abi itanium -emit-llvm -include-pch %t.pch -o - | FileCheck %s
#ifndef HEADER
#define HEADER
Modified: cfe/trunk/test/PCH/objc_literals.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/objc_literals.mm?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/PCH/objc_literals.mm (original)
+++ cfe/trunk/test/PCH/objc_literals.mm Mon Jan 13 13:48:13 2014
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -emit-pch -x objective-c++ -std=c++0x -o %t %s
-// RUN: %clang_cc1 -include-pch %t -x objective-c++ -std=c++0x -verify %s
-// RUN: %clang_cc1 -include-pch %t -x objective-c++ -std=c++0x -ast-print %s | FileCheck -check-prefix=CHECK-PRINT %s
-// RUN: %clang_cc1 -include-pch %t -x objective-c++ -std=c++0x -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-IR %s
+// RUN: %clang_cc1 -cxx-abi itanium -emit-pch -x objective-c++ -std=c++0x -o %t %s
+// RUN: %clang_cc1 -cxx-abi itanium -include-pch %t -x objective-c++ -std=c++0x -verify %s
+// RUN: %clang_cc1 -cxx-abi itanium -include-pch %t -x objective-c++ -std=c++0x -ast-print %s | FileCheck -check-prefix=CHECK-PRINT %s
+// RUN: %clang_cc1 -cxx-abi itanium -include-pch %t -x objective-c++ -std=c++0x -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-IR %s
// expected-no-diagnostics
Modified: cfe/trunk/test/PCH/objcxx-ivar-class.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/objcxx-ivar-class.mm?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/PCH/objcxx-ivar-class.mm (original)
+++ cfe/trunk/test/PCH/objcxx-ivar-class.mm Mon Jan 13 13:48:13 2014
@@ -1,9 +1,9 @@
// Test this without pch.
-// RUN: not %clang_cc1 -include %S/objcxx-ivar-class.h -verify %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -include %S/objcxx-ivar-class.h -cxx-abi itanium %s -emit-llvm -o - | FileCheck %s
// Test with pch.
-// RUN: %clang_cc1 -x objective-c++-header -emit-pch -o %t %S/objcxx-ivar-class.h
-// RUN: not %clang_cc1 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -x objective-c++-header -cxx-abi itanium -emit-pch -o %t %S/objcxx-ivar-class.h
+// RUN: %clang_cc1 -include-pch %t -cxx-abi itanium %s -emit-llvm -o - | FileCheck %s
// CHECK: [C position]
// CHECK: call {{.*}} @_ZN1SC1ERKS_
Modified: cfe/trunk/test/Sema/empty1.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/empty1.c?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/Sema/empty1.c (original)
+++ cfe/trunk/test/Sema/empty1.c Mon Jan 13 13:48:13 2014
@@ -1,4 +1,7 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify -Wc++-compat
+// RUN: %clang_cc1 %s -cxx-abi itanium -fsyntax-only -verify -Wc++-compat
+
+// FIXME: Empty C structs are 4 bytes in MSVC, but the -cxx-abi flag probably
+// shouldn't affect this since it's not C++. PR18263.
struct emp_1 { // expected-warning {{empty struct has size 0 in C, size 1 in C++}}
};
Modified: cfe/trunk/test/SemaCXX/deleted-operator.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/deleted-operator.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/deleted-operator.cpp (original)
+++ cfe/trunk/test/SemaCXX/deleted-operator.cpp Mon Jan 13 13:48:13 2014
@@ -13,6 +13,7 @@ int PR10757f() {
}
struct DelOpDel {
- virtual ~DelOpDel() {} // expected-error {{deleted function}}
- void operator delete(void*) = delete; // expected-note {{deleted here}}
+ // FIXME: In MS ABI, we error twice below.
+ virtual ~DelOpDel() {} // expected-error 1-2 {{attempt to use a deleted function}}
+ void operator delete(void*) = delete; // expected-note 1-2 {{deleted here}}
};
Modified: cfe/trunk/test/SemaCXX/destructor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/destructor.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/destructor.cpp (original)
+++ cfe/trunk/test/SemaCXX/destructor.cpp Mon Jan 13 13:48:13 2014
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -verify %s
+// RUN: %clang_cc1 -std=c++11 -cxx-abi itanium -fsyntax-only -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -verify %s
+// RUN: %clang_cc1 -std=c++11 -cxx-abi microsoft -DMSABI -fsyntax-only -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -verify %s
class A {
public:
~A();
@@ -83,6 +84,12 @@ namespace PR6421 {
}
namespace PR6709 {
+#ifdef MSABI
+ // This bug, "Clang instantiates destructor for function argument" is intended
+ // behaviour in the Microsoft ABI because the callee needs to destruct the arguments.
+ // expected-error at +3 {{indirection requires pointer operand ('int' invalid)}}
+ // expected-note at +3 {{in instantiation of member function 'PR6709::X<int>::~X' requested here}}
+#endif
template<class T> class X { T v; ~X() { ++*v; } };
void a(X<int> x) {}
}
@@ -100,10 +107,16 @@ namespace test6 {
T::deleteIt(p); // expected-error {{type 'int' cannot be used prior to '::'}}
}
+#ifdef MSABI
+ // expected-note at +2 {{in instantiation of member function 'test6::A<int>::operator delete' requested here}}
+#endif
virtual ~A() {}
};
- class B : A<int> { B(); }; // expected-note {{in instantiation of member function 'test6::A<int>::operator delete' requested here}}
+#ifndef MSABI
+ // expected-note at +2 {{in instantiation of member function 'test6::A<int>::operator delete' requested here}}
+#endif
+ class B : A<int> { B(); };
B::B() {}
}
Modified: cfe/trunk/test/SemaCXX/implicit-virtual-member-functions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/implicit-virtual-member-functions.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/implicit-virtual-member-functions.cpp (original)
+++ cfe/trunk/test/SemaCXX/implicit-virtual-member-functions.cpp Mon Jan 13 13:48:13 2014
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -cxx-abi itanium -verify %s
+// RUN: %clang_cc1 -fsyntax-only -cxx-abi microsoft -DMSABI -verify %s
struct A {
virtual ~A();
};
@@ -9,8 +10,12 @@ struct B : A { // expected-error {{no su
void operator delete (void *, int); // expected-note {{'operator delete' declared here}}
};
+#ifdef MSABI
+B b; // expected-note {{implicit destructor for 'B' first required here}}
+#else
void B::f() { // expected-note {{implicit destructor for 'B' first required here}}
}
+#endif
struct C : A { // expected-error {{no suitable member 'operator delete' in 'C'}}
C();
@@ -26,4 +31,3 @@ struct D : A { // expected-error {{no su
void f() {
new D; // expected-note {{implicit destructor for 'D' first required here}}
}
-
Modified: cfe/trunk/test/SemaCXX/primary-base.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/primary-base.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/primary-base.cpp (original)
+++ cfe/trunk/test/SemaCXX/primary-base.cpp Mon Jan 13 13:48:13 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -cxx-abi itanium -fsyntax-only -verify %s
// expected-no-diagnostics
class A { virtual void f(); };
class B : virtual A { };
Modified: cfe/trunk/test/SemaCXX/typeid-ref.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/typeid-ref.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/typeid-ref.cpp (original)
+++ cfe/trunk/test/SemaCXX/typeid-ref.cpp Mon Jan 13 13:48:13 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -cxx-abi itanium -emit-llvm -o - %s | FileCheck %s
namespace std {
class type_info;
}
Modified: cfe/trunk/test/SemaCXX/undefined-internal.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/undefined-internal.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/undefined-internal.cpp (original)
+++ cfe/trunk/test/SemaCXX/undefined-internal.cpp Mon Jan 13 13:48:13 2014
@@ -1,7 +1,10 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
// Make sure we don't produce invalid IR.
-// RUN: %clang_cc1 -emit-llvm-only %s
+// RUN: %clang_cc1 -cxx-abi itanium -emit-llvm-only %s
+
+// FIXME: -cxx-abi itanium shouldn't be necessary; the test should pass
+// in MS mode too.
namespace test1 {
static void foo(); // expected-warning {{function 'test1::foo' has internal linkage but is not defined}}
Modified: cfe/trunk/test/SemaCXX/virtual-base-used.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/virtual-base-used.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/virtual-base-used.cpp (original)
+++ cfe/trunk/test/SemaCXX/virtual-base-used.cpp Mon Jan 13 13:48:13 2014
@@ -1,42 +1,89 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -cxx-abi itanium -verify %s
+// RUN: %clang_cc1 -fsyntax-only -cxx-abi microsoft -DMSABI -verify %s
// PR7800
+// The Microsoft ABI doesn't have the concept of key functions, so we have different
+// expectations about when functions are first required for that case.
+
+#ifdef MSABI
+// expected-note at +2 3 {{declared private here}}
+#endif
class NoDestroy { ~NoDestroy(); }; // expected-note 3 {{declared private here}}
struct A {
virtual ~A();
};
+#ifdef MSABI
+// expected-error at +3 {{field of type 'NoDestroy' has private destructor}}
+#endif
struct B : public virtual A {
NoDestroy x; // expected-error {{field of type 'NoDestroy' has private destructor}}
};
+#ifdef MSABI
+// expected-note at +3 {{implicit default constructor for 'B' first required here}}
+// expected-note at +2 {{implicit destructor for 'B' first required here}}
+#endif
struct D : public virtual B {
virtual void foo();
~D();
};
+#ifdef MSABI
+D d; // expected-note {{implicit default constructor for 'D' first required here}}
+#else
void D::foo() { // expected-note {{implicit destructor for 'B' first required here}}
}
+#endif
+#ifdef MSABI
+// expected-error at +3 {{field of type 'NoDestroy' has private destructor}}
+#endif
struct E : public virtual A {
NoDestroy x; // expected-error {{field of type 'NoDestroy' has private destructor}}
};
+#ifdef MSABI
+// expected-note at +2 {{implicit default constructor for 'E' first required here}}
+#endif
struct F : public E { // expected-note {{implicit destructor for 'E' first required here}}
};
+#ifdef MSABI
+// expected-note at +2 {{implicit default constructor for 'F' first required here}}
+#endif
struct G : public virtual F {
virtual void foo();
~G();
};
+#ifdef MSABI
+G g; // expected-note {{implicit default constructor for 'G' first required here}}
+#else
void G::foo() { // expected-note {{implicit destructor for 'F' first required here}}
}
+#endif
+#ifdef MSABI
+// expected-note at +3 {{'H' declared here}}
+// expected-error at +3 {{field of type 'NoDestroy' has private destructor}}
+#endif
struct H : public virtual A {
NoDestroy x; // expected-error {{field of type 'NoDestroy' has private destructor}}
};
+#ifdef MSABI
+// expected-error at +3 {{implicit default constructor for 'I' must explicitly initialize the base class 'H' which does not have a default constructor}}
+// expected-note at +2 {{implicit destructor for 'H' first required here}}
+#endif
struct I : public virtual H {
~I();
};
+#ifdef MSABI
+// expected-note at +3 {{implicit default constructor for 'H' first required here}}
+// expected-note at +2 {{implicit default constructor for 'I' first required here}}
+#endif
struct J : public I {
virtual void foo();
~J();
};
+#ifdef MSABI
+J j; // expected-note {{implicit default constructor for 'J' first required here}}
+#else
void J::foo() { // expected-note {{implicit destructor for 'H' first required here}}
}
+#endif
Modified: cfe/trunk/test/SemaCXX/warn-reinterpret-base-class.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/warn-reinterpret-base-class.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/warn-reinterpret-base-class.cpp (original)
+++ cfe/trunk/test/SemaCXX/warn-reinterpret-base-class.cpp Mon Jan 13 13:48:13 2014
@@ -1,5 +1,8 @@
-// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -Wreinterpret-base-class -Wno-unused-volatile-lvalue %s
-// RUN: not %clang_cc1 -std=c++11 -fsyntax-only -fdiagnostics-parseable-fixits -Wreinterpret-base-class -Wno-unused-volatile-lvalue %s 2>&1 | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -cxx-abi itanium -verify -Wreinterpret-base-class -Wno-unused-volatile-lvalue %s
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -cxx-abi microsoft -DMSABI -verify -Wreinterpret-base-class -Wno-unused-volatile-lvalue %s
+
+// RUN: not %clang_cc1 -std=c++11 -fsyntax-only -cxx-abi itanium -fdiagnostics-parseable-fixits -Wreinterpret-base-class -Wno-unused-volatile-lvalue %s 2>&1 | FileCheck %s
+// RUN: not %clang_cc1 -std=c++11 -fsyntax-only -cxx-abi microsoft -fdiagnostics-parseable-fixits -Wreinterpret-base-class -Wno-unused-volatile-lvalue %s 2>&1 | FileCheck %s
// PR 13824
class A {
@@ -288,6 +291,11 @@ void different_subobject_downcast(E *e,
(void)reinterpret_cast<I *>(f);
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:9-[[@LINE-1]]:25}:"static_cast"
+#ifdef MSABI
+ // In MS ABI mode, A is at non-zero offset in H.
+ // expected-warning at +3 {{'reinterpret_cast' to class 'H *' from its base at non-zero offset 'A *' behaves differently from 'static_cast'}}
+ // expected-note at +2 {{use 'static_cast'}}
+#endif
(void)reinterpret_cast<H *>(a);
// expected-warning at +2 {{'reinterpret_cast' to class 'L' (aka 'const F *volatile') from its base at non-zero offset 'E *' behaves differently from 'static_cast'}}
@@ -309,6 +317,12 @@ void different_subobject_upcast(F *f, G
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:9-[[@LINE-1]]:25}:"static_cast"
(void)reinterpret_cast<E *>(h);
+
+#ifdef MSABI
+ // In MS ABI mode, A is at non-zero offset in H.
+ // expected-warning at +3 {{'reinterpret_cast' from class 'H *' to its base at non-zero offset 'A *' behaves differently from 'static_cast'}}
+ // expected-note at +2 {{use 'static_cast'}}
+#endif
(void)reinterpret_cast<A *>(h);
// expected-warning at +2 {{'reinterpret_cast' from class 'I *' to its virtual base 'F *' behaves differently from 'static_cast'}}
Modified: cfe/trunk/test/SemaCXX/warn-weak-vtables.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/warn-weak-vtables.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/warn-weak-vtables.cpp (original)
+++ cfe/trunk/test/SemaCXX/warn-weak-vtables.cpp Mon Jan 13 13:48:13 2014
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify -Wweak-vtables -Wweak-template-vtables
+// RUN: %clang_cc1 %s -fsyntax-only -verify -cxx-abi itanium -Wweak-vtables -Wweak-template-vtables
+// RUN: %clang_cc1 %s -fsyntax-only -cxx-abi microsoft -Werror -Wno-weak-vtables -Wno-weak-template-vtables
struct A { // expected-warning {{'A' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit}}
virtual void f() { }
Modified: cfe/trunk/test/SemaTemplate/inject-templated-friend-post.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/inject-templated-friend-post.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/inject-templated-friend-post.cpp (original)
+++ cfe/trunk/test/SemaTemplate/inject-templated-friend-post.cpp Mon Jan 13 13:48:13 2014
@@ -1,12 +1,17 @@
-// RUN: %clang %s -std=c++98 -S -emit-llvm -o - | grep -e "define linkonce_odr.*_ZlsR11std_ostreamRK8StreamerI3FooE"
-// RUN: %clang %s -std=c++98 -S -emit-llvm -o - -DPROTOTYPE | grep -e "define linkonce_odr.*_ZlsR11std_ostreamRK8StreamerI3FooE"
-// RUN: %clang %s -std=c++98 -S -emit-llvm -o - -DINSTANTIATE | grep -e "define linkonce_odr.*_ZlsR11std_ostreamRK8StreamerI3FooE"
-// RUN: %clang %s -std=c++98 -S -emit-llvm -o - -DPROTOTYPE -DINSTANTIATE | grep -e "define linkonce_odr.*_ZlsR11std_ostreamRK8StreamerI3FooE"
+// RUN: %clang_cc1 %s -std=c++98 -cxx-abi itanium -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -std=c++98 -cxx-abi itanium -emit-llvm -o - -DPROTOTYPE | FileCheck --check-prefix=CHECK-PROTOTYPE %s
+// RUN: %clang_cc1 %s -std=c++98 -cxx-abi itanium -emit-llvm -o - -DINSTANTIATE | FileCheck --check-prefix=CHECK-INSTANTIATE %s
+// RUN: %clang_cc1 %s -std=c++98 -cxx-abi itanium -emit-llvm -o - -DPROTOTYPE -DINSTANTIATE | FileCheck --check-prefix=CHECK-PROTOTYPE-INSTANTIATE %s
// RUN: %clang_cc1 %s -DREDEFINE -verify
// RUN: %clang_cc1 %s -DPROTOTYPE -DREDEFINE -verify
// PR8007: friend function not instantiated, reordered version.
// Corresponds to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38392
+// CHECK: define linkonce_odr{{.*}}_ZlsR11std_ostreamRK8StreamerI3FooE
+// CHECK-PROTOTYPE: define linkonce_odr{{.*}}_ZlsR11std_ostreamRK8StreamerI3FooE
+// CHECK-INSTANTIATE: define linkonce_odr{{.*}}_ZlsR11std_ostreamRK8StreamerI3FooE
+// CHECK-PROTOTYPE-INSTANTIATE: define linkonce_odr{{.*}}_ZlsR11std_ostreamRK8StreamerI3FooE
+
struct std_ostream
{
int dummy;
Modified: cfe/trunk/test/SemaTemplate/inject-templated-friend.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/inject-templated-friend.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/inject-templated-friend.cpp (original)
+++ cfe/trunk/test/SemaTemplate/inject-templated-friend.cpp Mon Jan 13 13:48:13 2014
@@ -1,7 +1,9 @@
-// RUN: %clang %s -S -emit-llvm -o - | grep -e "define linkonce_odr.*_ZlsR11std_ostreamRK8StreamerI3FooE"
+// RUN: %clang_cc1 %s -emit-llvm -cxx-abi itanium -o - | FileCheck %s
// RUN: %clang_cc1 %s -DREDEFINE -verify
// PR8007: friend function not instantiated.
+// CHECK: define linkonce_odr{{.*}}_ZlsR11std_ostreamRK8StreamerI3FooE
+
struct std_ostream
{
int dummy;
Modified: cfe/trunk/test/SemaTemplate/instantiate-complete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/instantiate-complete.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/instantiate-complete.cpp (original)
+++ cfe/trunk/test/SemaTemplate/instantiate-complete.cpp Mon Jan 13 13:48:13 2014
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -cxx-abi itanium -fsyntax-only -verify %s
+// RUN: %clang_cc1 -cxx-abi microsoft -DMSABI -fsyntax-only -verify %s
// Tests various places where requiring a complete type involves
// instantiation of that type.
@@ -7,6 +8,9 @@ template<typename T>
struct X {
X(T);
+#ifdef MSABI
+// expected-error at +2{{data member instantiated with function type 'long (long)'}}
+#endif
T f; // expected-error{{data member instantiated with function type 'float (int)'}} \
// expected-error{{data member instantiated with function type 'int (int)'}} \
// expected-error{{data member instantiated with function type 'char (char)'}} \
@@ -40,7 +44,11 @@ void test_new() {
void test_memptr(X<long> *p1, long X<long>::*pm1,
X<long(long)> *p2,
+#ifdef MSABI
+ long (X<long(long)>::*pm2)(long)) { // expected-note{{in instantiation of template class 'X<long (long)>' requested here}}
+#else
long (X<long(long)>::*pm2)(long)) {
+#endif
(void)(p1->*pm1);
}
Modified: cfe/trunk/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp (original)
+++ cfe/trunk/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp Mon Jan 13 13:48:13 2014
@@ -1,8 +1,11 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -ftemplate-depth 16 -fcxx-exceptions -fexceptions %s
+// RUN: %clang_cc1 -fsyntax-only -verify -cxx-abi itanium -std=c++11 -ftemplate-depth 16 -fcxx-exceptions -fexceptions %s
// DR1330: an exception specification for a function template is only
// instantiated when it is needed.
+// Note: the test is Itanium-specific because it depends on key functions in the
+// PR12763 namespace.
+
template<typename T> void f1(T*) throw(T); // expected-error{{incomplete type 'Incomplete' is not allowed in exception specification}}
struct Incomplete; // expected-note{{forward}}
Modified: cfe/trunk/test/SemaTemplate/virtual-member-functions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/virtual-member-functions.cpp?rev=199130&r1=199129&r2=199130&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/virtual-member-functions.cpp (original)
+++ cfe/trunk/test/SemaTemplate/virtual-member-functions.cpp Mon Jan 13 13:48:13 2014
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -cxx-abi itanium -fsyntax-only -verify %s
+// RUN: %clang_cc1 -cxx-abi microsoft -DMSABI -fsyntax-only -verify %s
namespace PR5557 {
template <class T> struct A {
@@ -71,8 +72,13 @@ namespace PR7114 {
int f() { return B<int>::value; }
+#ifdef MSABI
+ void test_typeid(B<float>::Inner bfi) { // expected-note{{implicit destructor}}
+ (void)typeid(bfi);
+#else
void test_typeid(B<float>::Inner bfi) {
(void)typeid(bfi); // expected-note{{implicit destructor}}
+#endif
}
template<typename T>
@@ -80,7 +86,7 @@ namespace PR7114 {
void f() { }
};
- void test_X(X<int> xi, X<float> xf) {
+ void test_X(X<int> &xi, X<float> &xf) {
xi.f();
}
}
More information about the cfe-commits
mailing list