Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/clang/lib/AST/TemplateBase.cpp b/clang/lib/AST/TemplateBase.cpp
- index 0d2e54d8d9a..538a342d93a 100644
- --- a/clang/lib/AST/TemplateBase.cpp
- +++ b/clang/lib/AST/TemplateBase.cpp
- @@ -76,13 +76,18 @@ static void printIntegral(const TemplateArgument &TemplArg,
- Out.write_escaped(StringRef(&Ch, 1), /*UseHexEscapes=*/ true);
- Out << "'";
- } else {
- - Out << Val;
- if (T->isBuiltinType()) {
- - if (Val.isUnsigned())
- - Out << "U";
- - if (Val.getBitWidth() == 64)
- - Out << "LL";
- + if (T->isUnsignedIntegerType() && Val.getBitWidth() == 64)
- + Out << Val << "ULL";
- + else if (T->isSignedIntegerType() && Val.getBitWidth() == 64)
- + Out << Val << "LL";
- + else if (T->isUnsignedIntegerType())
- + Out << Val << "U";
- + else
- + Out << "(" << T->getCanonicalTypeInternal().getAsString(Policy) << ")" << Val;
- }
- + else
- + Out << Val;
- }
- }
Add Comment
Please, Sign In to add comment