History log of /llvm-project/clang/lib/Sema/SemaModule.cpp (Results 76 – 98 of 98)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# fb3a2d45 24-Feb-2022 Benjamin Kramer <benny.kra@googlemail.com>

[Sema] Silence unused variable warning in Release builds. NFC.


# 69350e56 07-Feb-2021 Iain Sandoe <iain@sandoe.co.uk>

[C++20][Modules][3/8] Initial handling for module partitions.

This implements the parsing and recognition of module partition CMIs
and removes the FIXMEs in the parser.

Module partitions are recogn

[C++20][Modules][3/8] Initial handling for module partitions.

This implements the parsing and recognition of module partition CMIs
and removes the FIXMEs in the parser.

Module partitions are recognised in the base computation of visibility,
however additional amendments to visibility follow in subsequent patches.

Differential Revision: https://reviews.llvm.org/D118586

show more ...


# c9cc8035 29-Nov-2021 Iain Sandoe <iain@sandoe.co.uk>

[C++20][Modules][2/8] Add enumerations for partition modules and stream them.

This is an initial enabling patch for module partition support.
We add enumerations for partition interfaces/implementat

[C++20][Modules][2/8] Add enumerations for partition modules and stream them.

This is an initial enabling patch for module partition support.
We add enumerations for partition interfaces/implementations.

This means that the module kind enumeration now occupies three
bits, so the AST streamer is adjusted for this. Adding one bit there
seems preferable to trying to overload the meanings of existing
kinds (and we will also want to add a C++20 header unit case later).

Differential Revision: https://reviews.llvm.org/D114714

show more ...


# ab28488e 11-Feb-2021 Iain Sandoe <iain@sandoe.co.uk>

[C++20][Modules][1/8] Track valid import state.

In C++20 modules imports must be together and at the start of the module.
Rather than growing more ad-hoc flags to test state, this keeps track of the

[C++20][Modules][1/8] Track valid import state.

In C++20 modules imports must be together and at the start of the module.
Rather than growing more ad-hoc flags to test state, this keeps track of the
phase of of a valid module TU (first decl, global module frag, module,
private module frag). If the phasing is broken (with some diagnostic) the
pattern does not conform to a valid C++20 module, and we set the state
accordingly.

We can thus issue diagnostics when imports appear in the wrong places and
decouple the C++20 modules state from other module variants (modules-ts and
clang modules). Additionally, we attempt to diagnose wrong imports before
trying to find the module where possible (the latter will generally emit an
unhelpful diagnostic about the module not being available).

Although this generally simplifies the handling of C++20 module import
diagnostics, the motivation was that, in particular, it allows detecting
invalid imports like:

import module A;

int some_decl();

import module B;

where being in a module purview is insufficient to identify them.

Differential Revision: https://reviews.llvm.org/D118893

show more ...


# 67387924 20-Feb-2022 Iain Sandoe <iain@sandoe.co.uk>

Revert "[C++20][Modules][1/8] Track valid import state."

This reverts commit 8a3f9a584ad43369cf6a034dc875ebfca76d9033.

need to investigate build failures that do not show on CI or local
testing.


# 8a3f9a58 11-Feb-2021 Iain Sandoe <iain@sandoe.co.uk>

[C++20][Modules][1/8] Track valid import state.

In C++20 modules imports must be together and at the start of the module.
Rather than growing more ad-hoc flags to test state, this keeps track of the

[C++20][Modules][1/8] Track valid import state.

In C++20 modules imports must be together and at the start of the module.
Rather than growing more ad-hoc flags to test state, this keeps track of the
phase of of a valid module TU (first decl, global module frag, module,
private module frag). If the phasing is broken (with some diagnostic) the
pattern does not conform to a valid C++20 module, and we set the state
accordingly.

We can thus issue diagnostics when imports appear in the wrong places and
decouple the C++20 modules state from other module variants (modules-ts and
clang modules). Additionally, we attempt to diagnose wrong imports before
trying to find the module where possible (the latter will generally emit an
unhelpful diagnostic about the module not being available).

Although this generally simplifies the handling of C++20 module import
diagnostics, the motivation was that, in particular, it allows detecting
invalid imports like:

import module A;

int some_decl();

import module B;

where being in a module purview is insufficient to identify them.

Differential Revision: https://reviews.llvm.org/D118893

show more ...


# 3504937d 08-Feb-2022 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[C++20] [Modules] Don't create multiple global module fragment

Since the serialization code would recognize modules by names and the
name of all global module fragment is <global>, so that the
seria

[C++20] [Modules] Don't create multiple global module fragment

Since the serialization code would recognize modules by names and the
name of all global module fragment is <global>, so that the
serialization code would complain for the same module.

This patch fixes this by using a unique global module fragment in Sema.
Before this patch, the compiler would fail on an assertion complaining
the duplicated modules.

Reviewed By: urnathan, rsmith

Differential Revision: https://reviews.llvm.org/D115610

show more ...


# ba845787 04-Jan-2022 Timm Bäder <tbaeder@redhat.com>

[clang][sema] Add missing diagnostic parameter

The test case otherwise fails an assertion in Diagnostic::getArgKind().

Differential Revision: https://reviews.llvm.org/D116595


# 4f8916cf 14-Jan-2022 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[C++20] [Modules] Exit early if export decl is not valid

This patch fixes a crash due to following simple program:
> export struct Unit {
> bool operator<(const Unit&);
> };

It would crash since

[C++20] [Modules] Exit early if export decl is not valid

This patch fixes a crash due to following simple program:
> export struct Unit {
> bool operator<(const Unit&);
> };

It would crash since the compiler would set the module ownership for
Unit. And the declaration with a module ownership is assumed to own a
module. But here isn't one. So here is the crash.

This patch fixes this by exiting early if it finds the export decl is
already invalid.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D117093

show more ...


# 86b001a9 23-Dec-2021 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[C++20] [Modules] Mark imported module as imported if not exported

In C++20 Modules, imported module which doesn't get exported wouldn't be
recorded. This patch would record such modules to avoid po

[C++20] [Modules] Mark imported module as imported if not exported

In C++20 Modules, imported module which doesn't get exported wouldn't be
recorded. This patch would record such modules to avoid possible
incorrect visibility problems.

Reviewed By: urnathan

Differential Revision: https://reviews.llvm.org/D116098

show more ...


# 1e2c31c6 23-Dec-2021 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

Revert "[C++20] [Coroutines] Mark imported module as imported if not exported"

This reverts commit 368318bcce66d9fef420fc34cca361b79d80cee5.

The title is not right. It should be a patch about modul

Revert "[C++20] [Coroutines] Mark imported module as imported if not exported"

This reverts commit 368318bcce66d9fef420fc34cca361b79d80cee5.

The title is not right. It should be a patch about modules instead of
coroutines.

show more ...


# 368318bc 23-Dec-2021 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[C++20] [Coroutines] Mark imported module as imported if not exported

In C++20 Modules, imported module which doesn't get exported wouldn't be
recorded. This patch would record such modules to avoid

[C++20] [Coroutines] Mark imported module as imported if not exported

In C++20 Modules, imported module which doesn't get exported wouldn't be
recorded. This patch would record such modules to avoid possible
incorrect visibility problems.

Reviewed By: urnathan

Differential Revision: https://reviews.llvm.org/D116098

show more ...


# 4168efe1 08-Dec-2021 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[NFC] Fix C++20 module test in PPC and warning


# e587372f 08-Dec-2021 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[C++20] [Module] Support extern C/C++ semantics

According to [module.unit]p7.2.3, a declaration within a linkage-specification
should be attached to the global module.
This let user to forward decla

[C++20] [Module] Support extern C/C++ semantics

According to [module.unit]p7.2.3, a declaration within a linkage-specification
should be attached to the global module.
This let user to forward declare types across modules.

Reviewed by: rsmith, aaron.ballman

Differential Revision: https://reviews.llvm.org/D110215

show more ...


# 9f151df1 20-Oct-2020 Duncan P. N. Exon Smith <dexonsmith@apple.com>

Change Module::ASTFile and ModuleFile::File => Optional<FileEntryRef>, NFC

Change `Module::ASTFile` and `ModuleFile::File` to use
`Optional<FileEntryRef>` instead of `const FileEntry *`. One of many

Change Module::ASTFile and ModuleFile::File => Optional<FileEntryRef>, NFC

Change `Module::ASTFile` and `ModuleFile::File` to use
`Optional<FileEntryRef>` instead of `const FileEntry *`. One of many
steps toward removing `FileEntry::getName`.

Differential Revision: https://reviews.llvm.org/D89836

show more ...


Revision tags: llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1
# c63f1b16 07-Nov-2019 Ehud Katz <ehudkatz@gmail.com>

[DeclCXX] Remove unknown external linkage specifications

Partial revert of r372681 "Support for DWARF-5 C++ language tags".

The change introduced new external linkage languages ("C++11" and
"C++14"

[DeclCXX] Remove unknown external linkage specifications

Partial revert of r372681 "Support for DWARF-5 C++ language tags".

The change introduced new external linkage languages ("C++11" and
"C++14") which not supported in C++.

It also changed the definition of the existing enum to use the DWARF
constants. The problem is that "LinkageSpecDeclBits.Language" (the field
that reserves this enum) is actually defined as 3 bits length
(bitfield), which cannot contain the new DWARF constants. Defining the
enum as integer literals is more appropriate for maintaining valid
values.

Differential Revision: https://reviews.llvm.org/D69935

show more ...


# 350de4f0 24-Sep-2019 Adrian Prantl <aprantl@apple.com>

Support for DWARF-5 C++ language tags.

This patch provides support for DW_LANG_C_plus_plus_11,
DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend.

Patch by Sourabh Singh Tomar!
Differential Revi

Support for DWARF-5 C++ language tags.

This patch provides support for DW_LANG_C_plus_plus_11,
DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend.

Patch by Sourabh Singh Tomar!
Differential Revision: https://reviews.llvm.org/D67613

Reapplies r372663 after adapting a failing test in the LLDB testsuite.

llvm-svn: 372681

show more ...


# 5c49c267 23-Sep-2019 Jonas Devlieghere <jonas@devlieghere.com>

Revert "Support for DWARF-5 C++ language tags."

This reverts commit bf9c8ffb54943c6d77398adbedddf05ef9724007.

llvm-svn: 372672


# bf9c8ffb 23-Sep-2019 Adrian Prantl <aprantl@apple.com>

Support for DWARF-5 C++ language tags.

This patch provides support for DW_LANG_C_plus_plus_11,
DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend.

Patch by Sourabh Singh Tomar!
Differential Revi

Support for DWARF-5 C++ language tags.

This patch provides support for DW_LANG_C_plus_plus_11,
DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend.

Patch by Sourabh Singh Tomar!
Differential Revision: https://reviews.llvm.org/D67613

llvm-svn: 372663

show more ...


Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init
# 49a3ad21 16-Jul-2019 Rui Ueyama <ruiu@google.com>

Fix parameter name comments using clang-tidy. NFC.

This patch applies clang-tidy's bugprone-argument-comment tool
to LLVM, clang and lld source trees. Here is how I created this
patch:

$ git clone

Fix parameter name comments using clang-tidy. NFC.

This patch applies clang-tidy's bugprone-argument-comment tool
to LLVM, clang and lld source trees. Here is how I created this
patch:

$ git clone https://github.com/llvm/llvm-project.git
$ cd llvm-project
$ mkdir build
$ cd build
$ cmake -GNinja -DCMAKE_BUILD_TYPE=Debug \
-DLLVM_ENABLE_PROJECTS='clang;lld;clang-tools-extra' \
-DCMAKE_EXPORT_COMPILE_COMMANDS=On -DLLVM_ENABLE_LLD=On \
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ../llvm
$ ninja
$ parallel clang-tidy -checks='-*,bugprone-argument-comment' \
-config='{CheckOptions: [{key: StrictMode, value: 1}]}' -fix \
::: ../llvm/lib/**/*.{cpp,h} ../clang/lib/**/*.{cpp,h} ../lld/**/*.{cpp,h}

llvm-svn: 366177

show more ...


Revision tags: llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1
# e181de7f 22-Apr-2019 Richard Smith <richard-llvm@metafoo.co.uk>

[c++2a] Implement semantic restrictions for 'export' declarations.

llvm-svn: 358932


# a5bbbfef 18-Apr-2019 Richard Smith <richard-llvm@metafoo.co.uk>

[c++2a] Add semantic support for private module fragments.

llvm-svn: 358713


# b7bdb8cf 18-Apr-2019 Richard Smith <richard-llvm@metafoo.co.uk>

Split out modules-specific declaration handling from SemaDecl.cpp into a
new SemaModule.cpp.

llvm-svn: 358633


1234