summaryrefslogtreecommitdiff
path: root/clang/include
diff options
context:
space:
mode:
authorTakuya Shimizu <shimizu2486@gmail.com>2023-05-16 21:37:08 +0900
committerTakuya Shimizu <shimizu2486@gmail.com>2023-05-16 21:49:57 +0900
commit0e167fc0a2147c9b673b8afd5fea001b0d127781 (patch)
treec62543eb0af8a264251dbb4a8326c0eec8ca0a0b /clang/include
parentb5f2bc2ddfaafa8b5230af4a7dda6d6f441b8722 (diff)
downloadllvm-0e167fc0a2147c9b673b8afd5fea001b0d127781.tar.gz
[clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables
This patch improves the diagnostic on uninitialized subobjects in constexpr variables by modifying the diagnostic message to display the subobject's name instead of its type. Fixes https://github.com/llvm/llvm-project/issues/58601 Differential Revision: https://reviews.llvm.org/D146358
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/Basic/DiagnosticASTKinds.td2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/include/clang/Basic/DiagnosticASTKinds.td b/clang/include/clang/Basic/DiagnosticASTKinds.td
index c283ee842e73..eb1346731796 100644
--- a/clang/include/clang/Basic/DiagnosticASTKinds.td
+++ b/clang/include/clang/Basic/DiagnosticASTKinds.td
@@ -65,7 +65,7 @@ def note_consteval_address_accessible : Note<
"%select{pointer|reference}0 to a consteval declaration "
"is not a constant expression">;
def note_constexpr_uninitialized : Note<
- "%select{|sub}0object of type %1 is not initialized">;
+ "subobject %0 is not initialized">;
def note_constexpr_static_local : Note<
"control flows through the definition of a %select{static|thread_local}0 variable">;
def note_constexpr_subobject_declared_here : Note<