aboutsummaryrefslogtreecommitdiff
path: root/libcxx/src/algorithm.cpp
diff options
context:
space:
mode:
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>2024-10-30 17:27:04 +0800
committerGitHub <noreply@github.com>2024-10-30 17:27:04 +0800
commit259eaa6878ead1e2e7ef572a874dc3d885c1899b (patch)
tree6938a09f0c49ee7fc9f9f888cb3a83f0e0f0ade3 /libcxx/src/algorithm.cpp
parente61a7dc256bd530a0b9551e2732e5b5b77e2cd1e (diff)
downloadllvm-259eaa6878ead1e2e7ef572a874dc3d885c1899b.zip
llvm-259eaa6878ead1e2e7ef572a874dc3d885c1899b.tar.gz
llvm-259eaa6878ead1e2e7ef572a874dc3d885c1899b.tar.bz2
[C++20] [Modules] Fix the duplicated static initializer problem (#114193)
Reproducer: ``` //--- a.cppm export module a; int func(); static int a = func(); //--- a.cpp import a; ``` The `func()` should only execute once. However, before this patch we will somehow import `static int a` from a.cppm incorrectly and initialize that again. This is super bad and can introduce serious runtime behaviors. And also surprisingly, it looks like the root cause of the problem is simply some oversight choosing APIs.
Diffstat (limited to 'libcxx/src/algorithm.cpp')
0 files changed, 0 insertions, 0 deletions