aboutsummaryrefslogtreecommitdiff
path: root/test/Index
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-04-19 23:24:25 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-04-19 23:24:25 +0000
commit355dae6f1b819c42e2b416ea154b03b0aeaf58a3 (patch)
tree6a913f08957a09afaf6df4264186a8b5784da3e1 /test/Index
parente4cabeee0cc5903e5ebf1536f56c2d27c08fba72 (diff)
[libclang] Make sure the preable does not truncate comments.
rdar://13647445 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179907 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index')
-rw-r--r--test/Index/comment-with-preamble.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Index/comment-with-preamble.c b/test/Index/comment-with-preamble.c
new file mode 100644
index 0000000000..72e6140d12
--- /dev/null
+++ b/test/Index/comment-with-preamble.c
@@ -0,0 +1,13 @@
+// Make sure the preable does not truncate comments.
+
+#ifndef BAZ
+#define BAZ 3
+#endif
+
+//! Foo’s description.
+void Foo();
+
+// RUN: c-index-test -test-load-source-reparse 1 local %s | FileCheck %s
+// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 1 local %s | FileCheck %s
+
+// CHECK: FunctionDecl=Foo:8:6 RawComment=[//! Foo’s description.] RawCommentRange=[7:1 - 7:25] BriefComment=[Foo’s description.]