Skip to content

Commit befa5f3

Browse files
committed
[Clang] Update error messages, changed upstream
1 parent ae877e2 commit befa5f3

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

clang/test/BoundsSafety/Sema/attributes_in_template_decls_attr_only_mode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,9 @@ class RefParamMustBePtrBadPartialU : public RefParamMustBePtrBadPartialBase<int*
373373
template <class V>
374374
class RefParamMustBePtrBadPartialV : public RefParamMustBePtrBadPartialBase<int, int, V> {
375375
public:
376-
int __single ptr2; // expected-error{{'__single' attribute only applies to pointer arguments}}
376+
int __single ptr2; // expected-error{{'__single__' attribute only applies to pointer arguments}}
377377
typeof(RefParamMustBePtrGoodPartialBase<int, int, V>::ptr0) ptr3;
378-
int __single another_method() { return ptr2; } // expected-error{{'__single' attribute only applies to pointer arguments}}
378+
int __single another_method() { return ptr2; } // expected-error{{'__single__' attribute only applies to pointer arguments}}
379379
V __single other; // no error
380380
};
381381

clang/test/BoundsSafety/Sema/complex-typespecs-with-bounds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct S {
1919
};
2020

2121
void typeofexprs(struct S s) {
22-
// expected-error@+1{{'__single' attribute only applies to pointer arguments}}
22+
// expected-error@+1{{'__single__' attribute only applies to pointer arguments}}
2323
typeof(foo) __single p1;
2424
// expected-error@+1{{initializing 'typeof (foo())' (aka 'char *__single') with an expression of incompatible type 'char * _Nullable' casts away '__unsafe_indexable' qualifier; use '__unsafe_forge_single' or '__unsafe_forge_bidi_indexable' to perform this conversion}}
2525
typeof(foo()) __single p2 = foo();

clang/test/BoundsSafety/Sema/terminated-by-attr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
void term(int val) {
99
char a1[__terminated_by(0)] = "";
1010
char a2[__terminated_by(0x40 + 1)] = {'A'};
11-
char a3[__terminated_by(val)] = ""; // expected-error{{'__terminated_by' attribute requires an integer constant}}
11+
char a3[__terminated_by(val)] = ""; // expected-error{{'__terminated_by__' attribute requires an integer constant}}
1212
}
1313

1414
void multiple_attrs(void) {

clang/test/BoundsSafety/Sema/unsafe-late-const.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
unsigned global_data_const __unsafe_late_const;
1313
void *global_data_const2 __unsafe_late_const;
1414

15-
// expected-error@+2{{'__unsafe_late_const' attribute only applies to global variables}}
16-
// expected-error@+2{{'__unsafe_late_const' attribute only applies to global variables}}
15+
// expected-error@+2{{'__unsafe_late_const__' attribute only applies to global variables}}
16+
// expected-error@+2{{'__unsafe_late_const__' attribute only applies to global variables}}
1717
void __unsafe_late_const
1818
test(int param __unsafe_late_const) {
1919
static long static_local __unsafe_late_const;
20-
// expected-error@+1{{'__unsafe_late_const' attribute only applies to global variables}}
20+
// expected-error@+1{{'__unsafe_late_const__' attribute only applies to global variables}}
2121
int local __unsafe_late_const;
2222
}

clang/test/Frontend/macro_defined_type.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -I%S/Inputs -fsyntax-only -verify -triple x86_64-linux-gnu %s
1+
warn-thread-safety-parsing.cpp// RUN: %clang_cc1 -I%S/Inputs -fsyntax-only -verify -triple x86_64-linux-gnu %s
22

33
#include <macro_defined_type.h>
44

@@ -33,7 +33,7 @@ struct A {
3333
};
3434

3535
struct A_system_macro {
36-
_SYS_LIBCPP_FLOAT_ABI int operator()() throw(); // expected-warning{{'_SYS_LIBCPP_FLOAT_ABI' calling convention is not supported for this target}}
36+
_SYS_LIBCPP_FLOAT_ABI int operator()() throw(); // expected-warning{{'pcs' calling convention is not supported for this target}}
3737
};
3838

3939
// Added test for fix for PR43315

clang/test/SemaCXX/warn-thread-safety-parsing.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,14 +361,14 @@ int gb_testfn(int y){
361361
}
362362

363363
void gb_function_sys_macro() _SYS_GUARDED_BY(mu1); // \
364-
// expected-warning {{'_SYS_GUARDED_BY' attribute only applies to}}
364+
// expected-warning {{'pcs' attribute only applies to}}
365365

366366
void gb_function_params_sys_macro(int gv_lvar _SYS_GUARDED_BY(mu1)); // \
367-
// expected-warning {{'_SYS_GUARDED_BY' attribute only applies to}}
367+
// expected-warning {{'pcs' attribute only applies to}}
368368

369369
int gb_testfn_sys_macro(int y){
370370
int x _SYS_GUARDED_BY(mu1) = y; // \
371-
// expected-warning {{'_SYS_GUARDED_BY' attribute only applies to}}
371+
// expected-warning {{'pcs' attribute only applies to}}
372372
return x;
373373
}
374374

0 commit comments

Comments
 (0)