Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331056

Summary: Missing content assist proposals at global scope in combination with using declarations in separate header file
Product: [Tools] CDT Reporter: Jens Elmenthaler <jens.elmenthaler>
Component: cdt-parserAssignee: Markus Schorn <mschorn.eclipse>
Status: RESOLVED FIXED QA Contact: Markus Schorn <mschorn.eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 7.0   
Target Milestone: 8.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
testcase + fix mschorn.eclipse: iplog-

Description Jens Elmenthaler CLA 2010-11-24 14:38:28 EST
Build Identifier: HAED

Create the following files:
// content_assist.hpp
namespace A {
  class Reference {
  public:
  };
}

namespace B {
  using ::A::Reference;
}

// content_assist.cpp
#include "content_assist.hpp"
using namespace ::B;
// Start typign "Ref" here and press Ctrl-Space

No proposal is available. Adding "using namespace ::A;" in the cpp file does not help without removing the "using namespace ::B;".

Also, the using declaration for ::A::Reference must be in a separate header file.

Reproducible: Always
Comment 1 Markus Schorn CLA 2010-12-02 05:19:53 EST
Created attachment 184332 [details]
testcase + fix
Comment 2 Markus Schorn CLA 2010-12-02 05:22:33 EST
The using declarations obtained from the index need to be expanded by the parser.

Fixed in 8.0 > 20101202.