[cfe-dev] disabling MS extensions on some tests

Chris Lattner clattner at apple.com
Thu Oct 22 13:02:52 PDT 2009


On Oct 22, 2009, at 11:47 AM, John Thompson wrote:

> One more:
>
> Index: test/Preprocessor/macro_paste_bcpl_comment.c
> ===================================================================
> --- test/Preprocessor/macro_paste_bcpl_comment.c (revision 84858)
> +++ test/Preprocessor/macro_paste_bcpl_comment.c (working copy)
> @@ -1,4 +1,4 @@
> -// RUN: clang-cc %s -Eonly 2>&1 | grep error
> +// RUN: clang-cc %s -Eonly -fms-extensions=0 2>&1 | grep error
>
>  #define COMM1 / ## /
>  COMM1
>
> I did a little digging in the code with this one.  On Windows it  
> definitely does treat /##/ as an extension for Microsoft mode (see  
> TokenLexer.cpp:467).  Perhaps there is a way to test for both cases,  
> but I'm not sure how to set it up.  Is there a way to check for grep  
> failing or an empty file in this case?

This patch is ok, please commit it.

-Chris

>
> -John
>
> On Wed, Oct 21, 2009 at 12:05 PM, John Thompson <john.thompson.jtsoftware at gmail.com 
> > wrote:
> By adding -fms-extensions=0 to some of the tests previously failing  
> on Windows, it makes these 6 tests pass on Windows.
>
> The question is, are these legitimate differences between the  
> default Clang behavior and MSVC?
>
> They seem sort of reasonable, but I'm not knowledgeable enough to  
> say for sure.
>
> The enclosed patch contains these changes.
>
> Here is the previous test output:
>
> 1>********************
> 1>FAIL: Clang::SemaTemplate/nested-name-spec-template.cpp (1664 of  
> 1692)
> 1>******************** TEST 'Clang::SemaTemplate/nested-name-spec- 
> template.cpp' FAILED ********************
> 1>Script:
> 1>--
> 1>C:/Tools/llvm/bin/Debug/clang-cc.exe -fsyntax-only -verify C:\Tools 
> \llvm\tools\clang\test\SemaTemplate\nested-name-spec-template.cpp
> 1>--
> 1>Exit Code: 1
> 1>Command Output (stdout):
> 1>--
> 1>Command 0: "C:/Tools/llvm/bin/Debug/clang-cc.exe" "-fsyntax-only"  
> "-verify" "C:\Tools\llvm\tools\clang\test\SemaTemplate\nested-name- 
> spec-template.cpp"
> 1>Command 0 Result: 1
> 1>Command 0 Output:
> 1>Command 0 Stderr:
> 1>Errors expected but not seen:
> 1>  Line 34: C++ requires a type specifier for all declarations
> 1>Warnings seen but not expected:
> 1>  Line 34: type specifier missing, defaults to 'int'
> 1>--
> 1>Command Output (stderr):
> 1>--
> 1>--
> 1>********************
> 1>FAIL: Clang::Preprocessor/line-directive.c (903 of 1692)
> 1>******************** TEST 'Clang::Preprocessor/line-directive.c'  
> FAILED ********************
> 1>Script:
> 1>--
> 1>C:/Tools/llvm/bin/Debug/clang-cc.exe -fsyntax-only -verify - 
> pedantic C:\Tools\llvm\tools\clang\test\Preprocessor\line-directive.c
> 1>C:/Tools/llvm/bin/Debug/clang-cc.exe -E C:\Tools\llvm\tools\clang 
> \test\Preprocessor\line-directive.c 2>&1 | grep 'blonk.c:92:2:  
> error: #error ABC'
> 1>C:/Tools/llvm/bin/Debug/clang-cc.exe -E C:\Tools\llvm\tools\clang 
> \test\Preprocessor\line-directive.c 2>&1 | grep 'blonk.c:93:2:  
> error: #error DEF'
> 1>--
> 1>Exit Code: 1
> 1>Command Output (stdout):
> 1>--
> 1>Command 0: "C:/Tools/llvm/bin/Debug/clang-cc.exe" "-fsyntax-only"  
> "-verify" "-pedantic" "C:\Tools\llvm\tools\clang\test\Preprocessor 
> \line-directive.c"
> 1>Command 0 Result: 1
> 1>Command 0 Output:
> 1>Command 0 Stderr:
> 1>Errors expected but not seen:
> 1>  Line 44: redefinition of typedef 'x' is invalid in C
> 1>  Line 65: redefinition of typedef 'w' is invalid in C
> 1>Notes expected but not seen:
> 1>  Line 43: previous definition is here
> 1>  Line 64: previous definition is here
> 1>--
> 1>Command Output (stderr):
> 1>--
> 1>--
> 1>********************
> 1>FAIL: Clang::Parser/cxx-template-decl.cpp (793 of 1692)
> 1>******************** TEST 'Clang::Parser/cxx-template-decl.cpp'  
> FAILED ********************
> 1>Script:
> 1>--
> 1>C:/Tools/llvm/bin/Debug/clang-cc.exe -fsyntax-only -verify C:\Tools 
> \llvm\tools\clang\test\Parser\cxx-template-decl.cpp
> 1>--
> 1>Exit Code: 1
> 1>Command Output (stdout):
> 1>--
> 1>Command 0: "C:/Tools/llvm/bin/Debug/clang-cc.exe" "-fsyntax-only"  
> "-verify" "C:\Tools\llvm\tools\clang\test\Parser\cxx-template- 
> decl.cpp"
> 1>Command 0 Result: 1
> 1>Command 0 Output:
> 1>Command 0 Stderr:
> 1>Errors expected but not seen:
> 1>  Line 5: C++ requires a type specifier for all declarations
> 1>  Line 57: declaration of 'T' shadows template parameter
> 1>  Line 61: declaration of 'T' shadows template parameter
> 1>  Line 64: declaration of 'T' shadows template parameter
> 1>  Line 68: declaration of 'Size' shadows template parameter
> 1>  Line 73: shadows
> 1>  Line 78: shadows
> 1>Warnings seen but not expected:
> 1>  Line 5: type specifier missing, defaults to 'int'
> 1>Notes expected but not seen:
> 1>  Line 56: template parameter is declared here
> 1>  Line 60: template parameter is declared here
> 1>  Line 63: template parameter is declared here
> 1>  Line 67: template parameter is declared here
> 1>  Line 71: here
> 1>  Line 76: here
> 1>--
> 1>Command Output (stderr):
> 1>--
> 1>--
> 1>********************
> 1>FAIL: Clang::SemaCXX/implicit-int.cpp (1290 of 1692)
> 1>******************** TEST 'Clang::SemaCXX/implicit-int.cpp' FAILED  
> ********************
> 1>Script:
> 1>--
> 1>C:/Tools/llvm/bin/Debug/clang-cc.exe -fsyntax-only -verify C:\Tools 
> \llvm\tools\clang\test\SemaCXX\implicit-int.cpp
> 1>--
> 1>Exit Code: 1
> 1>Command Output (stdout):
> 1>--
> 1>Command 0: "C:/Tools/llvm/bin/Debug/clang-cc.exe" "-fsyntax-only"  
> "-verify" "C:\Tools\llvm\tools\clang\test\SemaCXX\implicit-int.cpp"
> 1>Command 0 Result: 1
> 1>Command 0 Output:
> 1>Command 0 Stderr:
> 1>Errors expected but not seen:
> 1>  Line 3: C++ requires a type specifier for all declarations
> 1>  Line 5: C++ requires a type specifier for all declarations
> 1>Warnings seen but not expected:
> 1>  Line 3: type specifier missing, defaults to 'int'
> 1>  Line 5: type specifier missing, defaults to 'int'
> 1>--
> 1>Command Output (stderr):
> 1>--
> 1>--
> 1>********************
> 1>FAIL: Clang::SemaCXX/typedef-redecl.cpp (1352 of 1692)
> 1>******************** TEST 'Clang::SemaCXX/typedef-redecl.cpp'  
> FAILED ********************
> 1>Script:
> 1>--
> 1>C:/Tools/llvm/bin/Debug/clang-cc.exe -fsyntax-only -verify C:\Tools 
> \llvm\tools\clang\test\SemaCXX\typedef-redecl.cpp
> 1>--
> 1>Exit Code: 1
> 1>Command Output (stdout):
> 1>--
> 1>Command 0: "C:/Tools/llvm/bin/Debug/clang-cc.exe" "-fsyntax-only"  
> "-verify" "C:\Tools\llvm\tools\clang\test\SemaCXX\typedef-redecl.cpp"
> 1>Command 0 Result: 1
> 1>Command 0 Output:
> 1>Command 0 Stderr:
> 1>Errors expected but not seen:
> 1>  Line 10: redefinition of 'result_type'
> 1>Notes expected but not seen:
> 1>  Line 9: previous definition is here
> 1>--
> 1>Command Output (stderr):
> 1>--
> 1>--
> 1>********************
> 1>FAIL: Clang::SemaCXX/nested-name-spec.cpp (1309 of 1692)
> 1>******************** TEST 'Clang::SemaCXX/nested-name-spec.cpp'  
> FAILED ********************
> 1>Script:
> 1>--
> 1>C:/Tools/llvm/bin/Debug/clang-cc.exe -fsyntax-only -std=c++98 - 
> verify C:\Tools\llvm\tools\clang\test\SemaCXX\nested-name-spec.cpp
> 1>--
> 1>Exit Code: 1
> 1>Command Output (stdout):
> 1>--
> 1>Command 0: "C:/Tools/llvm/bin/Debug/clang-cc.exe" "-fsyntax-only"  
> "-std=c++98" "-verify" "C:\Tools\llvm\tools\clang\test\SemaCXX 
> \nested-name-spec.cpp"
> 1>Command 0 Result: 1
> 1>Command 0 Output:
> 1>Command 0 Stderr:
> 1>Errors expected but not seen:
> 1>  Line 171: C++ requires a type specifier for all declarations
> 1>  Line 192: C++ requires a type specifier for all declarations
> 1>Errors seen but not expected:
> 1>  Line 195: cannot initialize 'a3' with an lvalue of type 'int'
> 1>Warnings seen but not expected:
> 1>  Line 171: type specifier missing, defaults to 'int'
> 1>  Line 192: type specifier missing, defaults to 'int'
> 1>--
> 1>Command Output (stderr):
> 1>--
> 1>--
>
>
> -- 
> John Thompson
> John.Thompson.JTSoftware at gmail.com
>
>
>
>
> -- 
> John Thompson
> John.Thompson.JTSoftware at gmail.com
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091022/00319e8a/attachment.html>


More information about the cfe-dev mailing list