diff options
author | Michael Ilseman <milseman@apple.com> | 2013-04-10 01:04:18 +0000 |
---|---|---|
committer | Michael Ilseman <milseman@apple.com> | 2013-04-10 01:04:18 +0000 |
commit | e910cc8e0708b5458be2599191cf14dc46bd2bfa (patch) | |
tree | 05a85f62d31ddeb3c54def14125b36880ab6c85e /clang/test | |
parent | e1368a107a3ec58b121d369468d8d047c3201395 (diff) | |
download | bcm5719-llvm-e910cc8e0708b5458be2599191cf14dc46bd2bfa.tar.gz bcm5719-llvm-e910cc8e0708b5458be2599191cf14dc46bd2bfa.zip |
Improve the diagnostics of the number-reading preprocessor directives.
The GNU line marker directive was sharing code with the #line directive, but some of the warnings/errors were reporting as #line directive diagnostics in both cases.
Previously:
#line 11foo1 ==> "#line directive requires a simple digit sequence"
# 11foo1 ==> "#line directive requires a simple digit sequence"
Now, we get:
#line 11foo1 ==> "#line directive requires a simple digit sequence"
# 11foo1 ==> "GNU line marker directive requires a simple digit sequence"
llvm-svn: 179139
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Preprocessor/line-directive.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/Preprocessor/line-directive.c b/clang/test/Preprocessor/line-directive.c index ffa7c5a4197..95a9b904de9 100644 --- a/clang/test/Preprocessor/line-directive.c +++ b/clang/test/Preprocessor/line-directive.c @@ -29,7 +29,7 @@ # 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}} - +# 42a33 // expected-error {{GNU line marker directive requires a simple digit sequence}} // These are checked by the RUN line. #line 92 "blonk.c" @@ -83,6 +83,7 @@ typedef int q; // original definition in system header, should not diagnose. // Line markers are digit strings interpreted as decimal numbers, this is // 10, not 8. #line 010 // expected-warning {{#line directive interprets number as decimal, not octal}} +# 010 // expected-warning {{GNU line marker directive interprets number as decimal, not octal}} extern int array[__LINE__ == 10 ? 1:-1]; /* PR3917 */ |