<div dir="ltr">Does removing -Werror help? All the bots on <a href="http://lab.llvm.org:8011/console">http://lab.llvm.org:8011/console</a> look happy.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 21, 2016 at 4:58 PM, Vedant Kumar via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Nico,<br>
<br>
This seems to be causing a test failure on one of our bots:<br>
<br>
<a href="http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/17279/testReport/junit/Clang/Driver/cl_pch_cpp/" rel="noreferrer" target="_blank">http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/17279/testReport/junit/Clang/Driver/cl_pch_cpp/</a><br>
<br>
Command Output (stderr):<br>
--<br>
/Users/buildslave/jenkins/sharedspace/phase1@2/llvm/tools/clang/test/Driver/cl-pch.cpp:314:20: error: expected string not found in input<br>
<span class="">// CHECK-NoSource: file.prof:{{.*}}input unused<br>
</span><stdin>:5:7: note: possible intended match here<br>
clang-3.8: error: argument unused during compilation: '-Werror'<br>
<br>
I'm not sure what exactly is causing the problem, but if -Werror is being ignored, the "input unused" warning may be suppressed somehow.<br>
<br>
I'd appreciate any help looking into this.<br>
<br>
thanks,<br>
vedant<br>
<div class="HOEnZb"><div class="h5"><br>
> On Apr 21, 2016, at 12:59 PM, Nico Weber via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br>
><br>
> Author: nico<br>
> Date: Thu Apr 21 14:59:10 2016<br>
> New Revision: 267040<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=267040&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=267040&view=rev</a><br>
> Log:<br>
> clang-cl: Don't assert on using /Yc with non-source files, PR27450<br>
><br>
> Move phase handling after input type validation.<br>
><br>
> Modified:<br>
> cfe/trunk/lib/Driver/Driver.cpp<br>
> cfe/trunk/test/Driver/cl-pch.cpp<br>
><br>
> Modified: cfe/trunk/lib/Driver/Driver.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=267040&r1=267039&r2=267040&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=267040&r1=267039&r2=267040&view=diff</a><br>
> ==============================================================================<br>
> --- cfe/trunk/lib/Driver/Driver.cpp (original)<br>
> +++ cfe/trunk/lib/Driver/Driver.cpp Thu Apr 21 14:59:10 2016<br>
> @@ -1563,25 +1563,6 @@ void Driver::BuildActions(Compilation &C<br>
> PL.clear();<br>
> types::getCompilationPhases(InputType, PL);<br>
><br>
> - if (YcArg) {<br>
> - // Add a separate precompile phase for the compile phase.<br>
> - if (FinalPhase >= phases::Compile) {<br>
> - llvm::SmallVector<phases::ID, phases::MaxNumberOfPhases> PCHPL;<br>
> - types::getCompilationPhases(types::TY_CXXHeader, PCHPL);<br>
> - Arg *PchInputArg = MakeInputArg(Args, Opts, YcArg->getValue());<br>
> -<br>
> - // Build the pipeline for the pch file.<br>
> - Action *ClangClPch = C.MakeAction<InputAction>(*PchInputArg, InputType);<br>
> - for (phases::ID Phase : PCHPL)<br>
> - ClangClPch = ConstructPhaseAction(C, Args, Phase, ClangClPch);<br>
> - assert(ClangClPch);<br>
> - Actions.push_back(ClangClPch);<br>
> - // The driver currently exits after the first failed command. This<br>
> - // relies on that behavior, to make sure if the pch generation fails,<br>
> - // the main compilation won't run.<br>
> - }<br>
> - }<br>
> -<br>
> // If the first step comes after the final phase we are doing as part of<br>
> // this compilation, warn the user about it.<br>
> phases::ID InitialPhase = PL[0];<br>
> @@ -1614,6 +1595,25 @@ void Driver::BuildActions(Compilation &C<br>
> continue;<br>
> }<br>
><br>
> + if (YcArg) {<br>
> + // Add a separate precompile phase for the compile phase.<br>
> + if (FinalPhase >= phases::Compile) {<br>
> + llvm::SmallVector<phases::ID, phases::MaxNumberOfPhases> PCHPL;<br>
> + types::getCompilationPhases(types::TY_CXXHeader, PCHPL);<br>
> + Arg *PchInputArg = MakeInputArg(Args, Opts, YcArg->getValue());<br>
> +<br>
> + // Build the pipeline for the pch file.<br>
> + Action *ClangClPch = C.MakeAction<InputAction>(*PchInputArg, InputType);<br>
> + for (phases::ID Phase : PCHPL)<br>
> + ClangClPch = ConstructPhaseAction(C, Args, Phase, ClangClPch);<br>
> + assert(ClangClPch);<br>
> + Actions.push_back(ClangClPch);<br>
> + // The driver currently exits after the first failed command. This<br>
> + // relies on that behavior, to make sure if the pch generation fails,<br>
> + // the main compilation won't run.<br>
> + }<br>
> + }<br>
> +<br>
> phases::ID CudaInjectionPhase =<br>
> (phases::Compile < FinalPhase &&<br>
> llvm::find(PL, phases::Compile) != PL.end())<br>
><br>
> Modified: cfe/trunk/test/Driver/cl-pch.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-pch.cpp?rev=267040&r1=267039&r2=267040&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-pch.cpp?rev=267040&r1=267039&r2=267040&view=diff</a><br>
> ==============================================================================<br>
> --- cfe/trunk/test/Driver/cl-pch.cpp (original)<br>
> +++ cfe/trunk/test/Driver/cl-pch.cpp Thu Apr 21 14:59:10 2016<br>
> @@ -296,7 +296,7 @@<br>
> // CHECK-YCTC: -o<br>
> // CHECK-YCTC: pchfile.pch<br>
> // CHECK-YCTC: -x<br>
> -// CHECK-YCTP: "c"<br>
> +// CHECK-YCTC: "c"<br>
><br>
> // Also check lower-case /Tc variant.<br>
> // RUN: %clang_cl -Werror /Ycpchfile.h /FIpchfile.h /c -### /Tc%s 2>&1 \<br>
> @@ -307,3 +307,18 @@<br>
> // CHECK-YCTc: pchfile.pch<br>
> // CHECK-YCTc: -x<br>
> // CHECK-YCTc: "c"<br>
> +<br>
> +// Don't crash when a non-source file is passed.<br>
> +// RUN: %clang_cl -Werror /Ycpchfile.h /FIpchfile.h /c -### %S/Inputs/file.prof 2>&1 \<br>
> +// RUN: | FileCheck -check-prefix=CHECK-NoSource %s<br>
> +// CHECK-NoSource: file.prof:{{.*}}input unused<br>
> +<br>
> +// ...but if an explicit file turns the file into a source file, handle it:<br>
> +// RUN: %clang_cl /TP -Werror /Ycpchfile.h /FIpchfile.h /c -### %S/Inputs/file.prof 2>&1 \<br>
> +// RUN: | FileCheck -check-prefix=CHECK-NoSourceTP %s<br>
> +// CHECK-NoSourceTP: cc1<br>
> +// CHECK-NoSourceTP: -emit-pch<br>
> +// CHECK-NoSourceTP: -o<br>
> +// CHECK-NoSourceTP: pchfile.pch<br>
> +// CHECK-NoSourceTP: -x<br>
> +// CHECK-NoSourceTP: "c++"<br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br></div>