Lines Matching refs:startBuf
438 bool BufferContainsPPDirectives(const char *startBuf, const char *endBuf);
782 const char *startBuf = SM->getCharacterData(startLoc);
783 assert((*startBuf == '@') && "bogus @synthesize location");
784 const char *semiBuf = strchr(startBuf, ';');
787 startLoc.getLocWithOffset(semiBuf-startBuf+1);
913 const char *startBuf = SM->getCharacterData(startLoc);
914 const char *semiPtr = strchr(startBuf, ';');
916 ReplaceText(startLoc, semiPtr-startBuf+1, typedefString);
1012 const char *startBuf = SM->getCharacterData(LocStart);
1014 for (const char *p = startBuf; p < endBuf; p++) {
1016 SourceLocation OptionalLoc = LocStart.getLocWithOffset(p-startBuf);
1021 SourceLocation OptionalLoc = LocStart.getLocWithOffset(p-startBuf);
1183 const char *startBuf = SM->getCharacterData(LocStart);
1185 ReplaceText(LocStart, endBuf-startBuf, ResultStr);
1194 const char *startBuf = SM->getCharacterData(LocStart);
1196 ReplaceText(LocStart, endBuf-startBuf, ResultStr);
1488 const char *startBuf = SM->getCharacterData(startLoc);
1528 const char *startCollectionBuf = startBuf;
1541 ReplaceText(startLoc, startCollectionBuf - startBuf, buf);
1545 SourceLocation lparenLoc = startLoc.getLocWithOffset(rparenBuf-startBuf);
1652 const char *startBuf = SM->getCharacterData(startLoc);
1654 assert((*startBuf == '@') && "bogus @synchronized location");
1658 const char *lparenBuf = startBuf;
1660 ReplaceText(startLoc, lparenBuf-startBuf+1, buf);
1667 SourceLocation rparenLoc = startLoc.getLocWithOffset(endBuf-startBuf);
1678 startBuf = SM->getCharacterData(startLoc);
1680 assert((*startBuf == '}') && "bogus @synchronized block");
1755 const char *startBuf = SM->getCharacterData(startLoc);
1757 const char *semiBuf = strchr(startBuf, ';');
1759 SourceLocation onePastSemiLoc = startLoc.getLocWithOffset(semiBuf-startBuf+1);
1778 const char *startBuf = SM->getCharacterData(startLoc);
1780 const char *semiBuf = strchr(startBuf, ';');
1782 SourceLocation onePastSemiLoc = startLoc.getLocWithOffset(semiBuf-startBuf+1);
1798 const char *startBuf = SM->getCharacterData(startLoc);
1800 assert((*startBuf == '@') && "bogus @try location");
1814 startBuf = SM->getCharacterData(startLoc);
1816 assert((*startBuf == '}') && "bogus @try block");
1845 startBuf = SM->getCharacterData(startLoc);
1847 assert((*startBuf == '@') && "bogus @catch location");
1849 const char *lParenLoc = strchr(startBuf, '(');
1861 Rewrite.ReplaceText(startLoc, bodyBuf-startBuf+1, buf);
1866 ReplaceText(startLoc, lParenLoc-startBuf+1, buf);
1875 ReplaceText(startLoc, lParenLoc-startBuf+1, buf);
1916 startBuf = SM->getCharacterData(startLoc);
1917 assert((*startBuf == '@') && "bogus @finally start");
1966 const char *startBuf = SM->getCharacterData(startLoc);
1968 assert((*startBuf == '@') && "bogus @throw location");
1978 const char *wBuf = strchr(startBuf, 'w');
1980 ReplaceText(startLoc, wBuf-startBuf+1, buf);
1982 const char *semiBuf = strchr(startBuf, ';');
1984 SourceLocation semiLoc = startLoc.getLocWithOffset(semiBuf-startBuf);
2040 static bool scanForProtocolRefs(const char *startBuf, const char *endBuf,
2042 while (startBuf < endBuf) {
2043 if (*startBuf == '<')
2044 startRef = startBuf; // mark the start.
2045 if (*startBuf == '>') {
2047 endRef = startBuf; // mark the end.
2052 startBuf++;
2103 const char *startBuf = SM->getCharacterData(Loc);
2106 if (scanForProtocolRefs(startBuf, endBuf, startRef, endRef)) {
2108 SourceLocation LessLoc = Loc.getLocWithOffset(startRef-startBuf);
2109 SourceLocation GreaterLoc = Loc.getLocWithOffset(endRef-startBuf+1);
2147 const char *startBuf = endBuf;
2148 while (*startBuf != ';' && *startBuf != '<' && startBuf != MainFileStart)
2149 startBuf
2151 if (scanForProtocolRefs(startBuf, endBuf, startRef, endRef)) {
2163 const char *startBuf = SM->getCharacterData(Loc);
2164 const char *startFuncBuf = startBuf;
2169 const char *endBuf = startBuf;
2173 if (scanForProtocolRefs(startBuf, endBuf, startRef, endRef)) {
2183 startBuf = ++endBuf;
2188 while (*startBuf && *startBuf != ')' && *startBuf != ',')
2189 startBuf++; // scan forward (from the decl location) for argument types.
2190 startBuf++;
2209 const char *startBuf = SM->getCharacterData(DeclLoc);
2221 ReplaceText(DeclLoc, endBuf-startBuf-1, TypeAsString);
2227 ReplaceText(DeclLoc, endBuf-startBuf-1, TypeAsString);
3085 bool RewriteObjC::BufferContainsPPDirectives(const char *startBuf,
3087 while (startBuf < endBuf) {
3088 if (*startBuf == '#') {
3090 for (++startBuf; startBuf[0] == ' ' || startBuf[0] == '\t'; ++startBuf)
3092 if (!strncmp(startBuf, "if", strlen("if")) ||
3093 !strncmp(startBuf, "ifdef", strlen("ifdef")) ||
3094 !strncmp(startBuf, "ifndef", strlen("ifndef")) ||
3095 !strncmp(startBuf, "define", strlen("define")) ||
3096 !strncmp(startBuf, "undef", strlen("undef")) ||
3097 !strncmp(startBuf, "else", strlen("else")) ||
3098 !strncmp(startBuf, "elif", strlen("elif")) ||
3099 !strncmp(startBuf, "endif", strlen("endif")) ||
3100 !strncmp(startBuf, "pragma", strlen("pragma")) ||
3101 !strncmp(startBuf, "include", strlen("include")) ||
3102 !strncmp(startBuf, "import", strlen("import")) ||
3103 !strncmp(startBuf, "include_next", strlen("include_next")))
3106 startBuf++;
3126 const char *startBuf = SM->getCharacterData(LocStart);
3134 ReplaceText(LocStart, endBuf-startBuf, Result);
3146 const char *cursor = strchr(startBuf, '{');
3164 if (BufferContainsPPDirectives(startBuf, cursor)) {
3176 ReplaceText(LocStart, endHeader-startBuf, Result);
3179 ReplaceText(LocStart, cursor-startBuf, Result);
3190 LocStart.getLocWithOffset(cursor-startBuf+1);
3198 SourceLocation atLoc = LocStart.getLocWithOffset(cursor-startBuf);
3215 SourceLocation atLoc = LocStart.getLocWithOffset(cursor-startBuf);
3219 atLoc = LocStart.getLocWithOffset(cursor-startBuf);
3222 SourceLocation caretLoc = LocStart.getLocWithOffset(cursor-startBuf);
3236 ReplaceText(LocStart, endBuf-startBuf, Result);
3942 const char *startBuf = SM->getCharacterData(LocStart);
3952 ReplaceText(LocStart, endBuf-startBuf+1, TypeAsString);
3956 const char *argPtr = startBuf;
3962 LocStart = LocStart.getLocWithOffset(argPtr-startBuf);
3975 const char *startBuf = SM->getCharacterData(DeclLoc);
3976 const char *startArgList = strchr(startBuf, '(');
3982 DeclLoc = DeclLoc.getLocWithOffset(startArgList-startBuf);
4084 const char *startBuf = SM->getCharacterData(DeclLoc);
4085 const char *endBuf = startBuf;
4087 while (*startBuf != '^' && *startBuf != ';' && startBuf != MainFileStart)
4088 startBuf--;
4089 SourceLocation Start = DeclLoc.getLocWithOffset(startBuf-endBuf);
4092 // *startBuf != '^' if we are dealing with a pointer to function that
4094 if (*startBuf == '^') {
4097 startBuf++;
4100 while (*startBuf != ')') {
4101 buf += *startBuf;
4102 startBuf++;
4113 startBuf = SM->getCharacterData(DeclLoc);
4115 GetExtentOfArgList(startBuf, argListBegin, argListEnd);
4231 const char *startBuf = SM->getCharacterData(DeclLoc);
4319 ReplaceText(DeclLoc, endBuf-startBuf+nameSize, ByrefType);
4346 ReplaceText(DeclLoc, endBuf-startBuf, ByrefType);
4691 const char *startBuf = SM->getCharacterData(startLoc);
4696 messString.append(startBuf, endBuf-startBuf+1);