summaryrefslogtreecommitdiff
path: root/test/Index/USR/linkage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Index/USR/linkage.cpp')
-rw-r--r--test/Index/USR/linkage.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Index/USR/linkage.cpp b/test/Index/USR/linkage.cpp
new file mode 100644
index 000000000000..fec80dace16e
--- /dev/null
+++ b/test/Index/USR/linkage.cpp
@@ -0,0 +1,7 @@
+// RUN: c-index-test core -print-source-symbols -- %s | FileCheck %s
+
+// Linkage decls are skipped in USRs for enclosed items.
+// Linkage decls themselves don't have USRs (no lines between ns and X).
+// CHECK: {{[0-9]+}}:11 | namespace/C++ | ns | c:@N@ns |
+// CHECK-NEXT: {{[0-9]+}}:33 | variable/C | X | c:@N@ns@X |
+namespace ns { extern "C" { int X; } }