r215046 - Use -Rblah, not -Wblah, to control remark diagnostics. This was always the

David Blaikie dblaikie at gmail.com
Thu Aug 7 12:11:06 PDT 2014


On Thu, Aug 7, 2014 at 11:57 AM, Justin Bogner <mail at justinbogner.com> wrote:
> Richard Smith <richard-llvm at metafoo.co.uk> writes:
>> Author: rsmith
>> Date: Wed Aug  6 19:24:21 2014
>> New Revision: 215046
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=215046&view=rev
>> Log:
>> Use -Rblah, not -Wblah, to control remark diagnostics. This was always the
>> intent when we added remark support, but was never implemented in the general
>> case, because the first -R flags didn't need it. (-Rpass= had special handling
>> to accomodate its argument.)
>
> <snip>
>
>> Modified: cfe/trunk/test/Modules/Rmodule-build.m
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Rmodule-build.m?rev=215046&r1=215045&r2=215046&view=diff==============================================================================
>> --- cfe/trunk/test/Modules/Rmodule-build.m (original)
>> +++ cfe/trunk/test/Modules/Rmodule-build.m Wed Aug  6 19:24:21 2014
>> @@ -7,7 +7,7 @@
>>  // RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap
>>
>>  // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -verify \
>> -// RUN:            -I %t -Wmodule-build
>> +// RUN:            -I %t -Rmodule-build
>>
>>  @import A; // expected-remark{{building module 'A' as}}
>>  @import B; // expected-remark{{building module 'B' as}}
>> @@ -16,7 +16,19 @@
>>
>>  // RUN: echo ' ' >> %t/B.h
>>  // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
>> -// RUN:            -Wmodule-build 2>&1 | FileCheck %s
>> +// RUN:            -Rmodule-build 2>&1 | FileCheck %s
>> +
>> +// RUN: echo ' ' >> %t/B.h
>> +// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
>> +// RUN:            -Reverything 2>&1 | FileCheck %s
>> +
>> +// RUN: echo ' ' >> %t/B.h
>> +// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
>> +// RUN:            2>&1 | count 0
>> +
>> +// RUN: echo ' ' >> %t/B.h
>> +// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
>> +// RUN:            -Rmodule-build -Rno-everything 2>&1 | count 0
>>
>>  // CHECK-NOT: building module 'A'
>>  // CHECK: building module 'B'
>
> stderr piped into "count 0" in tests breaks when guard malloc is
> involved. Please don't do it.

I'm curious - why does guard malloc hurt this? I imagine anything that
just writes extra stuff to stdout/stderr is probably not something we
want in the test environment (it sounds like that's what you're
implying guard malloc does).

>
> Historically there hasn't been a very good alternative, so I've added a
> -allow-empty flag to FileCheck in r215127 and used it in r215129 to fix
> this.
> _______________________________________________
> 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