Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331056 - Missing content assist proposals at global scope in combination with using declarations in separate header file
Summary: Missing content assist proposals at global scope in combination with using de...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Markus Schorn CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-24 14:38 EST by Jens Elmenthaler CLA
Modified: 2010-12-02 06:23 EST (History)
1 user (show)

See Also:


Attachments
testcase + fix (12.25 KB, patch)
2010-12-02 05:19 EST, Markus Schorn CLA
mschorn.eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.