Skip to content

Commit be42fbe

Browse files
authored
Fix character literal escaping in VisitCharacterLiteral
1 parent 2f9afef commit be42fbe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cpp2rust/converter/converter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,7 @@ bool Converter::VisitFloatingLiteral(clang::FloatingLiteral *expr) {
17081708
bool Converter::VisitCharacterLiteral(clang::CharacterLiteral *expr) {
17091709
auto uc = static_cast<unsigned char>(expr->getValue());
17101710
std::string ch = GetEscapedCharLiteral(expr->getValue());
1711-
ch = (uc > 0x7F ? "b'" : "'") + std::move(ch) + "'";
1711+
ch = (uc > 0x7F ? "b'" : "'") + std::move(ch) + '\'';
17121712
{
17131713
PushParen paren(*this);
17141714
StrCat(ch, keyword::kAs, ToStringBase(expr->getType()));

0 commit comments

Comments
 (0)