[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-07-03 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > You can certainly construct cases where the different lexing rules in > > > different language modes allow you to detect which language you're in > > > from within the preprocessor ([1](https://eel.is/c++draft/diff.cpp11.lex) > > >

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-07-02 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > > You can certainly construct cases where the different lexing rules in > > different language modes allow you to detect which language you're in from > > within the preprocessor ([1](https://eel.is/c++draft/diff.cpp11.lex) > >

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-24 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > > I guess the general question is - is it acceptable to have the Scanner > > > > operating in a language standard different than the passed in language > > > > mode and different than the compiler language standard? > > > > > > > > > I think that is acceptable. It

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-17 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > I guess the general question is - is it acceptable to have the Scanner > > > operating in a language standard different than the passed in language > > > mode and different than the compiler language standard? > > > > > > I think that is acceptable. It is kinda

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-05 Thread Richard Smith via cfe-commits
zygoloid wrote: > > I guess the general question is - is it acceptable to have the Scanner > > operating in a language standard different than the passed in language mode > > and different than the compiler language standard? > > I think that is acceptable. It is kinda hacky, but the lexer

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-05 Thread Nishith Kumar M Shah via cfe-commits
nishithshah2211 wrote: Here is the revert PR: https://github.com/llvm/llvm-project/pull/94488 https://github.com/llvm/llvm-project/pull/93753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-05 Thread Jan Svoboda via cfe-commits
jansvoboda11 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). > >

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-03 Thread Nishith Kumar M Shah via cfe-commits
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

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-03 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > Thanks for the comments @jansvoboda11 . I am new to all these different > moving parts and want to understand better. I have a few questions. > > > If you concurrently scan the same file under two language standards with > > the same scanning service, it becomes

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-03 Thread Nishith Kumar M Shah via cfe-commits
nishithshah2211 wrote: Thanks for the comments @jansvoboda11 . I am new to all these different moving parts and want to understand better. I have a few questions. > If you concurrently scan the same file under two language standards with the > same scanning service, it becomes

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-03 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I don't think this is correct. If you concurrently scan the same file under two language standards with the same scanning service, it becomes non-deterministic which one gets cached in the filesystem cache. For subsequent FS queries the cache might return wrong results,

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-03 Thread via cfe-commits
github-actions[bot] wrote: @nishithshah2211 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-03 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/93753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-03 Thread Nishith Kumar M Shah via cfe-commits
nishithshah2211 wrote: Thanks for the pointers. What would be the process to merge this in? https://github.com/llvm/llvm-project/pull/93753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-03 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. I think this makes sense. Thanks a lot for the fix https://github.com/llvm/llvm-project/pull/93753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-05-31 Thread Nishith Kumar M Shah via cfe-commits
nishithshah2211 wrote: Yes, sorry I missed committing that change. Let me know if there is a better way to test out the changes or add any additional changes. https://github.com/llvm/llvm-project/pull/93753 ___ cfe-commits mailing list

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-05-31 Thread Nishith Kumar M Shah via cfe-commits
https://github.com/nishithshah2211 updated https://github.com/llvm/llvm-project/pull/93753 >From 46a25038abbcf5ab9eebded6813b4bbb71a44925 Mon Sep 17 00:00:00 2001 From: Nishith Shah Date: Wed, 29 May 2024 12:34:52 -0700 Subject: [PATCH] Pass LangOpts from CompilerInstance to

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-05-31 Thread via cfe-commits
cor3ntin wrote: Can you add a test for https://github.com/llvm/llvm-project/issues/88896 ? https://github.com/llvm/llvm-project/pull/93753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-05-31 Thread Nishith Kumar M Shah via cfe-commits
nishithshah2211 wrote: @cor3ntin Thanks for reviewing. I updated the PR to get the tests/build passing. Please take a look when you get a chance. https://github.com/llvm/llvm-project/pull/93753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-05-30 Thread Nishith Kumar M Shah via cfe-commits
https://github.com/nishithshah2211 updated https://github.com/llvm/llvm-project/pull/93753 >From ae79ebec844a6a308bb370184eab892bd74e8fa1 Mon Sep 17 00:00:00 2001 From: Nishith Shah Date: Wed, 29 May 2024 12:34:52 -0700 Subject: [PATCH] Pass LangOpts from CompilerInstance to

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-05-29 Thread via cfe-commits
cor3ntin wrote: Thanks for working on that. Your change is pretty much what i expected yes, it's great! https://github.com/llvm/llvm-project/pull/93753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-05-29 Thread Nishith Kumar M Shah via cfe-commits
nishithshah2211 wrote: @cor3ntin @Sirraide I put up a draft PR to get some feedback and see if the changes here make sense or not. Also tagging @pogo59 since I received good feedback/pointers here:

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-05-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nishith Kumar M Shah (nishithshah2211) Changes This commit fixes https://github.com/llvm/llvm-project/issues/88896 by passing LangOpts from the CompilerInstance to DependencyScanningWorker so that the original LangOpts are

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-05-29 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you,

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-05-29 Thread Nishith Kumar M Shah via cfe-commits
https://github.com/nishithshah2211 created https://github.com/llvm/llvm-project/pull/93753 This commit fixes https://github.com/llvm/llvm-project/issues/88896 by passing LangOpts from the CompilerInstance to DependencyScanningWorker so that the original LangOpts are preserved/respected. This