Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lldb] Fix a format string in ClangASTSource #107325

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

bulbazord
Copy link
Member

Without this, LLDB asserts when enabling the expression logs.

Without this, LLDB asserts when enabling the expression logs.
@llvmbot
Copy link
Collaborator

llvmbot commented Sep 4, 2024

@llvm/pr-subscribers-lldb

Author: Alex Langford (bulbazord)

Changes

Without this, LLDB asserts when enabling the expression logs.


Full diff: https://github.com/llvm/llvm-project/pull/107325.diff

1 Files Affected:

  • (modified) lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp (+1-1)
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
index 1fdd272dcbeceb..e41efdd3f61c75 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
@@ -293,7 +293,7 @@ void ClangASTSource::CompleteType(clang::ObjCInterfaceDecl *interface_decl) {
 
   LLDB_LOG(log,
            "    [CompleteObjCInterfaceDecl] on (ASTContext*){0:x} '{1}' "
-           "Completing an ObjCInterfaceDecl named {1}",
+           "Completing an ObjCInterfaceDecl named {2}",
            m_ast_context, m_clang_ast_context->getDisplayName(),
            interface_decl->getName());
   LLDB_LOG(log, "      [COID] Before:\n{0}",

Copy link
Member

@Michael137 Michael137 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Is this asserting cause something changed in how llvm::formatv validates the format string? Or maybe I just never hit this codepath with expression log enabled before

@JDevlieghere
Copy link
Member

Thanks! Is this asserting cause something changed in how llvm::formatv validates the format string?

Correct: #105745

@bulbazord bulbazord merged commit 18ad98e into llvm:main Sep 5, 2024
9 checks passed
@bulbazord bulbazord deleted the fix-formatv-assertion branch September 5, 2024 16:54
VitaNuo pushed a commit to VitaNuo/llvm-project that referenced this pull request Sep 12, 2024
Without this, LLDB asserts when enabling the expression logs.
adrian-prantl pushed a commit to adrian-prantl/llvm-project that referenced this pull request Oct 12, 2024
Without this, LLDB asserts when enabling the expression logs.

(cherry picked from commit 18ad98e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants