diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-04 04:00:45 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-04 04:00:45 +0000 |
commit | e9b780230d2dde954d8f6750e05c4b89bc99f0d7 (patch) | |
tree | 986902e8e77e96df67f09829b2754f4fff6dba7c /test/Modules/odr_hash.cpp | |
parent | bd2061a19606a27c81bacdd54da40fb5736945c2 (diff) |
Disallow the operand of __builtin_constant_p from modifying enclosing
state when it's encountered while evaluating a constexpr function.
We attempt to follow GCC trunk's behavior here, but it is somewhat
inscrutible, so our behavior is only approximately the same for now.
Specifically, we only permit modification of objects whose lifetime
began within the operand of the __builtin_constant_p. GCC appears to
have effectively the same restriction, but also some unknown restriction
based on where and how the local state of the constexpr function is
mentioned within the operand (see added testcases).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules/odr_hash.cpp')
0 files changed, 0 insertions, 0 deletions