Skip to content

Commit

Permalink
[ClangAstParser] Ignores include paths that do not exist, instead of …
Browse files Browse the repository at this point in the history
…throwing an exception
  • Loading branch information
joaobispo committed Jun 7, 2024
1 parent 48f246a commit 4e8f9b6
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,14 @@ private List<File> getInputSourceFolders(List<File> sources, List<String> parser
}

if (isInclude) {
sourceFolders.add(SpecsIo.getCanonicalFile(SpecsIo.existingFolder(parserOption)));
var includePath = new File(parserOption);

if (!includePath.exists()) {
SpecsLogs.info("Include path not found, ignoring: '" + parserOption + "'");
} else {
sourceFolders.add(SpecsIo.getCanonicalFile(SpecsIo.existingFolder(parserOption)));
}

continue;
}
// if (parserOption.startsWith("-I")) {
Expand Down

0 comments on commit 4e8f9b6

Please sign in to comment.