Code completion results that refer to macros now get the cursor kind
of macro definitions when passed to CIndex. Add test for code
completion of macros via CIndex.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100431 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/CodeCompleteConsumer.cpp b/lib/Sema/CodeCompleteConsumer.cpp
index 299e84e..5483a29 100644
--- a/lib/Sema/CodeCompleteConsumer.cpp
+++ b/lib/Sema/CodeCompleteConsumer.cpp
@@ -582,9 +582,12 @@
break;
}
break;
-
- case Result::RK_Keyword:
+
case Result::RK_Macro:
+ Kind = CXCursor_MacroDefinition;
+ break;
+
+ case Result::RK_Keyword:
case Result::RK_Pattern:
Kind = CXCursor_NotImplemented;
break;