ChuanqiXu9 wrote:
I think we shouldn't remove the assertion. Your test passes with the removal of
the assertion since the initializers are not complex. So it ends quickly. But
if it is a complex initialization which triggers more deserialization, I feel
it will be problematic.
I think the poi
Author: Chuanqi Xu
Date: 2025-06-12T10:48:34+08:00
New Revision: bb3b8306dc226c4dc4dfde36444b43476eea66ee
URL:
https://github.com/llvm/llvm-project/commit/bb3b8306dc226c4dc4dfde36444b43476eea66ee
DIFF:
https://github.com/llvm/llvm-project/commit/bb3b8306dc226c4dc4dfde36444b43476eea66ee.diff
LO
Author: Chuanqi Xu
Date: 2025-06-12T11:48:09+08:00
New Revision: f09050fdc85074869f0b34f0d9e061a74ef549ee
URL:
https://github.com/llvm/llvm-project/commit/f09050fdc85074869f0b34f0d9e061a74ef549ee
DIFF:
https://github.com/llvm/llvm-project/commit/f09050fdc85074869f0b34f0d9e061a74ef549ee.diff
LO
https://github.com/ChuanqiXu9 commented:
If we can move lifetimes, this should be a general optimization. We don't have
to (and shouldn't) put this in Coroutine passes. Let's make it a general pass
and send it for review for wider visibility.
https://github.com/llvm/llvm-project/pull/14
__
@@ -6781,7 +6781,7 @@ static bool HandleConstructorCall(const Expr *E, const
LValue &This,
// and make sure we've initialized every step along it.
auto IndirectFieldChain = IFD->chain();
for (auto *C : IndirectFieldChain) {
-FD = cast(C);
+FD
https://github.com/ChuanqiXu9 approved this pull request.
https://github.com/llvm/llvm-project/pull/143168
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ChuanqiXu9 wrote:
lifetimes are widely used. I don't have a clear idea for position yet.
https://github.com/llvm/llvm-project/pull/14
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
ChuanqiXu9 wrote:
> > I think we shouldn't remove the assertion. Your test passes with the
> > removal of the assertion since the initializers are not complex. So it ends
> > quickly. But if it is a complex initialization which triggers more
> > deserialization, I feel it will be problematic.
Author: Chuanqi Xu
Date: 2025-06-12T17:46:33+08:00
New Revision: 1d1f9afe911c360b9505b5fd2c712cb112c8aa5f
URL:
https://github.com/llvm/llvm-project/commit/1d1f9afe911c360b9505b5fd2c712cb112c8aa5f
DIFF:
https://github.com/llvm/llvm-project/commit/1d1f9afe911c360b9505b5fd2c712cb112c8aa5f.diff
LO
ChuanqiXu9 wrote:
> If the module file index is 0, we use delta encoding (see [this code
> path](https://github.com/llvm/llvm-project/blob/01b288fe6a1e627954329198ed5641f2bf55ee8d/clang/include/clang/Serialization/SourceLocationEncoding.h#L165-L168)).
> However, the 1) case can produce a 33-bit
@@ -16719,6 +16719,9 @@ static bool EvaluateInPlace(APValue &Result, EvalInfo
&Info, const LValue &This,
const Expr *E, bool AllowNonLiteralTypes) {
assert(!E->isValueDependent());
+ if (E->getType().isNull())
ChuanqiXu9 wrote:
ChuanqiXu9 wrote:
> I'm not suggesting to treat CodeGenOptions as incompatible by default. For
> now I'm just trying to remove the duplication and improve the
> infrastructure.CodeGenOptions are still benign by default, and can only be
> marked as compatible, which doesn't have any impact on e
https://github.com/ChuanqiXu9 approved this pull request.
https://github.com/llvm/llvm-project/pull/146841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 closed
https://github.com/llvm/llvm-project/pull/146841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Chuanqi Xu
Date: 2025-07-03T19:03:52+08:00
New Revision: 5f62c791061d5fb39e3686126042e4a090132efc
URL:
https://github.com/llvm/llvm-project/commit/5f62c791061d5fb39e3686126042e4a090132efc
DIFF:
https://github.com/llvm/llvm-project/commit/5f62c791061d5fb39e3686126042e4a090132efc.diff
LO
https://github.com/ChuanqiXu9 approved this pull request.
BTW, I've landed the 3 patches (excluding the problematic reported by Google)
internally and we've used it for months. It looks good.
https://github.com/llvm/llvm-project/pull/133057
___
cfe-co
@@ -790,6 +792,35 @@ class Driver {
/// compilation based on which -f(no-)?lto(=.*)? option occurs last.
void setLTOMode(const llvm::opt::ArgList &Args);
+ /// BuildDefaultActions - Constructs the list of actions to perform
+ /// for the provided arguments, which are onl
@@ -577,6 +577,16 @@ def err_drv_reduced_module_output_overrided : Warning<
"please consider use '-fmodule-output=' to specify the output file for
reduced BMI explicitly">,
InGroup>;
+def remark_found_cxx20_module_usage : Remark<
+ "found C++20 module usage in file '%0'"
https://github.com/ChuanqiXu9 edited
https://github.com/llvm/llvm-project/pull/145220
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 requested changes to this pull request.
I still hope we can get a new name. It is important for me to understand if
some code may affect C++20 module or not by its name. I feel this can be
helpful for other developers too.
https://github.com/llvm/llvm-project/pull
https://github.com/ChuanqiXu9 edited
https://github.com/llvm/llvm-project/pull/121046
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14,3 +14,11 @@
//--- test.pcm
// CPP20WARNING-NOT: clang-cl: warning: argument unused during compilation:
'/std:c++20' [-Wunused-command-line-argument]
+
+// test whether the following outputs %Hello.bmi
ChuanqiXu9 wrote:
```suggestion
// test whether th
https://github.com/ChuanqiXu9 approved this pull request.
Given the problem is important (I've heard the problem for clang-cl with
modules several times) and the author have been active on this direction for
years, I think I can trust him even if I can't test it actually. So LGTM.
I'll land th
https://github.com/ChuanqiXu9 approved this pull request.
https://github.com/llvm/llvm-project/pull/146766
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 approved this pull request.
https://github.com/llvm/llvm-project/pull/146910
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ChuanqiXu9 wrote:
CC @mathstuf @bradking
https://github.com/llvm/llvm-project/pull/121046
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 approved this pull request.
https://github.com/llvm/llvm-project/pull/147204
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 approved this pull request.
https://github.com/llvm/llvm-project/pull/145220
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 approved this pull request.
LGTM. Thanks. A small suggestion is, it is better to paste the link of the
paper. So that I don't have to find it my self.
https://github.com/llvm/llvm-project/pull/147135
___
cfe-commits mail
https://github.com/ChuanqiXu9 approved this pull request.
https://github.com/llvm/llvm-project/pull/146993
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 approved this pull request.
https://github.com/llvm/llvm-project/pull/147138
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Chuanqi Xu
Date: 2025-06-30T18:56:29+08:00
New Revision: 5186d4aeeeca56a77404c2842e494524b7cdd4ba
URL:
https://github.com/llvm/llvm-project/commit/5186d4aeeeca56a77404c2842e494524b7cdd4ba
DIFF:
https://github.com/llvm/llvm-project/commit/5186d4aeeeca56a77404c2842e494524b7cdd4ba.diff
LO
ChuanqiXu9 wrote:
FWIW, I fixed it in
https://github.com/llvm/llvm-project/commit/5186d4aeeeca56a77404c2842e494524b7cdd4ba
to avoid affecting more people longer.
https://github.com/llvm/llvm-project/pull/146247
___
cfe-commits mailing list
cfe-commit
https://github.com/ChuanqiXu9 closed
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
ChuanqiXu9 wrote:
Please use a new email name. We don't accept github.noreply mail.
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
ChuanqiXu9 wrote:
I prefer a warning instead of hard error. There are already users who uses this.
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/
https://github.com/ChuanqiXu9 commented:
I prefer to change the term "explicit module" in the code to something like
`CXX20 module` or `named module` or whatever. Since when I read the term
`explicit module` I assumed it is a style to build clang header modules.
https://github.com/llvm/llvm-p
ChuanqiXu9 wrote:
> > How does this patch handle consistency issue? e.g., What if `a.pcm` is
> > compiled with `-O0` but the consumer is compiled with `-O1`? I hope we
> > won't break such things.
>
> All `Optimize`, `OptimizeSize` and `NoInlineDefine` were `COMPATIBLE_LANGOPT`
> in `LangOpti
Author: Chuanqi Xu
Date: 2025-06-30T23:22:31+08:00
New Revision: 8a5b97a7205db189ca82f44dec7a399c2b5da546
URL:
https://github.com/llvm/llvm-project/commit/8a5b97a7205db189ca82f44dec7a399c2b5da546
DIFF:
https://github.com/llvm/llvm-project/commit/8a5b97a7205db189ca82f44dec7a399c2b5da546.diff
LO
ChuanqiXu9 wrote:
I landed it in
https://github.com/llvm/llvm-project/commit/5186d4aeeeca56a77404c2842e494524b7cdd4ba
https://github.com/llvm/llvm-project/pull/146326
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-b
https://github.com/ChuanqiXu9 closed
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
ChuanqiXu9 wrote:
Didn't know it. I'll revert this.
@ashwinbanwari it looks like you need to remove the diagnostics with `extern
"C++" main` and apply it with libc++ and land this finally.
https://github.com/llvm/llvm-project/pull/146247
___
cfe-com
https://github.com/ChuanqiXu9 commented:
This has a stronger impact on C++20 modules since C++20 modules need to
generate codes.
How does this patch handle consistency issue? e.g., What if `a.pcm` is compiled
with `-O0` but the consumer is compiled with `-O1`? I hope we won't break such
thin
ChuanqiXu9 wrote:
> This PR is part of a series aimed at implementing native support for explicit
> module builds from the Clang driver.
This is confusing. Since explicit modules is an unrelated term with C++20
modules.
https://github.com/llvm/llvm-project/pull/145220
@@ -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
https://github.com/ChuanqiXu9 commented:
The change LGTM but I want a test to avoid further regression.
https://github.com/llvm/llvm-project/pull/146468
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
https://github.com/ChuanqiXu9 approved this pull request.
Sounds good. I'll merge this after the CI gets green.
https://github.com/llvm/llvm-project/pull/146461
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mail
https://github.com/ChuanqiXu9 approved this pull request.
LGTM
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
@@ -12486,6 +12486,14 @@ void Sema::CheckMain(FunctionDecl *FD, const DeclSpec
&DS) {
: FixItHint());
FD->setInvalidDecl(true);
}
+
+// In C++ [basic.start.main]p3, it is said a program attaching main to a
+// named module is i
https://github.com/ChuanqiXu9 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
ChuanqiXu9 wrote:
Please make sure the libc++ tests won't get affected. I am not sure if the
modules related tests in libc++ run by default.
https://github.com/llvm/llvm-project/pull/146635
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
https://github.com/ChuanqiXu9 closed
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
@@ -650,6 +650,9 @@ Improvements to Clang's diagnostics
#GH69470, #GH59391, #GH58172, #GH46215, #GH45915, #GH45891, #GH44490,
#GH36703, #GH32903, #GH23312, #GH69874.
+- A warning is now emitted when ``main`` is attached to a named module,
+ which can be turned off with ``
https://github.com/ChuanqiXu9 approved this pull request.
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
https://github.com/ChuanqiXu9 approved this pull request.
LGTM. Thanks.
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
@@ -1062,6 +1062,8 @@ def err_constexpr_main : Error<
"'main' is not allowed to be declared %select{constexpr|consteval}0">;
def err_deleted_main : Error<"'main' is not allowed to be deleted">;
def err_mainlike_template_decl : Error<"%0 cannot be a template">;
+def warn_main_
@@ -1062,6 +1062,8 @@ def err_constexpr_main : Error<
"'main' is not allowed to be declared %select{constexpr|consteval}0">;
def err_deleted_main : Error<"'main' is not allowed to be deleted">;
def err_mainlike_template_decl : Error<"%0 cannot be a template">;
+def warn_main_
https://github.com/ChuanqiXu9 approved this pull request.
SGTM
https://github.com/llvm/llvm-project/pull/146153
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -43,17 +46,24 @@ namespace clang {
// Macro locations have the top bit set, we rotate by one so it is the low bit.
class SourceLocationEncoding {
using UIntTy = SourceLocation::UIntTy;
- constexpr static unsigned UIntBits = CHAR_BIT * sizeof(UIntTy);
static UIntTy en
https://github.com/ChuanqiXu9 closed
https://github.com/llvm/llvm-project/pull/147138
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 closed
https://github.com/llvm/llvm-project/pull/146993
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 edited
https://github.com/llvm/llvm-project/pull/147292
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 closed
https://github.com/llvm/llvm-project/pull/147135
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 approved this pull request.
https://github.com/llvm/llvm-project/pull/147489
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 closed
https://github.com/llvm/llvm-project/pull/147489
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -43,17 +46,24 @@ namespace clang {
// Macro locations have the top bit set, we rotate by one so it is the low bit.
class SourceLocationEncoding {
using UIntTy = SourceLocation::UIntTy;
- constexpr static unsigned UIntBits = CHAR_BIT * sizeof(UIntTy);
static UIntTy en
https://github.com/ChuanqiXu9 commented:
Have you tested this with google's internal modules test? If yes, then LG.
https://github.com/llvm/llvm-project/pull/147292
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
ChuanqiXu9 wrote:
The size of the patch is too big to review. And personally I don't have such a
time to review it recently. Also from the community's perspective, the
maintainablity of large patches is questionable.
I think, you can achieve it with another direction. Instead of adding these
https://github.com/ChuanqiXu9 approved this pull request.
https://github.com/llvm/llvm-project/pull/147945
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -51,4 +39,71 @@ template module module_var_template;
// This is a variable named 'import' that shadows the type 'import' above.
struct X {} import;
-#endif
+
+//--- ImportError1.cppm
+module;
+
+struct import { struct inner {}; };
+struct module { struct inner {}; };
+
+con
@@ -51,4 +39,71 @@ template module module_var_template;
// This is a variable named 'import' that shadows the type 'import' above.
struct X {} import;
-#endif
+
+//--- ImportError1.cppm
+module;
+
+struct import { struct inner {}; };
+struct module { struct inner {}; };
+
+con
@@ -51,4 +39,71 @@ template module module_var_template;
// This is a variable named 'import' that shadows the type 'import' above.
struct X {} import;
-#endif
+
+//--- ImportError1.cppm
+module;
+
+struct import { struct inner {}; };
+struct module { struct inner {}; };
+
+con
@@ -51,4 +39,71 @@ template module module_var_template;
// This is a variable named 'import' that shadows the type 'import' above.
struct X {} import;
-#endif
+
+//--- ImportError1.cppm
+module;
+
+struct import { struct inner {}; };
+struct module { struct inner {}; };
+
+con
@@ -51,4 +39,71 @@ template module module_var_template;
// This is a variable named 'import' that shadows the type 'import' above.
struct X {} import;
-#endif
+
+//--- ImportError1.cppm
+module;
+
+struct import { struct inner {}; };
+struct module { struct inner {}; };
+
+con
Author: Chuanqi Xu
Date: 2025-07-11T11:18:21+08:00
New Revision: aa9902691db5cbb9db77270902f615f3c0877deb
URL:
https://github.com/llvm/llvm-project/commit/aa9902691db5cbb9db77270902f615f3c0877deb
DIFF:
https://github.com/llvm/llvm-project/commit/aa9902691db5cbb9db77270902f615f3c0877deb.diff
LO
2301 - 2375 of 2375 matches
Mail list logo