summaryrefslogtreecommitdiff
path: root/clang/lib/ARCMigrate/ARCMT.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
commitcfca06d7963fa0909f90483b42a6d7d194d01e08 (patch)
tree209fb2a2d68f8f277793fc8df46c753d31bc853b /clang/lib/ARCMigrate/ARCMT.cpp
parent706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff)
Notes
Diffstat (limited to 'clang/lib/ARCMigrate/ARCMT.cpp')
-rw-r--r--clang/lib/ARCMigrate/ARCMT.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/ARCMigrate/ARCMT.cpp b/clang/lib/ARCMigrate/ARCMT.cpp
index a9018c1c4bdf..e18def8a0b19 100644
--- a/clang/lib/ARCMigrate/ARCMT.cpp
+++ b/clang/lib/ARCMigrate/ARCMT.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "Internals.h"
+#include "clang/ARCMigrate/ARCMT.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/Basic/DiagnosticCategories.h"
#include "clang/Frontend/ASTUnit.h"
@@ -189,7 +190,7 @@ createInvocationForMigration(CompilerInvocation &origCI,
PPOpts.Includes.insert(PPOpts.Includes.begin(), OriginalFile);
PPOpts.ImplicitPCHInclude.clear();
}
- std::string define = getARCMTMacroName();
+ std::string define = std::string(getARCMTMacroName());
define += '=';
CInvok->getPreprocessorOpts().addMacroDef(define);
CInvok->getLangOpts()->ObjCAutoRefCount = true;
@@ -296,7 +297,7 @@ bool arcmt::checkForManualIssues(
for (CapturedDiagList::iterator
I = capturedDiags.begin(), E = capturedDiags.end(); I != E; ++I)
arcDiags.push_back(*I);
- writeARCDiagsToPlist(plistOut, arcDiags,
+ writeARCDiagsToPlist(std::string(plistOut), arcDiags,
Ctx.getSourceManager(), Ctx.getLangOpts());
}
@@ -598,7 +599,7 @@ bool MigrationProcess::applyTransform(TransformFn trans,
RewriteBuffer &buf = I->second;
const FileEntry *file = Ctx.getSourceManager().getFileEntryForID(FID);
assert(file);
- std::string newFname = file->getName();
+ std::string newFname = std::string(file->getName());
newFname += "-trans";
SmallString<512> newText;
llvm::raw_svector_ostream vecOS(newText);