Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342443 - IASTName of using declaration claims to be a definition
Summary: IASTName of using declaration claims to be a definition
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Markus Schorn CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-11 10:07 EDT by Lukas Felber CLA
Modified: 2011-04-14 08:23 EDT (History)
1 user (show)

See Also:


Attachments
testcase + fix (1.94 KB, patch)
2011-04-12 09:00 EDT, 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 Lukas Felber CLA 2011-04-11 10:07:44 EDT
Build Identifier: M20100909-0800

Calling IASTName.isDefinition() on the (last) IASTName of using declaration returns true instead of false. It is obvious that it should only return true when calling IASTName.isDeclaration() given by the name "using DECLARATION". Also the C++ Standard ( section 7.3.3 ) thinks so.

Reproducible: Always

Steps to Reproduce:
1. create emty source file containig the follwoing code:
using A::b;
2. Call IASTName.isDefinition() on the IASTName instance "b".
Comment 1 Markus Schorn CLA 2011-04-12 09:00:38 EDT
Created attachment 193041 [details]
testcase + fix

Thanks Lukas!
Comment 2 Markus Schorn CLA 2011-04-12 09:01:18 EDT
Fixed in 8.0 > 20110412.
Comment 5 CDT Genie CLA 2011-04-14 08:23:09 EDT
*** cdt cvs genie on behalf of mschorn ***
Bug 342443: A using declaration is not a definition.

[*] CPPSelectionTestsNoIndexer.java 1.32 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsNoIndexer.java?root=Tools_Project&r1=1.31&r2=1.32