<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi all,<div class=""><br class=""></div><div class="">I’m wondering what is a motivation for changes in this commit <a href="http://reviews.llvm.org/rL211426" class="">http://reviews.llvm.org/rL211426</a> for StmtPrinter.cpp, since this bug report <a href="https://llvm.org/bugs/show_bug.cgi?id=20008" class="">https://llvm.org/bugs/show_bug.cgi?id=20008</a> doesn’t provide much of a help, besides starting, that this is needed by MSVC, but doesn’t say why these suffixes are generated for all targets and not only for MSVC</div><div class=""><br class=""></div><div class=""><pre style="line-height: normal; widows: 1; word-wrap: break-word; white-space: pre-wrap;" class=""><pre style="line-height: normal; word-wrap: break-word; white-space: pre-wrap;" class="">--- cfe/trunk/lib/AST/StmtPrinter.cpp   2014/06/21 12:39:25     211434
+++ cfe/trunk/lib/AST/StmtPrinter.cpp   2014/06/21 18:46:07     211441
@@ -944,11 +944,10 @@
   // Emit suffixes.  Integer literals are always a builtin integer type.
   switch (Node->getType()->getAs<BuiltinType>()->getKind()) {
   default: llvm_unreachable("Unexpected type for integer literal!");
-  // FIXME: The Short and UShort cases are to handle cases where a short
-  // integeral literal is formed during template instantiation.  They should
-  // be removed when template instantiation no longer needs integer literals.
-  case BuiltinType::Short:
-  case BuiltinType::UShort:
+  case BuiltinType::SChar:     OS << "i8"; break;
+  case BuiltinType::UChar:     OS << "Ui8"; break;
+  case BuiltinType::Short:     OS << "i16"; break;
+  case BuiltinType::UShort:    OS << "Ui16"; break;
   case BuiltinType::Int:       break; // no suffix.
   case BuiltinType::UInt:      OS << 'U'; break;
   case BuiltinType::Long:      OS << 'L'; break;</pre><div class=""><br class=""></div></pre></div><div class="">Adding these suffixes breaks compilation of the code, which was generated via PrettyPrinting AST. I’m aware, that printing AST back to C code doesn’t guarantee, that code will be compilable, but changing Clang source code each time I need a fresh checkout of LLVM and Clang bugs me. </div><div class=""><br class=""></div><div class="">Besides I can’t find anywhere definition of suffixes i8, Ui8, i16, Ui16, i128 and Ui128. Only i64 is defined, as pointed out in the bug report.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Andrey</div></body></html>