[cfe-dev] message-length.c

John Thompson john.thompson.jtsoftware at gmail.com
Fri Oct 23 09:32:04 PDT 2009


Daniel,

I did some playing around with message-length.c, and I think the '\r''s are
confusing FileCheck.  I think it's the regex function, which is seeing them,
because the file is opened in binary mode.
This seems to be the easy fix:

Index: test/Misc/message-length.c
===================================================================
--- test/Misc/message-length.c (revision 84858)
+++ test/Misc/message-length.c (working copy)
@@ -29,4 +29,4 @@


 // CHECK: FILE:23:78
-// CHECK: {{^  ...// some long comment text and a brace, eh {} $}}
+// CHECK: {{^  ...// some long comment text and a brace, eh {} .$}}
I tried to match things with '\r' in it, but couldn't get it to work.
Alternatively, we could mess with FileCheck, but I was afraid to.  It uses
the MemoryBuffer function to read the file, so it's hard to chang the open
mode there.

-John

On Wed, Oct 21, 2009 at 12:58 PM, John Thompson <
john.thompson.jtsoftware at gmail.com> wrote:

> Nudge (1 of 3)
>
>
> On Mon, Oct 19, 2009 at 8:56 AM, John Thompson <
> john.thompson.jtsoftware at gmail.com> wrote:
>
>> Daniel,
>>
>> After updating, I noticed this test newly failing on Windows:
>>
>> 1>********************
>> 1>FAIL: Clang::Misc/message-length.c (728 of 1688)
>> 1>******************** TEST 'Clang::Misc/message-length.c' FAILED
>> ********************
>> 1>Script:
>> 1>--
>> 1>C:/Tools/llvm/bin/Debug\clang.EXE -fsyntax-only -fmessage-length=72
>> C:\Tools\llvm\tools\clang\test\Misc\message-length.c 2>&1 | FileCheck
>> -strict-whitespace C:\Tools\llvm\tools\clang\test\Misc\message-length.c
>> 1>C:/Tools/llvm/bin/Debug\clang.EXE -fsyntax-only -fmessage-length=1
>> C:\Tools\llvm\tools\clang\test\Misc\message-length.c
>> 1>--
>> 1>Exit Code: 1
>> 1>Command Output (stdout):
>> 1>--
>> 1>Command 0: "C:/Tools/llvm/bin/Debug\clang.EXE" "-fsyntax-only"
>> "-fmessage-length=72" "C:\Tools\llvm\tools\clang\test\Misc\message-length.c"
>> 1>Command 0 Result: 0
>> 1>Command 0 Output:
>> 1>Command 0 Stderr:
>> 1>Command 1: "FileCheck" "-strict-whitespace"
>> "C:\Tools\llvm\tools\clang\test\Misc\message-length.c"
>> 1>Command 1 Result: 1
>> 1>Command 1 Output:
>> 1>Command 1 Stderr:
>> 1>C:\Tools\llvm\tools\clang\test\Misc\message-length.c:32:67: error:
>> expected string not found in input
>> 1>// CHECK: {{^  ...// some long comment text and a brace, eh {} $}}
>> 1>                                                                  ^
>> 1><stdin>:18:11: note: scanning from here
>> 1>FILE:23:78: warning: expected 'ON' or 'OFF' or 'DEFAULT' in pragma
>> 1>          ^
>> 1>--
>> 1>Command Output (stderr):
>> 1>--
>> 1>--
>>
>> -John
>>
>> --
>> John Thompson
>> John.Thompson.JTSoftware at gmail.com
>>
>>
>
>
> --
> John Thompson
> John.Thompson.JTSoftware at gmail.com
>
>


-- 
John Thompson
John.Thompson.JTSoftware at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091023/173bbcef/attachment.html>


More information about the cfe-dev mailing list