diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-04 05:33:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-04 05:33:01 +0000 |
commit | 6b3066780bda02e3117d71a18ca2f430ed1454af (patch) | |
tree | 3875355647e996c6983acb03cb56fe0b1d18fcbe /test/Preprocessor/line-directive.c | |
parent | 9d79ebac47ffde6a1cb312f4c09b66b1b9a397fb (diff) |
make getFileCharacteristic linetable aware. line markers that
play around with the 'is system header' bit now function correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63720 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/line-directive.c')
-rw-r--r-- | test/Preprocessor/line-directive.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/Preprocessor/line-directive.c b/test/Preprocessor/line-directive.c index 6946ad4854..0a4b582239 100644 --- a/test/Preprocessor/line-directive.c +++ b/test/Preprocessor/line-directive.c @@ -34,3 +34,23 @@ #error ABC // expected-error {{#error ABC}} #error DEF // expected-error {{#error DEF}} + +// Verify that linemarker diddling of the system header flag works. + +# 192 "glomp.h" // not a system header. +typedef int x; // expected-note {{previous definition is here}} +typedef int x; // expected-error {{redefinition of 'x'}} + +# 192 "glomp.h" 3 // System header. +typedef int y; // ok +typedef int y; // ok + +#line 42 "blonk.h" // doesn't change system headerness. + +typedef int z; // ok +typedef int z; // ok + +# 42 "blonk.h" // DOES change system headerness. + +typedef int w; // expected-note {{previous definition is here}} +typedef int w; // expected-error {{redefinition of 'w'}} |