diff options
Diffstat (limited to 'test/PCH/line-directive-nofilename.c')
-rw-r--r-- | test/PCH/line-directive-nofilename.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/PCH/line-directive-nofilename.c b/test/PCH/line-directive-nofilename.c new file mode 100644 index 000000000000..0d2bcb78c2a4 --- /dev/null +++ b/test/PCH/line-directive-nofilename.c @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -emit-pch -o %t %S/line-directive-nofilename.h +// RUN: not %clang_cc1 -include-pch %t -fsyntax-only %s 2>&1 | FileCheck %s + +// This causes an "error: redefinition" diagnostic. The notes will have the +// locations of the declarations from the PCH file. +double foo, bar; + +// CHECK: line-directive-nofilename.h:42:5: note: previous definition is here +// CHECK: foobar.h:100:5: note: previous definition is here |