When generating code completion patterns for method declarations, give
the resulting pattern the appropriate cursor kind of an instance or
class method declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111237 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index ac58198..4b790e9 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/lib/Sema/SemaCodeComplete.cpp
@@ -4270,7 +4270,10 @@
Pattern->AddChunk(CodeCompletionString::CK_RightBrace);
}
- Results.AddResult(Result(Pattern));
+ Results.AddResult(Result(Pattern, CCP_CodePattern,
+ Method->isInstanceMethod()
+ ? CXCursor_ObjCInstanceMethodDecl
+ : CXCursor_ObjCClassMethodDecl));
}
Results.ExitScope();