diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-06-01 15:55:51 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-06-01 15:55:51 +0000 |
commit | 3617e198aa89d4aa0921343a22b96823a63f8a58 (patch) | |
tree | 573eb5adae2109861deeeaf665772cf2b8d34248 /lib | |
parent | 17e37c7959d60d8bfcbc8cb5630d3101ae583be5 (diff) |
The expression in a noexcept exception-specification is a
constant-expression, and, therefore, an unevaluated operand. Make it
so.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132400 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiateDecl.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index adf9b2f3cb..cd08b1e3df 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -2239,6 +2239,7 @@ TemplateDeclInstantiator::InitFunctionInstantiation(FunctionDecl *New, } Expr *NoexceptExpr = 0; if (Expr *OldNoexceptExpr = Proto->getNoexceptExpr()) { + EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated); ExprResult E = SemaRef.SubstExpr(OldNoexceptExpr, TemplateArgs); if (E.isUsable()) NoexceptExpr = E.take(); |