Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#include quoted form: preprocessor search order #1225

Closed
guwirth opened this issue Sep 7, 2017 · 0 comments · Fixed by #1984
Closed

#include quoted form: preprocessor search order #1225

guwirth opened this issue Sep 7, 2017 · 0 comments · Fixed by #1984
Assignees
Milestone

Comments

@guwirth
Copy link
Collaborator

guwirth commented Sep 7, 2017

Quoted form: The preprocessor searches for include files in this order:

  1. In the same directory as the file that contains the #include statement.
  2. In the directories of the currently opened include files, in the reverse order in which they were opened. The search begins in the directory of the parent include file and continues upward through the directories of any grandparent include files.

Case 2 seems to be not supported:

public File getSourceCodeFile(String filename, String cwd, boolean quoted) {

@guwirth guwirth added the bug label Sep 7, 2017
@guwirth guwirth changed the title #ionclude quoted form: preprocessor search order #include quoted form: preprocessor search order Sep 7, 2017
@guwirth guwirth added this to the 0.9.9 milestone Nov 19, 2017
@guwirth guwirth modified the milestones: 0.9.9, next Jan 1, 2018
@guwirth guwirth removed this from the next milestone Jan 16, 2018
@guwirth guwirth added this to the 1.1 milestone Jun 9, 2018
@guwirth guwirth modified the milestones: 1.1, 1.2 Jun 19, 2018
@guwirth guwirth removed this from the 1.2 milestone Oct 29, 2018
@guwirth guwirth added this to the 1.2.1 milestone Nov 14, 2018
@guwirth guwirth modified the milestones: 1.2.1, 1.2.2 Dec 23, 2018
@guwirth guwirth removed this from the 1.2.2 milestone Feb 9, 2019
@guwirth guwirth added this to the 2.0.0 milestone Nov 3, 2020
@guwirth guwirth self-assigned this Dec 1, 2020
guwirth added a commit to guwirth/sonar-cxx that referenced this issue Dec 2, 2020
- support Microsoft Quoted form search (close SonarOpenCommunity#1225):
1) In the same directory as the file that contains the #include statement.
2) In the directories of the currently opened include files, in the reverse order in which they were opened. The search begins in the directory  of the parent include file and continues upward through the directories of any grandparent include files.
3) fallback to use include paths instead of local folder (same as Angle-bracket form)

- add #include unit tests
- test for compilation database settings propagation (close SonarOpenCommunity#1489)
- refactoring
guwirth added a commit to guwirth/sonar-cxx that referenced this issue Dec 3, 2020
- support Microsoft Quoted form search (close SonarOpenCommunity#1225):
1) In the same directory as the file that contains the #include statement.
2) In the directories of the currently opened include files, in the reverse order in which they were opened. The search begins in the directory  of the parent include file and continues upward through the directories of any grandparent include files.
3) fallback to use include paths instead of local folder (same as Angle-bracket form)

- add #include unit tests
- test for compilation database settings propagation (close SonarOpenCommunity#1489)
- refactoring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant