Skip to content

Commit fe16bf1

Browse files
Reword diagnostic
1 parent 654b959 commit fe16bf1

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10355,7 +10355,7 @@ def warn_format_bool_as_character : Warning<
1035510355
InGroup<Format>;
1035610356
def note_format_string_defined : Note<"format string is defined here">;
1035710357
def note_format_string_evaluated_to : Note<
10358-
"format string resolved to a constant string">;
10358+
"format string computed from non-literal expression">;
1035910359
def note_format_fix_specifier : Note<"did you mean to use '%0'?">;
1036010360
def note_printf_c_str: Note<"did you mean to call the %0 method?">;
1036110361
def note_format_security_fixit: Note<

clang/lib/Sema/SemaChecking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6492,7 +6492,7 @@ EvaluateStringAndCreateLiteral(Sema &S, const Expr *E, const StringLiteral *&SL,
64926492
if (SER->getStringLiteral(SL, Offset))
64936493
return SLCER_Evaluated;
64946494

6495-
// Otherwise, lop that string into a scratch buffer, create a string literal
6495+
// Otherwise, plop that string into a scratch buffer, create a string literal
64966496
// and then go with that.
64976497
std::unique_ptr<llvm::MemoryBuffer> MemBuf;
64986498
{

clang/test/Sema/format-strings.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wformat-nonliteral -isystem %S/Inputs -triple=x86_64-unknown-fuchsia %s
44
// RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wformat-nonliteral -isystem %S/Inputs -triple=x86_64-linux-android %s
55

6-
// expected-note@-5{{format string was constant-evaluated}}
6+
// expected-note@-5{{format string computed from non-literal expression}}
77
// ^^^ there will be a <scratch space> SourceLocation caused by the
88
// test_consteval_init_array test, that -verify treats as if it showed up at
99
// line 1 of this file.

clang/test/SemaCXX/format-strings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// RUN: %clang_cc1 -fsyntax-only -verify -Wformat-nonliteral -Wformat-non-iso -Wformat-pedantic -fblocks -std=c++20 %s
55

66
#if __cplusplus >= 202000l
7-
// expected-note@-6{{format string was constant-evaluated}}
7+
// expected-note@-6{{format string computed from non-literal expression}}
88
// ^^^ there will be a <scratch space> SourceLocation caused by the
99
// test_constexpr_string test, that -verify treats as if it showed up at
1010
// line 1 of this file.

0 commit comments

Comments
 (0)