summaryrefslogtreecommitdiffstats
path: root/lib/ARCMigrate/TransUnbridgedCasts.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-09-27 22:38:19 +0000
committerDouglas Gregor <dgregor@apple.com>2011-09-27 22:38:19 +0000
commit30c42404202d2e2512e51efc6066bd614cfdb5a4 (patch)
tree5ac5699fb4d6d06231673b2e9a4887e4870684fb /lib/ARCMigrate/TransUnbridgedCasts.cpp
parent3240fe3b715327c8fda6f5a3bc8a092b1fce82a7 (diff)
When 'bool' is not a built-in type but is defined as a macro, print
'bool' rather than '_Bool' within types, to make things a bit more readable. Fixes <rdar://problem/10063263>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140650 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ARCMigrate/TransUnbridgedCasts.cpp')
-rw-r--r--lib/ARCMigrate/TransUnbridgedCasts.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ARCMigrate/TransUnbridgedCasts.cpp b/lib/ARCMigrate/TransUnbridgedCasts.cpp
index 047dfb276a..69fb2e8949 100644
--- a/lib/ARCMigrate/TransUnbridgedCasts.cpp
+++ b/lib/ARCMigrate/TransUnbridgedCasts.cpp
@@ -182,7 +182,7 @@ private:
llvm::SmallString<128> newCast;
newCast += '(';
newCast += bridge;
- newCast += E->getType().getAsString(Pass.Ctx.PrintingPolicy);
+ newCast += E->getType().getAsString(Pass.Ctx.getPrintingPolicy());
newCast += ')';
if (isa<ParenExpr>(E->getSubExpr())) {
@@ -215,7 +215,7 @@ private:
if (family == OMF_autorelease || family == OMF_release) {
std::string err = "it is not safe to cast to '";
- err += E->getType().getAsString(Pass.Ctx.PrintingPolicy);
+ err += E->getType().getAsString(Pass.Ctx.getPrintingPolicy());
err += "' the result of '";
err += family == OMF_autorelease ? "autorelease" : "release";
err += "' message; a __bridge cast may result in a pointer to a "
@@ -230,7 +230,7 @@ private:
if (ReturnStmt *retS = dyn_cast_or_null<ReturnStmt>(parent)) {
std::string note = "remove the cast and change return type of function "
"to '";
- note += E->getSubExpr()->getType().getAsString(Pass.Ctx.PrintingPolicy);
+ note += E->getSubExpr()->getType().getAsString(Pass.Ctx.getPrintingPolicy());
note += "' to have the object automatically autoreleased";
Pass.TA.reportNote(note, retS->getLocStart());
}