Index: lib/AST/StmtPrinter.cpp =================================================================== --- lib/AST/StmtPrinter.cpp +++ lib/AST/StmtPrinter.cpp @@ -1230,8 +1230,8 @@ default: if (value < 256 && isPrintable((unsigned char)value)) OS << "'" << (char)value << "'"; - else if (value < 256) - OS << "'\\x" << llvm::format("%02x", value) << "'"; + else if (value < 256 || CharacterLiteral::Ascii == Node->getKind()) + OS << "'\\x" << llvm::format("%02x", (unsigned char)value) << "'"; else if (value <= 0xFFFF) OS << "'\\u" << llvm::format("%04x", value) << "'"; else Index: test/Sema/ast-print.c =================================================================== --- test/Sema/ast-print.c +++ test/Sema/ast-print.c @@ -66,3 +66,6 @@ c; }); } + +// CHECK: char c = '\x80'; +char c = '\200';