[clang] clang: Relax LangOpts checks when lexing quoted numbers during preprocessing (PR #95798)

2024-11-09 Thread Nishith Kumar M Shah via cfe-commits
@@ -2068,7 +2068,8 @@ bool Lexer::LexNumericConstant(Token &Result, const char *CurPtr) { } // If we have a digit separator, continue. - if (C == '\'' && (LangOpts.CPlusPlus14 || LangOpts.C23)) { + if (C == '\'' && + (LangOpts.CPlusPlus14 || LangOpts.C23 || Parsing

[clang] clang: Relax LangOpts checks when lexing quoted numbers during preprocessing (PR #95798)

2024-06-17 Thread Nishith Kumar M Shah via cfe-commits
nishithshah2211 wrote: > The changes should come with a release note in clang/docs/ReleaseNotes.rst so > users know about the fix. Noted. Will include a release note, a lexer test and address any other comments for the next commit. https://github.com/llvm/llvm-project/pull/95798 _

[clang] clang: Relax LangOpts checks when lexing quoted numbers during preprocessing (PR #95798)

2024-06-17 Thread Nishith Kumar M Shah via cfe-commits
nishithshah2211 wrote: @jansvoboda11 - I put up this PR to get your thoughts on addressing https://github.com/llvm/llvm-project/issues/88896, since the previous commit was reverted. Is this more along the lines of what you were thinking? I will push more changes to include a test for the Lexer

[clang] clang: Relax LangOpts checks when lexing quoted numbers during preprocessing (PR #95798)

2024-06-17 Thread Nishith Kumar M Shah via cfe-commits
https://github.com/nishithshah2211 created https://github.com/llvm/llvm-project/pull/95798 When trying to lex numeric constants that use single quotes as separators, if the lexer is parsing a preprocessor directive, we can relax the language options check. These checks will be enforced in a la

[clang] Revert "Pass LangOpts from CompilerInstance to DependencyScanningWork… (PR #94488)

2024-06-05 Thread Nishith Kumar M Shah via cfe-commits
nishithshah2211 wrote: @jansvoboda11 - please merge this revert in when you get a chance, thanks! https://github.com/llvm/llvm-project/pull/94488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] Revert "Pass LangOpts from CompilerInstance to DependencyScanningWork… (PR #94488)

2024-06-05 Thread Nishith Kumar M Shah via cfe-commits
https://github.com/nishithshah2211 created https://github.com/llvm/llvm-project/pull/94488 …er (#93753)" This reverts commit 9862080b1cbf685c0d462b29596e3f7206d24aa2. >From 3bc45673476ae4fbd1166a2d6bff240077104f5e Mon Sep 17 00:00:00 2001 From: Nishith Shah Date: Tue, 4 Jun 2024 09:47:55 -070

[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 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 non-deterministi

[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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[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 cfe-commits@lis

[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 DependencyScanning

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

2024-05-30 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 h

[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 DependencyScanning

[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: https://discourse.llvm.org/t/looking-for-help-with-accessing-langopts-from-the-actual-compiler-i

[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 ma