Skip to content

Conversation

@bialger
Copy link
Contributor

@bialger bialger commented Nov 9, 2025

No description provided.

sashbek and others added 28 commits November 3, 2025 15:20
@bialger bialger closed this Nov 9, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +11 to +15
std::unique_ptr<TokenImportProcessor> import_processor =
std::make_unique<TokenImportProcessor>(parameters.main_file, parameters.include_paths);
processors.push_back(std::move(import_processor));

std::unique_ptr<TokenDirectivesProcessor> directives_processor =

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Respect conditional directives before expanding imports

The preprocessor pipeline now runs the import pass before any directive handling. MakeTokenProcessors constructs the TokenImportProcessor and executes it ahead of TokenDirectivesProcessor, while TokenImportProcessor::GatherDependencies blindly loads every #import it encounters. This means an import nested inside a #ifdef or #ifndef that will later be skipped is still resolved, so a missing file inside a disabled branch will raise an error and dependencies are added even when the directive evaluates to false. Imports should either be evaluated after directives or the importer must understand the skip state so that conditional imports are ignored when their branch is inactive.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants