Lines Matching defs:startBuf

428     bool BufferContainsPPDirectives(const char *startBuf, const char *endBuf);
772 const char *startBuf = SM->getCharacterData(startLoc);
773 assert((*startBuf == '@') && "bogus @synthesize location");
774 const char *semiBuf = strchr(startBuf, ';');
777 startLoc.getLocWithOffset(semiBuf-startBuf+1);
906 const char *startBuf = SM->getCharacterData(startLoc);
907 const char *semiPtr = strchr(startBuf, ';');
909 ReplaceText(startLoc, semiPtr - startBuf + 1, typedefString);
1005 const char *startBuf = SM->getCharacterData(LocStart);
1007 for (const char *p = startBuf; p < endBuf; p++) {
1009 SourceLocation OptionalLoc = LocStart.getLocWithOffset(p-startBuf);
1014 SourceLocation OptionalLoc = LocStart.getLocWithOffset(p-startBuf);
1180 const char *startBuf = SM->getCharacterData(LocStart);
1182 ReplaceText(LocStart, endBuf-startBuf, ResultStr);
1193 const char *startBuf = SM->getCharacterData(LocStart);
1195 ReplaceText(LocStart, endBuf-startBuf, ResultStr);
1487 const char *startBuf = SM->getCharacterData(startLoc);
1527 const char *startCollectionBuf = startBuf;
1540 ReplaceText(startLoc, startCollectionBuf - startBuf, buf);
1544 SourceLocation lparenLoc = startLoc.getLocWithOffset(rparenBuf-startBuf);
1651 const char *startBuf = SM->getCharacterData(startLoc);
1653 assert((*startBuf == '@') && "bogus @synchronized location");
1657 const char *lparenBuf = startBuf;
1659 ReplaceText(startLoc, lparenBuf-startBuf+1, buf);
1666 SourceLocation rparenLoc = startLoc.getLocWithOffset(endBuf-startBuf);
1677 startBuf = SM->getCharacterData(startLoc);
1679 assert((*startBuf == '}') && "bogus @synchronized block");
1752 const char *startBuf = SM->getCharacterData(startLoc);
1753 const char *semiBuf = strchr(startBuf, ';');
1755 SourceLocation onePastSemiLoc = startLoc.getLocWithOffset(semiBuf-startBuf+1);
1773 const char *startBuf = SM->getCharacterData(startLoc);
1775 const char *semiBuf = strchr(startBuf, ';');
1777 SourceLocation onePastSemiLoc = startLoc.getLocWithOffset(semiBuf-startBuf+1);
1792 const char *startBuf = SM->getCharacterData(startLoc);
1794 assert((*startBuf == '@') && "bogus @try location");
1808 startBuf = SM->getCharacterData(startLoc);
1810 assert((*startBuf == '}') && "bogus @try block");
1839 startBuf = SM->getCharacterData(startLoc);
1841 assert((*startBuf == '@') && "bogus @catch location");
1843 const char *lParenLoc = strchr(startBuf, '(');
1855 Rewrite.ReplaceText(startLoc, bodyBuf-startBuf+1, buf);
1860 ReplaceText(startLoc, lParenLoc-startBuf+1, buf);
1869 ReplaceText(startLoc, lParenLoc-startBuf+1, buf);
1910 startBuf = SM->getCharacterData(startLoc);
1911 assert((*startBuf == '@') && "bogus @finally start");
1960 const char *startBuf = SM->getCharacterData(startLoc);
1962 assert((*startBuf == '@') && "bogus @throw location");
1972 const char *wBuf = strchr(startBuf, 'w');
1974 ReplaceText(startLoc, wBuf-startBuf+1, buf);
1976 const char *semiBuf = strchr(startBuf, ';');
1978 SourceLocation semiLoc = startLoc.getLocWithOffset(semiBuf-startBuf);
2035 static bool scanForProtocolRefs(const char *startBuf, const char *endBuf,
2037 while (startBuf < endBuf) {
2038 if (*startBuf == '<')
2039 startRef = startBuf; // mark the start.
2040 if (*startBuf == '>') {
2042 endRef = startBuf; // mark the end.
2047 startBuf++;
2098 const char *startBuf = SM->getCharacterData(Loc);
2101 if (scanForProtocolRefs(startBuf, endBuf, startRef, endRef)) {
2103 SourceLocation LessLoc = Loc.getLocWithOffset(startRef-startBuf);
2104 SourceLocation GreaterLoc = Loc.getLocWithOffset(endRef-startBuf+1);
2142 const char *startBuf = endBuf;
2143 while (*startBuf != ';' && *startBuf != '<' && startBuf != MainFileStart)
2144 startBuf--; // scan backward (from the decl location) for return type.
2146 if (scanForProtocolRefs(startBuf, endBuf, startRef, endRef)) {
2158 const char *startBuf = SM->getCharacterData(Loc);
2159 const char *startFuncBuf = startBuf;
2164 const char *endBuf = startBuf;
2168 if (scanForProtocolRefs(startBuf, endBuf, startRef, endRef)) {
2178 startBuf = ++endBuf;
2183 while (*startBuf && *startBuf != ')' && *startBuf != ',')
2184 startBuf++; // scan forward (from the decl location) for argument types.
2185 startBuf++;
2204 const char *startBuf = SM->getCharacterData(DeclLoc);
2216 ReplaceText(DeclLoc, endBuf-startBuf-1, TypeAsString);
2222 ReplaceText(DeclLoc, endBuf-startBuf-1, TypeAsString);
3056 bool RewriteObjC::BufferContainsPPDirectives(const char *startBuf,
3058 while (startBuf < endBuf) {
3059 if (*startBuf == '#') {
3061 for (++startBuf; startBuf[0] == ' ' || startBuf[0] == '\t'; ++startBuf)
3063 if (!strncmp(startBuf, "if", strlen("if")) ||
3064 !strncmp(startBuf, "ifdef", strlen("ifdef")) ||
3065 !strncmp(startBuf, "ifndef", strlen("ifndef")) ||
3066 !strncmp(startBuf, "define", strlen("define")) ||
3067 !strncmp(startBuf, "undef", strlen("undef")) ||
3068 !strncmp(startBuf, "else", strlen("else")) ||
3069 !strncmp(startBuf, "elif", strlen("elif")) ||
3070 !strncmp(startBuf, "endif", strlen("endif")) ||
3071 !strncmp(startBuf, "pragma", strlen("pragma")) ||
3072 !strncmp(startBuf, "include", strlen("include")) ||
3073 !strncmp(startBuf, "import", strlen("import")) ||
3074 !strncmp(startBuf, "include_next", strlen("include_next")))
3077 startBuf++;
3097 const char *startBuf = SM->getCharacterData(LocStart);
3105 ReplaceText(LocStart, endBuf-startBuf, Result);
3117 const char *cursor = strchr(startBuf, '{');
3135 if (BufferContainsPPDirectives(startBuf, cursor)) {
3147 ReplaceText(LocStart, endHeader-startBuf, Result);
3150 ReplaceText(LocStart, cursor-startBuf, Result);
3161 LocStart.getLocWithOffset(cursor-startBuf+1);
3169 SourceLocation atLoc = LocStart.getLocWithOffset(cursor-startBuf);
3186 SourceLocation atLoc = LocStart.getLocWithOffset(cursor-startBuf);
3190 atLoc = LocStart.getLocWithOffset(cursor-startBuf);
3193 SourceLocation caretLoc = LocStart.getLocWithOffset(cursor-startBuf);
3207 ReplaceText(LocStart, endBuf-startBuf, Result);
3885 const char *startBuf = SM->getCharacterData(LocStart);
3895 ReplaceText(LocStart, endBuf-startBuf+1, TypeAsString);
3899 const char *argPtr = startBuf;
3905 LocStart = LocStart.getLocWithOffset(argPtr-startBuf);
3917 const char *startBuf = SM->getCharacterData(DeclLoc);
3918 const char *startArgList = strchr(startBuf, '(');
3924 DeclLoc = DeclLoc.getLocWithOffset(startArgList-startBuf);
4025 const char *startBuf = SM->getCharacterData(DeclLoc);
4026 const char *endBuf = startBuf;
4028 while (*startBuf != '^' && *startBuf != ';' && startBuf != MainFileStart)
4029 startBuf--;
4030 SourceLocation Start = DeclLoc.getLocWithOffset(startBuf-endBuf);
4033 // *startBuf != '^' if we are dealing with a pointer to function that
4035 if (*startBuf == '^') {
4038 startBuf++;
4041 while (*startBuf != ')') {
4042 buf += *startBuf;
4043 startBuf++;
4054 startBuf = SM->getCharacterData(DeclLoc);
4056 GetExtentOfArgList(startBuf, argListBegin, argListEnd);
4168 const char *startBuf = SM->getCharacterData(DeclLoc);
4256 ReplaceText(DeclLoc, endBuf-startBuf+nameSize, ByrefType);
4283 ReplaceText(DeclLoc, endBuf-startBuf, ByrefType);
4614 const char *startBuf = SM->getCharacterData(startLoc);
4619 messString.append(startBuf, endBuf-startBuf+1);