[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-23 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Yeah, this is the reason why I put the change in `C++ Specific Potentially Breaking Changes` section. I think specify `-fdelayed-template-parsing` explicitly may be a good solution/workaroud. https://github.com/llvm/llvm-project/pull/69431

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-23 Thread Petr Hosek via cfe-commits
petrhosek wrote: This broke the following tests on Windows: ``` llvm-libc++-static-clangcl.cfg.in :: libcxx/atomics/diagnose_invalid_memory_order.verify.cpp llvm-libc++-static-clangcl.cfg.in :: libcxx/fuzzing/random.pass.cpp llvm-libc++-static-clangcl.cfg.in :: std/depr/depr.c.headers/math_h.pas

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-23 Thread via cfe-commits
zeroomega wrote: FYI, we are seeing libc++ test failures on Windows after this patch landed, for example: llvm-libc++-static-clangcl.cfg.in :: std/numerics/c.math/cmath.pass.cpp: ``` # .---command stderr # | In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\std\num

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-22 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/69431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-22 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Comments addressed. https://github.com/llvm/llvm-project/pull/69431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-22 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69431 >From 9c0d81ef5fdae40d378170eebd848f099902dc98 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 18 Oct 2023 15:58:03 +0800 Subject: [PATCH] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsi

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-20 Thread David Blaikie via cfe-commits
@@ -6870,8 +6852,38 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.AddLastArg(CmdArgs, options::OPT_finline_max_stacksize_EQ); + // FIXME: Find a better way to determine whether we are in C++20. + bool HaveCxx20 = + Std && + (Std->contain

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-20 Thread David Blaikie via cfe-commits
@@ -6870,8 +6852,38 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.AddLastArg(CmdArgs, options::OPT_finline_max_stacksize_EQ); + // FIXME: Find a better way to determine whether we are in C++20. + bool HaveCxx20 = + Std && + (Std->contain

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-20 Thread David Blaikie via cfe-commits
@@ -6870,8 +6852,38 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.AddLastArg(CmdArgs, options::OPT_finline_max_stacksize_EQ); + // FIXME: Find a better way to determine whether we are in C++20. + bool HaveCxx20 = + Std && + (Std->contain

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-20 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie approved this pull request. Some minor comments but generally looks good to me. https://github.com/llvm/llvm-project/pull/69431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-20 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie edited https://github.com/llvm/llvm-project/pull/69431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-20 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > I still support disabling delayed template parsing by default in all > > > configurations. Ultimately, this feature is a source of bugs, and we > > > should start the clock on its deprecation and removal. This, of course, > > > involves real work, and I haven't allocate

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69431 >From 076f2ea9de7d0f979431363b5426931239c7c494 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 18 Oct 2023 15:58:03 +0800 Subject: [PATCH] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsi

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-19 Thread Markus Böck via cfe-commits
zero9178 wrote: > > According to the docs [0], MSVC actually defaults to > > `-fno-delayed-template-parsing` (`/Zc:twoPhase-` with MSVC CLI) if using > > C++20. This is due to `-std:c++20` implying `/permissive-` which implies > > `/Zc:twoPhase-`. We could therefore just disable it based on la

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-19 Thread Reid Kleckner via cfe-commits
rnk wrote: We can definitely disable delayed template parsing in C++20 mode, I wouldn't argue against that. Whoever actually does the work should decide how much effort they are willing to put in. I'm just saying there are benefits to starting the deprecation clock sooner, since it will ultima

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-19 Thread David Blaikie via cfe-commits
dwblaikie wrote: > > I still support disabling delayed template parsing by default in all > > configurations. Ultimately, this feature is a source of bugs, and we should > > start the clock on its deprecation and removal. This, of course, involves > > real work, and I haven't allocated any tim

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-19 Thread Iain Sandoe via cfe-commits
iains wrote: > I still support disabling delayed template parsing by default in all > configurations. Ultimately, this feature is a source of bugs, and we should > start the clock on its deprecation and removal. This, of course, involves > real work, and I haven't allocated any time (mine or o

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-19 Thread Reid Kleckner via cfe-commits
rnk wrote: I still support disabling delayed template parsing by default in all configurations. Ultimately, this feature is a source of bugs, and we should start the clock on its deprecation and removal. This, of course, involves real work, and I haven't allocated any time (mine or others') to

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > According to the docs [0], MSVC actually defaults to > `-fno-delayed-template-parsing` (`/Zc:twoPhase-` with MSVC CLI) if using > C++20. This is due to `-std:c++20` implying `/permissive-` which implies > `/Zc:twoPhase-`. We could therefore just disable it based on language

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-19 Thread Markus Böck via cfe-commits
zero9178 wrote: According to the docs [0], MSVC actually defaults to `-fno-delayed-template-parsing` (`/Zc:twoPhase-` with MSVC CLI) if using C++20. This is due to `-std:c++20` implying `/permissive-` which implies `/Zc:twoPhase-`. We could therefore just disable it based on language version

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Is delayed template parsing an optimisation or a correctness measure? If it's > an optimisation, then it seems that we should disable it for modules (because > that then makes the modules cases correct). If it's needed for correctness, > then we have more of a problem - do

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-19 Thread Iain Sandoe via cfe-commits
https://github.com/iains commented: Is delayed template parsing an optimisation or a correctness measure? If it's an optimisation, then it seems that we should disable it for modules (because that then makes the modules cases correct). If it's needed for correctness, then we have more of a pro

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-18 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Does MSVC have the delayed template parsing effects when using modules? If > not, perhaps we should just disable the flag/not allow it to be composed > together? As far as I can reach, (from the issue reports in MSVC community), MSVC don't have problems with the delayed te

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-18 Thread David Blaikie via cfe-commits
dwblaikie wrote: Does MSVC have the delayed template parsing effects when using modules? If not, perhaps we should just disable the flag/not allow it to be composed together? https://github.com/llvm/llvm-project/pull/69431 ___ cfe-commits mailing list

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9) Changes There are already 3 issues about the broken state of -fdelayed-template-parsing and C++20 modules: - https://github.com/llvm/llvm-project/issues/61068 - https://github.com/llvm/llvm-project/issues/64

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/69431 There are already 3 issues about the broken state of -fdelayed-template-parsing and C++20 modules: - https://github.com/llvm/llvm-project/issues/61068 - https://github.com/llvm/llvm-project/issues/64810 - http