Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319632 - Name resolution gets thrown off by a namespace in an unrelated file
Summary: Name resolution gets thrown off by a namespace in an unrelated file
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 7.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Sergey Prigogin CLA
QA Contact: Mike Kucera CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-12 16:34 EDT by Sergey Prigogin CLA
Modified: 2011-05-23 23:23 EDT (History)
1 user (show)

See Also:
eclipse.sprigogin: iplog-


Attachments
Implementation of indexing on open (27.36 KB, patch)
2011-05-23 18:26 EDT, Sergey Prigogin CLA
eclipse.sprigogin: iplog-
Details | Diff
Fix and test case (4.28 KB, patch)
2011-05-23 22:28 EDT, Sergey Prigogin CLA
eclipse.sprigogin: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Prigogin CLA 2010-07-12 16:34:09 EDT
unrelated.cc
------------
namespace ns1 { namespace ns2 {} }

test.cc
-------

namespace ns2 { class A {}; }

namespace ns1 {

class B : public ns2::A { // problem on ns2::A
};

}

It looks like we need namespace disambiguation based on reachability similar to how it is done for other bindings.
Comment 1 Sergey Prigogin CLA 2011-05-23 18:26:58 EDT
Created attachment 196382 [details]
Implementation of indexing on open
Comment 2 Sergey Prigogin CLA 2011-05-23 18:28:06 EDT
Comment on attachment 196382 [details]
Implementation of indexing on open

Attached to a wrong bug.
Comment 3 Sergey Prigogin CLA 2011-05-23 22:28:18 EDT
Created attachment 196393 [details]
Fix and test case
Comment 4 Sergey Prigogin CLA 2011-05-23 22:29:25 EDT
Fixed in HEAD > 20110523.