Skip to content

Commit 3e54bf3

Browse files
committed
Fix diagnostic message
1 parent 6c65805 commit 3e54bf3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8795,7 +8795,8 @@ def err_expected_callable_argument : Error<
87958795
def note_building_builtin_dump_struct_call : Note<
87968796
"in call to printing function with arguments '(%0)' while dumping struct">;
87978797
def err_builtin_verbose_trap_arg : Error<
8798-
"argument to __builtin_verbose_trap must be a non-empty string literal">;
8798+
"argument to __builtin_verbose_trap must be a pointer to a non-empty constant "
8799+
"string">;
87998800

88008801
def err_atomic_load_store_uses_lib : Error<
88018802
"atomic %select{load|store}0 requires runtime support that is not "

clang/test/SemaCXX/verbose-trap.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ void f(const char * arg) {
1414
__builtin_verbose_trap("hello" "world");
1515
__builtin_verbose_trap(constMsg1);
1616
__builtin_verbose_trap(constMsg2);
17-
__builtin_verbose_trap(""); // expected-error {{argument to __builtin_verbose_trap must be a non-empty string literal}}
17+
__builtin_verbose_trap(""); // expected-error {{argument to __builtin_verbose_trap must be a pointer to a non-empty constant string}}
1818
__builtin_verbose_trap(); // expected-error {{too few arguments}}
19-
__builtin_verbose_trap(0); // expected-error {{argument to __builtin_verbose_trap must be a non-empty string literal}}
19+
__builtin_verbose_trap(0); // expected-error {{argument to __builtin_verbose_trap must be a pointer to a non-empty constant string}}
2020
__builtin_verbose_trap(1); // expected-error {{cannot initialize a parameter of type 'const char *' with}}
21-
__builtin_verbose_trap(arg); // expected-error {{argument to __builtin_verbose_trap must be a non-empty string literal}}
21+
__builtin_verbose_trap(arg); // expected-error {{argument to __builtin_verbose_trap must be a pointer to a non-empty constant string}}
2222
__builtin_verbose_trap(str);
2323
__builtin_verbose_trap(u8"hello");
2424
}

0 commit comments

Comments
 (0)