| Summary: | StandaloneIndexerTask base uses default ScannerConfig in producing AST | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Missing name Mising name <sebastian.moss> | ||||||||
| Component: | cdt-core | Assignee: | Mike Kucera <mikekucera> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | cdt-core-inbox, cdtdoug, recoskie | ||||||||
| Version: | 5.0 | Flags: | cdtdoug:
iplog-
|
||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 245713 | ||||||||||
| Attachments: |
|
||||||||||
Created attachment 111128 [details]
Patch providing overloaded retrieveScannerConfig in StandaloneIndexerTask
Mike, I know you did some stuff recently with the scanner config for the standalone indexer. Can you take a look? Thanks. I recently added the ability to use an IStandaloneScannerInfoProvider with the StandaloneIndexer in order to provide ISannerInfo objects for specific files. The provided solution is incomplete because it does not use the IStandaloneScannerInfoProvider. As far as I can tell the 'default' scanner info object is only used when the indexer parses files up front. I guess this is because normally when an include file is parsed it is in the context of a source file in the project. But if a header file outside the project is parsed up front it needs a 'default' scanner info to provide at least a minimal amount of info to the parser. I'll take a look at fixing this. Created attachment 111311 [details]
proposed fix
This patch fixes the problem in a similar way, but it also adds a method to IStandaloneScannerInfoProvider for providing the default scanner info.
Also I deprecated getScannerInfo() in the standalone indexer task. You can get the same behavior by providing an implementation of IStandaloneScannerInfoProvider that always returns the same IScannerInfo object.
Fixed in HEAD. I've backported the patch to the 5.0 stream. |
Created attachment 111120 [details] Patch providing overloaded retrieveScannerConfig in StandaloneIndexerTask AbstractIndexerTask - base of StandaloneIndexerTask - uses a new ScannerConfig object when creating an AST. In derived classes such as StandaloneIndexerTask, it is preferable to use the IScannerConfig of the member indexer than the default-constructed ScannerConfig produced by AbstractIndexerTask.