[Sema] Discarded statment should be an evaluatable context.
authorErik Pilkington <erik.pilkington@gmail.com>
Tue, 3 Jul 2018 22:15:36 +0000 (22:15 +0000)
committerErik Pilkington <erik.pilkington@gmail.com>
Tue, 3 Jul 2018 22:15:36 +0000 (22:15 +0000)
commitf5d83f376813c8adbd94bdc498225f75d3adaffd
tree53ef4704584ffb52f143d035a7852c9ea252e81e
parent78ab286aa00a7147a60229674376f9203d7032e2
[Sema] Discarded statment should be an evaluatable context.

The constexpr evaluator was erroring out because these templates weren't
defined. Despite being used in a discarded statement, we still need to constexpr
evaluate them, which means that we need to instantiate them. Fixes PR37585.

Differential revision: https://reviews.llvm.org/D48322

llvm-svn: 336233
clang/lib/Sema/SemaExpr.cpp
clang/test/SemaCXX/constant-expression-cxx1z.cpp