summaryrefslogtreecommitdiff
path: root/lib/Edit/RewriteObjCFoundationAPI.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-08-02 17:33:11 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-08-02 17:33:11 +0000
commitc7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (patch)
tree27425930fc0c91650a7f3527fcac8e0f92907b90 /lib/Edit/RewriteObjCFoundationAPI.cpp
parent486754660bb926339aefcf012a3f848592babb8b (diff)
Notes
Diffstat (limited to 'lib/Edit/RewriteObjCFoundationAPI.cpp')
-rw-r--r--lib/Edit/RewriteObjCFoundationAPI.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Edit/RewriteObjCFoundationAPI.cpp b/lib/Edit/RewriteObjCFoundationAPI.cpp
index f89526a71da21..b53a70d87582b 100644
--- a/lib/Edit/RewriteObjCFoundationAPI.cpp
+++ b/lib/Edit/RewriteObjCFoundationAPI.cpp
@@ -82,7 +82,7 @@ bool edit::rewriteObjCRedundantCallWithLiteral(const ObjCMessageExpr *Msg,
(NS.getNSDictionarySelector(
NSAPI::NSDict_dictionaryWithDictionary) == Sel ||
NS.getNSDictionarySelector(NSAPI::NSDict_initWithDictionary) == Sel))) {
-
+
commit.replaceWithInner(Msg->getSourceRange(),
Msg->getArg(0)->getSourceRange());
return true;
@@ -726,7 +726,7 @@ static bool getLiteralInfo(SourceRange literalRange,
} else
break;
}
-
+
if (!UpperU.hasValue() && !UpperL.hasValue())
UpperU = UpperL = true;
else if (UpperU.hasValue() && !UpperL.hasValue())
@@ -738,7 +738,7 @@ static bool getLiteralInfo(SourceRange literalRange,
Info.L = *UpperL ? "L" : "l";
Info.LL = *UpperL ? "LL" : "ll";
Info.F = UpperF ? "F" : "f";
-
+
Info.Hex = Info.Octal = false;
if (text.startswith("0x"))
Info.Hex = true;
@@ -851,7 +851,7 @@ static bool rewriteToNumberLiteral(const ObjCMessageExpr *Msg,
// Try to modify the literal make it the same type as the method call.
// -Modify the suffix, and/or
// -Change integer to float
-
+
LiteralInfo LitInfo;
bool isIntZero = false;
if (const IntegerLiteral *IntE = dyn_cast<IntegerLiteral>(literalE))
@@ -862,7 +862,7 @@ static bool rewriteToNumberLiteral(const ObjCMessageExpr *Msg,
// Not easy to do int -> float with hex/octal and uncommon anyway.
if (!LitIsFloat && CallIsFloating && (LitInfo.Hex || LitInfo.Octal))
return rewriteToNumericBoxedExpression(Msg, NS, commit);
-
+
SourceLocation LitB = LitInfo.WithoutSuffRange.getBegin();
SourceLocation LitE = LitInfo.WithoutSuffRange.getEnd();
@@ -879,7 +879,7 @@ static bool rewriteToNumberLiteral(const ObjCMessageExpr *Msg,
} else {
if (CallIsUnsigned)
commit.insert(LitE, LitInfo.U);
-
+
if (CallIsLong)
commit.insert(LitE, LitInfo.L);
else if (CallIsLongLong)
@@ -997,7 +997,7 @@ static bool rewriteToNumericBoxedExpression(const ObjCMessageExpr *Msg,
uint64_t FinalTySize = Ctx.getTypeSize(FinalTy);
uint64_t OrigTySize = Ctx.getTypeSize(OrigTy);
- bool isTruncated = FinalTySize < OrigTySize;
+ bool isTruncated = FinalTySize < OrigTySize;
bool needsCast = false;
if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Arg)) {
@@ -1090,7 +1090,7 @@ static bool rewriteToNumericBoxedExpression(const ObjCMessageExpr *Msg,
}
if (needsCast) {
- DiagnosticsEngine &Diags = Ctx.getDiagnostics();
+ DiagnosticsEngine &Diags = Ctx.getDiagnostics();
// FIXME: Use a custom category name to distinguish migration diagnostics.
unsigned diagID = Diags.getCustomDiagID(DiagnosticsEngine::Warning,
"converting to boxing syntax requires casting %0 to %1");
@@ -1145,7 +1145,7 @@ static bool doRewriteToUTF8StringBoxedExpressionHelper(
commit.insertBefore(ArgRange.getBegin(), "@");
else
commit.insertWrap("@(", ArgRange, ")");
-
+
return true;
}
}