Home | History | Annotate | Download | only in Rewrite

Lines Matching defs:startBuf

430     bool BufferContainsPPDirectives(const char *startBuf, const char *endBuf);
773 const char *startBuf = SM->getCharacterData(startLoc);
774 assert((*startBuf == '@') && "bogus @synthesize location");
775 const char *semiBuf = strchr(startBuf, ';');
778 startLoc.getLocWithOffset(semiBuf-startBuf+1);
904 const char *startBuf = SM->getCharacterData(startLoc);
905 const char *semiPtr = strchr(startBuf, ';');
907 ReplaceText(startLoc, semiPtr-startBuf+1, typedefString);
1003 const char *startBuf = SM->getCharacterData(LocStart);
1005 for (const char *p = startBuf; p < endBuf; p++) {
1007 SourceLocation OptionalLoc = LocStart.getLocWithOffset(p-startBuf);
1012 SourceLocation OptionalLoc = LocStart.getLocWithOffset(p-startBuf);
1175 const char *startBuf = SM->getCharacterData(LocStart);
1177 ReplaceText(LocStart, endBuf-startBuf, ResultStr);
1186 const char *startBuf = SM->getCharacterData(LocStart);
1188 ReplaceText(LocStart, endBuf-startBuf, ResultStr);
1480 const char *startBuf = SM->getCharacterData(startLoc);
1520 const char *startCollectionBuf = startBuf;
1533 ReplaceText(startLoc, startCollectionBuf - startBuf, buf);
1537 SourceLocation lparenLoc = startLoc.getLocWithOffset(rparenBuf-startBuf);
1644 const char *startBuf = SM->getCharacterData(startLoc);
1646 assert((*startBuf == '@') && "bogus @synchronized location");
1650 const char *lparenBuf = startBuf;
1652 ReplaceText(startLoc, lparenBuf-startBuf+1, buf);
1659 SourceLocation rparenLoc = startLoc.getLocWithOffset(endBuf-startBuf);
1670 startBuf = SM->getCharacterData(startLoc);
1672 assert((*startBuf == '}') && "bogus @synchronized block");
1745 const char *startBuf = SM->getCharacterData(startLoc);
1746 const char *semiBuf = strchr(startBuf, ';');
1748 SourceLocation onePastSemiLoc = startLoc.getLocWithOffset(semiBuf-startBuf+1);
1766 const char *startBuf = SM->getCharacterData(startLoc);
1768 const char *semiBuf = strchr(startBuf, ';');
1770 SourceLocation onePastSemiLoc = startLoc.getLocWithOffset(semiBuf-startBuf+1);
1785 const char *startBuf = SM->getCharacterData(startLoc);
1787 assert((*startBuf == '@') && "bogus @try location");
1801 startBuf = SM->getCharacterData(startLoc);
1803 assert((*startBuf == '}') && "bogus @try block");
1832 startBuf = SM->getCharacterData(startLoc);
1834 assert((*startBuf == '@') && "bogus @catch location");
1836 const char *lParenLoc = strchr(startBuf, '(');
1848 Rewrite.ReplaceText(startLoc, bodyBuf-startBuf+1, buf);
1853 ReplaceText(startLoc, lParenLoc-startBuf+1, buf);
1862 ReplaceText(startLoc, lParenLoc-startBuf+1, buf);
1903 startBuf = SM->getCharacterData(startLoc);
1904 assert((*startBuf == '@') && "bogus @finally start");
1953 const char *startBuf = SM->getCharacterData(startLoc);
1955 assert((*startBuf == '@') && "bogus @throw location");
1965 const char *wBuf = strchr(startBuf, 'w');
1967 ReplaceText(startLoc, wBuf-startBuf+1, buf);
1969 const char *semiBuf = strchr(startBuf, ';');
1971 SourceLocation semiLoc = startLoc.getLocWithOffset(semiBuf-startBuf);
2028 static bool scanForProtocolRefs(const char *startBuf, const char *endBuf,
2030 while (startBuf < endBuf) {
2031 if (*startBuf == '<')
2032 startRef = startBuf; // mark the start.
2033 if (*startBuf == '>') {
2035 endRef = startBuf; // mark the end.
2040 startBuf++;
2091 const char *startBuf = SM->getCharacterData(Loc);
2094 if (scanForProtocolRefs(startBuf, endBuf, startRef, endRef)) {
2096 SourceLocation LessLoc = Loc.getLocWithOffset(startRef-startBuf);
2097 SourceLocation GreaterLoc = Loc.getLocWithOffset(endRef-startBuf+1);
2135 const char *startBuf = endBuf;
2136 while (*startBuf != ';' && *startBuf != '<' && startBuf != MainFileStart)
2137 startBuf--; // scan backward (from the decl location) for return type.
2139 if (scanForProtocolRefs(startBuf, endBuf, startRef, endRef)) {
2151 const char *startBuf = SM->getCharacterData(Loc);
2152 const char *startFuncBuf = startBuf;
2157 const char *endBuf = startBuf;
2161 if (scanForProtocolRefs(startBuf, endBuf, startRef, endRef)) {
2171 startBuf = ++endBuf;
2176 while (*startBuf && *startBuf != ')' && *startBuf != ',')
2177 startBuf++; // scan forward (from the decl location) for argument types.
2178 startBuf++;
2197 const char *startBuf = SM->getCharacterData(DeclLoc);
2209 ReplaceText(DeclLoc, endBuf-startBuf-1, TypeAsString);
2215 ReplaceText(DeclLoc, endBuf-startBuf-1, TypeAsString);
3057 bool RewriteObjC::BufferContainsPPDirectives(const char *startBuf,
3059 while (startBuf < endBuf) {
3060 if (*startBuf == '#') {
3062 for (++startBuf; startBuf[0] == ' ' || startBuf[0] == '\t'; ++startBuf)
3064 if (!strncmp(startBuf, "if", strlen("if")) ||
3065 !strncmp(startBuf, "ifdef", strlen("ifdef")) ||
3066 !strncmp(startBuf, "ifndef", strlen("ifndef")) ||
3067 !strncmp(startBuf, "define", strlen("define")) ||
3068 !strncmp(startBuf, "undef", strlen("undef")) ||
3069 !strncmp(startBuf, "else", strlen("else")) ||
3070 !strncmp(startBuf, "elif", strlen("elif")) ||
3071 !strncmp(startBuf, "endif", strlen("endif")) ||
3072 !strncmp(startBuf, "pragma", strlen("pragma")) ||
3073 !strncmp(startBuf, "include", strlen("include")) ||
3074 !strncmp(startBuf, "import", strlen("import")) ||
3075 !strncmp(startBuf, "include_next", strlen("include_next")))
3078 startBuf++;
3098 const char *startBuf = SM->getCharacterData(LocStart);
3106 ReplaceText(LocStart, endBuf-startBuf, Result);
3118 const char *cursor = strchr(startBuf, '{');
3136 if (BufferContainsPPDirectives(startBuf, cursor)) {
3148 ReplaceText(LocStart, endHeader-startBuf, Result);
3151 ReplaceText(LocStart, cursor-startBuf, Result);
3162 LocStart.getLocWithOffset(cursor-startBuf+1);
3170 SourceLocation atLoc = LocStart.getLocWithOffset(cursor-startBuf);
3187 SourceLocation atLoc = LocStart.getLocWithOffset(cursor-startBuf);
3191 atLoc = LocStart.getLocWithOffset(cursor-startBuf);
3194 SourceLocation caretLoc = LocStart.getLocWithOffset(cursor-startBuf);
3208 ReplaceText(LocStart, endBuf-startBuf, Result);
3896 const char *startBuf = SM->getCharacterData(LocStart);
3906 ReplaceText(LocStart, endBuf-startBuf+1, TypeAsString);
3910 const char *argPtr = startBuf;
3916 LocStart = LocStart.getLocWithOffset(argPtr-startBuf);
3928 const char *startBuf = SM->getCharacterData(DeclLoc);
3929 const char *startArgList = strchr(startBuf, '(');
3935 DeclLoc = DeclLoc.getLocWithOffset(startArgList-startBuf);
4036 const char *startBuf = SM->getCharacterData(DeclLoc);
4037 const char *endBuf = startBuf;
4039 while (*startBuf != '^' && *startBuf != ';' && startBuf != MainFileStart)
4040 startBuf--;
4041 SourceLocation Start = DeclLoc.getLocWithOffset(startBuf-endBuf);
4044 // *startBuf != '^' if we are dealing with a pointer to function that
4046 if (*startBuf == '^') {
4049 startBuf++;
4052 while (*startBuf != ')') {
4053 buf += *startBuf;
4054 startBuf++;
4065 startBuf = SM->getCharacterData(DeclLoc);
4067 GetExtentOfArgList(startBuf, argListBegin, argListEnd);
4180 const char *startBuf = SM->getCharacterData(DeclLoc);
4268 ReplaceText(DeclLoc, endBuf-startBuf+nameSize, ByrefType);
4295 ReplaceText(DeclLoc, endBuf-startBuf, ByrefType);
4637 const char *startBuf = SM->getCharacterData(startLoc);
4642 messString.append(startBuf, endBuf-startBuf+1);