diff options
author | Craig Topper <craig.topper@gmail.com> | 2015-10-22 03:13:10 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2015-10-22 03:13:10 +0000 |
commit | a2a8d9cb0a11a26204817bee3279efa767623f19 (patch) | |
tree | 5b50c00a736b9a18157b1926bc06ba6f243b3c7d /clang/lib/Frontend/Rewrite/RewriteObjC.cpp | |
parent | cf2126e2caf87ef3820a794b363088a4860efc45 (diff) | |
download | bcm5719-llvm-a2a8d9cb0a11a26204817bee3279efa767623f19.tar.gz bcm5719-llvm-a2a8d9cb0a11a26204817bee3279efa767623f19.zip |
Fix a couple places where InsertText was being called with a pointer and size when it really expects a StringRef and a normally optional bool argument.
The pointer was being implicitly converted to a StringRef and the size was being passed into the bool. Since the bool has a default value normally, no one noticed that the wrong number of arguments was given.
llvm-svn: 250977
Diffstat (limited to 'clang/lib/Frontend/Rewrite/RewriteObjC.cpp')
-rw-r--r-- | clang/lib/Frontend/Rewrite/RewriteObjC.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/Rewrite/RewriteObjC.cpp b/clang/lib/Frontend/Rewrite/RewriteObjC.cpp index 86efdccab90..e0ddadb1230 100644 --- a/clang/lib/Frontend/Rewrite/RewriteObjC.cpp +++ b/clang/lib/Frontend/Rewrite/RewriteObjC.cpp @@ -4664,7 +4664,7 @@ Stmt *RewriteObjC::RewriteFunctionBodyOrGlobalInitializer(Stmt *S) { // FIXME: Missing definition of // InsertText(clang::SourceLocation, char const*, unsigned int). - // InsertText(startLoc, messString.c_str(), messString.size()); + // InsertText(startLoc, messString); // Tried this, but it didn't work either... // ReplaceText(startLoc, 0, messString.c_str(), messString.size()); #endif @@ -4779,7 +4779,7 @@ Stmt *RewriteObjC::RewriteFunctionBodyOrGlobalInitializer(Stmt *S) { const std::string &Str = Buf.str(); printf("CAST = %s\n", &Str[0]); - InsertText(ICE->getSubExpr()->getLocStart(), &Str[0], Str.size()); + InsertText(ICE->getSubExpr()->getLocStart(), Str); delete S; return Replacement; } |