fix PR3579: __LINE__ expands to the presumed location of the
*end* of a macro instantiation, not the start of it. This is
really all about bug-for-bug compatibility with GCC, but not
doing this breaks the FreeBSD kernel.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64603 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Preprocessor/builtin_line.c b/test/Preprocessor/builtin_line.c
index c9ce558..7698d5f 100644
--- a/test/Preprocessor/builtin_line.c
+++ b/test/Preprocessor/builtin_line.c
@@ -1,4 +1,13 @@
-// RUN: clang %s -E | grep "^ 4"
+// RUN: clang %s -E | grep "^ 4" &&
#define FOO __LINE__
FOO
+
+// PR3579 - This should expand to the __LINE__ of the ')' not of the X.
+// RUN: clang %s -E | grep "^A 13"
+
+#define X() __LINE__
+
+A X(
+
+)