summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema')
-rw-r--r--clang/test/Sema/attr-availability-tvos.c6
-rw-r--r--clang/test/Sema/attr-availability.c4
-rw-r--r--clang/test/Sema/attr-coldhot.c4
-rw-r--r--clang/test/Sema/attr-disable-tail-calls.c4
-rw-r--r--clang/test/Sema/attr-long-call.c4
-rw-r--r--clang/test/Sema/attr-micromips.c4
-rw-r--r--clang/test/Sema/attr-notail.c4
-rw-r--r--clang/test/Sema/attr-ownership.c6
-rw-r--r--clang/test/Sema/attr-ownership.cpp4
-rw-r--r--clang/test/Sema/attr-print.c6
-rw-r--r--clang/test/Sema/attr-swiftcall.c2
-rw-r--r--clang/test/Sema/attr-target-mv.c2
-rw-r--r--clang/test/Sema/attr-visibility.c4
-rw-r--r--clang/test/Sema/internal_linkage.c4
-rw-r--r--clang/test/Sema/mips-interrupt-attr.c8
-rw-r--r--clang/test/Sema/ms_abi-sysv_abi.c4
-rw-r--r--clang/test/Sema/nullability.c4
-rw-r--r--clang/test/Sema/stdcall-fastcall.c2
18 files changed, 39 insertions, 37 deletions
diff --git a/clang/test/Sema/attr-availability-tvos.c b/clang/test/Sema/attr-availability-tvos.c
index 4f8c4588ec9..68337e49ce4 100644
--- a/clang/test/Sema/attr-availability-tvos.c
+++ b/clang/test/Sema/attr-availability-tvos.c
@@ -27,8 +27,10 @@ void test_transcribed_availability() {
f9(0);
}
-__attribute__((availability(ios,introduced=9_0,deprecated=9_0,message="" ))) // expected-warning 2{{availability does not match previous declaration}}
-__attribute__((availability(ios,introduced=7_0))) // expected-note 2{{previous attribute is here}}
+__attribute__((availability(ios,introduced=9_0,deprecated=9_0,message="" ))) // expected-note{{previous attribute is here}} \
+ // expected-note{{previous attribute is here}}
+__attribute__((availability(ios,introduced=7_0))) // expected-warning{{availability does not match previous declaration}} \
+ // expected-warning{{availability does not match previous declaration}}
void f10(int);
// Test tvOS specific attributes.
diff --git a/clang/test/Sema/attr-availability.c b/clang/test/Sema/attr-availability.c
index 4a266382529..1b8cbd256ce 100644
--- a/clang/test/Sema/attr-availability.c
+++ b/clang/test/Sema/attr-availability.c
@@ -64,8 +64,8 @@ enum {
void f4(int) __attribute__((availability(ios,deprecated=3.0)));
void f4(int) __attribute__((availability(ios,introduced=4.0))); // expected-warning {{feature cannot be deprecated in iOS version 3.0 before it was introduced in version 4.0; attribute ignored}}
-void f5(int) __attribute__((availability(ios,deprecated=3.0), // expected-warning {{feature cannot be deprecated in iOS version 3.0 before it was introduced in version 4.0; attribute ignored}}
- availability(ios,introduced=4.0)));
+void f5(int) __attribute__((availability(ios,deprecated=3.0),
+ availability(ios,introduced=4.0))); // expected-warning {{feature cannot be deprecated in iOS version 3.0 before it was introduced in version 4.0; attribute ignored}}
void f6(int) __attribute__((availability(ios,deprecated=3.0))); // expected-note {{previous attribute is here}}
void f6(int) __attribute__((availability(ios,deprecated=4.0))); // expected-warning {{availability does not match previous declaration}}
diff --git a/clang/test/Sema/attr-coldhot.c b/clang/test/Sema/attr-coldhot.c
index a4b15822065..972f5a5266a 100644
--- a/clang/test/Sema/attr-coldhot.c
+++ b/clang/test/Sema/attr-coldhot.c
@@ -6,7 +6,7 @@ int bar() __attribute__((__cold__));
int var1 __attribute__((__cold__)); // expected-warning{{'__cold__' attribute only applies to functions}}
int var2 __attribute__((__hot__)); // expected-warning{{'__hot__' attribute only applies to functions}}
-int qux() __attribute__((__hot__)) __attribute__((__cold__)); // expected-error{{'__cold__' and 'hot' attributes are not compatible}} \
+int qux() __attribute__((__hot__)) __attribute__((__cold__)); // expected-error{{'__hot__' and 'cold' attributes are not compatible}} \
// expected-note{{conflicting attribute is here}}
-int baz() __attribute__((__cold__)) __attribute__((__hot__)); // expected-error{{'__hot__' and 'cold' attributes are not compatible}} \
+int baz() __attribute__((__cold__)) __attribute__((__hot__)); // expected-error{{'__cold__' and 'hot' attributes are not compatible}} \
// expected-note{{conflicting attribute is here}}
diff --git a/clang/test/Sema/attr-disable-tail-calls.c b/clang/test/Sema/attr-disable-tail-calls.c
index 0545e951e60..e8f5bcc73ee 100644
--- a/clang/test/Sema/attr-disable-tail-calls.c
+++ b/clang/test/Sema/attr-disable-tail-calls.c
@@ -1,10 +1,10 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-void __attribute__((disable_tail_calls,naked)) foo1(int a) { // expected-error {{'naked' and 'disable_tail_calls' attributes are not compatible}} expected-note {{conflicting attribute is here}}
+void __attribute__((disable_tail_calls,naked)) foo1(int a) { // expected-error {{'disable_tail_calls' and 'naked' attributes are not compatible}} expected-note {{conflicting attribute is here}}
__asm__("");
}
-void __attribute__((naked,disable_tail_calls)) foo2(int a) { // expected-error {{'disable_tail_calls' and 'naked' attributes are not compatible}} expected-note {{conflicting attribute is here}}
+void __attribute__((naked,disable_tail_calls)) foo2(int a) { // expected-error {{'naked' and 'disable_tail_calls' attributes are not compatible}} expected-note {{conflicting attribute is here}}
__asm__("");
}
diff --git a/clang/test/Sema/attr-long-call.c b/clang/test/Sema/attr-long-call.c
index e80f8fdd52a..cd3de1bf9e4 100644
--- a/clang/test/Sema/attr-long-call.c
+++ b/clang/test/Sema/attr-long-call.c
@@ -19,8 +19,8 @@ __attribute((near)) void foo6();
__attribute((long_call, far)) void foo7();
__attribute((short_call, near)) void foo11();
-__attribute((far, near)) void foo8(); // expected-error {{'near' and 'far' attributes are not compatible}} \
+__attribute((far, near)) void foo8(); // expected-error {{'far' and 'near' attributes are not compatible}} \
// expected-note {{conflicting attribute is here}}
-__attribute((short_call, long_call)) void foo12(); // expected-error {{'long_call' and 'short_call' attributes are not compatible}} \
+__attribute((short_call, long_call)) void foo12(); // expected-error {{'short_call' and 'long_call' attributes are not compatible}} \
// expected-note {{conflicting attribute is here}}
diff --git a/clang/test/Sema/attr-micromips.c b/clang/test/Sema/attr-micromips.c
index 27c9d3b54f6..fe587fa3db0 100644
--- a/clang/test/Sema/attr-micromips.c
+++ b/clang/test/Sema/attr-micromips.c
@@ -6,9 +6,9 @@ __attribute__((micromips(1))) void foo2(); // expected-error {{'micromips' at
__attribute((nomicromips)) int a; // expected-error {{attribute only applies to functions}}
__attribute((micromips)) int b; // expected-error {{attribute only applies to functions}}
-__attribute__((micromips,mips16)) void foo5(); // expected-error {{'mips16' and 'micromips' attributes are not compatible}} \
+__attribute__((micromips,mips16)) void foo5(); // expected-error {{'micromips' and 'mips16' attributes are not compatible}} \
// expected-note {{conflicting attribute is here}}
-__attribute__((mips16,micromips)) void foo6(); // expected-error {{'micromips' and 'mips16' attributes are not compatible}} \
+__attribute__((mips16,micromips)) void foo6(); // expected-error {{'mips16' and 'micromips' attributes are not compatible}} \
// expected-note {{conflicting attribute is here}}
__attribute((micromips)) void foo7();
diff --git a/clang/test/Sema/attr-notail.c b/clang/test/Sema/attr-notail.c
index f65af47518d..4d05fcf6f2c 100644
--- a/clang/test/Sema/attr-notail.c
+++ b/clang/test/Sema/attr-notail.c
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-int callee0() __attribute__((not_tail_called,always_inline)); // expected-error{{'always_inline' and 'not_tail_called' attributes are not compatible}} \
+int callee0() __attribute__((not_tail_called,always_inline)); // expected-error{{'not_tail_called' and 'always_inline' attributes are not compatible}} \
// expected-note{{conflicting attribute is here}}
-int callee1() __attribute__((always_inline,not_tail_called)); // expected-error{{'not_tail_called' and 'always_inline' attributes are not compatible}} \
+int callee1() __attribute__((always_inline,not_tail_called)); // expected-error{{'always_inline' and 'not_tail_called' attributes are not compatible}} \
// expected-note{{conflicting attribute is here}}
int foo(int a) {
diff --git a/clang/test/Sema/attr-ownership.c b/clang/test/Sema/attr-ownership.c
index 5ce758d9f4a..ff6c7197df8 100644
--- a/clang/test/Sema/attr-ownership.c
+++ b/clang/test/Sema/attr-ownership.c
@@ -16,11 +16,11 @@ void *f11(float i) __attribute__((ownership_returns(foo, 1))); // expected-erro
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_takes' and 'ownership_holds' attributes are not compatible}}
+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}}
void f15(int, int)
- __attribute__((ownership_returns(foo, 1))) // expected-error {{'ownership_returns' attribute index does not match; here it is 1}}
- __attribute__((ownership_returns(foo, 2))); // expected-note {{declared with index 2 here}}
+ __attribute__((ownership_returns(foo, 1))) // expected-note {{declared with index 1 here}}
+ __attribute__((ownership_returns(foo, 2))); // expected-error {{'ownership_returns' attribute index does not match; here it is 2}}
void f16(int *i, int *j) __attribute__((ownership_holds(foo, 1))) __attribute__((ownership_holds(foo, 1))); // OK, same index
void f17(void*) __attribute__((ownership_takes(__, 1)));
void f18() __attribute__((ownership_takes(foo, 1))); // expected-warning {{'ownership_takes' attribute only applies to non-K&R-style functions}}
diff --git a/clang/test/Sema/attr-ownership.cpp b/clang/test/Sema/attr-ownership.cpp
index 7381285e2da..cde195ff0aa 100644
--- a/clang/test/Sema/attr-ownership.cpp
+++ b/clang/test/Sema/attr-ownership.cpp
@@ -2,6 +2,6 @@
class C {
void f(int, int)
- __attribute__((ownership_returns(foo, 2))) // expected-error {{'ownership_returns' attribute index does not match; here it is 2}}
- __attribute__((ownership_returns(foo, 3))); // expected-note {{declared with index 3 here}}
+ __attribute__((ownership_returns(foo, 2))) // expected-note {{declared with index 2 here}}
+ __attribute__((ownership_returns(foo, 3))); // expected-error {{'ownership_returns' attribute index does not match; here it is 3}}
};
diff --git a/clang/test/Sema/attr-print.c b/clang/test/Sema/attr-print.c
index 645b8bc3e7c..16b440d5d73 100644
--- a/clang/test/Sema/attr-print.c
+++ b/clang/test/Sema/attr-print.c
@@ -24,13 +24,13 @@ int * __ptr64 p64;
// TODO: the Type Printer has no way to specify the order to print attributes
// in, and so it currently always prints them in reverse order. Fix this.
-// CHECK: int * __uptr __ptr32 p32_2;
+// CHECK: int * __ptr32 __uptr p32_2;
int * __uptr __ptr32 p32_2;
-// CHECK: int * __sptr __ptr64 p64_2;
+// CHECK: int * __ptr64 __sptr p64_2;
int * __sptr __ptr64 p64_2;
-// CHECK: int * __uptr __ptr32 p32_3;
+// CHECK: int * __ptr32 __uptr p32_3;
int * __uptr __ptr32 p32_3;
// CHECK: int * __sptr * __ptr32 ppsp32;
diff --git a/clang/test/Sema/attr-swiftcall.c b/clang/test/Sema/attr-swiftcall.c
index 77cf1b314d4..0323f059bab 100644
--- a/clang/test/Sema/attr-swiftcall.c
+++ b/clang/test/Sema/attr-swiftcall.c
@@ -9,7 +9,7 @@
int notAFunction SWIFTCALL; // expected-warning {{'swiftcall' only applies to function types; type here is 'int'}}
void variadic(int x, ...) SWIFTCALL; // expected-error {{variadic function cannot use swiftcall calling convention}}
void unprototyped() SWIFTCALL; // expected-error {{function with no prototype cannot use the swiftcall calling convention}}
-void multiple_ccs(int x) SWIFTCALL __attribute__((vectorcall)); // expected-error {{swiftcall and vectorcall attributes are not compatible}}
+void multiple_ccs(int x) SWIFTCALL __attribute__((vectorcall)); // expected-error {{vectorcall and swiftcall attributes are not compatible}}
void (*functionPointer)(void) SWIFTCALL;
void indirect_result_nonswift(INDIRECT_RESULT void *out); // expected-error {{'swift_indirect_result' parameter can only be used with swiftcall calling convention}}
diff --git a/clang/test/Sema/attr-target-mv.c b/clang/test/Sema/attr-target-mv.c
index e65f6486fb5..671adff5b04 100644
--- a/clang/test/Sema/attr-target-mv.c
+++ b/clang/test/Sema/attr-target-mv.c
@@ -95,7 +95,7 @@ void __attribute__((target("arch=sandybridge"))) addtl_attrs4(void);
void __attribute__((used,target("arch=ivybridge"))) addtl_attrs4(void);
int __attribute__((target("sse4.2"))) diff_cc(void);
-// expected-error@+1 {{attribute 'target' multiversioning cannot be combined with other attributes}}
+// expected-error@+1 {{multiversioned function declaration has a different calling convention}}
__vectorcall int __attribute__((target("arch=sandybridge"))) diff_cc(void);
int __attribute__((target("sse4.2"))) diff_ret(void);
diff --git a/clang/test/Sema/attr-visibility.c b/clang/test/Sema/attr-visibility.c
index 798d6dcd78f..ed52ec2743f 100644
--- a/clang/test/Sema/attr-visibility.c
+++ b/clang/test/Sema/attr-visibility.c
@@ -15,8 +15,8 @@ struct test5;
struct __attribute__((visibility("hidden"))) test5; // expected-note {{previous attribute is here}}
struct __attribute__((visibility("default"))) test5; // expected-error {{visibility does not match previous declaration}}
-void test6() __attribute__((visibility("default"), // expected-error {{visibility does not match previous declaration}}
- visibility("hidden"))); // expected-note {{previous attribute is here}}
+void test6() __attribute__((visibility("hidden"), // expected-note {{previous attribute is here}}
+ visibility("default"))); // expected-error {{visibility does not match previous declaration}}
extern int test7 __attribute__((visibility("default"))); // expected-note {{previous attribute is here}}
extern int test7 __attribute__((visibility("hidden"))); // expected-error {{visibility does not match previous declaration}}
diff --git a/clang/test/Sema/internal_linkage.c b/clang/test/Sema/internal_linkage.c
index cc8039acd27..57315d826e2 100644
--- a/clang/test/Sema/internal_linkage.c
+++ b/clang/test/Sema/internal_linkage.c
@@ -1,9 +1,9 @@
// RUN: %clang_cc1 -fsyntax-only -verify -fdouble-square-bracket-attributes %s
int var __attribute__((internal_linkage));
-int var2 __attribute__((internal_linkage,common)); // expected-error{{'common' and 'internal_linkage' attributes are not compatible}} \
+int var2 __attribute__((internal_linkage,common)); // expected-error{{'internal_linkage' and 'common' attributes are not compatible}} \
// expected-note{{conflicting attribute is here}}
-int var3 __attribute__((common,internal_linkage)); // expected-error{{'internal_linkage' and 'common' attributes are not compatible}} \
+int var3 __attribute__((common,internal_linkage)); // expected-error{{'common' and 'internal_linkage' attributes are not compatible}} \
// expected-note{{conflicting attribute is here}}
int var4 __attribute__((common)); // expected-error{{'common' and 'internal_linkage' attributes are not compatible}} \
diff --git a/clang/test/Sema/mips-interrupt-attr.c b/clang/test/Sema/mips-interrupt-attr.c
index 7c5c9ddab5d..17344b6edcf 100644
--- a/clang/test/Sema/mips-interrupt-attr.c
+++ b/clang/test/Sema/mips-interrupt-attr.c
@@ -19,11 +19,11 @@ __attribute__((interrupt(""))) void food() {}
__attribute__((interrupt)) int foob() {return 0;} // expected-warning {{MIPS 'interrupt' attribute only applies to functions that have a 'void' return type}}
__attribute__((interrupt())) void fooc(int a) {} // expected-warning {{MIPS 'interrupt' attribute only applies to functions that have no parameters}}
-__attribute__((interrupt,mips16)) void fooe() {} // expected-error {{'mips16' and 'interrupt' attributes are not compatible}} \
+__attribute__((interrupt,mips16)) void fooe() {} // expected-error {{'interrupt' and 'mips16' attributes are not compatible}} \
// expected-note {{conflicting attribute is here}}
-__attribute__((mips16,interrupt)) void foof() {} // expected-error {{'interrupt' and 'mips16' attributes are not compatible}} \
+__attribute__((mips16,interrupt)) void foof() {} // expected-error {{'mips16' and 'interrupt' attributes are not compatible}} \
// expected-note {{conflicting attribute is here}}
-__attribute__((interrupt)) __attribute__ ((mips16)) void foo10() {} // expected-error {{'mips16' and 'interrupt' attributes are not compatible}} \
+__attribute__((interrupt)) __attribute__ ((mips16)) void foo10() {} // expected-error {{'interrupt' and 'mips16' attributes are not compatible}} \
// expected-note {{conflicting attribute is here}}
-__attribute__((mips16)) __attribute ((interrupt)) void foo11() {} // expected-error {{'interrupt' and 'mips16' attributes are not compatible}} \
+__attribute__((mips16)) __attribute ((interrupt)) void foo11() {} // expected-error {{'mips16' and 'interrupt' attributes are not compatible}} \
// expected-note {{conflicting attribute is here}}
diff --git a/clang/test/Sema/ms_abi-sysv_abi.c b/clang/test/Sema/ms_abi-sysv_abi.c
index e97914d7dd7..35a5fad9ceb 100644
--- a/clang/test/Sema/ms_abi-sysv_abi.c
+++ b/clang/test/Sema/ms_abi-sysv_abi.c
@@ -6,9 +6,9 @@ int __attribute__((sysv_abi)) var2; // expected-warning{{'sysv_abi' only applies
// Different CC qualifiers are not compatible
// FIXME: Should say 'sysv_abi' instead of 'cdecl'
-void __attribute__((ms_abi, sysv_abi)) foo3(void); // expected-error{{ms_abi and cdecl attributes are not compatible}}
+void __attribute__((ms_abi, sysv_abi)) foo3(void); // expected-error{{cdecl and ms_abi attributes are not compatible}}
void __attribute__((ms_abi)) foo4(); // expected-note{{previous declaration is here}}
void __attribute__((sysv_abi)) foo4(void); // expected-error{{function declared 'cdecl' here was previously declared 'ms_abi'}}
-void bar(int i, int j) __attribute__((ms_abi, cdecl)); // expected-error{{ms_abi and cdecl attributes are not compatible}}
+void bar(int i, int j) __attribute__((ms_abi, cdecl)); // expected-error{{cdecl and ms_abi attributes are not compatible}}
void bar2(int i, int j) __attribute__((sysv_abi, cdecl)); // no-error
diff --git a/clang/test/Sema/nullability.c b/clang/test/Sema/nullability.c
index cc251257e4e..a0247e5af8b 100644
--- a/clang/test/Sema/nullability.c
+++ b/clang/test/Sema/nullability.c
@@ -20,8 +20,8 @@ typedef int * _Null_unspecified null_unspecified_int_ptr;
typedef int * _Nonnull _Nonnull redundant_1; // expected-warning{{duplicate nullability specifier '_Nonnull'}}
// Conflicting nullability type specifiers.
-typedef int *_Nonnull _Nullable conflicting_1; // expected-error{{nullability specifier '_Nullable' conflicts with existing specifier '_Nonnull'}}
-typedef int *_Null_unspecified _Nonnull conflicting_2; // expected-error{{nullability specifier '_Nonnull' conflicts with existing specifier '_Null_unspecified'}}
+typedef int * _Nonnull _Nullable conflicting_1; // expected-error{{nullability specifier '_Nonnull' conflicts with existing specifier '_Nullable'}}
+typedef int * _Null_unspecified _Nonnull conflicting_2; // expected-error{{nullability specifier '_Null_unspecified' conflicts with existing specifier '_Nonnull'}}
// Redundant nullability specifiers via a typedef are okay.
typedef nonnull_int_ptr _Nonnull redundant_okay_1;
diff --git a/clang/test/Sema/stdcall-fastcall.c b/clang/test/Sema/stdcall-fastcall.c
index e011b45518c..256f5588e6d 100644
--- a/clang/test/Sema/stdcall-fastcall.c
+++ b/clang/test/Sema/stdcall-fastcall.c
@@ -5,7 +5,7 @@ int __attribute__((stdcall)) var1; // expected-warning{{'stdcall' only applies t
int __attribute__((fastcall)) var2; // expected-warning{{'fastcall' only applies to function types; type here is 'int'}}
// Different CC qualifiers are not compatible
-void __attribute__((stdcall, fastcall)) foo3(void); // expected-error{{stdcall and fastcall attributes are not compatible}}
+void __attribute__((stdcall, fastcall)) foo3(void); // expected-error{{fastcall and stdcall attributes are not compatible}}
void __attribute__((stdcall)) foo4(); // expected-note{{previous declaration is here}} expected-warning{{function with no prototype cannot use the stdcall calling convention}}
void __attribute__((fastcall)) foo4(void); // expected-error{{function declared 'fastcall' here was previously declared 'stdcall'}}
OpenPOWER on IntegriCloud