Bug 68931

Summary: Indexer syntax error only underlines the first character
Product: [Tools] CDT Reporter: Brent Nicolle <bnicolle>
Component: cdt-coreAssignee: Andrew Niefer <aniefer>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0.1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Brent Nicolle CLA 2004-06-29 17:10:40 EDT
CDT 2.0.0.200406280300

1. Turn on all indexer problem markers
2. Add code:
void foo()
{
     SomeUnknownType t;  // line A
}

The indexer will detect and mark a syntax problem on line A.
However it will only underline the letter 'S', not all of "SomeUnknownType".
Comment 1 Bogdan Gheorghe CLA 2004-06-29 17:32:24 EDT
That sounds like trouble in parser-offset land to me. Amigos?
Comment 2 Andrew Niefer CLA 2004-06-30 11:36:47 EDT
highlighting only one character happens when the parser returns offsets where 
the end offsets is <= the start offset.
The real bug here is then, why is this error reported as a syntax error with 
little offset information instead of the semantic error.
Comment 3 Andrew Niefer CLA 2004-07-08 13:31:10 EDT
The error is now the correct semantic problem:
"Attempt to use symbol failed : SomeUnknownType ..."

Fix commited to HEAD only.  Fix will be propagated to 2.0.1 stream later with 
the rest of the parser fixes.
Comment 4 Andrew Niefer CLA 2004-08-10 13:22:51 EDT
fix is now in 2.0.1