[all-commits] [llvm/llvm-project] 892df3: Fix interaction of `constinit` and `weak`.
Richard Smith via All-commits
all-commits at lists.llvm.org
Wed Sep 30 10:50:13 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 892df30a7f344b6cb9995710efbc94bb25cfb95b
https://github.com/llvm/llvm-project/commit/892df30a7f344b6cb9995710efbc94bb25cfb95b
Author: Richard Smith <richard at metafoo.co.uk>
Date: 2020-09-30 (Wed, 30 Sep 2020)
Changed paths:
M clang/lib/AST/Decl.cpp
M clang/lib/AST/ExprConstant.cpp
M clang/lib/Sema/SemaDeclCXX.cpp
A clang/test/SemaCXX/cxx20-constinit.cpp
Log Message:
-----------
Fix interaction of `constinit` and `weak`.
We previously took a shortcut and said that weak variables never have
constant initializers (because those initializers are never correct to
use outside the variable). We now say that weak variables can have
constant initializers, but are never usable in constant expressions.
More information about the All-commits
mailing list