[clang] [libcxx] [clang] [modules] Add err_main_in_named_module (PR #146635)

2025-07-02 Thread Ashwin Banwari via cfe-commits
https://github.com/kish1n updated https://github.com/llvm/llvm-project/pull/146635 >From 76bd9279c0410fa53c8a8ca34229f5ca3a4812e3 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Mon, 30 Jun 2025 18:10:24 -0700 Subject: [PATCH 1/5] Reapply "[clang] [modules] Add err_main_in_named_module (#1

[clang] [libcxx] [clang] [modules] Add err_main_in_named_module (PR #146635)

2025-07-02 Thread Ashwin Banwari via cfe-commits
kish1n wrote: I can't figure out how to make buildbot run the libc++ tests forcefully, so I add a dummy change in libcxx so the tests will run on this PR, and then will remove the change after. https://github.com/llvm/llvm-project/pull/146635 ___ cfe

[clang] [clang] [modules] Add err_main_in_named_module (PR #146635)

2025-07-01 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari edited https://github.com/llvm/llvm-project/pull/146635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [modules] Add err_main_in_named_module (PR #146635)

2025-07-01 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari created https://github.com/llvm/llvm-project/pull/146635 Revival of https://github.com/llvm/llvm-project/pull/146247. Now that https://github.com/llvm/llvm-project/pull/146461 is merged to allow `extern "C++"` for main, we can merge this change. >From 76bd9279

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146461 >From 845f99834c6c9a78c05396a0337051273b1ae138 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Mon, 30 Jun 2025 20:45:39 -0700 Subject: [PATCH 1/7] Implement P3618R0 --- clang/docs/ReleaseNotes.rst

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
@@ -12400,12 +12400,9 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) { // [basic.start.main]p3 - //The main function shall not be declared with a linkage-specification. - if (FD->isExter

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146461 >From 845f99834c6c9a78c05396a0337051273b1ae138 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Mon, 30 Jun 2025 20:45:39 -0700 Subject: [PATCH 1/6] Implement P3618R0 --- clang/docs/ReleaseNotes.rst

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146461 >From 845f99834c6c9a78c05396a0337051273b1ae138 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Mon, 30 Jun 2025 20:45:39 -0700 Subject: [PATCH 1/4] Implement P3618R0 --- clang/docs/ReleaseNotes.rst

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146461 >From 845f99834c6c9a78c05396a0337051273b1ae138 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Mon, 30 Jun 2025 20:45:39 -0700 Subject: [PATCH 1/2] Implement P3618R0 --- clang/docs/ReleaseNotes.rst

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
ashwinbanwari wrote: CC @ChuanqiXu9 for review https://github.com/llvm/llvm-project/pull/146461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146461 >From 845f99834c6c9a78c05396a0337051273b1ae138 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Mon, 30 Jun 2025 20:45:39 -0700 Subject: [PATCH 1/3] Implement P3618R0 --- clang/docs/ReleaseNotes.rst

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari created https://github.com/llvm/llvm-project/pull/146461 Remove the prior warning for attaching extern "C++" to main. >From 845f99834c6c9a78c05396a0337051273b1ae138 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Mon, 30 Jun 2025 20:45:39 -0700 Subject: [PA

[clang] [clang] Fix broken autocomplete test (PR #146326)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari edited https://github.com/llvm/llvm-project/pull/146326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix broken Autocomplete test (PR #146326)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146326 >From f2ed0c7989d7e181004237a4fa2ba7ae1efe44ed Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Sat, 28 Jun 2025 16:19:55 -0700 Subject: [PATCH 01/11] add err_main_in_named_module --- clang/include/cl

[clang] [clang] Fix broken Autocomplete test (PR #146326)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari created https://github.com/llvm/llvm-project/pull/146326 Adding a new warning broke an autocomplete test. This test seemingly needs to be updated on addition for new warning flags. Original PR - https://github.com/llvm/llvm-project/pull/146247 >From f2ed0c798

[clang] [clang] [modules] Add err_main_in_named_module (PR #146247)

2025-06-30 Thread Ashwin Banwari via cfe-commits
ashwinbanwari wrote: It seems I need to add the line `// WARNING-NEXT: -Wmain-attached-to-named-module` on this [line](https://sourcegraph.com/github.com/llvm/llvm-project/-/blob/clang/test/Driver/autocomplete.c?L114) to fix the autocomplete test. What is the process to amend this PR? https:

[clang] [clang] [modules] Add err_main_in_named_module (PR #146247)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146247 >From f2ed0c7989d7e181004237a4fa2ba7ae1efe44ed Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Sat, 28 Jun 2025 16:19:55 -0700 Subject: [PATCH 01/10] add err_main_in_named_module --- clang/include/cl

[clang] [clang] [modules] Add err_main_in_named_module (PR #146247)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari edited https://github.com/llvm/llvm-project/pull/146247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [modules] Add err_main_in_named_module (PR #146247)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146247 >From f2ed0c7989d7e181004237a4fa2ba7ae1efe44ed Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Sat, 28 Jun 2025 16:19:55 -0700 Subject: [PATCH 1/9] add err_main_in_named_module --- clang/include/clan

[clang] [clang] [modules] Add err_main_in_named_module (PR #146247)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari edited https://github.com/llvm/llvm-project/pull/146247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [modules] Add err_main_in_named_module (PR #146247)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146247 >From f2ed0c7989d7e181004237a4fa2ba7ae1efe44ed Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Sat, 28 Jun 2025 16:19:55 -0700 Subject: [PATCH 1/5] add err_main_in_named_module --- clang/include/clan

[clang] [clang] [modules] Add err_main_in_named_module (PR #146247)

2025-06-29 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146247 >From f2ed0c7989d7e181004237a4fa2ba7ae1efe44ed Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Sat, 28 Jun 2025 16:19:55 -0700 Subject: [PATCH 1/4] add err_main_in_named_module --- clang/include/clan

[clang] [clang] [modules] Add err_main_in_named_module (PR #146247)

2025-06-29 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146247 >From f2ed0c7989d7e181004237a4fa2ba7ae1efe44ed Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Sat, 28 Jun 2025 16:19:55 -0700 Subject: [PATCH 1/4] add err_main_in_named_module --- clang/include/clan

[clang] [clang] [modules] Add err_main_in_named_module (PR #146247)

2025-06-28 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146247 >From f2ed0c7989d7e181004237a4fa2ba7ae1efe44ed Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Sat, 28 Jun 2025 16:19:55 -0700 Subject: [PATCH 1/3] add err_main_in_named_module --- clang/include/clan

[clang] [clang] [modules] Add err_main_in_named_module (PR #146247)

2025-06-28 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari edited https://github.com/llvm/llvm-project/pull/146247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [modules] add err_main_in_named_module (PR #146247)

2025-06-28 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari edited https://github.com/llvm/llvm-project/pull/146247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [modules] add err_main_in_named_module (PR #146247)

2025-06-28 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari created https://github.com/llvm/llvm-project/pull/146247 Close https://github.com/llvm/llvm-project/issues/146229 As the issue said, main shouldn't be in any modules. New Error Output: ``` /my/code/directory/main.cpp:3:1: error: 'main' cannot be attached to a n