This is an archive of the discontinued LLVM Phabricator instance.

[lldb][ClangExpression] Fix LLDB_LOG incorrect format specifier
ClosedPublic

Authored by Michael137 on Aug 25 2022, 3:43 PM.

Details

Summary

Previously this would log:

 FindExternalLexicalDecls on (ASTContext*)0x00000005CE825200 'Expression
ASTContext for '<user expression 0>'' in 'weak_ptr'
(%sDecl*)ClassTemplateSpecialization
 FindExternalLexicalDecls on (ASTContext*)0x00000005CE825200 'Expression
ASTContext for '<user expression 0>'' in '__shared_count'
(%sDecl*)CXXRecord

Note that the %s isn't actually respected. This patch fixes this
by providing the format specifiers that lldb::formatv supports.

Diff Detail

Event Timeline

Michael137 created this revision.Aug 25 2022, 3:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2022, 3:43 PM
Michael137 requested review of this revision.Aug 25 2022, 3:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2022, 3:43 PM
This revision is now accepted and ready to land.Aug 25 2022, 4:24 PM