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

Ted Kremenek kremenek at apple.com
Mon Apr 18 16:58:14 PDT 2011


Thanks Francois.

On Apr 18, 2011, at 4:33 PM, Francois Pichet wrote:

> Author: fpichet
> Date: Mon Apr 18 18:33:22 2011
> New Revision: 129732
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=129732&view=rev
> Log:
> Unbreak the MSVC build: Don't mix variable declarations and statements in a .c file.
> 
> 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=129732&r1=129731&r2=129732&view=diff
> ==============================================================================
> --- cfe/trunk/tools/c-index-test/c-index-test.c (original)
> +++ cfe/trunk/tools/c-index-test/c-index-test.c Mon Apr 18 18:33:22 2011
> @@ -372,9 +372,11 @@
> 
> void PrintMemoryUsage(CXTranslationUnit TU) {
>   CXTUMemoryUsage usage = clang_getCXTUMemoryUsage(TU);
> -  fprintf(stderr, "Memory usage:\n");
>   unsigned long total = 0.0;
> -  for (unsigned i = 0, n = usage.numEntries; i != n; ++i) {
> +  unsigned i, n;
> +
> +  fprintf(stderr, "Memory usage:\n");
> +  for (i = 0, n = usage.numEntries; i != n; ++i) {
>     const char *name = clang_getTUMemoryUsageName(usage.entries[i].kind);
>     unsigned long amount = usage.entries[i].amount;
>     total += amount;
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list