[Inconsistency in SgProject] get_includePathList() vs. get_includeFileList() vs. get_includeDirectorySpecifierList()
@chunhualiao is already working on this.
Since Nov 26, 2019.
- Dominant language
- C
- Stars
- 688
- Forks
- 144
- PR merge metrics
- No merged PRs in 30d
Description
Hello Everyone,
according to [this part of the doxygen documentation](http://rosecompiler.org/ROSE_HTML_Reference/classSgProject.html), SgProject provides three mechanisms to query command line arguments related to the `-I` flag parsed by `frontend(argc, argv)`. These three functions are: `get_includeDirectorySpecifierList()`, `get_includePathList()` and `get_includeFileList()`. All three functions are immensly useful.
However, in practice only `get_includeDirectorySpecifierList()` produces the expected result whereas `get_includePathList()` and `get_includeFileList()` return empty lists.
A call to `SgProject::initialization()` _does not_ solve the issue.
I assembled a [reproduction package](https://github.com/forflo/bugReproductionPackage02) for the issue. The call to the example binary built from `fail.cpp` produces the following output:
```
$ cat call_fail.sh
=> ./fail dummy.c -Ifoo -Ibar -I/opt/local/foobar
$ . call_fail.sh
=>
content of project->get_includeDirectorySpecifierList()
-Ifoo
-Ibar
-I/opt/local/foobar
content of project->get_includePathList()
content of project->get_includeFileList()
```
Is there any other initialization of SgProject required that I am not aware of?
Thanks & Best regards
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.