https://github.com/erichkeane approved this pull request.
happy now :)
https://github.com/llvm/llvm-project/pull/88963
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,58 @@
+// RUN: %clang_cc1 -std=c++20 -verify %s
+
+template
+concept C = I >= 4;
+
+template
+concept D = I < 8;
+
+template
+struct A {
+ constexpr static int f() { return 0; }
+ constexpr static int f() requires C && D { return 1; }
+ constexpr static int f()
@@ -5437,6 +5437,11 @@ def note_function_template_spec_matched : Note<
def err_function_template_partial_spec : Error<
"function template partial specialization is not allowed">;
+def err_function_member_spec_ambiguous : Error<
+"ambiguous member function
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/88963
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
Do we need a release note? Else LGTM.
https://github.com/llvm/llvm-project/pull/88963
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/91339
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
Seems simple enough, and the AST output looks reasonable.
https://github.com/llvm/llvm-project/pull/90842
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/erichkeane approved this pull request.
This looks good to me, please give this a day or so for any conversations to
die down.
https://github.com/llvm/llvm-project/pull/91140
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -1779,9 +1779,8 @@ void Parser::ParseClassSpecifier(tok::TokenKind
TagTokKind,
tok::kw___is_union,
tok::kw___is_unsigned,
tok::kw___is_void,
- tok::kw___is_volatile,
- tok::kw___reference_binds_to_temporary,
-
https://github.com/erichkeane approved this pull request.
LGTM. I want @Endilll to confirm the DR test looks right though.
https://github.com/llvm/llvm-project/pull/90760
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/erichkeane approved this pull request.
This seems reasonable to me, I think @cor3ntin should also approve before
committing though.
https://github.com/llvm/llvm-project/pull/89565
___
cfe-commits mailing list
@@ -134,6 +134,8 @@ def err_fe_no_pch_in_dir : Error<
"no suitable precompiled header file found in directory '%0'">;
def err_fe_action_not_available : Error<
"action %0 not compiled in">;
+def err_fe_invalid_multiple_actions : Error<
+"action %0 is specified,
https://github.com/erichkeane commented:
CI seems to have noticed what I feared :) This is going to hit a good amount
of our internal tests, there is no way our copy-paste cargo-cult didn't come up
with this before.
https://github.com/llvm/llvm-project/pull/91140
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/91140
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1779,9 +1779,8 @@ void Parser::ParseClassSpecifier(tok::TokenKind
TagTokKind,
tok::kw___is_union,
tok::kw___is_unsigned,
tok::kw___is_void,
- tok::kw___is_volatile,
- tok::kw___reference_binds_to_temporary,
-
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/91199
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane commented:
Seems reasonable to me. Curious about 1 change though.
https://github.com/llvm/llvm-project/pull/91199
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s
erichkeane wrote:
> We don't have any IR to test just yet. @lanza you could use `FileCheck` with
> `--allow-empty` here for now. You could also rename this test
@@ -42,6 +47,14 @@ CreateFrontendBaseAction(CompilerInstance ) {
StringRef Action("unknown");
(void)Action;
+ auto UseCIR = CI.getFrontendOpts().UseClangIRPipeline;
erichkeane wrote:
Thats a question I think for @AaronBallman . This DOES live in the
@@ -0,0 +1,61 @@
+//=== CIRGenAction.h - CIR Code Generation Frontend Action -*- C++
-*--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s
erichkeane wrote:
Would still like this to 'pipe' to filecheck. In addition to 'not crash', it
would be worthwhile to ensure we emit sensible IR.
@@ -42,6 +47,14 @@ CreateFrontendBaseAction(CompilerInstance ) {
StringRef Action("unknown");
(void)Action;
+ auto UseCIR = CI.getFrontendOpts().UseClangIRPipeline;
erichkeane wrote:
Coding standard doesn't allow use of 'auto' here, only when the actual
@@ -0,0 +1,61 @@
+//===--- CIRGenModule.h - Per-Module state for CIR gen --*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,59 @@
+//===- CIRGenerator.h - CIR Generation from Clang AST
-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -53,8 +66,13 @@ CreateFrontendBaseAction(CompilerInstance ) {
case DumpTokens: return std::make_unique();
case EmitAssembly: return std::make_unique();
case EmitBC: return std::make_unique();
+#if CLANG_ENABLE_CIR
+ case EmitCIR:
@@ -0,0 +1,61 @@
+//===--- CIRGenModule.h - Per-Module state for CIR gen --*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,61 @@
+//=== CIRGenAction.h - CIR Code Generation Frontend Action -*- C++
-*--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
https://github.com/erichkeane approved this pull request.
No need for release notes,as you said, this is a fix within this release.
https://github.com/llvm/llvm-project/pull/90999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
erichkeane wrote:
> @erichkeane I think this is actually a bug in how I applied [[temp.dep.type]
> p5](http://eel.is/c++draft/temp.dep.type#5):
>
> > A qualified name is dependent if
> >
> > * it is a _conversion-function-id_ whose _conversion-type-id_ is dependent,
> > or
> > * its lookup
@@ -79,3 +79,16 @@ float V7 = []() -> float {
0x0.01p0F);
}();
// CHECK: @V7 = {{.*}} float 1.00e+00
+
+template struct L {
+ constexpr L() : value(V) {}
+ float value;
+};
+
+#pragma STDC FENV_ROUND FE_DOWNWARD
erichkeane wrote:
>Does this test
erichkeane wrote:
> This seems to break the version of libstdc++ we use in our sysroot: (Details
> on https://crbug.com/338536261)
>
> ```
> ../../build/linux/debian_bullseye_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_iterator.h:1718:20:
> error: use
@@ -79,3 +79,16 @@ float V7 = []() -> float {
0x0.01p0F);
}();
// CHECK: @V7 = {{.*}} float 1.00e+00
+
+template struct L {
+ constexpr L() : value(V) {}
+ float value;
+};
+
+#pragma STDC FENV_ROUND FE_DOWNWARD
erichkeane wrote:
> In this snippet
@@ -79,3 +79,16 @@ float V7 = []() -> float {
0x0.01p0F);
}();
// CHECK: @V7 = {{.*}} float 1.00e+00
+
+template struct L {
+ constexpr L() : value(V) {}
+ float value;
+};
+
+#pragma STDC FENV_ROUND FE_DOWNWARD
erichkeane wrote:
Ah, I see that
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/90877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/89019
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -79,3 +79,16 @@ float V7 = []() -> float {
0x0.01p0F);
}();
// CHECK: @V7 = {{.*}} float 1.00e+00
+
+template struct L {
+ constexpr L() : value(V) {}
+ float value;
+};
+
+#pragma STDC FENV_ROUND FE_DOWNWARD
erichkeane wrote:
I meant something
https://github.com/erichkeane commented:
I'm still OK with this, but @shafik : Please ensure this has the test coverage
you asked for.
https://github.com/llvm/llvm-project/pull/90500
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/erichkeane commented:
This is introducing a new type that has a pretty subtle difference vs others.
Can we have some documentation in the internals manual explaining the
difference?
Code wise, I think this looks fine.
https://github.com/llvm/llvm-project/pull/89019
https://github.com/erichkeane approved this pull request.
I think I'm ok with this, please give others a day or two to sign off as well.
https://github.com/llvm/llvm-project/pull/90894
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
erichkeane wrote:
> @yxsamliu The type of `this` is always a pointer. The class member access
> operator may only be overloaded for operands of class type. In your reduced
> example, could you provide a value of `T` that would instantiate to a valid
> specialization?
Agreed, this is another
erichkeane wrote:
>This is the option I've decided to go with here. There's a slight wrinkle in
>that we create a LookupResult that claims we looked up the unnamed field for
>the anonymous class -- even though we would obviously never be able to look up
>an unnamed field. I think this is
erichkeane wrote:
Also, test failures are related to this patch!
https://github.com/llvm/llvm-project/pull/90877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3858,7 +3858,8 @@ static Expr *BuildFloatingLiteral(Sema ,
NumericLiteralParser ,
using llvm::APFloat;
APFloat Val(Format);
- APFloat::opStatus result = Literal.GetFloatValue(Val);
+ APFloat::opStatus result =
erichkeane wrote:
Does this work
https://github.com/erichkeane commented:
probably needs a release note
https://github.com/llvm/llvm-project/pull/90877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/90877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
Also needs release note.
https://github.com/llvm/llvm-project/pull/90894
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2803,7 +2803,207 @@ getRHSTemplateDeclAndArgs(Sema ,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
-// Build deduction guides for a type alias template.
+// Build deduction guides for a type alias template from the given underlying
@@ -261,6 +261,13 @@ AG ag = {1};
// CHECK: | `-BuiltinType {{.*}} 'int'
// CHECK: `-ParmVarDecl {{.*}} 'int'
+template
+using BG = G;
+BG bg = {1.0};
+// CHECK-LABEL: Dumping
+// CHECK: FunctionTemplateDecl
erichkeane wrote:
Could these be
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/90796
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/90796
>From ac69522bf15c7c169c4cdb9d3d1547c5c0962193 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Tue, 30 Apr 2024 11:42:35 -0700
Subject: [PATCH 1/2] [OpenACC} Implement SubArray Parsing/Sema
This
erichkeane wrote:
I think the `-fdelayed-template-parsing` is as much as we're going to do. This
is a conformance issue, and I don't think we want to create a backwards
compatibility flag for it.
Clang has ALWAYS diagnosed un-instantiatable templates as aggressively as we
could. ALL of the
https://github.com/erichkeane created
https://github.com/llvm/llvm-project/pull/90796
This implementation takes quite a bit from the OMP implementation of array
sections, but only has to enforce the rules as applicable to OpenACC.
Additionally, it does its best to create an AST node (with
https://github.com/erichkeane commented:
This seems reasonable to me. We need a release note however.
https://github.com/llvm/llvm-project/pull/90625
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/erichkeane commented:
This seems reasonable, @mizvekov is doing more work in this area, so I'd like
him to make sure this isn't something he's fixed elsewhere.
https://github.com/llvm/llvm-project/pull/90646
___
cfe-commits mailing
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/90521
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -166,3 +176,9 @@ void OpenACCClausePrinter::VisitVectorLengthClause(
const OpenACCVectorLengthClause ) {
OS << "vector_length(" << C.getIntExpr() << ")";
}
+
+void OpenACCClausePrinter::VisitPrivateClause(const OpenACCPrivateClause ) {
+ OS << "private(";
+
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/90521
>From 54ba7d0b7d71d751cf268c3bdfb89bc5ca628a6b Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Mon, 22 Apr 2024 13:31:52 -0700
Subject: [PATCH 1/4] [OpenACC] Private Clause on Compute Constructs
The private
@@ -166,3 +176,9 @@ void OpenACCClausePrinter::VisitVectorLengthClause(
const OpenACCVectorLengthClause ) {
OS << "vector_length(" << C.getIntExpr() << ")";
}
+
+void OpenACCClausePrinter::VisitPrivateClause(const OpenACCPrivateClause ) {
+ OS << "private(";
+
@@ -423,6 +450,52 @@ ExprResult SemaOpenACC::ActOnIntExpr(OpenACCDirectiveKind
DK,
return IntExpr;
}
+ExprResult SemaOpenACC::ActOnVar(Expr *VarExpr) {
+ // We still need to retain the array subscript/subarray exprs, so work on a
+ // copy.
+ Expr *CurVarExpr =
@@ -134,6 +134,24 @@ OpenACCNumGangsClause *OpenACCNumGangsClause::Create(const
ASTContext ,
return new (Mem) OpenACCNumGangsClause(BeginLoc, LParenLoc, IntExprs,
EndLoc);
}
+OpenACCPrivateClause *OpenACCPrivateClause::Create(const ASTContext ,
+
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/90521
>From 54ba7d0b7d71d751cf268c3bdfb89bc5ca628a6b Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Mon, 22 Apr 2024 13:31:52 -0700
Subject: [PATCH 1/3] [OpenACC] Private Clause on Compute Constructs
The private
erichkeane wrote:
> I'd like someone to review the AST matcher changes (the code owner listed in
> `CodeOwners.rst` appears to be inactive).
Ah, yes! Unfortunately I think he's the best person to review, I don't know of
anyone familiar enough with the matchers. But he'll be back next week.
erichkeane wrote:
> Ping @AaronBallman
Aaron is on vacation this week, is there feedback from him that you're looking
for?
https://github.com/llvm/llvm-project/pull/81642
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -958,13 +931,14 @@ Parser::OpenACCClauseParseResult
Parser::ParseOpenACCClauseParams(
case OpenACCClauseKind::Link:
case OpenACCClauseKind::NoCreate:
case OpenACCClauseKind::Present:
-case OpenACCClauseKind::Private:
case OpenACCClauseKind::UseDevice:
@@ -423,6 +450,52 @@ ExprResult SemaOpenACC::ActOnIntExpr(OpenACCDirectiveKind
DK,
return IntExpr;
}
+ExprResult SemaOpenACC::ActOnVar(Expr *VarExpr) {
+ // We still need to retain the array subscript/subarray exprs, so work on a
+ // copy.
+ Expr *CurVarExpr =
https://github.com/erichkeane approved this pull request.
This LGTM, but please give @efriedma-quic a day or two to confirm this looks
right for him too.
https://github.com/llvm/llvm-project/pull/90066
___
cfe-commits mailing list
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/89807
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
Corentin's request for a comment makes sense to me, or perhaps a better name th
an just 'D'? So please take care of his request, but otherwise LGTM.
https://github.com/llvm/llvm-project/pull/90517
@@ -11196,6 +11198,31 @@ void
OpenACCClauseTransform::VisitNumGangsClause(
ParsedClause.getLParenLoc(), ParsedClause.getIntExprs(),
ParsedClause.getEndLoc());
}
+
+template
+void OpenACCClauseTransform::VisitPrivateClause(
+const OpenACCPrivateClause ) {
+
@@ -423,6 +450,52 @@ ExprResult SemaOpenACC::ActOnIntExpr(OpenACCDirectiveKind
DK,
return IntExpr;
}
+ExprResult SemaOpenACC::ActOnVar(Expr *VarExpr) {
+ // We still need to retain the array subscript/subarray exprs, so work on a
+ // copy.
+ Expr *CurVarExpr =
@@ -958,13 +931,14 @@ Parser::OpenACCClauseParseResult
Parser::ParseOpenACCClauseParams(
case OpenACCClauseKind::Link:
case OpenACCClauseKind::NoCreate:
case OpenACCClauseKind::Present:
-case OpenACCClauseKind::Private:
case OpenACCClauseKind::UseDevice:
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/90521
>From 54ba7d0b7d71d751cf268c3bdfb89bc5ca628a6b Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Mon, 22 Apr 2024 13:31:52 -0700
Subject: [PATCH 1/2] [OpenACC] Private Clause on Compute Constructs
The private
https://github.com/erichkeane commented:
Missing test + release note.
In the future, please use 'draft pull request' when your patch is not ready for
review/to be committed.
https://github.com/llvm/llvm-project/pull/90517
___
cfe-commits mailing
https://github.com/erichkeane created
https://github.com/llvm/llvm-project/pull/90521
The private clause is the first that takes a 'var-list', thus this has a lot of
additional work to enable the var-list type. A 'var' is a traditional variable
reference, subscript, member-expression, or
https://github.com/erichkeane approved this pull request.
This looks fine enough to me. Aaron is away this week, so you can either let
him review this when he gets back, or just merge this and let him make comments
on followups/on the commit when he gets back.
https://github.com/erichkeane approved this pull request.
This needs a release note, likely in the 'potentially breaking changes'.
Projects are filled with code that is not ever instantiated, and Clang's
aggressive instantiation can be a problem.
Else, LGTM.
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/90495
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -16548,11 +16548,10 @@ static void CheckImplicitConversion(Sema , Expr *E,
QualType T,
std::string PrettySourceValue = toString(Value, 10);
std::string PrettyTargetValue = PrettyPrintInRange(Value, TargetRange);
-S.DiagRuntimeBehavior(
-
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/90466
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/90240
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -107,3 +107,17 @@ auto FooFunc(C auto V) -> C decltype(auto) {
}
}
+
+namespace dump_unreslove_lookup_arguments {
erichkeane wrote:
This is the wrong file for this, it is meant for `concepts`, which this isn't
really related to.
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/90152
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane commented:
Code changes LGTM, please add the tests, and I'll do another run at this.
https://github.com/llvm/llvm-project/pull/90152
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
erichkeane wrote:
Please also identify the changes you made vs the previous patch.
https://github.com/llvm/llvm-project/pull/90152
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1753,17 +1740,18 @@ Possible Questions
How modules speed up compilation
-A classic theory for the reason why modules speed up the compilation is:
-if there are ``n`` headers and ``m`` source files and each header is included
by each
@@ -8,79 +8,60 @@ Standard C++ Modules
Introduction
-The term ``modules`` has a lot of meanings. For the users of Clang, modules may
-refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header
Modules``,
-etc.) or ``Standard C++ Modules``. The
@@ -998,25 +992,23 @@ headers to:
...
#endif
-If the modules imported by your library provides such headers too, remember to
add them to
-your ``your_library_imported.h`` too.
+If the modules imported by the library provide such headers, remember to add
+them to
@@ -1222,33 +1214,31 @@ One often reported example is:
export module repro;
export import :part;
-Currently the compiler complains about the inconsistent definition of `fun()`
in
-2 module units. This is incorrect. Since both definitions of `fun()` has the
same
@@ -738,22 +736,21 @@ the following style significantly:
import M;
... // use declarations from module M.
-The key part of the tip is to reduce the duplications from the text includes.
+Reducing the duplication from textual includes is what improves compile-time
@@ -925,45 +923,41 @@ In that case, you need to convert your source files (.cpp
files) to module imple
// Following off should be unchanged.
...
-The module implementation unit will import the primary module implicitly.
-We don't include any headers in the module
@@ -738,22 +736,21 @@ the following style significantly:
import M;
... // use declarations from module M.
-The key part of the tip is to reduce the duplications from the text includes.
+Reducing the duplication from textual includes is what improves compile-time
@@ -577,15 +574,16 @@ the generated BMI specified by ``-o`` will be full BMI
and the BMI specified by
-> ...
-> consumer_n.cpp
-We don't emit diagnostics if
@@ -875,11 +872,11 @@ The pattern for ABI breaking style is similar with export
extern-C++ style.
}
#endif
-(And add `EXPORT` and conditional include to the headers as suggested in the
export
-extern-C++ style section)
+(And add `EXPORT` and conditional include to the
@@ -216,51 +198,56 @@ We explain the options in the following sections.
How to enable standard C++ modules
~~
-Currently, standard C++ modules are enabled automatically
-if the language standard is ``-std=c++20`` or newer.
+Standard C++ modules
@@ -289,20 +277,20 @@ we can't compile them by the original command lines. But
we are still able to do
$ ./Hello.out
Hello World!
-Module name requirement
-~~~
+Module name requirements
+
-[module.unit]p1 says:
+..
-..
@@ -312,75 +300,76 @@ So all of the following name is not valid by default:
__test
// and so on ...
-If you still want to use the reserved module names for any reason, use
-``-Wno-reserved-module-identifier`` to suppress the warning.
+Using a reserved module name is
@@ -312,75 +300,76 @@ So all of the following name is not valid by default:
__test
// and so on ...
-If you still want to use the reserved module names for any reason, use
-``-Wno-reserved-module-identifier`` to suppress the warning.
+Using a reserved module name is
@@ -138,7 +120,7 @@ Let's see a "hello world" example that uses modules.
return 0;
}
-Then we type:
+From the command line, enter:
erichkeane wrote:
Then, on the command line, invoke clang like:
https://github.com/llvm/llvm-project/pull/90237
@@ -312,75 +300,76 @@ So all of the following name is not valid by default:
__test
// and so on ...
-If you still want to use the reserved module names for any reason, use
-``-Wno-reserved-module-identifier`` to suppress the warning.
+Using a reserved module name is
@@ -530,43 +527,43 @@ Now the linkage name of ``NS::foo()`` will be
``_ZN2NS3fooEv``.
Module Initializers
~~~
-All the importable module units are required to emit an initializer function.
-The initializer function should contain calls to importing modules
201 - 300 of 2361 matches
Mail list logo