Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354959 - Allow Codan to access org.eclipse.cdt.internal.core.dom.parser and below
Summary: Allow Codan to access org.eclipse.cdt.internal.core.dom.parser and below
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: CDT Codan Inbox CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-17 11:00 EDT by Tomasz Wesolowski CLA
Modified: 2019-12-30 18:55 EST (History)
2 users (show)

See Also:


Attachments
Proposed change (1.50 KB, patch)
2011-08-17 11:00 EDT, Tomasz Wesolowski CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.