Hello, About the -### failing, it seems that it related to the way clang returns error.
-O4 uses (lib/Driver/Tools.cpp) Driver.Diag( while the -O20 uses (lib/Frontend/CompilerInvocation.cpp) DiagnosticsEngine.Report( $ /data/pkg-llvm/llvm.svn/build/Release/bin/clang -### -S -O4 /data/pkg-llvm/clang.svn/test/Driver/clang_f_opts.c clang version 3.4 (trunk 194467) Target: x86_64-unknown-linux-gnu Thread model: posix clang: warning: -O4 is equivalent to -O3 "/data/pkg-llvm/llvm.svn/build/Release/bin/clang" [...] $ /data/pkg-llvm/llvm.svn/build/Release/bin/clang -### -S -O20 /data/pkg-llvm/clang.svn/test/Driver/clang_f_opts.c clang version 3.4 (trunk 194467) Target: x86_64-unknown-linux-gnu Thread model: posix "/data/pkg-llvm/llvm.svn/build/Release/bin/clang" [...] => in this case, the warning does not show. Can anyone explain me the difference ? Thanks Sylvestre On 11/11/2013 21:38, Rafael Espíndola wrote: > On 11 November 2013 15:35, Sylvestre Ledru <[email protected]> wrote: >> I still wonder why the -### made my tests failed... and why I missed these >> tests failing :( >> >> >> On 2013-11-11 21:18, Rafael Espíndola wrote: >>> invalid-o-level.c and Misc/warning-flags.c are still failing. >>> >>> On 11 November 2013 14:54, Sylvestre Ledru <[email protected]> wrote: >>>> Author: sylvestre >>>> Date: Mon Nov 11 13:54:40 2013 >>>> New Revision: 194414 >>>> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=194414&view=rev >>>> Log: >>>> Remove -### from the -O20 test, it was failing the test (?) >>>> >>>> Modified: >>>> cfe/trunk/test/Driver/clang_f_opts.c >>>> >>>> Modified: cfe/trunk/test/Driver/clang_f_opts.c >>>> URL: >>>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang_f_opts.c?rev=194414&r1=194413&r2=194414&view=diff >>>> >>>> ============================================================================== >>>> --- cfe/trunk/test/Driver/clang_f_opts.c (original) >>>> +++ cfe/trunk/test/Driver/clang_f_opts.c Mon Nov 11 13:54:40 2013 >>>> @@ -100,7 +100,7 @@ >>>> // CHECK-MAX-O: warning: -O4 is equivalent to -O3 >>>> // CHECK-MAX-O: -O3 >>>> >>>> -// RUN: %clang -### -S -O20 %s 2>&1 | FileCheck >>>> -check-prefix=CHECK-INVALID-O %s >>>> +// RUN: %clang -S -O20 %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-O >>>> %s >>>> // CHECK-INVALID-O: warning: optimization level '-O20' is unsupported; >>>> using '-O3' instead. >>>> >>>> // Test that we don't error on these. >>>> >>>> >>>> _______________________________________________ >>>> cfe-commits mailing list >>>> [email protected] >>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
