aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Expr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r--lib/AST/Expr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 92e901a93b..9c9c7baf8e 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -500,7 +500,7 @@ double FloatingLiteral::getValueAsApproximateDouble() const {
}
int StringLiteral::mapCharByteWidth(TargetInfo const &target,StringKind k) {
- int CharByteWidth;
+ int CharByteWidth = 0;
switch(k) {
case Ascii:
case UTF8:
@@ -514,6 +514,7 @@ int StringLiteral::mapCharByteWidth(TargetInfo const &target,StringKind k) {
break;
case UTF32:
CharByteWidth = target.getChar32Width();
+ break;
}
assert((CharByteWidth & 7) == 0 && "Assumes character size is byte multiple");
CharByteWidth /= 8;