mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-12 09:41:26 +00:00
[ASTDumper] Add some more character escapes for convenience.
llvm-svn: 287859
This commit is contained in:
parent
1a2ac9bda5
commit
60a53d5e16
@ -970,10 +970,13 @@ void StringLiteral::outputString(raw_ostream &OS) const {
|
||||
// Handle some common non-printable cases to make dumps prettier.
|
||||
case '\\': OS << "\\\\"; break;
|
||||
case '"': OS << "\\\""; break;
|
||||
case '\n': OS << "\\n"; break;
|
||||
case '\t': OS << "\\t"; break;
|
||||
case '\a': OS << "\\a"; break;
|
||||
case '\b': OS << "\\b"; break;
|
||||
case '\f': OS << "\\f"; break;
|
||||
case '\n': OS << "\\n"; break;
|
||||
case '\r': OS << "\\r"; break;
|
||||
case '\t': OS << "\\t"; break;
|
||||
case '\v': OS << "\\v"; break;
|
||||
}
|
||||
}
|
||||
OS << '"';
|
||||
|
@ -1,7 +1,7 @@
|
||||
// RUN: %clang_cc1 -std=c++11 -ast-dump %s -triple x86_64-linux-gnu | FileCheck %s
|
||||
|
||||
char c8[] = u8"test\0\\\"\t\a\b\234";
|
||||
// CHECK: StringLiteral {{.*}} lvalue u8"test\000\\\"\t\a\b\234"
|
||||
char c8[] = u8"test\0\\\"\a\b\f\n\r\t\v\234";
|
||||
// CHECK: StringLiteral {{.*}} lvalue u8"test\000\\\"\a\b\f\n\r\t\v\234"
|
||||
|
||||
char16_t c16[] = u"test\0\\\"\t\a\b\234\u1234";
|
||||
// CHECK: StringLiteral {{.*}} lvalue u"test\000\\\"\t\a\b\234\u1234"
|
||||
|
Loading…
Reference in New Issue
Block a user