| Summary: | IName returns wrong starting line number | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Lukas Felber <l.felber> |
| Component: | cdt-indexer | Assignee: | Project Inbox <cdt-indexer-inbox> |
| Status: | RESOLVED INVALID | QA Contact: | Markus Schorn <mschorn.eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug |
| Version: | 8.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
Works as specified, see javadoc of IASTFileLocation.getStartingLineNumber(). (In reply to comment #1) > Works as specified, see javadoc of IASTFileLocation.getStartingLineNumber(). that is true. is there a special reason that the line number is not remembered in the index? would it be possible to change that one gets the correct line number also form index file locations? |
Build Identifier: M20100909-0800 When resolving the usage of a namespace alias with the indexer, the returned IName returns 0 for getStartingLineNumber (which is wrong, see code below). Reproducible: Always Steps to Reproduce: 1. create project with 2 files: //main.cpp #include "ns.h" int main() { NS::i = 5; return 0; } //ns.h namespace NS1 { int i = 1; } namespace NS = NS1; 2. use index to resolve "NS" occurence in the main file (which returns 1 IName) 3. calling getFileLocation().getStartingLineNumber() on that name returns 0 but should be 2