Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342443

Summary: IASTName of using declaration claims to be a definition
Product: [Tools] CDT Reporter: Lukas Felber <l.felber>
Component: cdt-parserAssignee: Markus Schorn <mschorn.eclipse>
Status: RESOLVED FIXED QA Contact: Markus Schorn <mschorn.eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
testcase + fix mschorn.eclipse: iplog-

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