Lines Matching defs:startBuf
526 bool BufferContainsPPDirectives(const char *startBuf, const char *endBuf);
936 const char *startBuf = SM->getCharacterData(startLoc);
937 assert((*startBuf == '@') && "bogus @synthesize location");
938 const char *semiBuf = strchr(startBuf, ';');
940 startGetterSetterLoc = startLoc.getLocWithOffset(semiBuf-startBuf+1);
1072 const char *startBuf = SM->getCharacterData(startLoc);
1073 const char *semiPtr = strchr(startBuf, ';');
1075 ReplaceText(startLoc, semiPtr-startBuf+1, typedefString);
1182 const char *startBuf = SM->getCharacterData(LocStart);
1184 for (const char *p = startBuf; p < endBuf; p++) {
1186 SourceLocation OptionalLoc = LocStart.getLocWithOffset(p-startBuf);
1191 SourceLocation OptionalLoc = LocStart.getLocWithOffset(p-startBuf);
1379 const char *startBuf = SM->getCharacterData(LocStart);
1381 ReplaceText(LocStart, endBuf-startBuf, ResultStr);
1390 const char *startBuf = SM->getCharacterData(LocStart);
1392 ReplaceText(LocStart, endBuf-startBuf, ResultStr);
1712 const char *startBuf = SM->getCharacterData(startLoc);
1755 const char *startCollectionBuf = startBuf;
1768 ReplaceText(startLoc, startCollectionBuf - startBuf, buf);
1772 SourceLocation lparenLoc = startLoc.getLocWithOffset(rparenBuf-startBuf);
1886 const char *startBuf = SM->getCharacterData(startLoc);
1888 assert((*startBuf == '@') && "bogus @synchronized location");
1895 const char *lparenBuf = startBuf;
1897 ReplaceText(startLoc, lparenBuf-startBuf+1, buf);
1911 RParenExprLoc = startLoc.getLocWithOffset(RParenExprLocBuf-startBuf);
1971 const char *startBuf = SM->getCharacterData(startLoc);
1973 assert((*startBuf == '@') && "bogus @try location");
1995 startBuf = SM->getCharacterData(startLoc);
1996 assert((*startBuf == '@') && "bogus @catch location");
2004 ReplaceText(startLoc, rParenBuf-startBuf+1, Result);
2062 const char *startBuf = SM->getCharacterData(startLoc);
2064 assert((*startBuf == '@') && "bogus @throw location");
2074 const char *wBuf = strchr(startBuf, 'w');
2076 ReplaceText(startLoc, wBuf-startBuf+1, buf);
2082 SourceLocation semiLoc = startLoc.getLocWithOffset(semiBuf-startBuf);
2140 static bool scanForProtocolRefs(const char *startBuf, const char *endBuf,
2142 while (startBuf < endBuf) {
2143 if (*startBuf == '<')
2144 startRef = startBuf; // mark the start.
2145 if (*startBuf == '>') {
2147 endRef = startBuf; // mark the end.
2152 startBuf++;
2203 const char *startBuf = SM->getCharacterData(Loc);
2206 if (scanForProtocolRefs(startBuf, endBuf, startRef, endRef)) {
2208 SourceLocation LessLoc = Loc.getLocWithOffset(startRef-startBuf);
2209 SourceLocation GreaterLoc = Loc.getLocWithOffset(endRef-startBuf+1);
2251 const char *startBuf = endBuf;
2252 while (*startBuf != ';' && *startBuf != '<' && startBuf != MainFileStart)
2253 startBuf--; // scan backward (from the decl location) for return type.
2255 if (scanForProtocolRefs(startBuf, endBuf, startRef, endRef)) {
2267 const char *startBuf = SM->getCharacterData(Loc);
2268 const char *startFuncBuf = startBuf;
2273 const char *endBuf = startBuf;
2277 if (scanForProtocolRefs(startBuf, endBuf, startRef, endRef)) {
2287 startBuf = ++endBuf;
2292 while (*startBuf && *startBuf != ')' && *startBuf != ',')
2293 startBuf++; // scan forward (from the decl location) for argument types.
2294 startBuf++;
2313 const char *startBuf = SM->getCharacterData(DeclLoc);
2325 ReplaceText(DeclLoc, endBuf-startBuf-1, TypeAsString);
2331 ReplaceText(DeclLoc, endBuf-startBuf-1, TypeAsString);
3641 bool RewriteModernObjC::BufferContainsPPDirectives(const char *startBuf,
3643 while (startBuf < endBuf) {
3644 if (*startBuf
3646 for (++startBuf; startBuf[0] == ' ' || startBuf[0] == '\t'; ++startBuf)
3648 if (!strncmp(startBuf, "if", strlen("if")) ||
3649 !strncmp(startBuf, "ifdef", strlen("ifdef")) ||
3650 !strncmp(startBuf, "ifndef", strlen("ifndef")) ||
3651 !strncmp(startBuf, "define", strlen("define")) ||
3652 !strncmp(startBuf, "undef", strlen("undef")) ||
3653 !strncmp(startBuf, "else", strlen("else")) ||
3654 !strncmp(startBuf, "elif", strlen("elif")) ||
3655 !strncmp(startBuf, "endif", strlen("endif")) ||
3656 !strncmp(startBuf, "pragma", strlen("pragma")) ||
3657 !strncmp(startBuf, "include", strlen("include")) ||
3658 !strncmp(startBuf, "import", strlen("import")) ||
3659 !strncmp(startBuf, "include_next", strlen("include_next")))
3662 startBuf++;
3962 const char *startBuf = SM->getCharacterData(LocStart);
3970 ReplaceText(LocStart, endBuf-startBuf, Result);
4017 ReplaceText(LocStart, endBuf-startBuf, Result);
4806 const char *startBuf = SM->getCharacterData(LocStart);
4816 ReplaceText(LocStart, endBuf-startBuf+1, TypeAsString);
4820 const char *argPtr = startBuf;
4826 LocStart = LocStart.getLocWithOffset(argPtr-startBuf);
4856 const char *startBuf = SM->getCharacterData(DeclLoc);
4857 const char *startArgList = strchr(startBuf, '(');
4863 DeclLoc = DeclLoc.getLocWithOffset(startArgList-startBuf);
4965 const char *startBuf = SM->getCharacterData(DeclLoc);
4966 const char *endBuf = startBuf;
4968 while (*startBuf != '^' && *startBuf != ';' && startBuf != MainFileStart)
4969 startBuf--;
4970 SourceLocation Start = DeclLoc.getLocWithOffset(startBuf-endBuf);
4973 // *startBuf != '^' if we are dealing with a pointer to function that
4975 if (*startBuf == '^') {
4978 startBuf++;
4981 while (*startBuf != ')') {
4982 buf += *startBuf;
4983 startBuf++;
4994 startBuf = SM->getCharacterData(DeclLoc);
4996 GetExtentOfArgList(startBuf, argListBegin, argListEnd);
5109 const char *startBuf = SM->getCharacterData(DeclLoc);
5211 startBuf = commaBuf;
5221 ReplaceText(DeclLoc, endBuf-startBuf+nameSize, ByrefType);
5233 ReplaceText(DeclLoc, endBuf-startBuf, ByrefType);
5615 const char *startBuf = SM->getCharacterData(startLoc);
5620 messString.append(startBuf, endBuf-startBuf+1);