[cfe-commits] r164705 - in /cfe/trunk: include/clang-c/Index.h include/clang/Sema/CodeCompleteConsumer.h lib/Sema/CodeCompleteConsumer.cpp lib/Sema/SemaCodeComplete.cpp test/CodeCompletion/preamble.c test/Index/complete-documentation.cpp test/Index/complete-exprs.cpp test/Index/complete-lambdas.mm test/Index/complete-method-decls.m test/Index/complete-objc-message.m test/Index/complete-preamble.cpp test/Index/complete-qualified.cpp tools/libclang/CIndexCodeCompletion.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Wed Sep 26 09:39:56 PDT 2012
Author: akirtzidis
Date: Wed Sep 26 11:39:56 2012
New Revision: 164705
URL: http://llvm.org/viewvc/llvm-project?rev=164705&view=rev
Log:
[libclang] Remove the ParentKind cursor kind from code-completion results.
This is to reduce dependency to cursors for the code-completion results.
Modified:
cfe/trunk/include/clang-c/Index.h
cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h
cfe/trunk/lib/Sema/CodeCompleteConsumer.cpp
cfe/trunk/lib/Sema/SemaCodeComplete.cpp
cfe/trunk/test/CodeCompletion/preamble.c
cfe/trunk/test/Index/complete-documentation.cpp
cfe/trunk/test/Index/complete-exprs.cpp
cfe/trunk/test/Index/complete-lambdas.mm
cfe/trunk/test/Index/complete-method-decls.m
cfe/trunk/test/Index/complete-objc-message.m
cfe/trunk/test/Index/complete-preamble.cpp
cfe/trunk/test/Index/complete-qualified.cpp
cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp
Modified: cfe/trunk/include/clang-c/Index.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang-c/Index.h?rev=164705&r1=164704&r2=164705&view=diff
==============================================================================
--- cfe/trunk/include/clang-c/Index.h (original)
+++ cfe/trunk/include/clang-c/Index.h Wed Sep 26 11:39:56 2012
@@ -4322,8 +4322,7 @@
* \param completion_string The code completion string whose parent is
* being queried.
*
- * \param kind If non-NULL, will be set to the kind of the parent context,
- * or CXCursor_NotImplemented if there is no context.
+ * \param kind DEPRECATED: always set to CXCursor_NotImplemented if non-NULL.
*
* \returns The name of the completion parent, e.g., "NSObject" if
* the completion string represents a method in the NSObject class.
Modified: cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h?rev=164705&r1=164704&r2=164705&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h (original)
+++ cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h Wed Sep 26 11:39:56 2012
@@ -439,9 +439,6 @@
/// \brief The availability of this code-completion result.
unsigned Availability : 2;
-
- /// \brief The kind of the parent context.
- unsigned ParentKind : 14;
/// \brief The name of the parent context.
StringRef ParentName;
@@ -456,7 +453,7 @@
CodeCompletionString(const Chunk *Chunks, unsigned NumChunks,
unsigned Priority, CXAvailabilityKind Availability,
const char **Annotations, unsigned NumAnnotations,
- CXCursorKind ParentKind, StringRef ParentName,
+ StringRef ParentName,
const char *BriefComment);
~CodeCompletionString() { }
@@ -489,11 +486,6 @@
/// \brief Retrieve the annotation string specified by \c AnnotationNr.
const char *getAnnotation(unsigned AnnotationNr) const;
-
- /// \brief Retrieve parent context's cursor kind.
- CXCursorKind getParentContextKind() const {
- return (CXCursorKind)ParentKind;
- }
/// \brief Retrieve the name of the parent context.
StringRef getParentContextName() const {
@@ -577,7 +569,6 @@
CodeCompletionTUInfo &CCTUInfo;
unsigned Priority;
CXAvailabilityKind Availability;
- CXCursorKind ParentKind;
StringRef ParentName;
const char *BriefComment;
@@ -591,14 +582,14 @@
CodeCompletionTUInfo &CCTUInfo)
: Allocator(Allocator), CCTUInfo(CCTUInfo),
Priority(0), Availability(CXAvailability_Available),
- ParentKind(CXCursor_NotImplemented), BriefComment(NULL) { }
+ BriefComment(NULL) { }
CodeCompletionBuilder(CodeCompletionAllocator &Allocator,
CodeCompletionTUInfo &CCTUInfo,
unsigned Priority, CXAvailabilityKind Availability)
: Allocator(Allocator), CCTUInfo(CCTUInfo),
Priority(Priority), Availability(Availability),
- ParentKind(CXCursor_NotImplemented), BriefComment(NULL) { }
+ BriefComment(NULL) { }
/// \brief Retrieve the allocator into which the code completion
/// strings should be allocated.
@@ -642,7 +633,6 @@
void addBriefComment(StringRef Comment);
- CXCursorKind getParentKind() const { return ParentKind; }
StringRef getParentName() const { return ParentName; }
};
Modified: cfe/trunk/lib/Sema/CodeCompleteConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/CodeCompleteConsumer.cpp?rev=164705&r1=164704&r2=164705&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/CodeCompleteConsumer.cpp (original)
+++ cfe/trunk/lib/Sema/CodeCompleteConsumer.cpp Wed Sep 26 11:39:56 2012
@@ -193,11 +193,10 @@
CXAvailabilityKind Availability,
const char **Annotations,
unsigned NumAnnotations,
- CXCursorKind ParentKind,
StringRef ParentName,
const char *BriefComment)
: NumChunks(NumChunks), NumAnnotations(NumAnnotations),
- Priority(Priority), Availability(Availability), ParentKind(ParentKind),
+ Priority(Priority), Availability(Availability),
ParentName(ParentName), BriefComment(BriefComment)
{
assert(NumChunks <= 0xffff);
@@ -339,7 +338,7 @@
= new (Mem) CodeCompletionString(Chunks.data(), Chunks.size(),
Priority, Availability,
Annotations.data(), Annotations.size(),
- ParentKind, ParentName, BriefComment);
+ ParentName, BriefComment);
Chunks.clear();
return Result;
}
@@ -380,7 +379,6 @@
void CodeCompletionBuilder::addParentContext(DeclContext *DC) {
if (DC->isTranslationUnit()) {
- ParentKind = CXCursor_TranslationUnit;
return;
}
@@ -391,7 +389,6 @@
if (!ND)
return;
- ParentKind = getCursorKindForDecl(ND);
ParentName = getCodeCompletionTUInfo().getParentName(DC);
}
Modified: cfe/trunk/lib/Sema/SemaCodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCodeComplete.cpp?rev=164705&r1=164704&r2=164705&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCodeComplete.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCodeComplete.cpp Wed Sep 26 11:39:56 2012
@@ -2483,7 +2483,6 @@
if (Declaration) {
Result.addParentContext(Declaration->getDeclContext());
- Pattern->ParentKind = Result.getParentKind();
Pattern->ParentName = Result.getParentName();
}
Modified: cfe/trunk/test/CodeCompletion/preamble.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeCompletion/preamble.c?rev=164705&r1=164704&r2=164705&view=diff
==============================================================================
--- cfe/trunk/test/CodeCompletion/preamble.c (original)
+++ cfe/trunk/test/CodeCompletion/preamble.c Wed Sep 26 11:39:56 2012
@@ -4,4 +4,4 @@
x.
// RUN: env CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:4:5 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s
-// CHECK-CC1: FieldDecl:{ResultType int}{TypedText m} (35) (parent: StructDecl 'X')
+// CHECK-CC1: FieldDecl:{ResultType int}{TypedText m} (35)
Modified: cfe/trunk/test/Index/complete-documentation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/complete-documentation.cpp?rev=164705&r1=164704&r2=164705&view=diff
==============================================================================
--- cfe/trunk/test/Index/complete-documentation.cpp (original)
+++ cfe/trunk/test/Index/complete-documentation.cpp Wed Sep 26 11:39:56 2012
@@ -47,5 +47,5 @@
// CHECK-CC2: FieldDecl:{ResultType int}{TypedText T4}{{.*}}(brief comment: Ddd.)
// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:37:6 %s | FileCheck -check-prefix=CC3 %s
-// CHECK-CC3: CXXMethod:{ResultType void}{TypedText T7}{LeftParen (}{RightParen )} (34) (parent: StructDecl 'T6')(brief comment: Fff.)
-// CHECK-CC3: CXXMethod:{ResultType void}{TypedText T8}{LeftParen (}{RightParen )} (34) (parent: StructDecl 'T6')(brief comment: Ggg.)
+// CHECK-CC3: CXXMethod:{ResultType void}{TypedText T7}{LeftParen (}{RightParen )} (34)(brief comment: Fff.)
+// CHECK-CC3: CXXMethod:{ResultType void}{TypedText T8}{LeftParen (}{RightParen )} (34)(brief comment: Ggg.)
Modified: cfe/trunk/test/Index/complete-exprs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/complete-exprs.cpp?rev=164705&r1=164704&r2=164705&view=diff
==============================================================================
--- cfe/trunk/test/Index/complete-exprs.cpp (original)
+++ cfe/trunk/test/Index/complete-exprs.cpp Wed Sep 26 11:39:56 2012
@@ -78,7 +78,7 @@
// CHECK-CC4: NotImplemented:{ResultType const X *}{TypedText this} (40)
// RUN: c-index-test -code-completion-at=%s:43:14 %s | FileCheck -check-prefix=CHECK-CC5 %s
-// CHECK-CC5: FieldDecl:{ResultType int}{TypedText member} (8) (parent: ClassDecl 'N::C')
+// CHECK-CC5: FieldDecl:{ResultType int}{TypedText member} (8)
// CHECK-CC5: ParmDecl:{ResultType int}{TypedText param} (8)
-// CHECK-CC5: StructDecl:{TypedText X} (50) (parent: TranslationUnit '(null)')
-// CHECK-CC5: VarDecl:{ResultType int}{TypedText x} (12) (parent: Namespace 'N')
+// CHECK-CC5: StructDecl:{TypedText X} (50)
+// CHECK-CC5: VarDecl:{ResultType int}{TypedText x} (12)
Modified: cfe/trunk/test/Index/complete-lambdas.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/complete-lambdas.mm?rev=164705&r1=164704&r2=164705&view=diff
==============================================================================
--- cfe/trunk/test/Index/complete-lambdas.mm (original)
+++ cfe/trunk/test/Index/complete-lambdas.mm Wed Sep 26 11:39:56 2012
@@ -23,16 +23,16 @@
@end
// RUN: c-index-test -code-completion-at=%s:14:6 -std=c++11 %s | FileCheck -check-prefix=CHECK-CC1 %s
-// CHECK-CC1: ObjCInstanceMethodDecl:{ResultType id}{TypedText instanceMethod:}{Placeholder (int)}{HorizontalSpace }{TypedText withOther:}{Placeholder (int)} (35) (parent: ObjCInterfaceDecl 'A')
+// CHECK-CC1: ObjCInstanceMethodDecl:{ResultType id}{TypedText instanceMethod:}{Placeholder (int)}{HorizontalSpace }{TypedText withOther:}{Placeholder (int)} (35)
// RUN: c-index-test -code-completion-at=%s:15:6 -std=c++11 %s | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: ObjCClassMethodDecl:{ResultType id}{TypedText classMethod} (35) (parent: ObjCInterfaceDecl 'A')
+// CHECK-CC2: ObjCClassMethodDecl:{ResultType id}{TypedText classMethod} (35)
// RUN: c-index-test -code-completion-at=%s:16:4 -std=c++11 %s | FileCheck -check-prefix=CHECK-CC3 %s
-// CHECK-CC3: ObjCInterfaceDecl:{TypedText A} (50) (parent: TranslationUnit '(null)')
+// CHECK-CC3: ObjCInterfaceDecl:{TypedText A} (50)
// CHECK-CC3: ParmDecl:{ResultType A *}{TypedText a} (34)
-// CHECK-CC3: ObjCInterfaceDecl:{TypedText B} (50) (parent: TranslationUnit '(null)')
-// CHECK-CC3: TypedefDecl:{TypedText Class} (50) (parent: TranslationUnit '(null)')
+// CHECK-CC3: ObjCInterfaceDecl:{TypedText B} (50)
+// CHECK-CC3: TypedefDecl:{TypedText Class} (50)
// RUN: c-index-test -code-completion-at=%s:16:21 -x objective-c++ -std=c++11 %s | FileCheck -check-prefix=CHECK-CC4 %s
@@ -46,6 +46,6 @@
// CHECK-CC5-NEXT: NotImplemented:{ResultType B *}{TypedText self} (34)
// RUN: c-index-test -code-completion-at=%s:20:11 -x objective-c++ -std=c++11 %s | FileCheck -check-prefix=CHECK-CC6 %s
-// CHECK-CC6: ObjCInstanceMethodDecl:{ResultType id}{TypedText instanceMethod:}{Placeholder (int)}{HorizontalSpace }{TypedText withOther:}{Placeholder (int)} (37) (parent: ObjCInterfaceDecl 'A')
-// CHECK-CC6-NEXT: ObjCInstanceMethodDecl:{ResultType id}{TypedText someMethod:}{Placeholder (A *)} (32) (parent: ObjCImplementationDecl 'B')
+// CHECK-CC6: ObjCInstanceMethodDecl:{ResultType id}{TypedText instanceMethod:}{Placeholder (int)}{HorizontalSpace }{TypedText withOther:}{Placeholder (int)} (37)
+// CHECK-CC6-NEXT: ObjCInstanceMethodDecl:{ResultType id}{TypedText someMethod:}{Placeholder (A *)} (32)
Modified: cfe/trunk/test/Index/complete-method-decls.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/complete-method-decls.m?rev=164705&r1=164704&r2=164705&view=diff
==============================================================================
--- cfe/trunk/test/Index/complete-method-decls.m (original)
+++ cfe/trunk/test/Index/complete-method-decls.m Wed Sep 26 11:39:56 2012
@@ -73,11 +73,11 @@
@end
// RUN: c-index-test -code-completion-at=%s:17:3 %s | FileCheck -check-prefix=CHECK-CC1 %s
-// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText abc} (40) (parent: ObjCProtocolDecl 'P1')
-// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text int}{RightParen )}{TypedText getInt} (40) (parent: ObjCProtocolDecl 'P1')
-// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText getSelf} (40) (parent: ObjCProtocolDecl 'P1')
-// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText initWithInt}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x} (40) (parent: ObjCProtocolDecl 'P1')
-// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText initWithTwoInts}{TypedText :}{LeftParen (}{Text inout }{Text int}{RightParen )}{Text x}{HorizontalSpace }{TypedText second:}{LeftParen (}{Text int}{RightParen )}{Text y} (40) (parent: ObjCProtocolDecl 'P1')
+// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText abc} (40)
+// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text int}{RightParen )}{TypedText getInt} (40)
+// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText getSelf} (40)
+// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText initWithInt}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x} (40)
+// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText initWithTwoInts}{TypedText :}{LeftParen (}{Text inout }{Text int}{RightParen )}{Text x}{HorizontalSpace }{TypedText second:}{LeftParen (}{Text int}{RightParen )}{Text y} (40)
// RUN: c-index-test -code-completion-at=%s:17:7 %s | FileCheck -check-prefix=CHECK-CC2 %s
// CHECK-CC2: ObjCInstanceMethodDecl:{TypedText abc}
// CHECK-CC2-NEXT: ObjCInstanceMethodDecl:{TypedText getSelf}
@@ -98,8 +98,8 @@
// CHECK-CC4: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText initWithTwoInts}{TypedText :}{LeftParen (}{Text inout }{Text int}{RightParen )}{Text x}{HorizontalSpace }{TypedText second:}{LeftParen (}{Text int}{RightParen )}{Text y}{HorizontalSpace }{LeftBrace {}{VerticalSpace
// CHECK-CC4: ObjCInstanceMethodDecl:{LeftParen (}{Text int}{RightParen )}{TypedText setValue}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x}{HorizontalSpace }{LeftBrace {}{VerticalSpace
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:33:8 %s | FileCheck -check-prefix=CHECK-CC5 %s
-// CHECK-CC5: ObjCInstanceMethodDecl:{TypedText getInt}{HorizontalSpace }{LeftBrace {}{VerticalSpace }{Text return}{HorizontalSpace }{Placeholder expression}{SemiColon ;}{VerticalSpace }{RightBrace }} (42) (parent: ObjCProtocolDecl 'P1')
-// CHECK-CC5: ObjCInstanceMethodDecl:{TypedText getSecondValue}{HorizontalSpace }{LeftBrace {}{VerticalSpace }{Text return}{HorizontalSpace }{Placeholder expression}{SemiColon ;}{VerticalSpace }{RightBrace }} (40) (parent: ObjCInterfaceDecl 'B')
+// CHECK-CC5: ObjCInstanceMethodDecl:{TypedText getInt}{HorizontalSpace }{LeftBrace {}{VerticalSpace }{Text return}{HorizontalSpace }{Placeholder expression}{SemiColon ;}{VerticalSpace }{RightBrace }} (42)
+// CHECK-CC5: ObjCInstanceMethodDecl:{TypedText getSecondValue}{HorizontalSpace }{LeftBrace {}{VerticalSpace }{Text return}{HorizontalSpace }{Placeholder expression}{SemiColon ;}{VerticalSpace }{RightBrace }} (40)
// CHECK-CC5-NOT: {TypedText getSelf}{HorizontalSpace }{LeftBrace {}{VerticalSpace
// CHECK-CC5: ObjCInstanceMethodDecl:{TypedText setValue}{TypedText :}{LeftParen (}{Text int}{RightParen )}{Text x}{HorizontalSpace }{LeftBrace {}{VerticalSpace
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:37:7 %s | FileCheck -check-prefix=CHECK-CC6 %s
@@ -181,4 +181,4 @@
// RUN: c-index-test -code-completion-at=%s:72:2 %s | FileCheck -check-prefix=CHECK-ONEWAY %s
-// CHECK-ONEWAY: ObjCInstanceMethodDecl:{LeftParen (}{Text oneway }{Text void}{RightParen )}{TypedText method}{TypedText :}{LeftParen (}{Text in }{Text id}{RightParen )}{Text x} (40) (parent: ObjCInterfaceDecl 'Passing')
+// CHECK-ONEWAY: ObjCInstanceMethodDecl:{LeftParen (}{Text oneway }{Text void}{RightParen )}{TypedText method}{TypedText :}{LeftParen (}{Text in }{Text id}{RightParen )}{Text x} (40)
Modified: cfe/trunk/test/Index/complete-objc-message.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/complete-objc-message.m?rev=164705&r1=164704&r2=164705&view=diff
==============================================================================
--- cfe/trunk/test/Index/complete-objc-message.m (original)
+++ cfe/trunk/test/Index/complete-objc-message.m Wed Sep 26 11:39:56 2012
@@ -190,11 +190,11 @@
}
// RUN: c-index-test -code-completion-at=%s:23:19 %s | FileCheck -check-prefix=CHECK-CC1 %s
-// CHECK-CC1: {TypedText categoryClassMethod} (35) (parent: ObjCCategoryDecl 'Foo(FooTestCategory)')
-// CHECK-CC1: {TypedText classMethod1:}{Placeholder (id)}{HorizontalSpace }{TypedText withKeyword:}{Placeholder (int)} (35) (parent: ObjCInterfaceDecl 'Foo')
-// CHECK-CC1: {TypedText classMethod2} (35) (parent: ObjCInterfaceDecl 'Foo')
-// CHECK-CC1: {TypedText new} (35) (parent: ObjCInterfaceDecl 'Foo')
-// CHECK-CC1: {TypedText protocolClassMethod} (37) (parent: ObjCProtocolDecl 'FooTestProtocol')
+// CHECK-CC1: {TypedText categoryClassMethod} (35)
+// CHECK-CC1: {TypedText classMethod1:}{Placeholder (id)}{HorizontalSpace }{TypedText withKeyword:}{Placeholder (int)} (35)
+// CHECK-CC1: {TypedText classMethod2} (35)
+// CHECK-CC1: {TypedText new} (35)
+// CHECK-CC1: {TypedText protocolClassMethod} (37)
// CHECK-CC1: Completion contexts:
// CHECK-CC1-NEXT: Objective-C class method
// CHECK-CC1-NEXT: Container Kind: ObjCInterfaceDecl
@@ -309,7 +309,7 @@
// RUN: c-index-test -code-completion-at=%s:170:16 %s | FileCheck -check-prefix=CHECK-CLASS-RESULT %s
// CHECK-CLASS-RESULT: ObjCClassMethodDecl:{ResultType void}{TypedText class_method3} (35)
-// CHECK-CLASS-RESULT: ObjCClassMethodDecl:{ResultType void}{TypedText class_method4} (35) (parent: ObjCCategoryDecl 'A(Cat)')
+// CHECK-CLASS-RESULT: ObjCClassMethodDecl:{ResultType void}{TypedText class_method4} (35)
// RUN: c-index-test -code-completion-at=%s:181:4 %s | FileCheck -check-prefix=CHECK-BLOCK-RECEIVER %s
// CHECK-BLOCK-RECEIVER: ObjCInterfaceDecl:{TypedText A} (50)
Modified: cfe/trunk/test/Index/complete-preamble.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/complete-preamble.cpp?rev=164705&r1=164704&r2=164705&view=diff
==============================================================================
--- cfe/trunk/test/Index/complete-preamble.cpp (original)
+++ cfe/trunk/test/Index/complete-preamble.cpp Wed Sep 26 11:39:56 2012
@@ -4,5 +4,5 @@
}
// RUN: env CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:3:8 %s -o - | FileCheck -check-prefix=CC1 %s
-// CHECK-CC1: {ResultType void}{TypedText wibble}{LeftParen (}{RightParen )} (50) (parent: Namespace 'std')
+// CHECK-CC1: {ResultType void}{TypedText wibble}{LeftParen (}{RightParen )} (50)
Modified: cfe/trunk/test/Index/complete-qualified.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/complete-qualified.cpp?rev=164705&r1=164704&r2=164705&view=diff
==============================================================================
--- cfe/trunk/test/Index/complete-qualified.cpp (original)
+++ cfe/trunk/test/Index/complete-qualified.cpp Wed Sep 26 11:39:56 2012
@@ -14,7 +14,7 @@
Foo::
// RUN: c-index-test -code-completion-at=%s:14:8 %s -o - | FileCheck -check-prefix=CC1 %s
-// CHECK-CC1: FieldDecl:{ResultType C<Foo, class Bar>}{TypedText c} (35) (parent: ClassDecl 'Foo')
-// CHECK-CC1: ClassDecl:{TypedText Foo} (35) (parent: ClassDecl 'Foo')
-// CHECK-CC1: CXXMethod:{ResultType Foo &}{TypedText operator=}{LeftParen (}{Placeholder const Foo &}{RightParen )} (35) (parent: ClassDecl 'Foo')
-// CHECK-CC1: CXXDestructor:{ResultType void}{TypedText ~Foo}{LeftParen (}{RightParen )} (35) (parent: ClassDecl 'Foo')
+// CHECK-CC1: FieldDecl:{ResultType C<Foo, class Bar>}{TypedText c} (35)
+// CHECK-CC1: ClassDecl:{TypedText Foo} (35)
+// CHECK-CC1: CXXMethod:{ResultType Foo &}{TypedText operator=}{LeftParen (}{Placeholder const Foo &}{RightParen )}
+// CHECK-CC1: CXXDestructor:{ResultType void}{TypedText ~Foo}{LeftParen (}{RightParen )} (35)
Modified: cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp?rev=164705&r1=164704&r2=164705&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp (original)
+++ cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp Wed Sep 26 11:39:56 2012
@@ -223,8 +223,6 @@
if (!CCStr)
return createCXString((const char *)0);
- if (kind)
- *kind = CCStr->getParentContextKind();
return createCXString(CCStr->getParentContextName(), /*DupString=*/false);
}
More information about the cfe-commits
mailing list