Bug 172317

Summary: [Content Assist] Class scoped reference: missing proposals
Product: [Tools] CDT Reporter: Bryan Wilkinson <bryan2233>
Component: cdt-coreAssignee: Bryan Wilkinson <bryan2233>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 Keywords: contributed
Version: 4.0   
Target Milestone: 4.0 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
proposed patch bjorn.freeman-benson: iplog+

Description Bryan Wilkinson CLA 2007-01-31 09:55:44 EST
Currently, if a completion is executed for a class scoped reference, only the class's declared methods are considered for proposals.  Static fields and nested classes should also be considered.

Failing tests:
CompletionTest_ScopedReference_NonCodeScope
CompletionTest_VariableType_NestedPrefix
Comment 1 Bryan Wilkinson CLA 2007-01-31 10:18:00 EST
Created attachment 57916 [details]
proposed patch

CPPASTQualifiedName.resolvePrefix() finds bindings for these cases.  This patch makes this method look through the class's fields and nested classes for appropriate bindings.
Comment 2 Anton Leherbauer CLA 2007-02-01 06:51:04 EST
Patch looks good.
Comment 3 Anton Leherbauer CLA 2007-02-01 07:43:46 EST
Applied to HEAD. Thanks!