summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/borland-extensions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/borland-extensions.cpp')
-rw-r--r--test/SemaCXX/borland-extensions.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/SemaCXX/borland-extensions.cpp b/test/SemaCXX/borland-extensions.cpp
index 1e4bd45..d214473 100644
--- a/test/SemaCXX/borland-extensions.cpp
+++ b/test/SemaCXX/borland-extensions.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify -fborland-extensions
-// expected-no-diagnostics
+// RUN: %clang_cc1 %s -fsyntax-only -fborland-extensions -triple x86_64-linux-gnu -verify
+// RUN: %clang_cc1 %s -fsyntax-only -fborland-extensions -triple i686-linux-gnu -Werror
// Borland extensions
@@ -7,15 +7,21 @@
int dummy_function() { return 0; }
// 2. test __pascal
+// expected-warning@+1 {{calling convention '_pascal' ignored for this target}}
int _pascal f2();
+// expected-warning@+1 {{calling convention '__pascal' ignored for this target}}
float __pascal gi2(int, int);
+// expected-warning@+1 {{calling convention '__pascal' ignored for this target}}
template<typename T> T g2(T (__pascal * const )(int, int)) { return 0; }
struct M {
+ // expected-warning@+1 {{calling convention '__pascal' ignored for this target}}
int __pascal addP();
+ // expected-warning@+1 {{calling convention '__pascal' ignored for this target}}
float __pascal subtractP();
};
+// expected-warning@+1 {{calling convention '__pascal' ignored for this target}}
template<typename T> int h2(T (__pascal M::* const )()) { return 0; }
void m2() {
int i; float f;
@@ -28,7 +34,9 @@ void m2() {
// 3. test other calling conventions
int _cdecl fa3();
+// expected-warning@+1 {{calling convention '_fastcall' ignored for this target}}
int _fastcall fc3();
+// expected-warning@+1 {{calling convention '_stdcall' ignored for this target}}
int _stdcall fd3();
// 4. test __uuidof()
OpenPOWER on IntegriCloud