Skip to content

Commit 0879a5f

Browse files
committed
Address punctuation and layout of diagnostics
1 parent 07b6275 commit 0879a5f

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,21 +1028,22 @@ def err_ptrauth_indirect_goto_addrlabel_arithmetic : Error<
10281028

10291029
// __ptrauth qualifier
10301030
def err_ptrauth_qualifier_invalid : Error<
1031-
"%select{return type|parameter type|property}1 may not be qualified with '__ptrauth'; type is %0">;
1031+
"%select{return type|parameter type|property}1 may not be qualified with "
1032+
"'__ptrauth'; type is %0">;
10321033
def err_ptrauth_qualifier_cast : Error<
10331034
"cannot cast to '__ptrauth'-qualified type %0">;
1034-
def err_ptrauth_qualifier_invalid_target
1035-
: Error<"'__ptrauth' qualifier only applies to pointer or pointer sized "
1036-
"integer"
1037-
" types; %0 is invalid">;
1038-
def err_ptrauth_qualifier_redundant
1039-
: Error<"type %0 is already __ptrauth-qualified">;
1035+
def err_ptrauth_qualifier_invalid_target : Error<
1036+
"'__ptrauth' qualifier only applies to pointer or pointer sized integer "
1037+
"types; %0 is invalid">;
1038+
def err_ptrauth_qualifier_redundant: Error<
1039+
"type %0 is already '__ptrauth'-qualified">;
10401040
def err_ptrauth_arg_not_ice : Error<
10411041
"argument to '__ptrauth' must be an integer constant expression">;
10421042
def err_ptrauth_address_discrimination_invalid : Error<
10431043
"invalid address discrimination flag '%0'; '__ptrauth' requires '0' or '1'">;
10441044
def err_ptrauth_extra_discriminator_invalid : Error<
1045-
"invalid extra discriminator flag '%0'; '__ptrauth' requires a value between '0' and '%1'">;
1045+
"invalid extra discriminator flag '%0'; '__ptrauth' requires a value between "
1046+
"'0' and '%1'">;
10461047

10471048
/// main()
10481049
// static main() is not an error in C, just in C++.

clang/test/Sema/ptrauth-qualifier.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ __ptrauth(INVALID_KEY) int invalid2; // expected-error{{200 does not identify a
2727
__ptrauth(VALID_DATA_KEY) int invalid3; // expected-error {{'__ptrauth' qualifier only applies to pointer or pointer sized integer types; 'int' is invalid}}
2828
__ptrauth(VALID_DATA_KEY) int *invalid4; // expected-error {{'__ptrauth' qualifier only applies to pointer or pointer sized integer types; 'int' is invalid}}
2929
int * (__ptrauth(VALID_DATA_KEY) invalid5); // expected-error{{expected identifier or '('}} expected-error{{expected ')'}} expected-note {{to match this '('}}
30-
int *__ptrauth(VALID_DATA_KEY) __ptrauth(VALID_DATA_KEY) invalid6; // expected-error{{type 'int *__ptrauth(2,0,0)' is already __ptrauth-qualified}}
30+
int *__ptrauth(VALID_DATA_KEY) __ptrauth(VALID_DATA_KEY) invalid6; // expected-error{{type 'int *__ptrauth(2,0,0)' is already '__ptrauth'-qualified}}
3131
int * __ptrauth(VALID_DATA_KEY, 2) invalid7; // expected-error {{invalid address discrimination flag '2'; '__ptrauth' requires '0' or '1'}}
3232
int * __ptrauth(VALID_DATA_KEY, -1) invalid8; // expected-error {{invalid address discrimination flag '-1'; '__ptrauth' requires '0' or '1'}}
3333
int * __ptrauth(VALID_DATA_KEY, 1, -1) invalid9; // expected-error {{invalid extra discriminator flag '-1'; '__ptrauth' requires a value between '0' and '65535'}}

clang/test/SemaCXX/ptrauth-template-parameters.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
template <typename T> struct G {
55
T __ptrauth(0,0,1234) test;
6-
// expected-error@-1 2 {{type '__ptrauth(0,0,1234) T' is already __ptrauth-qualified}}
6+
// expected-error@-1 2 {{type '__ptrauth(0,0,1234) T' is already '__ptrauth'-qualified}}
77
};
88

99
template <typename T> struct Indirect {

0 commit comments

Comments
 (0)