[cfe-commits] r63713 - /cfe/trunk/test/Preprocessor/line-directive.c
Piotr Rak
piotr.rak at gmail.com
Tue Feb 3 22:40:00 PST 2009
Hi Chris,
2009/2/4 Chris Lattner <sabre at nondot.org>:
> Author: lattner
> Date: Tue Feb 3 20:17:09 2009
> New Revision: 63713
>
> URL: http://llvm.org/viewvc/llvm-project?rev=63713&view=rev
> Log:
> Add simple #line directive test.
>
> Modified:
> cfe/trunk/test/Preprocessor/line-directive.c
>
> Modified: cfe/trunk/test/Preprocessor/line-directive.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/line-directive.c?rev=63713&r1=63712&r2=63713&view=diff
>
Starting from this commit make test fails Preprocessor/line-directive.c test.
Running 'clang -E test/Preprocessor/line-directive.c' I get:
test/Preprocessor/line-directive.c:5:7: error: #line directive
requires a positive integer argument
#line 'a' // expected-error {{#line directive requires a
positive integer argument}}
^
test/Preprocessor/line-directive.c:6:7: error: #line directive
requires a positive integer argument
#line 0 // expected-error {{#line directive requires a
positive integer argument}}
^
test/Preprocessor/line-directive.c:42:10: error: invalid filename for
#line directive
#line 42 'a' // expected-error {{invalid filename for #line directive}}
^
clang: /home/prak/projects/llvm.git/tools/clang/lib/Basic/SourceManager.cpp:132:
const char* clang::LineTableInfo::getFilename(unsigned int) const:
Assertion `ID < FilenamesByID.size() && "Invalid FilenameID"' failed.
Przerwane
It is linux x86, using gcc 4.1.2 now.
> ==============================================================================
> --- cfe/trunk/test/Preprocessor/line-directive.c (original)
> +++ cfe/trunk/test/Preprocessor/line-directive.c Tue Feb 3 20:17:09 2009
> @@ -1,4 +1,6 @@
> -// RUN: clang -fsyntax-only -verify -pedantic %s
> +// RUN: clang -fsyntax-only -verify -pedantic %s &&
> +// RUN: clang -E %s 2>&1 | grep 'blonk.c:92:2: error: #error ABC' &&
> +// RUN: clang -E %s 2>&1 | grep 'blonk.c:93:2: error: #error DEF'
>
> #line 'a' // expected-error {{#line directive requires a positive integer argument}}
> #line 0 // expected-error {{#line directive requires a positive integer argument}}
> @@ -25,3 +27,10 @@
> # 42 "foo" 3 1 // expected-error {{invalid flag line marker directive}}
> # 42 "foo" 42 // expected-error {{invalid flag line marker directive}}
> # 42 "foo" 1 2 // expected-error {{invalid flag line marker directive}}
> +
> +
> +// These are checked by the RUN line.
> +#line 92 "blonk.c"
> +#error ABC // expected-error {{#error ABC}}
> +#error DEF // expected-error {{#error DEF}}
> +
>
Piotr
More information about the cfe-commits
mailing list