summaryrefslogtreecommitdiff
path: root/test/Index/Core/index-source-invalid-name.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-07-13 19:25:38 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-07-13 19:25:38 +0000
commit8746d127c04f5bbaf6c6e88cef8606ca5a6a54e9 (patch)
tree84c9d77f8c764f04bcef0b1da4eedfa233d67a46 /test/Index/Core/index-source-invalid-name.cpp
parentcf1b401909b5e54edfd80656b1a18eaa31f9f6f1 (diff)
Diffstat (limited to 'test/Index/Core/index-source-invalid-name.cpp')
-rw-r--r--test/Index/Core/index-source-invalid-name.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Index/Core/index-source-invalid-name.cpp b/test/Index/Core/index-source-invalid-name.cpp
new file mode 100644
index 0000000000000..1b4b059cd1b36
--- /dev/null
+++ b/test/Index/Core/index-source-invalid-name.cpp
@@ -0,0 +1,13 @@
+// RUN: c-index-test core -print-source-symbols -- %s -std=c++1z -target x86_64-apple-macosx10.7 | FileCheck %s
+
+namespace rdar32474406 {
+// CHECK: [[@LINE+1]]:6 | function/C | foo | c:@N@rdar32474406@F@foo# | __ZN12rdar324744063fooEv | Decl,RelChild | rel: 1
+void foo();
+// CHECK: [[@LINE+1]]:16 | type-alias/C | Func_t | c:index-source-invalid-name.cpp@N@rdar32474406@T@Func_t | <no-cgname> | Def,RelChild | rel: 1
+typedef void (*Func_t)();
+// CHECK: [[@LINE+4]]:1 | type-alias/C | Func_t | c:index-source-invalid-name.cpp@N@rdar32474406@T@Func_t | <no-cgname> | Ref,RelCont | rel: 1
+// CHECK-NEXT: RelCont | rdar32474406 | c:@N@rdar32474406
+// CHECK: [[@LINE+2]]:14 | function/C | foo | c:@N@rdar32474406@F@foo# | __ZN12rdar324744063fooEv | Ref,RelCont | rel: 1
+// CHECK-NEXT: RelCont | rdar32474406 | c:@N@rdar32474406
+Func_t[] = { foo }; // invalid decomposition
+}