r207814 - -fsyntax-only for a test
Lubos Lunak
l.lunak at centrum.cz
Thu May 1 23:48:22 PDT 2014
On Friday 02 of May 2014, Nick Lewycky wrote:
> On 1 May 2014 17:12, Nick Lewycky <nlewycky at google.com> wrote:
> > On 1 May 2014 16:58, Lubos Lunak <l.lunak at centrum.cz> wrote:
> >> Author: llunak
> >> Date: Thu May 1 18:58:20 2014
> >> New Revision: 207814
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=207814&view=rev
> >> Log:
> >> -fsyntax-only for a test
...
> >> // RUN: %clang_cc1 -E -frewrite-includes %s -I%S/Inputs/ | %clang_cc1
> >> -Wall -fsyntax-only -Wunused-macros -x c - 2>&1 > %t.1
> >> -// RUN: %clang_cc1 -I%S/Inputs/ -Wall -Wunused-macros %s 2>&1 > %t.2
> >> +// RUN: %clang_cc1 -I%S/Inputs/ -Wall -Wunused-macros -fsyntax-only %s
> >> 2>&1 > %t.2
> >
> > Huh? This test is running clang -cc1 which defaults to only syntax
> > checking unless something else is specified. -fsyntax-only isn't a -cc1
> > flag, it's a clang flag.
> >
> > Please revert.
>
> Heh, I just saw the discussion on r207808. I understand what happened.
>
> %clang has its own set of flags and reads them, then fork+exec's %clang_cc1
> with a different set of flags. The suggestion of using -fsyntax-only and
> updating to %clang_cc1 were mutually incompatible, just using %clang_cc1
> was the right thing here.
Well, there are about 2670 tests that use %clang_cc1 -fsyntax-only (including
the first call of this very test even before I added the flag to the second
call), so apparently it is not mutually incompatible. So if it is not
supposed to be there, you rather want the right grep+sed and I don't feel
like doing that for 2670 tests, given that I had no idea about this.
--
Lubos Lunak
More information about the cfe-commits
mailing list