[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)
Nishith Kumar M Shah via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 3 11:44:12 PDT 2024
nishithshah2211 wrote:
> You can have a project that has both C and C++ implementation files that end up including the same header files from the C standard library. One can be compiled under C11 (without separator support), the other under C++14 (with separator support).
Thanks. I had considered this very lightly, and in my mind, I thought that this would result in two separate passes of scanning - and so, two separate scanning services. Maybe I am wrong?
Thank you for the additional context and bits of knowledge, super helpful. I'll put up a separate PR that does the following:
1. reverts the changes within this PR
2. checks if the lexer has `ParsingPreprocessorDirective` property `true` or `false` and allow for the numeric lexing to happen in that case.
Let me know if it is preferable for history etc. to have two separate PRs - one for the revert and one for the lexer to relax the CPP14/C23 constraint during the preprocessing phase.
https://github.com/llvm/llvm-project/pull/93753
More information about the cfe-commits
mailing list