r189110 - Respect -Wnewline-eof even in C++11 mode.
Jordan Rose
jordan_rose at apple.com
Fri Aug 23 09:13:23 PDT 2013
On Aug 23, 2013, at 9:11 , Dmitri Gribenko <gribozavr at gmail.com> wrote:
> On Fri, Aug 23, 2013 at 8:42 AM, Jordan Rose <jordan_rose at apple.com> wrote:
>> Modified: cfe/trunk/test/Lexer/newline-eof.c
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/newline-eof.c?rev=189110&r1=189109&r2=189110&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Lexer/newline-eof.c (original)
>> +++ cfe/trunk/test/Lexer/newline-eof.c Fri Aug 23 10:42:01 2013
>> @@ -1,9 +1,15 @@
>> -// RUN: %clang_cc1 -fsyntax-only -Wnewline-eof -verify %s
>> -// RUN: %clang_cc1 -fsyntax-only -Wnewline-eof %s 2>&1 | FileCheck %s
>> +// RUN: %clang -fsyntax-only -Wnewline-eof -verify %s
>> +// RUN: %clang -fsyntax-only -pedantic -verify %s
>> +// RUN: %clang -fsyntax-only -x c++ -std=c++03 -pedantic -verify %s
>> +// RUN: %clang -fsyntax-only -Wnewline-eof %s 2>&1 | FileCheck %s
>> // rdar://9133072
>>
>> +// In C++11 mode, this is allowed, so don't warn in pedantic mode.
>> +// RUN: %clang -fsyntax-only -x c++ -std=c++11 -Wnewline-eof -verify %s
>
> Why not %clang_cc1?
Hm, in retrospect I'm not sure why I did that. I'll change it back.
>
>> +// RUN: %clang -fsyntax-only -x c++ -std=c++11 -pedantic %s
>
> Will this RUN line fail if we emit the warning? Maybe add -Werror?
Right. Thanks!
>
> Dmitri
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the cfe-commits
mailing list