Skip to content

Commit

Permalink
Fix typos for diagnosis
Browse files Browse the repository at this point in the history
  • Loading branch information
v01dxyz committed Dec 14, 2024
1 parent 5c89ebb commit 0524125
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions clang/include/clang/Basic/DiagnosticSemaKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -2337,11 +2337,11 @@ def note_in_reference_temporary_list_initializer : Note<
def note_var_fixit_add_initialization : Note<
"initialize the variable %0 to silence this warning">;
def warn_cheri_compartment_void_return_type : Warning <
"void return on a cross-compartment call make it impossible for callers to detect failure">,
"void return on a cross-compartment call makes it impossible for callers to detect failure">,
InGroup<CHERICompartmentReturnVoid>;
def note_cheri_compartment_void_return_type : Note<"replace void return type with int">;
def warn_cheri_compartment_return_void_or_falloff : Warning <
"Cross-compartement calls that always succeed should return 0 instead">,
"cross-compartement calls that always succeed should return 0 instead">,
InGroup<CHERICompartmentReturnVoid>;
def note_uninit_fixit_remove_cond : Note<
"remove the %select{'%1' if its condition|condition if it}0 "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
//

// -fdiagnostics-fixit-info
__attribute__((cheri_compartment("example"))) void void_return_type_f(int a) // expected-warning{{void return on a cross-compartment call make it impossible for callers to detect failure}} expected-note{{replace void return type with int}}
__attribute__((cheri_compartment("example"))) void void_return_type_f(int a) // expected-warning{{void return on a cross-compartment call makes it impossible for callers to detect failure}} expected-note{{replace void return type with int}}
{
if (a) {
/// CHECK: fix-it:"{{.*}}":{[[@LINE+1]]:[[COL:[0-9]+]]-[[@LINE+1]]:[[COL]]}:" 0"
return; // expected-warning{{Cross-compartement calls that always succeed should return 0 instead}}
return; // expected-warning{{cross-compartement calls that always succeed should return 0 instead}}
}
} // expected-warning{{Cross-compartement calls that always succeed should return 0 instead}}
} // expected-warning{{cross-compartement calls that always succeed should return 0 instead}}

__attribute__((cheri_compartment("example"))) int int_return_type_f() {
return 0;
Expand Down

0 comments on commit 0524125

Please sign in to comment.