summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/retain-comments-from-system-headers.c
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-09-13 17:25:51 +0000
committerTed Kremenek <kremenek@apple.com>2012-09-13 17:25:51 +0000
commit12c7799c550dffde579f9001194309a2b0801adf (patch)
treefb4a6f45307a7a9dc57a729475e4b5d49750b0e4 /clang/test/Index/retain-comments-from-system-headers.c
parentfcdd9b120d1be866bfa4ad3736789b3c7a8aac92 (diff)
downloadbcm5719-llvm-12c7799c550dffde579f9001194309a2b0801adf.tar.gz
bcm5719-llvm-12c7799c550dffde579f9001194309a2b0801adf.zip
Add tests for r163778.
llvm-svn: 163812
Diffstat (limited to 'clang/test/Index/retain-comments-from-system-headers.c')
-rw-r--r--clang/test/Index/retain-comments-from-system-headers.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/Index/retain-comments-from-system-headers.c b/clang/test/Index/retain-comments-from-system-headers.c
new file mode 100644
index 00000000000..a9b2e2f1ef3
--- /dev/null
+++ b/clang/test/Index/retain-comments-from-system-headers.c
@@ -0,0 +1,19 @@
+// Run lines are sensitive to line numbers and come below the code.
+
+#include "retain-comments-from-system-headers.h"
+
+/**
+ * user_function
+ * \param a Aaa.
+ */
+int user_function(int a);
+
+// RUN: c-index-test -test-load-source all %s -I %S/Inputs | FileCheck %s
+// RUN: c-index-test -test-load-source all %s -fretain-comments-from-system-headers -I %S/Inputs | FileCheck %s -check-prefix=RETAIN
+
+// CHECK: retain-comments-from-system-headers.h:7:5: FunctionDecl=system_function:7:5 Extent=[7:1 - 7:27]
+// CHECK: retain-comments-from-system-headers.c:9:5: FunctionDecl=user_function:9:5 RawComment=[/**\n * user_function\n * \param a Aaa.\n */] RawCommentRange=[5:1 - 8:4] BriefComment=[user_function]
+
+// CHECK-RETAIN: retain-comments-from-system-headers.h:7:5: FunctionDecl=system_function:7:5 RawComment=[/**\n * system_function\n * \param a Aaa.\n */] RawCommentRange=[3:1 - 6:4] BriefComment=[system_function]
+// CHECK-RETAIN: retain-comments-from-system-headers.c:9:5: FunctionDecl=user_function:9:5 RawComment=[/**\n * user_function\n * \param a Aaa.\n */] RawCommentRange=[5:1 - 8:4] BriefComment=[user_function]
+
OpenPOWER on IntegriCloud