v.g.vassilev created this revision.
Patch by Axel Naumann!
Repository:
rL LLVM
https://reviews.llvm.org/D34912
Files:
lib/AST/TemplateBase.cpp
Index: lib/AST/TemplateBase.cpp
===================================================================
--- lib/AST/TemplateBase.cpp
+++ lib/AST/TemplateBase.cpp
@@ -62,6 +62,12 @@
Out << "'";
} else {
Out << Val;
+ // Handle cases where the value is too large to fit into the underlying
type
+ // i.e. where the unsignedness matters.
+ if (const BuiltinType *BT = T->getAs<BuiltinType>()) {
+ if (Val.isUnsigned() && Val.getBitWidth() == 64 && Val.isNegative())
+ Out << "ull";
+ }
}
}
Index: lib/AST/TemplateBase.cpp
===================================================================
--- lib/AST/TemplateBase.cpp
+++ lib/AST/TemplateBase.cpp
@@ -62,6 +62,12 @@
Out << "'";
} else {
Out << Val;
+ // Handle cases where the value is too large to fit into the underlying type
+ // i.e. where the unsignedness matters.
+ if (const BuiltinType *BT = T->getAs<BuiltinType>()) {
+ if (Val.isUnsigned() && Val.getBitWidth() == 64 && Val.isNegative())
+ Out << "ull";
+ }
}
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits