[cfe-commits] r54412 - /cfe/trunk/Driver/RewriteObjC.cpp

Steve Naroff snaroff at apple.com
Wed Aug 6 08:58:35 PDT 2008


Author: snaroff
Date: Wed Aug  6 10:58:23 2008
New Revision: 54412

URL: http://llvm.org/viewvc/llvm-project?rev=54412&view=rev
Log:
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).

Modified:
    cfe/trunk/Driver/RewriteObjC.cpp

Modified: cfe/trunk/Driver/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteObjC.cpp?rev=54412&r1=54411&r2=54412&view=diff

==============================================================================
--- cfe/trunk/Driver/RewriteObjC.cpp (original)
+++ cfe/trunk/Driver/RewriteObjC.cpp Wed Aug  6 10:58:23 2008
@@ -1692,7 +1692,9 @@
       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++;
     }





More information about the cfe-commits mailing list