Skip to content

Commit 437441a

Browse files
committed
Fix diagnostic message
1 parent 50068f2 commit 437441a

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
@@ -8765,7 +8765,8 @@ def err_expected_callable_argument : Error<
87658765
def note_building_builtin_dump_struct_call : Note<
87668766
"in call to printing function with arguments '(%0)' while dumping struct">;
87678767
def err_builtin_verbose_trap_arg : Error<
8768-
"argument to __builtin_verbose_trap must be a non-empty string literal">;
8768+
"argument to __builtin_verbose_trap must be a pointer to a non-empty constant "
8769+
"string">;
87698770

87708771
def err_atomic_load_store_uses_lib : Error<
87718772
"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)