Fix for <rdar://problem/6113807> clang ObjC rewriter: crash rewriting attached file

While this is a safe rewriter fix, there is still a need for some discussion (see report for more info).

llvm-svn: 54412
This commit is contained in:
Steve Naroff 2008-08-06 15:58:23 +00:00
parent 04f4c833e9
commit c884aa8e84
1 changed files with 3 additions and 1 deletions

View File

@ -1692,7 +1692,9 @@ void RewriteObjC::RewriteObjCQualifiedInterfaceTypes(Decl *Dcl) {
startBuf = ++endBuf;
}
else {
while (*startBuf != ')' && *startBuf != ',')
// If the function name is derived from a macro expansion, then the
// argument buffer will not follow the name. Need to speak with Chris.
while (*startBuf && *startBuf != ')' && *startBuf != ',')
startBuf++; // scan forward (from the decl location) for argument types.
startBuf++;
}