[cfe-commits] r86556 - /cfe/trunk/tools/c-index-test/c-index-test.c

Douglas Gregor dgregor at apple.com
Mon Nov 9 09:05:28 PST 2009


Author: dgregor
Date: Mon Nov  9 11:05:28 2009
New Revision: 86556

URL: http://llvm.org/viewvc/llvm-project?rev=86556&view=rev
Log:
C doesn't allow mixing declarations and statements, silly

Modified:
    cfe/trunk/tools/c-index-test/c-index-test.c

Modified: cfe/trunk/tools/c-index-test/c-index-test.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/c-index-test.c?rev=86556&r1=86555&r2=86556&view=diff

==============================================================================
--- cfe/trunk/tools/c-index-test/c-index-test.c (original)
+++ cfe/trunk/tools/c-index-test/c-index-test.c Mon Nov  9 11:05:28 2009
@@ -163,6 +163,7 @@
   
   N = clang_getNumCompletionChunks(completion_string);
   for (I = 0; I != N; ++I) {
+    const char *text = 0;
     enum CXCompletionChunkKind Kind
       = clang_getCompletionChunkKind(completion_string, I);
     
@@ -175,8 +176,7 @@
       continue;
     }
     
-    const char *text 
-      = clang_getCompletionChunkText(completion_string, I);
+    text = clang_getCompletionChunkText(completion_string, I);
     fprintf(file, "{%s %s}", 
             clang_getCompletionChunkKindSpelling(Kind),
             text? text : "");





More information about the cfe-commits mailing list