aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/LiteralSupport.cpp
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-14 16:46:37 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-14 16:46:37 +0000
commit0fab49f7daa53a53882f19c2879feb210608fe00 (patch)
tree0652594db35d881c2403d6986ef41edeeb4c28a6 /lib/Lex/LiteralSupport.cpp
parent86daeee2d4aa6523679f07f27a826bf4c42ca95d (diff)
Literal value calculation isn't likely to overflow on targets having int as 32 or less. Fixing the assert as it otherwise triggers for PIC16 which as i16 as int.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69046 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/LiteralSupport.cpp')
-rw-r--r--lib/Lex/LiteralSupport.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Lex/LiteralSupport.cpp b/lib/Lex/LiteralSupport.cpp
index a52d951e75..e8d3162886 100644
--- a/lib/Lex/LiteralSupport.cpp
+++ b/lib/Lex/LiteralSupport.cpp
@@ -632,10 +632,10 @@ CharLiteralParser::CharLiteralParser(const char *begin, const char *end,
assert(begin[0] == '\'' && "Invalid token lexed");
++begin;
- // FIXME: This assumes that 'int' is 32-bits in overflow calculation, and the
- // size of "value".
- assert(PP.getTargetInfo().getIntWidth() == 32 &&
- "Assumes sizeof(int) == 4 for now");
+ // FIXME: This assumes that 'int' is not more than 32-bits in overflow
+ // calculation, and the size of "value".
+ assert(PP.getTargetInfo().getIntWidth() <= 32 &&
+ "Assumes sizeof(int) <= 4 for now");
// FIXME: This assumes that wchar_t is 32-bits for now.
assert(PP.getTargetInfo().getWCharWidth() == 32 &&
"Assumes sizeof(wchar_t) == 4 for now");