r182871 - [libclang] For "@import .." code-completion results, associate a CXCursor_ModuleImportDecl cursor instead of CXCursor_NotImplemented.

Argyrios Kyrtzidis akyrtzi at gmail.com
Wed May 29 11:50:15 PDT 2013


Author: akirtzidis
Date: Wed May 29 13:50:15 2013
New Revision: 182871

URL: http://llvm.org/viewvc/llvm-project?rev=182871&view=rev
Log:
[libclang] For "@import .." code-completion results, associate a CXCursor_ModuleImportDecl cursor instead of CXCursor_NotImplemented.

Modified:
    cfe/trunk/lib/Sema/SemaCodeComplete.cpp
    cfe/trunk/test/Index/complete-modules.m

Modified: cfe/trunk/lib/Sema/SemaCodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCodeComplete.cpp?rev=182871&r1=182870&r2=182871&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCodeComplete.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCodeComplete.cpp Wed May 29 13:50:15 2013
@@ -3183,7 +3183,7 @@ void Sema::CodeCompleteModuleImport(Sour
         Builder.getAllocator().CopyString(Modules[I]->Name));
       Results.AddResult(Result(Builder.TakeString(),
                                CCP_Declaration, 
-                               CXCursor_NotImplemented,
+                               CXCursor_ModuleImportDecl,
                                Modules[I]->isAvailable()
                                  ? CXAvailability_Available
                                   : CXAvailability_NotAvailable));
@@ -3203,7 +3203,7 @@ void Sema::CodeCompleteModuleImport(Sour
           Builder.getAllocator().CopyString((*Sub)->Name));
         Results.AddResult(Result(Builder.TakeString(),
                                  CCP_Declaration, 
-                                 CXCursor_NotImplemented,
+                                 CXCursor_ModuleImportDecl,
                                  (*Sub)->isAvailable()
                                    ? CXAvailability_Available
                                    : CXAvailability_NotAvailable));

Modified: cfe/trunk/test/Index/complete-modules.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/complete-modules.m?rev=182871&r1=182870&r2=182871&view=diff
==============================================================================
--- cfe/trunk/test/Index/complete-modules.m (original)
+++ cfe/trunk/test/Index/complete-modules.m Wed May 29 13:50:15 2013
@@ -5,12 +5,12 @@
 
 // RUN: rm -rf %t
 // RUN: c-index-test -code-completion-at=%s:4:9 -fmodules-cache-path=%t -fmodules -F %S/Inputs/Frameworks -I %S/Inputs/Headers %s | FileCheck -check-prefix=CHECK-TOP-LEVEL %s
-// CHECK-TOP-LEVEL: NotImplemented:{TypedText Framework} (50)
-// CHECK-TOP-LEVEL: NotImplemented:{TypedText LibA} (50)
-// CHECK-TOP-LEVEL: NotImplemented:{TypedText nested} (50)
+// CHECK-TOP-LEVEL: ModuleImport:{TypedText Framework} (50)
+// CHECK-TOP-LEVEL: ModuleImport:{TypedText LibA} (50)
+// CHECK-TOP-LEVEL: ModuleImport:{TypedText nested} (50)
 
 // RUN: c-index-test -code-completion-at=%s:4:14 -fmodules-cache-path=%t -fmodules -F %S/Inputs/Frameworks -I %S/Inputs/Headers %s | FileCheck -check-prefix=CHECK-LIBA %s
-// CHECK-LIBA: NotImplemented:{TypedText Extensions} (50)
+// CHECK-LIBA: ModuleImport:{TypedText Extensions} (50)
 
 // RUN: c-index-test -code-completion-at=%s:4:1 -fmodules-cache-path=%t -fmodules -F %S/Inputs/Frameworks -I %S/Inputs/Headers %s | FileCheck -check-prefix=CHECK-TOP %s
 // CHECK-TOP: NotImplemented:{TypedText @import}{HorizontalSpace  }{Placeholder module} (40)





More information about the cfe-commits mailing list