]> granicus.if.org Git - clang/commit
[Sema] Note when we encounter a problem in ExprConstant.
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Wed, 25 May 2016 22:31:54 +0000 (22:31 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Wed, 25 May 2016 22:31:54 +0000 (22:31 +0000)
commit90ce5cd716419c04a9402de118534ecb5f279ede
tree086cf2d658144b494188c2d6a9d387faf41fa54f
parent5d58ec90417dd7a912109e582a67905a9ece2351
[Sema] Note when we encounter a problem in ExprConstant.

Currently, the constexpr evaluator is very conservative about unmodeled
side-effects when we're evaluating an expression in a mode that allows
such side-effects.

This patch makes us note when we might have actually encountered an
unmodeled side-effect, which allows us to be more accurate when we know
an unmodeled side-effect couldn't have occurred.

This patch has been split into two commits; this one primarily
introduces the bits necessary to track whether we might have potentially
hit such a side-effect. The one that actually does the tracking (which
boils down to more or less a rename of keepEvaluatingAfterFailure to
noteFailure) is coming soon.

Differential Revision: http://reviews.llvm.org/D18540

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270781 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ExprConstant.cpp
test/SemaCXX/builtin-object-size-cxx14.cpp [new file with mode: 0644]
test/SemaCXX/constant-expression-cxx1y.cpp