[index] Index the deleted functions
authorAlex Lorenz <arphaman@gmail.com>
Mon, 22 May 2017 15:42:45 +0000 (15:42 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Mon, 22 May 2017 15:42:45 +0000 (15:42 +0000)
rdar://32323386

llvm-svn: 303563

clang/lib/Index/IndexDecl.cpp
clang/test/Index/Core/index-source.cpp

index 726568a..7f940ef 100644 (file)
@@ -217,9 +217,6 @@ public:
   }
 
   bool VisitFunctionDecl(const FunctionDecl *D) {
-    if (D->isDeleted())
-      return true;
-
     SymbolRoleSet Roles{};
     SmallVector<SymbolRelation, 4> Relations;
     if (auto *CXXMD = dyn_cast<CXXMethodDecl>(D)) {
index 5f2044e..e5f58d1 100644 (file)
@@ -366,3 +366,11 @@ struct IndexDefaultValue {
 // CHECK: [[@LINE-2]]:30 | struct/C++ | Record | c:@S@Record | <no-cgname> | Ref,RelCont | rel: 1
    }
 };
+
+struct DeletedMethods {
+  DeletedMethods(const DeletedMethods &) = delete;
+// CHECK: [[@LINE-1]]:3 | constructor/cxx-copy-ctor/C++ | DeletedMethods | c:@S@DeletedMethods@F@DeletedMethods#&1$@S@DeletedMethods# | __ZN14DeletedMethodsC1ERKS_ | Def,RelChild | rel: 1
+// CHECK: RelChild | DeletedMethods | c:@S@DeletedMethods
+// CHECK: [[@LINE-3]]:24 | struct/C++ | DeletedMethods | c:@S@DeletedMethods | <no-cgname> | Ref,RelCont | rel: 1
+// CHECK: [[@LINE-4]]:3 | struct/C++ | DeletedMethods | c:@S@DeletedMethods | <no-cgname> | Ref,RelCont | rel: 1
+};