[all-commits] [llvm/llvm-project] cb2289: [C++20] [Modules] Attach implicitly declared alloc...
Chuanqi Xu via All-commits
all-commits at lists.llvm.org
Tue Nov 15 01:27:49 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cb2289f39240a0fdccc9a853a02ae9751578a0fd
https://github.com/llvm/llvm-project/commit/cb2289f39240a0fdccc9a853a02ae9751578a0fd
Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
Date: 2022-11-15 (Tue, 15 Nov 2022)
Changed paths:
M clang/lib/Basic/Module.cpp
M clang/lib/Sema/SemaExprCXX.cpp
A clang/test/Modules/implicit-declared-allocation-functions.cppm
M clang/unittests/AST/DeclTest.cpp
Log Message:
-----------
[C++20] [Modules] Attach implicitly declared allocation funcitons to
global module fragment
[basic.stc.dynamic.general]p2 says:
> The library provides default definitions for the global allocation
> and deallocation functions. Some global allocation and
> deallocation
> functions are replaceable ([new.delete]); these are attached to
> the global module ([module.unit]).
But we didn't take this before and the implicitly generated functions
will live in the module purview if we're compiling a module unit. This
is bad since the owning module will affect the linkage of the
declarations. This patch addresses this.
Closes https://github.com/llvm/llvm-project/issues/58560
More information about the All-commits
mailing list