Fix some const-ness to keep the VisualStudio C++ compiler happy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56560 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/RewriteBlocks.cpp b/Driver/RewriteBlocks.cpp
index b9e2217..691f104 100644
--- a/Driver/RewriteBlocks.cpp
+++ b/Driver/RewriteBlocks.cpp
@@ -133,7 +133,7 @@
void RewriteMethodDecl(ObjCMethodDecl *MDecl);
bool BlockPointerTypeTakesAnyBlockArguments(QualType QT);
- void GetExtentOfArgList(const char *Name, char *&LParen, char *&RParen);
+ void GetExtentOfArgList(const char *Name, const char *&LParen, const char *&RParen);
};
}
@@ -826,8 +826,8 @@
}
void RewriteBlocks::GetExtentOfArgList(const char *Name,
- char *&LParen, char *&RParen) {
- char *argPtr = strchr(Name, '(');
+ const char *&LParen, const char *&RParen) {
+ const char *argPtr = strchr(Name, '(');
assert((*argPtr == '(') && "Rewriter fuzzy parser confused");
LParen = argPtr; // output the start.
@@ -876,7 +876,7 @@
// Replace the '^' with '*' for arguments.
DeclLoc = ND->getLocation();
startBuf = SM->getCharacterData(DeclLoc);
- char *argListBegin, *argListEnd;
+ const char *argListBegin, *argListEnd;
GetExtentOfArgList(startBuf, argListBegin, argListEnd);
while (argListBegin < argListEnd) {
if (*argListBegin == '^') {