diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-04-29 00:54:03 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-04-29 00:54:03 +0000 |
| commit | c7cacdc3327de057bfa25d2195cce1f8146e8769 (patch) | |
| tree | 4fc19a5e3cc7dac389ced8441d67c7d1c8570146 /clang/test | |
| parent | ced8d3aaa966459222276a33f10dbc6f8163834d (diff) | |
| download | bcm5719-llvm-c7cacdc3327de057bfa25d2195cce1f8146e8769.tar.gz bcm5719-llvm-c7cacdc3327de057bfa25d2195cce1f8146e8769.zip | |
PR26771: don't forget the " 2" (returning from #included file) linemarker after including an empty file with -frewrite-includes.
llvm-svn: 301727
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Frontend/Inputs/empty.h | 0 | ||||
| -rw-r--r-- | clang/test/Frontend/rewrite-includes-line-markers.c | 8 |
2 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Frontend/Inputs/empty.h b/clang/test/Frontend/Inputs/empty.h new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/clang/test/Frontend/Inputs/empty.h diff --git a/clang/test/Frontend/rewrite-includes-line-markers.c b/clang/test/Frontend/rewrite-includes-line-markers.c index 14692a19e9b..f5fb627fec1 100644 --- a/clang/test/Frontend/rewrite-includes-line-markers.c +++ b/clang/test/Frontend/rewrite-includes-line-markers.c @@ -3,6 +3,8 @@ #include "test.h" int f() { return x; } +#include "empty.h" + // GNU: {{^}}# 1 "{{.*}}rewrite-includes-line-markers.c" // GNU: {{^}}#include "test.h" // GNU: {{^}}# 1 "{{.*}}test.h" @@ -11,6 +13,9 @@ int f() { return x; } // GNU: {{^}}int x; // GNU: {{^}}# 4 "{{.*}}rewrite-includes-line-markers.c" 2 // GNU: {{^}}int f() { return x; } +// GNU: {{^}} +// GNU: {{^}}# 1 "{{.*}}empty.h" 1 +// GNU: {{^}}# 7 "{{.*}}rewrite-includes-line-markers.c" 2 // LINE: {{^}}#line 1 "{{.*}}rewrite-includes-line-markers.c" // LINE: {{^}}#include "test.h" @@ -20,3 +25,6 @@ int f() { return x; } // LINE: {{^}}int x; // LINE: {{^}}#line 4 "{{.*}}rewrite-includes-line-markers.c" // LINE: {{^}}int f() { return x; } +// LINE: {{^}} +// LINE: {{^}}#line 1 "{{.*}}empty.h" +// LINE: {{^}}#line 7 "{{.*}}rewrite-includes-line-markers.c" |

