Bug 69745 - Consecutive "using" statements cause indexer warnings
Summary: Consecutive "using" statements cause indexer warnings
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Andrew Niefer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-09 14:32 EDT by Julien Dubuc CLA
Modified: 2004-08-10 14:01 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Dubuc CLA 2004-07-09 14:32:16 EDT
example:

void TestReport::report() const
{
    using std::cout;
    using std::endl;

    ...

In this case, the second "using" (not the first) causes a "Syntax error" 
indexer warning. I don't think that's right.
Comment 1 John Camelon CLA 2004-07-11 16:13:01 EDT
I don't think its the using directive, I think it's something to do with 
endl.  
Comment 2 Andrew Niefer CLA 2004-07-12 17:16:04 EDT
The problem was with the endl.  It was a bug in the implementation of ANSI 
7.3.3-5 "A using-declaration shall not name a template-id".
(endl is a template function, but not in this case a template-id, which would 
look something like endl<int>)

I've also fixed the error reporting around using declarations so when there is 
an error it will be "Invalid using directive/declaration" instead of the 
generic syntax error.

Fix applied to HEAD and will be propagated to 2.0.1 branch at a later date.
Comment 3 Andrew Niefer CLA 2004-08-10 14:01:19 EDT
fix is now in 2.0.1