summaryrefslogtreecommitdiff
path: root/test/Index/Core/index-source.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2017-08-15 17:20:37 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2017-08-15 17:20:37 +0000
commit5280dab80aa7e4fb0468730d88604a67efb7ac60 (patch)
treebac92635e22429271a25f19c350456f4cd4dca74 /test/Index/Core/index-source.cpp
parentabc35c84541476ad090cb6e764e75ad2127f4c6e (diff)
downloadclang-5280dab80aa7e4fb0468730d88604a67efb7ac60.tar.gz
[index] Update indexing to handle CXXDeductionGuideDecls properly
CXXDeductionGuideDecls can't be referenced so there's no need to output a symbol occurrence for them. Also handle DeducedTemplateSpecializationTypeLocs in the TypeIndexer so we don't miss the symbol occurrences of the corresponding template decls. Patch by Nathan Hawes! Differential Revision: https://reviews.llvm.org/D36641 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310933 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/Core/index-source.cpp')
-rw-r--r--test/Index/Core/index-source.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Index/Core/index-source.cpp b/test/Index/Core/index-source.cpp
index 4864d6cf01..f9c88d5ea6 100644
--- a/test/Index/Core/index-source.cpp
+++ b/test/Index/Core/index-source.cpp
@@ -497,6 +497,19 @@ void localStructuredBindingAndRef() {
}
+template<typename T>
+struct Guided { T t; };
+// CHECK: [[@LINE-1]]:8 | struct(Gen)/C++ | Guided | c:@ST>1#T@Guided | <no-cgname> | Def | rel: 0
+// CHECK-NEXT: [[@LINE-2]]:19 | field/C++ | t | c:@ST>1#T@Guided@FI@t | <no-cgname> | Def,RelChild | rel: 1
+// CHECK-NEXT: RelChild | Guided | c:@ST>1#T@Guided
+Guided(double) -> Guided<float>;
+// CHECK: [[@LINE-1]]:19 | struct(Gen)/C++ | Guided | c:@ST>1#T@Guided | <no-cgname> | Ref | rel: 0
+// CHECK-NEXT: [[@LINE-2]]:1 | struct(Gen)/C++ | Guided | c:@ST>1#T@Guided | <no-cgname> | Ref | rel: 0
+auto guided = Guided{1.0};
+// CHECK: [[@LINE-1]]:6 | variable/C | guided | c:@guided | _guided | Def | rel: 0
+// CHECK-NEXT: [[@LINE-2]]:15 | struct(Gen)/C++ | Guided | c:@ST>1#T@Guided | <no-cgname> | Ref,RelCont | rel: 1
+// CHECK-NEXT: RelCont | guided | c:@guided
+
namespace rd33122110 {
struct Outer {