r303563 - [index] Index the deleted functions

Alex Lorenz via cfe-commits cfe-commits at lists.llvm.org
Mon May 22 08:42:46 PDT 2017


Author: arphaman
Date: Mon May 22 10:42:45 2017
New Revision: 303563

URL: http://llvm.org/viewvc/llvm-project?rev=303563&view=rev
Log:
[index] Index the deleted functions

rdar://32323386

Modified:
    cfe/trunk/lib/Index/IndexDecl.cpp
    cfe/trunk/test/Index/Core/index-source.cpp

Modified: cfe/trunk/lib/Index/IndexDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/IndexDecl.cpp?rev=303563&r1=303562&r2=303563&view=diff
==============================================================================
--- cfe/trunk/lib/Index/IndexDecl.cpp (original)
+++ cfe/trunk/lib/Index/IndexDecl.cpp Mon May 22 10:42:45 2017
@@ -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)) {

Modified: cfe/trunk/test/Index/Core/index-source.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/Core/index-source.cpp?rev=303563&r1=303562&r2=303563&view=diff
==============================================================================
--- cfe/trunk/test/Index/Core/index-source.cpp (original)
+++ cfe/trunk/test/Index/Core/index-source.cpp Mon May 22 10:42:45 2017
@@ -366,3 +366,11 @@ struct IndexDefaultValue {
 // CHECK: [[@LINE-2]]:30 | struct/C++ | Record | c:@S at 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 at DeletedMethods@F at DeletedMethods#&1$@S at DeletedMethods# | __ZN14DeletedMethodsC1ERKS_ | Def,RelChild | rel: 1
+// CHECK: RelChild | DeletedMethods | c:@S at DeletedMethods
+// CHECK: [[@LINE-3]]:24 | struct/C++ | DeletedMethods | c:@S at DeletedMethods | <no-cgname> | Ref,RelCont | rel: 1
+// CHECK: [[@LINE-4]]:3 | struct/C++ | DeletedMethods | c:@S at DeletedMethods | <no-cgname> | Ref,RelCont | rel: 1
+};




More information about the cfe-commits mailing list