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

Bug 354959

Summary: Allow Codan to access org.eclipse.cdt.internal.core.dom.parser and below
Product: [Tools] CDT Reporter: Tomasz Wesolowski <kosashi>
Component: cdt-codanAssignee: CDT Codan Inbox <cdt-codan-inbox>
Status: NEW --- QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: cdtdoug, zeratul976
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Proposed change none

Description Tomasz Wesolowski CLA 2011-08-17 11:00:19 EDT
Hello,

The parser contains a lot of logic, usually in classes, which tend to be very usable in Codan checkers. Examples include classes such as:

org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil
org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper

These classes are tested to correctly implement the logic described in the C++ standard and are updated alongside with it. Hence, especially since Codan is an integral part of CDT now, I believe that Codan would benefit from being provided access to org.eclipse.cdt.internal.core.dom.parser packages, in order to avoid the obvious downsides of having to duplicate the semantics provided there.

Note that if one day a need arises to change the logic in the parser (such as updates to the C++ standard), the exactly same reason will make it necessary to update the Codan checkers - so introducing this dependency into code looks very natural.
Comment 1 Tomasz Wesolowski CLA 2011-08-17 11:00:59 EDT
Created attachment 201649 [details]
Proposed change
Comment 2 Nathan Ridge CLA 2013-07-21 21:55:07 EDT
Wouldn't it be a better idea to expose the logic that is useful to codan in public APIs in core?

I began doing that with org.eclipse.cdt.core.dom.ast.cpp.SemanticQueries.
Comment 3 Jonah Graham CLA 2019-12-30 18:55:36 EST
This bug was assigned and targeted at a now released milestone (or Future or Next that isn't being used by CDT). As that milestone has now passed, the milestone field has been cleared. If this bug has been fixed, please set the milestone to the version it was fixed in and mark the bug as resolved.