[PATCH] D20129: [libclang] Properly expose linkage spec cursors

Cameron via cfe-commits cfe-commits at lists.llvm.org
Tue May 10 13:26:48 PDT 2016


cameron314 created this revision.
cameron314 added a reviewer: rsmith.
cameron314 added a subscriber: cfe-commits.

All the groundwork for `CXCursor_LinkageSpec` already existed, but because of a missing case in a switch, cursors of that type were never actually created for linkage specifications in the AST. This patch fixes that.

I remember seeing another patch that fixed this a long time ago (that I found after fixing it myself), but it was never committed (it was just forgotten, if I recall correctly).

http://reviews.llvm.org/D20129

Files:
  lib/Sema/SemaCodeComplete.cpp

Index: lib/Sema/SemaCodeComplete.cpp
===================================================================
--- lib/Sema/SemaCodeComplete.cpp
+++ lib/Sema/SemaCodeComplete.cpp
@@ -3052,7 +3052,10 @@
     case Decl::UnresolvedUsingValue:
     case Decl::UnresolvedUsingTypename: 
       return CXCursor_UsingDeclaration;
-      
+
+    case Decl::LinkageSpec:
+      return CXCursor_LinkageSpec;
+
     case Decl::ObjCPropertyImpl:
       switch (cast<ObjCPropertyImplDecl>(D)->getPropertyImplementation()) {
       case ObjCPropertyImplDecl::Dynamic:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20129.56794.patch
Type: text/x-patch
Size: 548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160510/6501b6e5/attachment.bin>


More information about the cfe-commits mailing list